diff --git a/src/main.ts b/src/main.ts index 7aa9920b..2e37e18b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import program from 'commander'; import leven from 'leven'; -import { packageCommand, ls } from './package'; +import { packageCommand, ls, Targets } from './package'; import { publish, unpublish } from './publish'; import { show } from './show'; import { search } from './search'; @@ -55,6 +55,8 @@ function main(task: Promise): void { }); } +const ValidTargets = [...Targets].join(', '); + module.exports = function (argv: string[]): void { program.version(pkg.version).usage(''); @@ -81,7 +83,7 @@ module.exports = function (argv: string[]): void { .command('package [version]') .description('Packages an extension') .option('-o, --out ', 'Output .vsix extension file to location (defaults to -.vsix)') - .option('-t, --target ', 'Target architecture') + .option('-t, --target ', `Target architecture. Valid targets: ${ValidTargets}`) .option('-m, --message ', 'Commit message used when calling `npm version`.') .option( '--no-git-tag-version', @@ -167,7 +169,7 @@ module.exports = function (argv: string[]): void { 'Personal Access Token (defaults to VSCE_PAT environment variable)', process.env['VSCE_PAT'] ) - .option('-t, --target ', 'Target architectures') + .option('-t, --target ', `Target architectures. Valid targets: ${ValidTargets}`) .option('-m, --message ', 'Commit message used when calling `npm version`.') .option( '--no-git-tag-version', diff --git a/src/package.ts b/src/package.ts index e27f9f1e..e3669af6 100644 --- a/src/package.ts +++ b/src/package.ts @@ -350,7 +350,7 @@ export async function versionBump(options: IVersionBumpOptions): Promise { } } -const Targets = new Set([ +export const Targets = new Set([ 'win32-x64', 'win32-ia32', 'win32-arm64',