Skip to content

Commit 3f1af5b

Browse files
fix: text UI changes
1 parent 6f2c709 commit 3f1af5b

File tree

8 files changed

+72
-42
lines changed

8 files changed

+72
-42
lines changed

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $ npm install -g @contentstack/apps-cli
2020
$ csdx COMMAND
2121
running command...
2222
$ csdx (--version|-v)
23-
@contentstack/apps-cli/1.0.5 darwin-arm64 node-v20.10.0
23+
@contentstack/apps-cli/1.0.7 darwin-arm64 node-v20.10.0
2424
$ csdx --help [COMMAND]
2525
USAGE
2626
$ csdx COMMAND
@@ -63,23 +63,23 @@ EXAMPLES
6363
$ csdx app:uninstall
6464
```
6565

66-
_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.0.5/src/commands/app/index.ts)_
66+
_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/index.ts)_
6767

6868
## `csdx app:create`
6969

7070
Create a new app in Developer Hub and optionally clone a boilerplate locally.
7171

7272
```
7373
USAGE
74-
$ csdx app:create [--org <value>] [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>]
74+
$ csdx app:create [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>] [--org <value>]
7575
7676
FLAGS
7777
-c, --config=<value> Path of the external config
7878
-d, --data-dir=<value> Current working directory.
79-
-n, --name=<value> Name of the app to be created
80-
--app-type=<option> [default: stack] Type of App
79+
-n, --name=<value> [default: app-boilerplate] Name of the app to be created
80+
--app-type=<option> [default: stack] Type of app
8181
<options: stack|organization>
82-
--org=<value> Provide the organization UID
82+
--org=<value> Provide the organization UID where the app is to be created.
8383
8484
DESCRIPTION
8585
Create a new app in Developer Hub and optionally clone a boilerplate locally.
@@ -94,19 +94,19 @@ EXAMPLES
9494
$ csdx app:create --name App-3 --app-type organization --org <UID> -d ./boilerplate -c ./external-config.json
9595
```
9696

97-
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.0.5/src/commands/app/create.ts)_
97+
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/create.ts)_
9898

9999
## `csdx app:delete`
100100

101101
Delete app from marketplace
102102

103103
```
104104
USAGE
105-
$ csdx app:delete [--org <value>] [--app-uid <value>]
105+
$ csdx app:delete [--app-uid <value>] [--org <value>]
106106
107107
FLAGS
108-
--app-uid=<value> Provide the app UID
109-
--org=<value> Provide the organization UID
108+
--app-uid=<value> Provide the app UID of an existing app to be deleted.
109+
--org=<value> Provide the organization UID where the app details are to be fetched from, to delete the app
110110
111111
DESCRIPTION
112112
Delete app from marketplace
@@ -119,22 +119,22 @@ EXAMPLES
119119
$ csdx app:delete --app-uid <value> --org <value> -d ./boilerplate
120120
```
121121

122-
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.0.5/src/commands/app/delete.ts)_
122+
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/delete.ts)_
123123

124124
## `csdx app:get`
125125

126126
Get details of an app in developer hub
127127

128128
```
129129
USAGE
130-
$ csdx app:get [--org <value>] [--app-uid <value>] [--app-type stack|organization] [-d <value>]
130+
$ csdx app:get [--app-uid <value>] [--app-type stack|organization] [-d <value>] [--org <value>]
131131
132132
FLAGS
133133
-d, --data-dir=<value> Current working directory.
134-
--app-type=<option> [default: stack] Type of App
134+
--app-type=<option> [default: stack] Type of app
135135
<options: stack|organization>
136-
--app-uid=<value> Provide the app UID
137-
--org=<value> Provide the organization UID
136+
--app-uid=<value> Provide the app UID of an existing app to fetch the details.
137+
--org=<value> Provide the organization UID where the app details are to be fetched from.
138138
139139
DESCRIPTION
140140
Get details of an app in developer hub
@@ -149,19 +149,20 @@ EXAMPLES
149149
$ csdx app:get --org <value> --app-uid <value> --app-type organization
150150
```
151151

152-
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.0.5/src/commands/app/get.ts)_
152+
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/get.ts)_
153153

154154
## `csdx app:install`
155155

156156
Install an app from the marketplace
157157

158158
```
159159
USAGE
160-
$ csdx app:install [--org <value>] [--app-uid <value>] [--stack-api-key <value>]
160+
$ csdx app:install [--app-uid <value>] [--stack-api-key <value>] [--org <value>]
161161
162162
FLAGS
163-
--app-uid=<value> Provide the app UID
164-
--org=<value> Provide the organization UID
163+
--app-uid=<value> Provide the app UID of an existing app to be installed.
164+
--org=<value> Provide the organization UID where the app details are to be fetched from, to install the
165+
app.
165166
--stack-api-key=<value> API key of the stack where the app is to be installed.
166167
167168
DESCRIPTION
@@ -175,20 +176,21 @@ EXAMPLES
175176
$ csdx app:install --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
176177
```
177178

178-
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.0.5/src/commands/app/install.ts)_
179+
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/install.ts)_
179180

180181
## `csdx app:uninstall`
181182

182183
Uninstall an app
183184

184185
```
185186
USAGE
186-
$ csdx app:uninstall [--org <value>] [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]
187+
$ csdx app:uninstall [--app-uid <value>] [--installation-uid <value>] [--uninstall-all] [--org <value>]
187188
188189
FLAGS
189-
--app-uid=<value> Provide the app UID
190+
--app-uid=<value> Provide the Aapp UID of an existing app to be uninstalled.
190191
--installation-uid=<value> Provide the installation ID of the app that needs to be uninstalled.
191-
--org=<value> Provide the organization UID
192+
--org=<value> Provide the organization UID where the app details are to be fetched from to uninstall the
193+
app.
192194
--uninstall-all Please select stacks from where the app must be uninstalled.
193195
194196
DESCRIPTION
@@ -202,19 +204,19 @@ EXAMPLES
202204
$ csdx app:uninstall --org <UID> --app-uid <APP-UID-1> --installation-uid <INSTALLATION-UID-1>
203205
```
204206

205-
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.0.5/src/commands/app/uninstall.ts)_
207+
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/uninstall.ts)_
206208

207209
## `csdx app:update`
208210

209211
Update the existing app in developer hub
210212

211213
```
212214
USAGE
213-
$ csdx app:update [--org <value>] [--app-manifest <value>]
215+
$ csdx app:update [--app-manifest <value>] [--org <value>]
214216
215217
FLAGS
216218
--app-manifest=<value> Path to the app manifest.json file:
217-
--org=<value> Provide the organization UID
219+
--org=<value> Provide the organization UID where the app details are to be fetched from.
218220
219221
DESCRIPTION
220222
Update the existing app in developer hub
@@ -225,5 +227,5 @@ EXAMPLES
225227
$ csdx app:update --app-manifest ./boilerplate/manifest.json
226228
```
227229

228-
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.0.5/src/commands/app/update.ts)_
230+
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.0.7/src/commands/app/update.ts)_
229231
<!-- commandsstop -->

src/commands/app/create.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export default class Create extends BaseCommand<typeof Create> {
5454
static flags = {
5555
name: flags.string({
5656
char: "n",
57+
default: "app-boilerplate",
5758
description: appCreate.NAME_DESCRIPTION,
5859
}),
5960
"app-type": flags.string({
@@ -69,6 +70,9 @@ export default class Create extends BaseCommand<typeof Create> {
6970
char: "d",
7071
description: commonMsg.CURRENT_WORKING_DIR,
7172
}),
73+
org: flags.string({
74+
description: appCreate.ORG_UID_DESCRIPTION,
75+
}),
7276
};
7377

7478
async run(): Promise<void> {

src/commands/app/delete.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ export default class Delete extends AppCLIBaseCommand {
1515

1616
static flags = {
1717
"app-uid": flags.string({
18-
description: commonMsg.APP_UID,
18+
description: deleteAppMsg.APP_UID,
19+
}),
20+
org: flags.string({
21+
description: deleteAppMsg.ORG_UID_DESCRIPTION,
1922
}),
2023
};
2124

src/commands/app/get.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { flags } from "@contentstack/cli-utilities";
22

3-
import { commonMsg } from "../../messages";
3+
import { commonMsg, getAppMsg } from "../../messages";
44
import {AppCLIBaseCommand} from "../../app-cli-base-coomand";
55
import { getOrg, getApp, writeFile, fetchApp } from "../../util";
66

@@ -27,6 +27,9 @@ export default class Get extends AppCLIBaseCommand {
2727
char: "d",
2828
description: commonMsg.CURRENT_WORKING_DIR,
2929
}),
30+
org: flags.string({
31+
description: getAppMsg.ORG_UID_DESCRIPTION,
32+
}),
3033
};
3134

3235
async run(): Promise<void> {

src/commands/app/install.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ export default class Install extends AppCLIBaseCommand {
2323

2424
static flags = {
2525
"app-uid": flags.string({
26-
description: commonMsg.APP_UID,
26+
description: installAppMsg.APP_UID,
2727
}),
2828
"stack-api-key": flags.string({
2929
description: commonMsg.STACK_API_KEY,
3030
}),
31+
org: flags.string({
32+
description: installAppMsg.ORG_UID_DESCRIPTION,
33+
})
3134
};
3235

3336
async run(): Promise<void> {

src/commands/app/uninstall.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { flags } from "@contentstack/cli-utilities";
22

3-
import { commonMsg, uninstallAppMsg } from "../../messages";
3+
import { uninstallAppMsg } from "../../messages";
44
import {AppCLIBaseCommand} from "../../app-cli-base-coomand";
55
import { getOrg, fetchApp, getInstalledApps } from "../../util";
66
import { UninstallAppFactory } from "../../factories/uninstall-app-factory";
@@ -16,14 +16,17 @@ export default class Uninstall extends AppCLIBaseCommand {
1616

1717
static flags = {
1818
'app-uid': flags.string({
19-
description: commonMsg.APP_UID,
19+
description: uninstallAppMsg.APP_UID,
2020
}),
2121
'installation-uid': flags.string({
2222
description: uninstallAppMsg.INSTALLATION_UID
2323
}),
2424
'uninstall-all': flags.boolean({
2525
description: uninstallAppMsg.UNINSTALL_ALL,
26-
})
26+
}),
27+
org: flags.string({
28+
description: uninstallAppMsg.ORG_UID_DESCRIPTION,
29+
}),
2730
}
2831

2932
async run(): Promise<void> {

src/commands/app/update.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export default class Update extends AppCLIBaseCommand {
2424
"app-manifest": flags.string({
2525
description: $t(appUpdate.FILE_PATH, { fileName: "app manifest.json" }),
2626
}),
27+
org: flags.string({
28+
description: appUpdate.ORG_UID_DESCRIPTION,
29+
}),
2730
};
2831

2932
async run(): Promise<void> {

src/messages/index.ts

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const commonMsg = {
3030
SKIP_CONFIRMATION: "Use this flag to skip the confirmation.",
3131
DEVELOPER_HUB_URL_PROMPT:
3232
"Enter the Developer Hub Base URL for the {name} region: ",
33-
APP_UID: "Provide the app UID",
34-
APP_TYPE_DESCRIPTION: "Type of App",
33+
APP_UID: "Provide the app UID of an existing app to fetch the details.",
34+
APP_TYPE_DESCRIPTION: "Type of app",
3535
CONTACT_SUPPORT: "Please contact the support team.",
3636
STACK_API_KEY: "API key of the stack where the app is to be installed.",
3737
USER_TERMINATION: "Process terminated by the user.",
@@ -42,7 +42,7 @@ const appCreate = {
4242
ORG_UID: "Organization UID",
4343
NAME: "{target} name",
4444
UNZIP: "Unzipping the boilerplate...",
45-
APP_TYPE_DESCRIPTION: "Type of App",
45+
APP_TYPE_DESCRIPTION: "Type of app",
4646
CHOOSE_ORG: "Choose an organization",
4747
DIR_EXIST: "Directory name already exists.",
4848
ROLLBACK_BOILERPLATE: "Rolling back boilerplate...",
@@ -56,15 +56,17 @@ const appCreate = {
5656
REGISTER_THE_APP_ON_DEVELOPER_HUB:
5757
"Registering the app with the name {appName} on the Developer Hub...",
5858
START_APP_COMMAND: "Start the app using the following command: {command}",
59+
ORG_UID_DESCRIPTION: "Provide the organization UID where the app is to be created.",
5960
};
6061

61-
const getApp = {
62+
const getAppMsg = {
6263
CHOOSE_APP: "Choose an app",
6364
APP_UID_NOT_FOUND: "App UID was not found!",
6465
FILE_WRITTEN_SUCCESS: "App data has been written to {file} successfully.",
6566
APPS_NOT_FOUND: "No apps found!",
6667
FILE_ALREADY_EXISTS:
6768
"{file} already exists. Do you want to overwrite this file? (y/n) (Selecting 'n' creates a new file)",
69+
ORG_UID_DESCRIPTION:"Provide the organization UID where the app details are to be fetched from.",
6870
};
6971

7072
const appUpdate = {
@@ -73,22 +75,27 @@ const appUpdate = {
7375
APP_UPDATE_SUCCESS: "App updated successfully!",
7476
APP_VERSION_MISS_MATCH:
7577
"App versions mismatch! Please download the latest file using the `csdx app:get` command and sync the file with the latest downloaded file.",
78+
ORG_UID_DESCRIPTION:"Provide the organization UID where the app details are to be fetched from.",
7679
};
7780

7881
const deleteAppMsg = {
7982
APP_IS_INSTALLED: "This app is installed in one of your stacks. Please uninstall the app from your stack to proceed with the delete operation.",
8083
APP_DELETED_SUCCESSFULLY: "{app} deleted successfully.",
8184
APP_UID_INVALID: "App UID must be valid.",
8285
PLEASE_SELECT_APP_FROM_LIST: "Please select an app from the list",
83-
DELETE_CONFIRMATION: "Are you sure you want to delete this app?"
86+
DELETE_CONFIRMATION: "Are you sure you want to delete this app?",
87+
APP_UID: "Provide the app UID of an existing app to be deleted.",
88+
ORG_UID_DESCRIPTION:"Provide the organization UID where the app details are to be fetched from, to delete the app",
8489
}
8590

8691
const installAppMsg = {
8792
CHOOSE_A_STACK: "Please select a stack",
8893
APP_INSTALLED_SUCCESSFULLY: "{app} installed successfully in {target}.",
8994
INSTALL_ORG_APP_TO_STACK: "{app} is an organization app. It cannot be installed to a stack. Do you want to proceed?",
9095
MISSING_STACK_API_KEY: "As {app} is a stack app, it can only be installed in a stack. Please select a stack.",
91-
INSTALLING_APP_NOTICE: "Installing {app} on {type} {target}."
96+
INSTALLING_APP_NOTICE: "Installing {app} on {type} {target}.",
97+
APP_UID: "Provide the app UID of an existing app to be installed.",
98+
ORG_UID_DESCRIPTION:"Provide the organization UID where the app details are to be fetched from, to install the app.",
9299
}
93100

94101
const uninstallAppMsg = {
@@ -98,21 +105,23 @@ const uninstallAppMsg = {
98105
APP_UNINSTALLED: "{app} uninstalled successfully.",
99106
UNINSTALLING_APP: "Uninstalling app from {type}...",
100107
UNINSTALL_ALL: "Please select stacks from where the app must be uninstalled.",
108+
APP_UID: "Provide the Aapp UID of an existing app to be uninstalled.",
109+
ORG_UID_DESCRIPTION:"Provide the organization UID where the app details are to be fetched from to uninstall the app.",
101110
}
102111

103112
const messages: typeof errors &
104113
typeof commonMsg &
105114
typeof appCreate &
106115
typeof appUpdate &
107-
typeof getApp &
116+
typeof getAppMsg &
108117
typeof deleteAppMsg &
109118
typeof installAppMsg &
110119
typeof uninstallAppMsg = {
111120
...errors,
112121
...commonMsg,
113122
...appCreate,
114123
...appUpdate,
115-
...getApp,
124+
...getAppMsg,
116125
...deleteAppMsg,
117126
...installAppMsg,
118127
...uninstallAppMsg
@@ -130,4 +139,4 @@ const $t = (msg: string, args: Record<string, string>): string => {
130139
};
131140

132141
export default messages;
133-
export { $t, errors, commonMsg, appCreate, appUpdate, getApp, deleteAppMsg, installAppMsg, uninstallAppMsg };
142+
export { $t, errors, commonMsg, appCreate, appUpdate, getAppMsg, deleteAppMsg, installAppMsg, uninstallAppMsg };

0 commit comments

Comments
 (0)