diff --git a/packages/aws-cdk/lib/config.ts b/packages/aws-cdk/lib/config.ts index 13898df29fa7a..2ef82baf3304e 100644 --- a/packages/aws-cdk/lib/config.ts +++ b/packages/aws-cdk/lib/config.ts @@ -56,12 +56,12 @@ export async function makeConfig(): Promise { 'show-dependencies': { type: 'boolean', default: false, alias: 'd', desc: 'Display stack dependency information for each stack' }, }, }, - synthesize: { + synth: { arg: { name: 'STACKS', variadic: true, }, - aliases: ['synth'], + aliases: ['synthesize'], description: 'Synthesizes and prints the CloudFormation template for this stack', options: { exclusively: { type: 'boolean', alias: 'e', desc: 'Only synthesize requested stacks, don\'t include dependencies' }, diff --git a/packages/aws-cdk/lib/convert-to-user-input.ts b/packages/aws-cdk/lib/convert-to-user-input.ts index de07f9b3c0eef..f3ffcd4eee611 100644 --- a/packages/aws-cdk/lib/convert-to-user-input.ts +++ b/packages/aws-cdk/lib/convert-to-user-input.ts @@ -46,8 +46,8 @@ export function convertYargsToUserInput(args: any): UserInput { }; break; - case 'synthesize': case 'synth': + case 'synthesize': commandOptions = { exclusively: args.exclusively, validation: args.validation, @@ -292,10 +292,10 @@ export function convertConfigToUserInput(config: any): UserInput { long: config.list?.long, showDependencies: config.list?.showDependencies, }; - const synthesizeOptions = { - exclusively: config.synthesize?.exclusively, - validation: config.synthesize?.validation, - quiet: config.synthesize?.quiet, + const synthOptions = { + exclusively: config.synth?.exclusively, + validation: config.synth?.validation, + quiet: config.synth?.quiet, }; const bootstrapOptions = { bootstrapBucketName: config.bootstrap?.bootstrapBucketName, @@ -431,7 +431,7 @@ export function convertConfigToUserInput(config: any): UserInput { const userInput: UserInput = { globalOptions, list: listOptions, - synthesize: synthesizeOptions, + synth: synthOptions, bootstrap: bootstrapOptions, gc: gcOptions, deploy: deployOptions, diff --git a/packages/aws-cdk/lib/parse-command-line-arguments.ts b/packages/aws-cdk/lib/parse-command-line-arguments.ts index b0d4f3060024e..20b09694290fa 100644 --- a/packages/aws-cdk/lib/parse-command-line-arguments.ts +++ b/packages/aws-cdk/lib/parse-command-line-arguments.ts @@ -172,7 +172,7 @@ export function parseCommandLineArguments(args: Array): any { desc: 'Display stack dependency information for each stack', }), ) - .command(['synthesize [STACKS..]', 'synth [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', (yargs: Argv) => + .command(['synth [STACKS..]', 'synthesize [STACKS..]'], 'Synthesizes and prints the CloudFormation template for this stack', (yargs: Argv) => yargs .option('exclusively', { default: undefined, diff --git a/packages/aws-cdk/lib/user-input.ts b/packages/aws-cdk/lib/user-input.ts index 13ae60938f6ff..992202dfaec72 100644 --- a/packages/aws-cdk/lib/user-input.ts +++ b/packages/aws-cdk/lib/user-input.ts @@ -31,9 +31,9 @@ export interface UserInput { /** * Synthesizes and prints the CloudFormation template for this stack * - * aliases: synth + * aliases: synthesize */ - readonly synthesize?: SynthesizeOptions; + readonly synth?: SynthOptions; /** * Deploys the CDK toolkit stack into an AWS environment @@ -337,11 +337,11 @@ export interface ListOptions { /** * Synthesizes and prints the CloudFormation template for this stack * - * aliases: synth + * aliases: synthesize * * @struct */ -export interface SynthesizeOptions { +export interface SynthOptions { /** * Only synthesize requested stacks, don't include dependencies * @@ -368,7 +368,7 @@ export interface SynthesizeOptions { readonly quiet?: boolean; /** - * Positional argument for synthesize + * Positional argument for synth */ readonly STACKS?: Array; } diff --git a/packages/aws-cdk/test/cli-arguments.test.ts b/packages/aws-cdk/test/cli-arguments.test.ts index 32ad80da77e84..ad0bfecd0cf74 100644 --- a/packages/aws-cdk/test/cli-arguments.test.ts +++ b/packages/aws-cdk/test/cli-arguments.test.ts @@ -131,7 +131,7 @@ describe('config', () => { metadata: expect.anything(), migrate: expect.anything(), rollback: expect.anything(), - synthesize: expect.anything(), + synth: expect.anything(), watch: expect.anything(), notices: expect.anything(), import: expect.anything(),