diff --git a/.changeset/happy-paws-applaud.md b/.changeset/happy-paws-applaud.md new file mode 100644 index 0000000000..6287373d81 --- /dev/null +++ b/.changeset/happy-paws-applaud.md @@ -0,0 +1,5 @@ +--- +'@aws-amplify/backend-cli': patch +--- + +fix: change 'out' to 'outDir' diff --git a/packages/cli/src/commands/sandbox/sandbox_command.test.ts b/packages/cli/src/commands/sandbox/sandbox_command.test.ts index fb86ed41c1..c402b8a2b8 100644 --- a/packages/cli/src/commands/sandbox/sandbox_command.test.ts +++ b/packages/cli/src/commands/sandbox/sandbox_command.test.ts @@ -57,7 +57,9 @@ describe('sandbox command', () => { }); it('starts sandbox with user provided output directory for client config', async () => { - await commandRunner.runCommand('sandbox --out test/location --format js'); + await commandRunner.runCommand( + 'sandbox --outDir test/location --format js' + ); assert.equal(sandboxStartMock.mock.callCount(), 1); assert.deepStrictEqual( sandboxStartMock.mock.calls[0].arguments[0].clientConfigFilePath, @@ -75,7 +77,7 @@ describe('sandbox command', () => { assert.match(output, /--dirToWatch/); assert.match(output, /--exclude/); assert.match(output, /--format/); - assert.match(output, /--out/); + assert.match(output, /--outDir/); }); it('fails if invalid dirToWatch is provided', async () => { diff --git a/packages/cli/src/commands/sandbox/sandbox_command.ts b/packages/cli/src/commands/sandbox/sandbox_command.ts index 6864ee1f5d..f2dae5010f 100644 --- a/packages/cli/src/commands/sandbox/sandbox_command.ts +++ b/packages/cli/src/commands/sandbox/sandbox_command.ts @@ -10,7 +10,7 @@ export type SandboxCommandOptions = { exclude: string[] | undefined; name: string | undefined; format: ClientConfigFormat | undefined; - out: string | undefined; + outDir: string | undefined; profile: string | undefined; }; @@ -57,7 +57,7 @@ export class SandboxCommand exclude: args.exclude, name: args.name, format: args.format, - clientConfigFilePath: args.out, + clientConfigFilePath: args.outDir, profile: args.profile, }); process.once('SIGINT', () => void this.sigIntHandler()); @@ -95,7 +95,7 @@ export class SandboxCommand array: false, choices: Object.values(ClientConfigFormat), }) - .option('out', { + .option('outDir', { describe: 'A path to directory where config is written. If not provided defaults to current process working directory.', type: 'string',