diff --git a/src/commands/app/deploy.ts b/src/commands/app/deploy.ts index 8cb9095..2c873ea 100644 --- a/src/commands/app/deploy.ts +++ b/src/commands/app/deploy.ts @@ -31,9 +31,9 @@ export default class Deploy extends AppCLIBaseCommand { "$ <%= config.bin %> <%= command.id %>", "$ <%= config.bin %> <%= command.id %> --org --app-uid ", "$ <%= config.bin %> <%= command.id %> --org --app-uid --hosting-type --app-url ", - "$ <%= config.bin %> <%= command.id %> --org --app-uid --hosting-type --launch-project-type ", - "$ <%= config.bin %> <%= command.id %> --org --app-uid --hosting-type --launch-project-type ", - "$ <%= config.bin %> <%= command.id %> --org --app-uid --hosting-type --launch-project-type --config ", + "$ <%= config.bin %> <%= command.id %> --org --app-uid --hosting-type --launch-project ", + "$ <%= config.bin %> <%= command.id %> --org --app-uid --hosting-type --launch-project ", + "$ <%= config.bin %> <%= command.id %> --org --app-uid --hosting-type --launch-project --config ", ]; static flags: FlagInput = { @@ -51,10 +51,10 @@ export default class Deploy extends AppCLIBaseCommand { description: deployAppMsg.FORCE_DISCONNECT, default: false, }), - "launch-project-type": Flags.string({ + "launch-project": Flags.string({ multiple: false, - options: ["existing-project", "new-project"], - description: deployAppMsg.LAUNCH_PROJECT_TYPE, + options: ["existing", "new"], + description: deployAppMsg.LAUNCH_PROJECT, }), config: Flags.string({ char: "c", @@ -89,8 +89,8 @@ export default class Deploy extends AppCLIBaseCommand { const config = setupConfig(flags["config"]); config["name"] = config["name"] || app?.name; await this.handleAppDisconnect(projects); - this.flags["launch-project-type"] = - this.flags["launch-project-type"] || (await askProjectType()); + this.flags["launch-project"] = + this.flags["launch-project"] || (await askProjectType()); await this.handleHostingWithLaunch(config, updateHostingPayload, projects); break; default: @@ -190,9 +190,9 @@ export default class Deploy extends AppCLIBaseCommand { ): Promise { let url: string = ""; - if (this.flags["launch-project-type"] === "existing-project") { + if (this.flags["launch-project"] === "existing") { url = await this.handleExistingProject(updateHostingPayload, projects); - } else if (this.flags["launch-project-type"] === "new-project") { + } else if (this.flags["launch-project"] === "new") { config["name"] = await handleProjectNameConflict( config["name"], projects diff --git a/src/messages/index.ts b/src/messages/index.ts index 89a9e5c..e77d3a3 100644 --- a/src/messages/index.ts +++ b/src/messages/index.ts @@ -115,7 +115,7 @@ const reinstallAppMsg = { const deployAppMsg = { APP_DEPLOYED: "{app} deployed successfully.", FORCE_DISCONNECT: "Force disconnect launch project by skipping the confirmation", - LAUNCH_PROJECT_TYPE: "Launch Project Type", + LAUNCH_PROJECT: "Launch Project", APP_URL: "App URL", HOSTING_TYPE: "Hosting Type", CONFIG_FILE: "[optional] path of config file", diff --git a/src/util/inquirer.ts b/src/util/inquirer.ts index 4f31d13..f28db07 100644 --- a/src/util/inquirer.ts +++ b/src/util/inquirer.ts @@ -349,11 +349,11 @@ async function selectProject( const askProjectType = async (): Promise => { return await cliux.inquire({ type: "list", - name: "selected_project_type", - message: "Launch Project type", + name: "selected_launch_project", + message: "Launch Project", choices: [ - { name: "Existing", value: "existing-project" }, - { name: "New", value: "new-project" }, + { name: "Existing", value: "existing" }, + { name: "New", value: "new" }, ], }); };