1
1
import * as commandLineArgs from "command-line-args" ;
2
- import { Options } from "../options" ;
2
+ import { Access , Options } from "../options" ;
3
3
import { ExitCode } from "./exit-code" ;
4
4
import { usageText } from "./help" ;
5
5
@@ -24,11 +24,13 @@ export function parseArgs(argv: string[]): ParsedArgs {
24
24
{ name : "token" , type : String } ,
25
25
{ name : "registry" , type : String } ,
26
26
{ name : "package" , type : String , defaultOption : true } ,
27
+ { name : "tag" , type : String } ,
28
+ { name : "access" , type : String } ,
29
+ { name : "dry-run" , type : Boolean } ,
27
30
{ name : "debug" , alias : "d" , type : Boolean } ,
28
31
{ name : "quiet" , alias : "q" , type : Boolean } ,
29
32
{ name : "version" , alias : "v" , type : Boolean } ,
30
33
{ name : "help" , alias : "h" , type : Boolean } ,
31
- { name : "dry-run" , type : Boolean }
32
34
] ,
33
35
{ argv }
34
36
) ;
@@ -48,9 +50,11 @@ export function parseArgs(argv: string[]): ParsedArgs {
48
50
token : args . token as string ,
49
51
registry : args . registry as string ,
50
52
package : args . package as string ,
53
+ tag : args . tag as string ,
54
+ access : args . access as Access ,
55
+ dryRun : args [ "dry-run" ] as boolean ,
51
56
debug : args . debug ? console . debug : undefined ,
52
57
quiet : args . quiet as boolean ,
53
- dryRun : args [ "dry-run" ] as boolean
54
58
}
55
59
} ;
56
60
0 commit comments