@contentstack/apps-cli 1.3.3 → 1.3.4

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 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.3 darwin-arm64 node-v18.12.1
23
+ @contentstack/apps-cli/1.3.4 darwin-arm64 node-v22.2.0
24
24
  $ csdx --help [COMMAND]
25
25
  USAGE
26
26
  $ csdx COMMAND
@@ -69,7 +69,7 @@ EXAMPLES
69
69
  $ csdx app:update
70
70
  ```
71
71
 
72
- _See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/index.ts)_
72
+ _See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/index.ts)_
73
73
 
74
74
  ## `csdx app:create`
75
75
 
@@ -109,7 +109,7 @@ EXAMPLES
109
109
  $ csdx app:create --name App-4 --app-type organization --org <UID> --boilerplate <Ecommerce App Boilerplate>
110
110
  ```
111
111
 
112
- _See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/create.ts)_
112
+ _See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/create.ts)_
113
113
 
114
114
  ## `csdx app:delete`
115
115
 
@@ -134,7 +134,7 @@ EXAMPLES
134
134
  $ csdx app:delete --app-uid <value> --org <value> -d ./boilerplate
135
135
  ```
136
136
 
137
- _See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/delete.ts)_
137
+ _See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/delete.ts)_
138
138
 
139
139
  ## `csdx app:deploy`
140
140
 
@@ -142,7 +142,7 @@ Deploy an app
142
142
 
143
143
  ```
144
144
  USAGE
145
- $ csdx app:deploy [--app-uid <value>] [--hosting-type Hosting with Launch|Custom Hosting] [--app-url <value>]
145
+ $ csdx app:deploy [--app-uid <value>] [--hosting-type hosting-with-launch|custom-hosting] [--app-url <value>]
146
146
  [--launch-project existing|new] [-c <value>] [--org <value>]
147
147
 
148
148
  FLAGS
@@ -150,7 +150,7 @@ FLAGS
150
150
  --app-uid=<value> Provide the app UID of an existing app.
151
151
  --app-url=<value> Please enter the URL of the app you want to deploy.
152
152
  --hosting-type=<option> Choose a valid Hosting Type.
153
- <options: Hosting with Launch|Custom Hosting>
153
+ <options: hosting-with-launch|custom-hosting>
154
154
  --launch-project=<option> Choose a new or an existing Launch project.
155
155
  <options: existing|new>
156
156
  --org=<value> Provide the organization UID to fetch the app details for the operation.
@@ -163,16 +163,16 @@ EXAMPLES
163
163
 
164
164
  $ csdx app:deploy --org <UID> --app-uid <APP-UID-1>
165
165
 
166
- $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Custom Hosting> --app-url <https://localhost:3000>
166
+ $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <custom-hosting> --app-url <https://localhost:3000>
167
167
 
168
- $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <existing>
168
+ $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <hosting-with-launch> --launch-project <existing>
169
169
 
170
- $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new>
170
+ $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <hosting-with-launch> --launch-project <new>
171
171
 
172
- $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new> --config <config-path>
172
+ $ csdx app:deploy --org <UID> --app-uid <APP-UID-1> --hosting-type <hosting-with-launch> --launch-project <new> --config <config-path>
173
173
  ```
174
174
 
175
- _See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/deploy.ts)_
175
+ _See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/deploy.ts)_
176
176
 
177
177
  ## `csdx app:get`
178
178
 
@@ -202,7 +202,7 @@ EXAMPLES
202
202
  $ csdx app:get --org <value> --app-uid <value> --app-type organization
203
203
  ```
204
204
 
205
- _See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/get.ts)_
205
+ _See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/get.ts)_
206
206
 
207
207
  ## `csdx app:install`
208
208
 
@@ -228,7 +228,7 @@ EXAMPLES
228
228
  $ csdx app:install --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
