@contentstack/apps-cli 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -23
- package/lib/base-command.js +4 -4
- package/lib/commands/app/create.js +6 -12
- package/lib/commands/app/delete.js +2 -4
- package/lib/commands/app/deploy.js +6 -12
- package/lib/commands/app/get.js +4 -8
- package/lib/commands/app/index.js +4 -3
- package/lib/commands/app/install.js +3 -6
- package/lib/commands/app/reinstall.js +3 -6
- package/lib/commands/app/uninstall.js +4 -8
- package/lib/commands/app/update.js +2 -4
- package/lib/util/inquirer.js +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @contentstack/apps-cli
|
|
|
20
20
|
$ csdx COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ csdx (--version|-v)
|
|
23
|
-
@contentstack/apps-cli/1.3.
|
|
23
|
+
@contentstack/apps-cli/1.3.1 darwin-arm64 node-v18.20.2
|
|
24
24
|
$ csdx --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ csdx COMMAND
|
|
@@ -54,20 +54,22 @@ DESCRIPTION
|
|
|
54
54
|
EXAMPLES
|
|
55
55
|
$ csdx app:create
|
|
56
56
|
|
|
57
|
-
$ csdx app:
|
|
57
|
+
$ csdx app:delete
|
|
58
58
|
|
|
59
|
-
$ csdx app:
|
|
59
|
+
$ csdx app:deploy
|
|
60
60
|
|
|
61
|
-
$ csdx app:
|
|
61
|
+
$ csdx app:get
|
|
62
62
|
|
|
63
63
|
$ csdx app:install
|
|
64
64
|
|
|
65
|
+
$ csdx app:reinstall
|
|
66
|
+
|
|
65
67
|
$ csdx app:uninstall
|
|
66
68
|
|
|
67
|
-
$ csdx app:
|
|
69
|
+
$ csdx app:update
|
|
68
70
|
```
|
|
69
71
|
|
|
70
|
-
_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
72
|
+
_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/index.ts)_
|
|
71
73
|
|
|
72
74
|
## `csdx app:create`
|
|
73
75
|
|
|
@@ -76,7 +78,7 @@ Create a new app in Developer Hub and optionally clone a boilerplate locally.
|
|
|
76
78
|
```
|
|
77
79
|
USAGE
|
|
78
80
|
$ csdx app:create [-n <value>] [--app-type stack|organization] [-c <value>] [-d <value>] [--boilerplate
|
|
79
|
-
<value>]
|
|
81
|
+
<value>] [--org <value>]
|
|
80
82
|
|
|
81
83
|
FLAGS
|
|
82
84
|
-c, --config=<value> Path of the external config
|
|
@@ -84,7 +86,9 @@ FLAGS
|
|
|
84
86
|
-n, --name=<value> Name of the app to be created
|
|
85
87
|
--app-type=<option> [default: stack] Type of app
|
|
86
88
|
<options: stack|organization>
|
|
87
|
-
--boilerplate=<value> Provide a boilerplate. <options: App Boilerplate|DAM App Boilerplate|Ecommerce App
|
|
89
|
+
--boilerplate=<value> Provide a boilerplate. <options: App Boilerplate|DAM App Boilerplate|Ecommerce App
|
|
90
|
+
Boilerplate>
|
|
91
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
88
92
|
|
|
89
93
|
DESCRIPTION
|
|
90
94
|
Create a new app in Developer Hub and optionally clone a boilerplate locally.
|
|
@@ -105,7 +109,7 @@ EXAMPLES
|
|
|
105
109
|
$ csdx app:create --name App-4 --app-type organization --org <UID> --boilerplate <Ecommerce App Boilerplate>
|
|
106
110
|
```
|
|
107
111
|
|
|
108
|
-
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
112
|
+
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/create.ts)_
|
|
109
113
|
|
|
110
114
|
## `csdx app:delete`
|
|
111
115
|
|
|
@@ -113,10 +117,11 @@ Delete app from marketplace
|
|
|
113
117
|
|
|
114
118
|
```
|
|
115
119
|
USAGE
|
|
116
|
-
$ csdx app:delete [--app-uid <value>]
|
|
120
|
+
$ csdx app:delete [--app-uid <value>] [--org <value>]
|
|
117
121
|
|
|
118
122
|
FLAGS
|
|
119
123
|
--app-uid=<value> Provide the app UID of an existing app.
|
|
124
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
120
125
|
|
|
121
126
|
DESCRIPTION
|
|
122
127
|
Delete app from marketplace
|
|
@@ -129,7 +134,7 @@ EXAMPLES
|
|
|
129
134
|
$ csdx app:delete --app-uid <value> --org <value> -d ./boilerplate
|
|
130
135
|
```
|
|
131
136
|
|
|
132
|
-
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
137
|
+
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/delete.ts)_
|
|
133
138
|
|
|
134
139
|
## `csdx app:deploy`
|
|
135
140
|
|
|
@@ -138,7 +143,7 @@ Deploy an app
|
|
|
138
143
|
```
|
|
139
144
|
USAGE
|
|
140
145
|
$ csdx app:deploy [--app-uid <value>] [--hosting-type Hosting with Launch|Custom Hosting] [--app-url <value>]
|
|
141
|
-
[--launch-project existing|new] [-c <value>]
|
|
146
|
+
[--launch-project existing|new] [-c <value>] [--org <value>]
|
|
142
147
|
|
|
143
148
|
FLAGS
|
|
144
149
|
-c, --config=<value> [optional] Please enter the path of the config file.
|
|
@@ -148,6 +153,7 @@ FLAGS
|
|
|
148
153
|
<options: Hosting with Launch|Custom Hosting>
|
|
149
154
|
--launch-project=<option> Choose a new or an existing Launch project.
|
|
150
155
|
<options: existing|new>
|
|
156
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
151
157
|
|
|
152
158
|
DESCRIPTION
|
|
153
159
|
Deploy an app
|
|
@@ -166,7 +172,7 @@ EXAMPLES
|
|
|
166
172
|
$ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new> --config <config-path>
|
|
167
173
|
```
|
|
168
174
|
|
|
169
|
-
_See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
175
|
+
_See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/deploy.ts)_
|
|
170
176
|
|
|
171
177
|
## `csdx app:get`
|
|
172
178
|
|
|
@@ -174,13 +180,14 @@ Get details of an app in developer hub
|
|
|
174
180
|
|
|
175
181
|
```
|
|
176
182
|
USAGE
|
|
177
|
-
$ csdx app:get [--app-uid <value>] [--app-type stack|organization] [-d <value>]
|
|
183
|
+
$ csdx app:get [--app-uid <value>] [--app-type stack|organization] [-d <value>] [--org <value>]
|
|
178
184
|
|
|
179
185
|
FLAGS
|
|
180
186
|
-d, --data-dir=<value> Current working directory.
|
|
181
187
|
--app-type=<option> [default: stack] Type of app
|
|
182
188
|
<options: stack|organization>
|
|
183
189
|
--app-uid=<value> Provide the app UID of an existing app.
|
|
190
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
184
191
|
|
|
185
192
|
DESCRIPTION
|
|
186
193
|
Get details of an app in developer hub
|
|
@@ -195,7 +202,7 @@ EXAMPLES
|
|
|
195
202
|
$ csdx app:get --org <value> --app-uid <value> --app-type organization
|
|
196
203
|
```
|
|
197
204
|
|
|
198
|
-
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
205
|
+
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/get.ts)_
|
|
199
206
|
|
|
200
207
|
## `csdx app:install`
|
|
201
208
|
|
|
@@ -203,10 +210,11 @@ Install an app from the marketplace
|
|
|
203
210
|
|
|
204
211
|
```
|
|
205
212
|
USAGE
|
|
206
|
-
$ csdx app:install [--app-uid <value>] [--stack-api-key <value>]
|
|
213
|
+
$ csdx app:install [--app-uid <value>] [--stack-api-key <value>] [--org <value>]
|
|
207
214
|
|
|
208
215
|
FLAGS
|
|
209
216
|
--app-uid=<value> Provide the app UID of an existing app.
|
|
217
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
210
218
|
--stack-api-key=<value> API key of the stack where the app operation is to be performed.
|
|
211
219
|
|
|
212
220
|
DESCRIPTION
|
|
@@ -220,7 +228,7 @@ EXAMPLES
|
|
|
220
228
|
$ csdx app:install --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
|
|
221
229
|
```
|
|
222
230
|
|
|
223
|
-
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
231
|
+
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/install.ts)_
|
|
224
232
|
|
|
225
233
|
## `csdx app:reinstall`
|
|
226
234
|
|
|
@@ -228,10 +236,11 @@ Reinstall an app from the marketplace
|
|
|
228
236
|
|
|
229
237
|
```
|
|
230
238
|
USAGE
|
|
231
|
-
$ csdx app:reinstall [--app-uid <value>] [--stack-api-key <value>]
|
|
239
|
+
$ csdx app:reinstall [--app-uid <value>] [--stack-api-key <value>] [--org <value>]
|
|
232
240
|
|
|
233
241
|
FLAGS
|
|
234
242
|
--app-uid=<value> Provide the app UID of an existing app.
|
|
243
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
235
244
|
--stack-api-key=<value> API key of the stack where the app operation is to be performed.
|
|
236
245
|
|
|
237
246
|
DESCRIPTION
|
|
@@ -245,7 +254,7 @@ EXAMPLES
|
|
|
245
254
|
$ csdx app:reinstall --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
|
|
246
255
|
```
|
|
247
256
|
|
|
248
|
-
_See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
257
|
+
_See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/reinstall.ts)_
|
|
249
258
|
|
|
250
259
|
## `csdx app:uninstall`
|
|
251
260
|
|
|
@@ -253,11 +262,12 @@ Uninstall an app
|
|
|
253
262
|
|
|
254
263
|
```
|
|
255
264
|
USAGE
|
|
256
|
-
$ csdx app:uninstall [--app-uid <value>] [--installation-uid <value>] [--uninstall-all]
|
|
265
|
+
$ csdx app:uninstall [--app-uid <value>] [--installation-uid <value>] [--uninstall-all] [--org <value>]
|
|
257
266
|
|
|
258
267
|
FLAGS
|
|
259
268
|
--app-uid=<value> Provide the app UID of an existing app.
|
|
260
269
|
--installation-uid=<value> Provide the installation ID of the app that needs to be uninstalled.
|
|
270
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
261
271
|
--uninstall-all Please select stacks from where the app must be uninstalled.
|
|
262
272
|
|
|
263
273
|
DESCRIPTION
|
|
@@ -271,7 +281,7 @@ EXAMPLES
|
|
|
271
281
|
$ csdx app:uninstall --org <UID> --app-uid <APP-UID-1> --installation-uid <INSTALLATION-UID-1>
|
|
272
282
|
```
|
|
273
283
|
|
|
274
|
-
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
284
|
+
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/uninstall.ts)_
|
|
275
285
|
|
|
276
286
|
## `csdx app:update`
|
|
277
287
|
|
|
@@ -279,10 +289,11 @@ Update the existing app in developer hub
|
|
|
279
289
|
|
|
280
290
|
```
|
|
281
291
|
USAGE
|
|
282
|
-
$ csdx app:update [--app-manifest <value>]
|
|
292
|
+
$ csdx app:update [--app-manifest <value>] [--org <value>]
|
|
283
293
|
|
|
284
294
|
FLAGS
|
|
285
295
|
--app-manifest=<value> Path to the app manifest.json file:
|
|
296
|
+
--org=<value> Provide the organization UID to fetch the app details for the operation.
|
|
286
297
|
|
|
287
298
|
DESCRIPTION
|
|
288
299
|
Update the existing app in developer hub
|
|
@@ -293,5 +304,5 @@ EXAMPLES
|
|
|
293
304
|
$ csdx app:update --app-manifest ./boilerplate/manifest.json
|
|
294
305
|
```
|
|
295
306
|
|
|
296
|
-
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.3.
|
|
307
|
+
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.3.1/src/commands/app/update.ts)_
|
|
297
308
|
<!-- commandsstop -->
|
package/lib/base-command.js
CHANGED
|
@@ -29,14 +29,14 @@ class BaseCommand extends cli_command_1.Command {
|
|
|
29
29
|
this.args = args;
|
|
30
30
|
cli_utilities_1.cliux.registerSearchPlugin();
|
|
31
31
|
this.registerConfig();
|
|
32
|
-
this.developerHubBaseUrl =
|
|
33
|
-
this.sharedConfig.developerHubBaseUrl || (0, util_1.getDeveloperHubUrl)();
|
|
34
|
-
await this.initCmaSDK();
|
|
35
|
-
await this.initMarketplaceSDK();
|
|
36
32
|
// Init logger
|
|
37
33
|
const logger = new util_1.Logger(this.sharedConfig);
|
|
38
34
|
this.log = logger.log.bind(logger);
|
|
39
35
|
this.validateRegionAndAuth();
|
|
36
|
+
this.developerHubBaseUrl =
|
|
37
|
+
this.sharedConfig.developerHubBaseUrl || (0, util_1.getDeveloperHubUrl)();
|
|
38
|
+
await this.initCmaSDK();
|
|
39
|
+
await this.initMarketplaceSDK();
|
|
40
40
|
}
|
|
41
41
|
async catch(err) {
|
|
42
42
|
// add any custom logic to handle errors from the command
|
|
@@ -325,26 +325,20 @@ Create.examples = [
|
|
|
325
325
|
"$ <%= config.bin %> <%= command.id %> --name App-4 --app-type organization --org <UID> --boilerplate <DAM App Boilerplate>",
|
|
326
326
|
"$ <%= config.bin %> <%= command.id %> --name App-4 --app-type organization --org <UID> --boilerplate <Ecommerce App Boilerplate>",
|
|
327
327
|
];
|
|
328
|
-
Create.flags = {
|
|
329
|
-
name: cli_utilities_1.flags.string({
|
|
328
|
+
Create.flags = Object.assign({ name: cli_utilities_1.flags.string({
|
|
330
329
|
char: "n",
|
|
331
330
|
description: messages_1.appCreate.NAME_DESCRIPTION,
|
|
332
|
-
}),
|
|
333
|
-
"app-type": cli_utilities_1.flags.string({
|
|
331
|
+
}), "app-type": cli_utilities_1.flags.string({
|
|
334
332
|
default: "stack",
|
|
335
333
|
options: ["stack", "organization"],
|
|
336
334
|
description: messages_1.appCreate.APP_TYPE_DESCRIPTION,
|
|
337
|
-
}),
|
|
338
|
-
config: cli_utilities_1.flags.string({
|
|
335
|
+
}), config: cli_utilities_1.flags.string({
|
|
339
336
|
char: "c",
|
|
340
337
|
description: messages_1.commonMsg.CONFIG,
|
|
341
|
-
}),
|
|
342
|
-
"data-dir": cli_utilities_1.flags.string({
|
|
338
|
+
}), "data-dir": cli_utilities_1.flags.string({
|
|
343
339
|
char: "d",
|
|
344
340
|
description: messages_1.commonMsg.CURRENT_WORKING_DIR,
|
|
345
|
-
}),
|
|
346
|
-
boilerplate: cli_utilities_1.flags.string({
|
|
341
|
+
}), boilerplate: cli_utilities_1.flags.string({
|
|
347
342
|
description: messages_1.appCreate.BOILERPLATE_TEMPLATES,
|
|
348
|
-
}),
|
|
349
|
-
};
|
|
343
|
+
}) }, base_command_1.BaseCommand.baseFlags);
|
|
350
344
|
exports.default = Create;
|
|
@@ -67,9 +67,7 @@ Delete.examples = [
|
|
|
67
67
|
"$ <%= config.bin %> <%= command.id %> --app-uid <value>",
|
|
68
68
|
"$ <%= config.bin %> <%= command.id %> --app-uid <value> --org <value> -d ./boilerplate",
|
|
69
69
|
];
|
|
70
|
-
Delete.flags = {
|
|
71
|
-
"app-uid": cli_utilities_1.flags.string({
|
|
70
|
+
Delete.flags = Object.assign({ "app-uid": cli_utilities_1.flags.string({
|
|
72
71
|
description: messages_1.commonMsg.APP_UID,
|
|
73
|
-
}),
|
|
74
|
-
};
|
|
72
|
+
}) }, app_cli_base_command_1.AppCLIBaseCommand.baseFlags);
|
|
75
73
|
exports.default = Delete;
|
|
@@ -208,26 +208,20 @@ Deploy.examples = [
|
|
|
208
208
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new>",
|
|
209
209
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new> --config <config-path>",
|
|
210
210
|
];
|
|
211
|
-
Deploy.flags = {
|
|
212
|
-
"app-uid": cli_utilities_1.Flags.string({
|
|
211
|
+
Deploy.flags = Object.assign({ "app-uid": cli_utilities_1.Flags.string({
|
|
213
212
|
description: messages_1.commonMsg.APP_UID,
|
|
214
|
-
}),
|
|
215
|
-
"hosting-type": cli_utilities_1.Flags.string({
|
|
213
|
+
}), "hosting-type": cli_utilities_1.Flags.string({
|
|
216
214
|
multiple: false,
|
|
217
215
|
options: ["Hosting with Launch", "Custom Hosting"],
|
|
218
216
|
description: messages_1.deployAppMsg.HOSTING_TYPE,
|
|
219
|
-
}),
|
|
220
|
-
"app-url": cli_utilities_1.Flags.string({
|
|
217
|
+
}), "app-url": cli_utilities_1.Flags.string({
|
|
221
218
|
description: messages_1.deployAppMsg.APP_URL,
|
|
222
|
-
}),
|
|
223
|
-
"launch-project": cli_utilities_1.Flags.string({
|
|
219
|
+
}), "launch-project": cli_utilities_1.Flags.string({
|
|
224
220
|
multiple: false,
|
|
225
221
|
options: ["existing", "new"],
|
|
226
222
|
description: messages_1.deployAppMsg.LAUNCH_PROJECT,
|
|
227
|
-
}),
|
|
228
|
-
config: cli_utilities_1.Flags.string({
|
|
223
|
+
}), config: cli_utilities_1.Flags.string({
|
|
229
224
|
char: "c",
|
|
230
225
|
description: messages_1.deployAppMsg.CONFIG_FILE,
|
|
231
|
-
}),
|
|
232
|
-
};
|
|
226
|
+
}) }, app_cli_base_command_1.AppCLIBaseCommand.baseFlags);
|
|
233
227
|
exports.default = Deploy;
|
package/lib/commands/app/get.js
CHANGED
|
@@ -42,18 +42,14 @@ Get.examples = [
|
|
|
42
42
|
"$ <%= config.bin %> <%= command.id %> --org <value> --app-uid <value> --app-type stack",
|
|
43
43
|
"$ <%= config.bin %> <%= command.id %> --org <value> --app-uid <value> --app-type organization",
|
|
44
44
|
];
|
|
45
|
-
Get.flags = {
|
|
46
|
-
"app-uid": cli_utilities_1.flags.string({
|
|
45
|
+
Get.flags = Object.assign({ "app-uid": cli_utilities_1.flags.string({
|
|
47
46
|
description: messages_1.commonMsg.APP_UID,
|
|
48
|
-
}),
|
|
49
|
-
"app-type": cli_utilities_1.flags.string({
|
|
47
|
+
}), "app-type": cli_utilities_1.flags.string({
|
|
50
48
|
default: "stack",
|
|
51
49
|
options: ["stack", "organization"],
|
|
52
50
|
description: messages_1.commonMsg.APP_TYPE_DESCRIPTION,
|
|
53
|
-
}),
|
|
54
|
-
"data-dir": cli_utilities_1.flags.string({
|
|
51
|
+
}), "data-dir": cli_utilities_1.flags.string({
|
|
55
52
|
char: "d",
|
|
56
53
|
description: messages_1.commonMsg.CURRENT_WORKING_DIR,
|
|
57
|
-
}),
|
|
58
|
-
};
|
|
54
|
+
}) }, app_cli_base_command_1.AppCLIBaseCommand.baseFlags);
|
|
59
55
|
exports.default = Get;
|
|
@@ -25,11 +25,12 @@ class App extends cli_utilities_1.Command {
|
|
|
25
25
|
App.description = "Apps CLI plugin";
|
|
26
26
|
App.examples = [
|
|
27
27
|
"$ <%= config.bin %> <%= command.id %>:create",
|
|
28
|
-
"$ <%= config.bin %> <%= command.id %>:get",
|
|
29
|
-
"$ <%= config.bin %> <%= command.id %>:update",
|
|
30
28
|
"$ <%= config.bin %> <%= command.id %>:delete",
|
|
29
|
+
"$ <%= config.bin %> <%= command.id %>:deploy",
|
|
30
|
+
"$ <%= config.bin %> <%= command.id %>:get",
|
|
31
31
|
"$ <%= config.bin %> <%= command.id %>:install",
|
|
32
|
-
"$ <%= config.bin %> <%= command.id %>:uninstall",
|
|
33
32
|
"$ <%= config.bin %> <%= command.id %>:reinstall",
|
|
33
|
+
"$ <%= config.bin %> <%= command.id %>:uninstall",
|
|
34
|
+
"$ <%= config.bin %> <%= command.id %>:update",
|
|
34
35
|
];
|
|
35
36
|
exports.default = App;
|
|
@@ -109,12 +109,9 @@ Install.examples = [
|
|
|
109
109
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1>",
|
|
110
110
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>",
|
|
111
111
|
];
|
|
112
|
-
Install.flags = {
|
|
113
|
-
"app-uid": cli_utilities_1.flags.string({
|
|
112
|
+
Install.flags = Object.assign({ "app-uid": cli_utilities_1.flags.string({
|
|
114
113
|
description: messages_1.commonMsg.APP_UID,
|
|
115
|
-
}),
|
|
116
|
-
"stack-api-key": cli_utilities_1.flags.string({
|
|
114
|
+
}), "stack-api-key": cli_utilities_1.flags.string({
|
|
117
115
|
description: messages_1.commonMsg.STACK_API_KEY,
|
|
118
|
-
}),
|
|
119
|
-
};
|
|
116
|
+
}) }, app_cli_base_command_1.AppCLIBaseCommand.baseFlags);
|
|
120
117
|
exports.default = Install;
|
|
@@ -94,12 +94,9 @@ Reinstall.examples = [
|
|
|
94
94
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1>",
|
|
95
95
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>",
|
|
96
96
|
];
|
|
97
|
-
Reinstall.flags = {
|
|
98
|
-
"app-uid": cli_utilities_1.flags.string({
|
|
97
|
+
Reinstall.flags = Object.assign({ "app-uid": cli_utilities_1.flags.string({
|
|
99
98
|
description: messages_1.commonMsg.APP_UID,
|
|
100
|
-
}),
|
|
101
|
-
"stack-api-key": cli_utilities_1.flags.string({
|
|
99
|
+
}), "stack-api-key": cli_utilities_1.flags.string({
|
|
102
100
|
description: messages_1.commonMsg.STACK_API_KEY,
|
|
103
|
-
}),
|
|
104
|
-
};
|
|
101
|
+
}) }, app_cli_base_command_1.AppCLIBaseCommand.baseFlags);
|
|
105
102
|
exports.default = Reinstall;
|
|
@@ -39,15 +39,11 @@ Uninstall.examples = [
|
|
|
39
39
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1>",
|
|
40
40
|
"$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --installation-uid <INSTALLATION-UID-1>",
|
|
41
41
|
];
|
|
42
|
-
Uninstall.flags = {
|
|
43
|
-
'app-uid': cli_utilities_1.flags.string({
|
|
42
|
+
Uninstall.flags = Object.assign({ 'app-uid': cli_utilities_1.flags.string({
|
|
44
43
|
description: messages_1.commonMsg.APP_UID,
|
|
45
|
-
}),
|
|
46
|
-
'installation-uid': cli_utilities_1.flags.string({
|
|
44
|
+
}), 'installation-uid': cli_utilities_1.flags.string({
|
|
47
45
|
description: messages_1.uninstallAppMsg.INSTALLATION_UID
|
|
48
|
-
}),
|
|
49
|
-
'uninstall-all': cli_utilities_1.flags.boolean({
|
|
46
|
+
}), 'uninstall-all': cli_utilities_1.flags.boolean({
|
|
50
47
|
description: messages_1.uninstallAppMsg.UNINSTALL_ALL,
|
|
51
|
-
}),
|
|
52
|
-
};
|
|
48
|
+
}) }, app_cli_base_command_1.AppCLIBaseCommand.baseFlags);
|
|
53
49
|
exports.default = Uninstall;
|
|
@@ -187,9 +187,7 @@ Update.examples = [
|
|
|
187
187
|
"$ <%= config.bin %> <%= command.id %>",
|
|
188
188
|
"$ <%= config.bin %> <%= command.id %> --app-manifest ./boilerplate/manifest.json",
|
|
189
189
|
];
|
|
190
|
-
Update.flags = {
|
|
191
|
-
"app-manifest": cli_utilities_1.flags.string({
|
|
190
|
+
Update.flags = Object.assign({ "app-manifest": cli_utilities_1.flags.string({
|
|
192
191
|
description: (0, messages_1.$t)(messages_1.appUpdate.FILE_PATH, { fileName: "app manifest.json" }),
|
|
193
|
-
}),
|
|
194
|
-
};
|
|
192
|
+
}) }, app_cli_base_command_1.AppCLIBaseCommand.baseFlags);
|
|
195
193
|
exports.default = Update;
|
package/lib/util/inquirer.js
CHANGED
|
@@ -126,6 +126,9 @@ exports.getInstalledApps = getInstalledApps;
|
|
|
126
126
|
*/
|
|
127
127
|
function getDeveloperHubUrl() {
|
|
128
128
|
const { cma } = cli_utilities_1.configHandler.get("region") || {};
|
|
129
|
+
if (!cma) {
|
|
130
|
+
throw new Error("Region not configured. Please set the region with command $ csdx config:set:region");
|
|
131
|
+
}
|
|
129
132
|
let developerHubBaseUrl = cma.replace("api", "developerhub-api");
|
|
130
133
|
if (developerHubBaseUrl.startsWith("http")) {
|
|
131
134
|
developerHubBaseUrl = developerHubBaseUrl.split("//")[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/apps-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "App ClI",
|
|
5
5
|
"author": "Contentstack CLI",
|
|
6
6
|
"homepage": "https://github.com/contentstack/contentstack-apps-cli",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@apollo/client": "^3.7.9",
|
|
24
24
|
"@contentstack/cli-command": "^1.2.18",
|
|
25
25
|
"@contentstack/cli-launch": "^1.0.18",
|
|
26
|
-
"@contentstack/cli-utilities": "^1.
|
|
26
|
+
"@contentstack/cli-utilities": "^1.7.0",
|
|
27
27
|
"adm-zip": "^0.5.10",
|
|
28
28
|
"chalk": "^4.1.2",
|
|
29
29
|
"lodash": "^4.17.21",
|