Skip to content

Commit d342cb5

Browse files
committed
refactor: deploy command ui text
1 parent f327429 commit d342cb5

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ $ csdx COMMAND
2121
running command...
2222
$ csdx (--version|-v)
2323
@contentstack/apps-cli/1.2.0 darwin-arm64 node-v18.20.2
24-
@contentstack/apps-cli/1.2.0 darwin-arm64 node-v18.20.2
2524
$ csdx --help [COMMAND]
2625
USAGE
2726
$ csdx COMMAND
@@ -130,16 +129,16 @@ Deploy an app
130129

131130
```
132131
USAGE
133-
$ csdx app:deploy [--app-uid <value>] [--hosting-type <value>] [--app-url <value>] [-y] [--launch-project
134-
existing|new] [-c <value>]
132+
$ csdx app:deploy [--app-uid <value>] [--hosting-type Hosting with Launch|Custom Hosting] [--app-url <value>]
133+
[--launch-project existing|new] [-c <value>]
135134
136135
FLAGS
137-
-c, --config=<value> [optional] path of config file
138-
-y, --yes Force disconnect launch project by skipping the confirmation
136+
-c, --config=<value> [optional] Please enter the path of the config file.
139137
--app-uid=<value> Provide the app UID of an existing app.
140-
--app-url=<value> App URL
141-
--hosting-type=<value> Hosting Type
142-
--launch-project=<option> Launch Project
138+
--app-url=<value> Please enter the URL of the app you want to deploy.
139+
--hosting-type=<option> Please provide a valid Hosting Type.
140+
<options: Hosting with Launch|Custom Hosting>
141+
--launch-project=<option> Choose a new or an existing Launch project.
143142
<options: existing|new>
144143
145144
DESCRIPTION

src/commands/app/deploy.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export default class Deploy extends AppCLIBaseCommand {
4141
description: commonMsg.APP_UID,
4242
}),
4343
"hosting-type": Flags.string({
44+
multiple: false,
45+
options: ["Hosting with Launch", "Custom Hosting"],
4446
description: deployAppMsg.HOSTING_TYPE,
4547
}),
4648
"app-url": Flags.string({
@@ -90,7 +92,7 @@ export default class Deploy extends AppCLIBaseCommand {
9092
await this.handleHostingWithLaunch(config, updateHostingPayload, projects);
9193
break;
9294
default:
93-
this.log("Invalid hosting type", "error");
95+
this.log("Please provide a valid Hosting Type.", "error");
9496
return;
9597
}
9698

@@ -197,7 +199,7 @@ export default class Deploy extends AppCLIBaseCommand {
197199
);
198200
url = await this.handleNewProject(config, updateHostingPayload);
199201
} else {
200-
this.log("Invalid project type", "error");
202+
this.log("Please provide a valid launch project.", "error");
201203
return;
202204
}
203205

src/messages/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ const reinstallAppMsg = {
113113
}
114114

115115
const deployAppMsg = {
116-
APP_DEPLOYED: "{app} deployed successfully.",
116+
APP_DEPLOYED: "{app} has been deployed successfully.",
117117
FORCE_DISCONNECT: "Force disconnect launch project by skipping the confirmation",
118-
LAUNCH_PROJECT: "Launch Project",
119-
APP_URL: "App URL",
120-
HOSTING_TYPE: "Hosting Type",
121-
CONFIG_FILE: "[optional] path of config file",
122-
APP_UPDATE_TERMINATION_MSG: "Launch Project connected! Skipping app hosting updates process...",
123-
DISCONNECT_PROJECT: "Are you sure you want to disconnect launch Project ?",
124-
PROJECT_NOT_FOUND: "Project not found!",
125-
PROJECT_NAME_CONFLICT_FAILED: "Project name conflict resolution failed!"
118+
LAUNCH_PROJECT: "Choose a new or an existing Launch project.",
119+
APP_URL: "Please enter the URL of the app you want to deploy.",
120+
HOSTING_TYPE: "Please provide a valid Hosting Type.",
121+
CONFIG_FILE: "[optional] Please enter the path of the config file.",
122+
APP_UPDATE_TERMINATION_MSG: "The app is already connected to the Launch project. Skipping the app hosting updates process.",
123+
DISCONNECT_PROJECT: "Are you sure you wan to disconnect the Launch project?",
124+
PROJECT_NOT_FOUND: "We couldn't find the project. Please enter a valid project name.",
125+
PROJECT_NAME_CONFLICT_FAILED: "Unable to resolve the project name conflict."
126126
}
127127

128128
const messages: typeof errors &

src/util/inquirer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ const askProjectName = async (
373373
type: "input",
374374
name: "name",
375375
validate: inquireRequireValidation,
376-
message: `${projectName} project already exist. Enter a new name to create a project.?`,
376+
message: `The project name ${projectName} is already in use. Please enter a different name for your project`,
377377
});
378378
};
379379

0 commit comments

Comments
 (0)