229
229
  ```
230
230
 
231
- _See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/install.ts)_
231
+ _See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/install.ts)_
232
232
 
233
233
  ## `csdx app:reinstall`
234
234
 
@@ -254,7 +254,7 @@ EXAMPLES
254
254
  $ csdx app:reinstall --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
255
255
  ```
256
256
 
257
- _See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/reinstall.ts)_
257
+ _See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/reinstall.ts)_
258
258
 
259
259
  ## `csdx app:uninstall`
260
260
 
@@ -281,7 +281,7 @@ EXAMPLES
281
281
  $ csdx app:uninstall --org <UID> --app-uid <APP-UID-1> --installation-uid <INSTALLATION-UID-1>
282
282
  ```
283
283
 
284
- _See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/uninstall.ts)_
284
+ _See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/uninstall.ts)_
285
285
 
286
286
  ## `csdx app:update`
287
287
 
@@ -304,5 +304,5 @@ EXAMPLES
304
304
  $ csdx app:update --app-manifest ./boilerplate/manifest.json
305
305
  ```
306
306
 
307
- _See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.3.3/src/commands/app/update.ts)_
307
+ _See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.3.4/src/commands/app/update.ts)_
308
308
  <!-- commandsstop -->
@@ -18,6 +18,7 @@ class BaseCommand extends cli_command_1.Command {
18
18
  this.messages = Object.assign({}, messages_1.default);
19
19
  }
