@@ -39,8 +39,8 @@ var dependencies$1 = {
39
39
cac : "^6.7.14" ,
40
40
execa : "5.1.1" ,
41
41
kolorist : "^1.5.1" ,
42
- prompts : "^2.4.2 " ,
43
- "node-fetch" : "2.6.6 "
42
+ "node-fetch" : "2.6.6 " ,
43
+ prompts : "^2.4.2 "
44
44
} ;
45
45
var pkg$1 = {
46
46
name : name$1 ,
@@ -487,7 +487,6 @@ const testRegistry = async (registry) => {
487
487
} ) ;
488
488
status = response . ok ;
489
489
} catch ( error ) {
490
- console . log ( error ) ;
491
490
isTimeout = error . type === "request-timeout" ;
492
491
}
493
492
return {
@@ -518,8 +517,8 @@ const useTest = async (cmd) => {
518
517
await iterator ;
519
518
return ;
520
519
}
521
- if ( cmd . packageManager ) {
522
- const registry2 = registryList . find ( ( x ) => x . alias === cmd . packageManager ) ;
520
+ if ( cmd . registry ) {
521
+ const registry2 = registryList . find ( ( x ) => x . alias === cmd . registry || x . name === cmd . registry ) ;
523
522
if ( registry2 )
524
523
await test ( registry2 ) ;
525
524
return ;
@@ -537,14 +536,14 @@ const useTest = async (cmd) => {
537
536
} )
538
537
}
539
538
] ) ;
540
- await test ( registry . registry ) ;
539
+ await test ( registry ) ;
541
540
} ;
542
541
543
542
const program = cac__default [ "default" ] ( "gnrm" ) ;
544
543
program . version ( useVersion ( ) ) ;
545
544
program . command ( "ls" , "\u5F53\u524D\u7528\u6237\u5217\u8868" ) . option ( "-p, --packageManager <packageManager>" , "\u67E5\u770B\u5BF9\u5E94\u5305\u7BA1\u7406\u5668\uFF1A\u9ED8\u8BA4npm" ) . action ( useLs ) ;
546
- program . command ( "use [name]" , "\u5207\u6362\u955C\u50CF\u6E90" ) . option ( "-p, --packageManager <packageManager>" , "\u8BBE\u7F6E\u5BF9\u5E94\u5305\u7BA1\u7406\u5668\uFF1A\u9ED8\u8BA4npm" ) . action ( useUse ) ;
547
- program . command ( "test" , "\u5207\u6362\u955C\u50CF\u6E90" ) . option ( "-p , --packageManager <packageManager >" , "\u6D4B\u8BD5\u5BF9\u5E94\u5305\u7BA1\u7406\u5668\uFF1A\u9ED8\u8BA4npm " ) . option ( "-a, --all" , "\u6D4B\u8BD5\u5B58\u5728\u7684\u955C\u50CF\u6E90" ) . action ( useTest ) ;
545
+ program . command ( "use [name]" , "\u5207\u6362\u955C\u50CF\u6E90" ) . option ( "-p, --registry <packageManager>" , "\u8BBE\u7F6E\u5BF9\u5E94\u5305\u7BA1\u7406\u5668\uFF1A\u9ED8\u8BA4npm" ) . action ( useUse ) ;
546
+ program . command ( "test" , "\u5207\u6362\u955C\u50CF\u6E90" ) . option ( "-r , --registry <registry >" , "\u6D4B\u8BD5\u6E90\u540D\u79F0\u6216\u8005\u522B\u540D " ) . option ( "-a, --all" , "\u6D4B\u8BD5\u5B58\u5728\u7684\u955C\u50CF\u6E90" ) . action ( useTest ) ;
548
547
program . command ( "add" , "\u6DFB\u52A0\u955C\u50CF" ) . option ( "-n, --name <name>" , "\u955C\u50CF\u540D\u79F0" ) . option ( "-r, --registry <registry>" , "\u955C\u50CF\u5730\u5740" ) . option ( "-a, --alias <alias>" , "\u955C\u50CF\u522B\u540D" ) . action ( useAdd ) ;
549
548
program . command ( "alias <origin> <target>" , "\u955C\u50CF\u6DFB\u52A0\u522B\u540D" ) . action ( useAlias ) ;
550
549
program . command ( "delete <name>" , "\u5220\u9664\u955C\u50CF" ) . action ( useDelete ) ;
0 commit comments