1
1
import program from 'commander' ;
2
2
import leven from 'leven' ;
3
- import { packageCommand , ls } from './package' ;
3
+ import { packageCommand , ls , Targets } from './package' ;
4
4
import { publish , unpublish } from './publish' ;
5
5
import { show } from './show' ;
6
6
import { search } from './search' ;
@@ -55,6 +55,8 @@ function main(task: Promise<any>): void {
55
55
} ) ;
56
56
}
57
57
58
+ const ValidTargets = [ ...Targets ] . join ( ', ' ) ;
59
+
58
60
module . exports = function ( argv : string [ ] ) : void {
59
61
program . version ( pkg . version ) . usage ( '<command>' ) ;
60
62
@@ -81,7 +83,7 @@ module.exports = function (argv: string[]): void {
81
83
. command ( 'package [version]' )
82
84
. description ( 'Packages an extension' )
83
85
. option ( '-o, --out <path>' , 'Output .vsix extension file to <path> location (defaults to <name>-<version>.vsix)' )
84
- . option ( '-t, --target <target>' , ' Target architecture' )
86
+ . option ( '-t, --target <target>' , ` Target architecture. Valid targets: ${ ValidTargets } ` )
85
87
. option ( '-m, --message <commit message>' , 'Commit message used when calling `npm version`.' )
86
88
. option (
87
89
'--no-git-tag-version' ,
@@ -167,7 +169,7 @@ module.exports = function (argv: string[]): void {
167
169
'Personal Access Token (defaults to VSCE_PAT environment variable)' ,
168
170
process . env [ 'VSCE_PAT' ]
169
171
)
170
- . option ( '-t, --target <targets...>' , ' Target architectures' )
172
+ . option ( '-t, --target <targets...>' , ` Target architectures. Valid targets: ${ ValidTargets } ` )
171
173
. option ( '-m, --message <commit message>' , 'Commit message used when calling `npm version`.' )
172
174
. option (
173
175
'--no-git-tag-version' ,
0 commit comments