20
20
  async init() {
21
+ var _a, _b;
21
22
  await super.init();
22
23
  const { args, flags } = await this.parse({
23
24
  flags: this.ctor.flags,
@@ -33,8 +34,12 @@ class BaseCommand extends cli_command_1.Command {
33
34
  const logger = new util_1.Logger(this.sharedConfig);
34
35
  this.log = logger.log.bind(logger);
35
36
  this.validateRegionAndAuth();
36
- this.developerHubBaseUrl =
37
- this.sharedConfig.developerHubBaseUrl || (0, util_1.getDeveloperHubUrl)();
37
+ this.developerHubBaseUrl = this.sharedConfig.developerHubBaseUrl;
38
+ if ((_a = this.developerHubUrl) === null || _a === void 0 ? void 0 : _a.startsWith("https")) {
39
+ this.developerHubBaseUrl = (_b = this.developerHubUrl) === null || _b === void 0 ? void 0 : _b.split("//")[1];
40
+ }
41
+ if (!this.developerHubBaseUrl)
42
+ this.developerHubBaseUrl = (0, util_1.getDeveloperHubUrl)();
38
43
  await this.initCmaSDK();
39
44
  await this.initMarketplaceSDK();
40
45
  }
@@ -6,15 +6,17 @@ const messages_1 = require("../../messages");
6
6
  const util_1 = require("../../util");
7
7
  class Delete extends app_cli_base_command_1.AppCLIBaseCommand {
8
8
  async run() {
9
- var _a, _b, _c, _d;
9
+ var _a, _b, _c;
10
10
  try {
11
11
  let app;
12
- this.sharedConfig.org =
13
- (_b = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.organization_uid) !== null && _b !== void 0 ? _b : (await (0, util_1.getOrg)(this.flags, {
12
+ this.sharedConfig.org = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.organization_uid;
13
+ if (!this.sharedConfig.org) {
14
+ this.sharedConfig.org = await (0, util_1.getOrg)(this.flags, {
14
15
  managementSdk: this.managementSdk,
15
16
  log: this.log,
16
- }));
17
- this.flags["app-uid"] = (_d = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.uid) !== null && _d !== void 0 ? _d : this.flags["app-uid"];
17
+ });
18
+ }
19
+ this.flags["app-uid"] = (_c = (_b = this.manifestData) === null || _b === void 0 ? void 0 : _b.uid) !== null && _c !== void 0 ? _c : this.flags["app-uid"];
18
20
  if (!this.flags["app-uid"]) {
19
21
  app = await (0, util_1.getApp)(this.flags, this.sharedConfig.org, {
20
22
  marketplaceSdk: this.marketplaceAppSdk,
@@ -26,12 +26,12 @@ class Deploy extends app_cli_base_command_1.AppCLIBaseCommand {
26
26
  deployment_url: "",
27
27
  };
28
28
  switch (flags["hosting-type"]) {
29
- case "Custom Hosting":
29
+ case "custom-hosting":
30
30
  flags["app-url"] = flags["app-url"] || (await (0, util_2.getAppUrl)());
31
31
  this.flags["app-url"] = (0, util_2.formatUrl)(flags["app-url"]);
32
32
  updateHostingPayload["deployment_url"] = this.flags["app-url"];
33
33
  break;
34
- case "Hosting with Launch":
34
+ case "hosting-with-Launch":
35
35
  updateHostingPayload["provider"] = "launch";
36
36
  const config = (0, util_2.setupConfig)(flags["config"]);
37
37
  config["name"] = config["name"] || (app === null || app === void 0 ? void 0 : app.name);
@@ -68,10 +68,14 @@ class Deploy extends app_cli_base_command_1.AppCLIBaseCommand {
68
68
  */
69
69
  async getOrganization() {
70
70
  var _a, _b;
71
- return ((_b = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.organization_uid) !== null && _b !== void 0 ? _b : (await (0, util_2.getOrg)(this.flags, {
72
- managementSdk: this.managementSdk,
73
- log: this.log,
74
- })));
71
+ const organizationUid = (_b = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.organization_uid) !== null && _b !== void 0 ? _b : "";
72
+ if (!organizationUid) {
73
+ return await (0, util_2.getOrg)(this.flags, {
74
+ managementSdk: this.managementSdk,
75
+ log: this.log,
76
+ });
77
+ }
78
+ return organizationUid;
75
79
  }
76
80
  /**
77
81
  * Fetches the details of an app.
@@ -205,16 +209,16 @@ Deploy.description = "Deploy an app";
205
209
  Deploy.examples = [
206
210
  "$ <%= config.bin %> <%= command.id %>",
207
211
  "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1>",
208
- "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Custom Hosting> --app-url <https://localhost:3000>",
209
- "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <existing>",
210
- "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new>",
211
- "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new> --config <config-path>",
212
+ "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <custom-hosting> --app-url <https://localhost:3000>",
213
+ "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <hosting-with-launch> --launch-project <existing>",
214
+ "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <hosting-with-launch> --launch-project <new>",
215
+ "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <hosting-with-launch> --launch-project <new> --config <config-path>",
212
216
  ];
213
217
  Deploy.flags = Object.assign({ "app-uid": cli_utilities_1.Flags.string({
214
218
  description: messages_1.commonMsg.APP_UID,
215
219
  }), "hosting-type": cli_utilities_1.Flags.string({
216
220
  multiple: false,
217
- options: ["Hosting with Launch", "Custom Hosting"],
221
+ options: ["hosting-with-launch", "custom-hosting"],
218
222
  description: messages_1.deployAppMsg.HOSTING_TYPE,
219
223
  }), "app-url": cli_utilities_1.Flags.string({
220
224
  description: messages_1.deployAppMsg.APP_URL,
@@ -6,15 +6,17 @@ const app_cli_base_command_1 = require("../../app-cli-base-command");
6
6
  const util_1 = require("../../util");
7
7
  class Get extends app_cli_base_command_1.AppCLIBaseCommand {
8
8
  async run() {
9
- var _a, _b, _c, _d;
9
+ var _a, _b, _c;
10
10
  try {
11
11
  let appData;
12
12
  this.flags["app-uid"] = (_b = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : this.flags["app-uid"];
13
- this.sharedConfig.org =
14
- (_d = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid) !== null && _d !== void 0 ? _d : (await (0, util_1.getOrg)(this.flags, {
13
+ this.sharedConfig.org = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid;
14
+ if (!this.sharedConfig.org) {
15
+ this.sharedConfig.org = await (0, util_1.getOrg)(this.flags, {
15
16
  managementSdk: this.managementSdk,
16
17
  log: this.log,
17
- }));
18
+ });
19
+ }
18
20
  if (!this.flags["app-uid"]) {
19
21
  appData = await (0, util_1.getApp)(this.flags, this.sharedConfig.org, {
20
22
  marketplaceSdk: this.marketplaceAppSdk,
@@ -6,7 +6,7 @@ const messages_1 = require("../../messages");
6
6
  const util_1 = require("../../util");
7
7
  class Install extends app_cli_base_command_1.AppCLIBaseCommand {
8
8
  async run() {
9
- var _a, _b, _c, _d;
9
+ var _a, _b, _c;
10
10
  try {
11
11
  let app, stack, appType;
12
12
  this.flags["app-uid"] = (_b = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : this.flags["app-uid"]; //manifest file first preference
@@ -19,11 +19,13 @@ class Install extends app_cli_base_command_1.AppCLIBaseCommand {
19
19
  });
20
20
  }
21
21
  // get organization to be used
22
- this.sharedConfig.org =
23
- (_d = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid) !== null && _d !== void 0 ? _d : (await (0, util_1.getOrg)(this.flags, {
22
+ this.sharedConfig.org = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid;
23
+ if (!this.sharedConfig.org) {
24
+ this.sharedConfig.org = await (0, util_1.getOrg)(this.flags, {
24
25
  managementSdk: this.managementSdk,
25
26
  log: this.log,
26
- }));
27
+ });
28
+ }
27
29
  // fetch app details
28
30
  if (!this.flags["app-uid"]) {
29
31
  app = await (0, util_1.getApp)(this.flags, this.sharedConfig.org, {
@@ -86,7 +88,9 @@ class Install extends app_cli_base_command_1.AppCLIBaseCommand {
86
88
  (error === null || error === void 0 ? void 0 : error.status) === 400) {
87
89
  this.displayReInstallMsg();
88
90
  }
89
- this.exit(1);
91
+ else {
92
+ this.exit(1);
93
+ }
90
94
  }
91
95
  }
92
96
  /**
@@ -6,7 +6,7 @@ const messages_1 = require("../../messages");
6
6
  const util_1 = require("../../util");
7
7
  class Reinstall extends app_cli_base_command_1.AppCLIBaseCommand {
8
8
  async run() {
9
- var _a, _b, _c, _d;
9
+ var _a, _b, _c;
10
10
  try {
11
11
  let app, stack, appType;
12
12
  this.flags["app-uid"] = (_b = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : this.flags["app-uid"];
@@ -16,11 +16,13 @@ class Reinstall extends app_cli_base_command_1.AppCLIBaseCommand {
16
16
  log: this.log,
17
17
  });
18
18
  }
19
- this.sharedConfig.org =
20
- (_d = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid) !== null && _d !== void 0 ? _d : (await (0, util_1.getOrg)(this.flags, {
19
+ this.sharedConfig.org = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid;
20
+ if (!this.sharedConfig.org) {
21
+ this.sharedConfig.org = await (0, util_1.getOrg)(this.flags, {
21
22
  managementSdk: this.managementSdk,
22
23
  log: this.log,
23
- }));
24
+ });
25
+ }
24
26
  if (!this.flags["app-uid"]) {
25
27
  app = await (0, util_1.getApp)(this.flags, this.sharedConfig.org, {
26
28
  marketplaceSdk: this.marketplaceAppSdk,
@@ -76,8 +78,13 @@ class Reinstall extends app_cli_base_command_1.AppCLIBaseCommand {
76
78
  this.displayStackUrl();
77
79
  }
78
80
  catch (error) {
79
- this.log((error === null || error === void 0 ? void 0 : error.errorMessage) || (error === null || error === void 0 ? void 0 : error.message) || error, "error");
80
- this.exit(1);
81
+ if ((error === null || error === void 0 ? void 0 : error.errorMessage) !== "You are already using the latest version.") {
82
+ this.log((error === null || error === void 0 ? void 0 : error.errorMessage) || (error === null || error === void 0 ? void 0 : error.message) || error, "error");
83
+ this.exit(1);
84
+ }
85
+ else {
86
+ this.log((error === null || error === void 0 ? void 0 : error.errorMessage) || (error === null || error === void 0 ? void 0 : error.message) || error, "error");
87
+ }
81
88
  }
82
89
  }
83
90
  displayStackUrl() {
@@ -7,12 +7,18 @@ const util_1 = require("../../util");
7
7
  const uninstall_app_factory_1 = require("../../factories/uninstall-app-factory");
8
8
  class Uninstall extends app_cli_base_command_1.AppCLIBaseCommand {
9
9
  async run() {
10
- var _a, _b, _c, _d;
10
+ var _a, _b, _c;
11
11
  try {
12
12
  let app, appType;
13
13
  this.flags["app-uid"] = (_b = (_a = this.manifestData) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : this.flags["app-uid"];
14
14
  // get organization to be used
15
- this.sharedConfig.org = (_d = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid) !== null && _d !== void 0 ? _d : (await (0, util_1.getOrg)(this.flags, { managementSdk: this.managementSdk, log: this.log }));
15
+ this.sharedConfig.org = (_c = this.manifestData) === null || _c === void 0 ? void 0 : _c.organization_uid;
16
+ if (!this.sharedConfig.org) {
17
+ this.sharedConfig.org = await (0, util_1.getOrg)(this.flags, {
18
+ managementSdk: this.managementSdk,
19
+ log: this.log,
20
+ });
21
+ }
16
22
  // fetch app details
17
23
  if (!this.flags['app-uid']) {
18
24
  app = await (0, util_1.getInstalledApps)(this.flags, this.sharedConfig.org, { marketplaceSdk: this.marketplaceAppSdk, log: this.log });
@@ -10,6 +10,7 @@ declare const errors: {
10
10
  APP_CREATION_FAILURE: string;
11
11
  APP_UID_NOT_MATCH: string;
12
12
  APP_CREATION_CONSTRAINT_FAILURE: string;
13
+ APP_CREATE_FAILURE_AND_ROLLBACK: string;
13
14
  APP_INVALID_ORG: string;
14
15
  DUPLICATE_APP_NAME: string;
15
16
  INVALID_URL: string;
@@ -17,6 +18,7 @@ declare const errors: {
17
18
  declare const commonMsg: {
18
19
  CONFIG: string;
19
20
  MAX_RETRY_LIMIT: string;
21
+ MAX_RETRY_LIMIT_WARN: string;
20
22
  PROVIDE_ORG_UID: string;
21
23
  CURRENT_WORKING_DIR: string;
22
24
  SKIP_CONFIRMATION: string;
@@ -46,11 +48,14 @@ declare const appCreate: {
46
48
  START_APP_COMMAND: string;
47
49
  BOILERPLATE_TEMPLATES: string;
48
50
  SELECT_BOILERPLATE: string;
51
+ DEPENDENCY_INSTALLATION_FAILURE: string;
52
+ APP_CREATION_FAILED: string;
49
53
  };
50
54
  declare const getAppMsg: {
51
55
  CHOOSE_APP: string;
52
56
  APP_UID_NOT_FOUND: string;
53
57
  FILE_WRITTEN_SUCCESS: string;
58
+ FILE_WRITTEN_SUCCESS_INFO: string;
54
59
  APPS_NOT_FOUND: string;
55
60
  FILE_ALREADY_EXISTS: string;
56
61
  };
@@ -90,6 +95,8 @@ declare const reinstallAppMsg: {
90
95
  MISSING_STACK_API_KEY: string;
91
96
  REINSTALLING_APP_NOTICE: string;
92
97
  APP_UID: string;
98
+ APP_ALREADY_LATEST_VERSION: string;
99
+ APP_IS_LATEST_VERSION: string;
93
100
  };
94
101
  declare const deployAppMsg: {
95
102
  APP_DEPLOYED: string;
@@ -13,6 +13,7 @@ const errors = {
13
13
  APP_CREATION_FAILURE: "App could not be registered on Developer Hub.",
14
14
  APP_UID_NOT_MATCH: "Provided app UID is not matching with the app manifest.json app UID",
15
15
  APP_CREATION_CONSTRAINT_FAILURE: "App could not be registered. Please go through the constraints on the app name and try running the command again.",
16
+ APP_CREATE_FAILURE_AND_ROLLBACK: "App creation should fail and rollback",
16
17
  APP_INVALID_ORG: "App could not be registered. Please verify the inputs and try again.",
17
18
  DUPLICATE_APP_NAME: "The {appName} app already exists. Please create an app with a different name.",
18
19
  INVALID_URL: "Please enter a valid URL. The URL should start with http:// or https://",
@@ -21,6 +22,7 @@ exports.errors = errors;
21
22
  const commonMsg = {
22
23
  CONFIG: "Path of the external config",
23
24
  MAX_RETRY_LIMIT: "Maximum retry limit reached.",
25
+ MAX_RETRY_LIMIT_WARN: "warn: Maximum retry limit reached.\n",
24
26
  PROVIDE_ORG_UID: "Provide the organization UID to fetch the app details for the operation.",
25
27
  CURRENT_WORKING_DIR: "Current working directory.",
26
28
  SKIP_CONFIRMATION: "Use this flag to skip the confirmation.",
@@ -50,13 +52,16 @@ const appCreate = {
50
52
  REGISTER_THE_APP_ON_DEVELOPER_HUB: "Registering the app with the name {appName} on the Developer Hub...",
51
53
  START_APP_COMMAND: "Start the app using the following command: {command}",
52
54
  BOILERPLATE_TEMPLATES: "Provide a boilerplate. <options: App Boilerplate|DAM App Boilerplate|Ecommerce App Boilerplate>",
53
- SELECT_BOILERPLATE: "Select one from the following boilerplates:"
55
+ SELECT_BOILERPLATE: "Select one from the following boilerplates:",
56
+ DEPENDENCY_INSTALLATION_FAILURE: "Dependency installation failed.",
57
+ APP_CREATION_FAILED: "Failed to create app"
54
58
  };
55
59
  exports.appCreate = appCreate;
56
60
  const getAppMsg = {
57
61
  CHOOSE_APP: "Choose an app",
58
62
  APP_UID_NOT_FOUND: "App UID was not found!",
59
63
  FILE_WRITTEN_SUCCESS: "App data has been written to {file} successfully.",
64
+ FILE_WRITTEN_SUCCESS_INFO: "info: App data has been written to {file} successfully.",
60
65
  APPS_NOT_FOUND: "No apps found!",
61
66
  FILE_ALREADY_EXISTS: "{file} already exists. Do you want to overwrite this file? (y/n) (Selecting 'n' creates a new file)",
62
67
  };
@@ -101,6 +106,8 @@ const reinstallAppMsg = {
101
106
  MISSING_STACK_API_KEY: "As {app} is a stack app, it can only be reinstalled in a stack. Please select a stack.",
102
107
  REINSTALLING_APP_NOTICE: "Reinstalling {app} on {type} {target}.",
103
108
  APP_UID: "Provide the app UID of an existing app to be reinstalled.",
109
+ APP_ALREADY_LATEST_VERSION: "The application is already up to date; no new version is available.",
110
+ APP_IS_LATEST_VERSION: "The app is already running the latest version and does not require an update."
104
111
  };
105
112
  exports.reinstallAppMsg = reinstallAppMsg;
106
113
  const deployAppMsg = {
@@ -229,8 +229,8 @@ function populateMissingDataInInstallations(installations, stacks) {
229
229
  }
230
230
  async function getHostingType() {
231
231
  const hostingTypes = [
232
- { name: "Hosting with Launch", value: "Hosting with Launch" },
233
- { name: "Custom Hosting", value: "Custom Hosting" },
232
+ { name: "Hosting with Launch", value: "hosting-with-launch" },
233
+ { name: "Custom Hosting", value: "custom-hosting" },
234
234
  ];
235
235
  return cli_utilities_1.cliux.inquire({
236
236
  type: "list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/apps-cli",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "App ClI",
5
5
  "author": "Contentstack CLI",
6
6
  "homepage": "https://github.com/contentstack/contentstack-apps-cli",
@@ -20,39 +20,42 @@
20
20
  "/oclif.manifest.json"
21
21
  ],
22
22
  "dependencies": {
23
- "@apollo/client": "^3.7.9",
24
- "@contentstack/cli-command": "~1.2.19",
25
- "@contentstack/cli-launch": "~1.2.0",
26
- "@contentstack/cli-utilities": "~1.7.0",
27
- "adm-zip": "^0.5.15",
23
+ "@apollo/client": "^3.11.8",
24
+ "@contentstack/cli-command": "^1.3.2",
25
+ "@contentstack/cli-launch": "^1.2.3",
26
+ "@contentstack/cli-utilities": "^1.8.0",
27
+ "adm-zip": "^0.5.16",
28
+ "chai-as-promised": "^8.0.0",
28
29
  "chalk": "^4.1.2",
30
+ "fancy-test": "^3.0.16",
29
31
  "lodash": "^4.17.21",
30
32
  "shelljs": "^0.8.5",
31
33
  "tmp": "^0.2.3",
32
- "winston": "^3.12.0"
34
+ "winston": "^3.15.0"
33
35
  },
34
36
  "devDependencies": {
35
- "@oclif/test": "^2.5.6",
37
+ "@oclif/test": "^4.0.10",
36
38
  "@types/adm-zip": "^0.5.5",
37
- "@types/chai": "^4.3.11",
38
- "@types/lodash": "^4.17.4",
39
- "@types/mocha": "^10.0.6",
40
- "@types/node": "^20.15.0",
39
+ "@types/chai": "^4.3.20",
40
+ "@types/lodash": "^4.17.10",
41
+ "@types/mocha": "^10.0.9",
42
+ "@types/node": "^20.16.11",
41
43
  "@types/shelljs": "^0.8.15",
42
44
  "@types/tmp": "^0.2.6",
43
- "axios": "^1.7.4",
44
- "chai": "^4.3.10",
45
+ "axios": "^1.7.7",
46
+ "chai": "^4.5.0",
45
47
  "dotenv": "^16.4.5",
46
- "eslint": "^8.57.0",
47
- "eslint-config-oclif": "^5.0.0",
48
- "eslint-config-oclif-typescript": "^3.1.0",
49
- "mocha": "^10.2.0",
48
+ "eslint": "^8.57.1",
49
+ "eslint-config-oclif": "^5.2.1",
50
+ "eslint-config-oclif-typescript": "^3.1.12",
51
+ "fancy-test": "3.0.16",
52
+ "mocha": "^10.7.3",
50
53
  "nyc": "^15.1.0",
51
- "oclif": "^3.10.0",
54
+ "oclif": "^3.17.2",
52
55
  "shx": "^0.3.4",
53
56
  "ts-node": "^10.9.2",
54
- "tslib": "^2.6.2",
55
- "typescript": "^5.3.3"
57
+ "tslib": "^2.8.0",
58
+ "typescript": "^5.6.3"
56
59
  },
57
60
  "oclif": {
58
61
  "bin": "csdx",