@contentstack/apps-cli 1.3.2 → 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.2 darwin-arm64 node-v18.20.2
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.2/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.2/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.2/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.2/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.2/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.2/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.2/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.2/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.2/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.
@@ -96,8 +100,7 @@ class Deploy extends app_cli_base_command_1.AppCLIBaseCommand {
96
100
  * @returns {Promise<ApolloClient>} The Apollo Client instance.
97
101
  */
98
102
  async getApolloClient(projectUid = "") {
99
- const baseUrl = config_1.default.launchBaseUrl ||
100
- config_1.default.launchHubUrls[this.cmaAPIUrl];
103
+ const baseUrl = config_1.default.launchBaseUrl || (0, util_2.getLaunchHubUrl)();
101
104
  const manageApiBaseUrl = `${baseUrl}/${config_1.default.manageApiEndpoint}`;
102
105
  return await new util_1.GraphqlApiClient({
103
106
  headers: {
@@ -206,16 +209,16 @@ Deploy.description = "Deploy an app";
206
209
  Deploy.examples = [
207
210
  "$ <%= config.bin %> <%= command.id %>",
208
211
  "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1>",
209
- "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Custom Hosting> --app-url <https://localhost:3000>",
210
- "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <existing>",
211
- "$ <%= config.bin %> <%= command.id %> --org <UID> --app-uid <APP-UID-1> --hosting-type <Hosting with Launch> --launch-project <new>",
212
- "$ <%= 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>",
213
216
  ];
214
217
  Deploy.flags = Object.assign({ "app-uid": cli_utilities_1.Flags.string({
215
218
  description: messages_1.commonMsg.APP_UID,
216
219
  }), "hosting-type": cli_utilities_1.Flags.string({
217
220
  multiple: false,
218
- options: ["Hosting with Launch", "Custom Hosting"],
221
+ options: ["hosting-with-launch", "custom-hosting"],
219
222
  description: messages_1.deployAppMsg.HOSTING_TYPE,
220
223
  }), "app-url": cli_utilities_1.Flags.string({
221
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 = {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.apiRequestHandler = void 0;
3
+ exports.apiRequestHandler = apiRequestHandler;
4
4
  const cli_utilities_1 = require("@contentstack/cli-utilities");
5
5
  const error_helper_1 = require("./error-helper");
6
6
  async function apiRequestHandler(params) {
@@ -49,4 +49,3 @@ async function apiRequestHandler(params) {
49
49
  throw error;
50
50
  }
51
51
  }
52
- exports.apiRequestHandler = apiRequestHandler;
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateBoilerplate = exports.fetchBoilerplateDetails = exports.handleProjectNameConflict = exports.formatUrl = exports.disconnectApp = exports.setupConfig = exports.getManifestDetails = exports.getProjects = exports.updateApp = exports.sanitizePath = exports.reinstallApp = exports.fetchInstalledApps = exports.uninstallApp = exports.fetchStack = exports.getStacks = exports.installApp = exports.deleteApp = exports.fetchAppInstallations = exports.fetchApp = exports.fetchApps = exports.getOrgAppUiLocation = exports.getOrganizations = void 0;
3
+ exports.handleProjectNameConflict = exports.sanitizePath = void 0;
4
+ exports.getOrganizations = getOrganizations;
5
+ exports.getOrgAppUiLocation = getOrgAppUiLocation;
6
+ exports.fetchApps = fetchApps;
7
+ exports.fetchApp = fetchApp;
8
+ exports.fetchAppInstallations = fetchAppInstallations;
9
+ exports.deleteApp = deleteApp;
10
+ exports.installApp = installApp;
11
+ exports.getStacks = getStacks;
12
+ exports.fetchStack = fetchStack;
13
+ exports.uninstallApp = uninstallApp;
14
+ exports.fetchInstalledApps = fetchInstalledApps;
15
+ exports.reinstallApp = reinstallApp;
16
+ exports.updateApp = updateApp;
17
+ exports.getProjects = getProjects;
18
+ exports.getManifestDetails = getManifestDetails;
19
+ exports.setupConfig = setupConfig;
20
+ exports.disconnectApp = disconnectApp;
21
+ exports.formatUrl = formatUrl;
22
+ exports.fetchBoilerplateDetails = fetchBoilerplateDetails;
23
+ exports.validateBoilerplate = validateBoilerplate;
4
24
  const tslib_1 = require("tslib");
5
25
  const map_1 = tslib_1.__importDefault(require("lodash/map"));
6
26
  const cli_utilities_1 = require("@contentstack/cli-utilities");
@@ -28,7 +48,6 @@ async function getOrganizations(options, skip = 0, organizations = []) {
28
48
  }
29
49
  return organizations;
30
50
  }
31
- exports.getOrganizations = getOrganizations;
32
51
  function getOrgAppUiLocation() {
33
52
  const orgConfigLocation = {
34
53
  type: types_1.AppLocation.ORG_CONFIG,
@@ -42,7 +61,6 @@ function getOrgAppUiLocation() {
42
61
  };
43
62
  return [orgConfigLocation];
44
63
  }
45
- exports.getOrgAppUiLocation = getOrgAppUiLocation;
46
64
  async function fetchApps(flags, orgUid, options, skip = 0, apps = []) {
47
65
  const { log, marketplaceSdk } = options;
48
66
  const response = await marketplaceSdk
@@ -67,7 +85,6 @@ async function fetchApps(flags, orgUid, options, skip = 0, apps = []) {
67
85
  }
68
86
  return apps;
69
87
  }
70
- exports.fetchApps = fetchApps;
71
88
  function fetchApp(flags, orgUid, options) {
72
89
  const { marketplaceSdk } = options;
73
90
  const app = flags["app-uid"];
@@ -76,7 +93,6 @@ function fetchApp(flags, orgUid, options) {
76
93
  .app(app)
77
94
  .fetch();
78
95
  }
79
- exports.fetchApp = fetchApp;
80
96
  function fetchAppInstallations(flags, orgUid, options) {
81
97
  const { managementSdk } = options;
82
98
  const app = flags["app-uid"];
@@ -92,7 +108,6 @@ function fetchAppInstallations(flags, orgUid, options) {
92
108
  throw error; // throwing error here instead of removing the catch block, as the loader needs to stopped in case there is an error.
93
109
  });
94
110
  }
95
- exports.fetchAppInstallations = fetchAppInstallations;
96
111
  function deleteApp(flags, orgUid, options) {
97
112
  const { marketplaceSdk } = options;
98
113
  const app = flags["app-uid"];
@@ -101,7 +116,6 @@ function deleteApp(flags, orgUid, options) {
101
116
  .app(app)
102
117
  .delete();
103
118
  }
104
- exports.deleteApp = deleteApp;
105
119
  function installApp(flags, orgUid, type, options) {
106
120
  const { marketplaceSdk } = options;
107
121
  return marketplaceSdk
@@ -112,7 +126,6 @@ function installApp(flags, orgUid, type, options) {
112
126
  targetType: type,
113
127
  });
114
128
  }
115
- exports.installApp = installApp;
116
129
  function reinstallApp(flags, orgUid, type, options) {
117
130
  const { marketplaceSdk } = options;
118
131
  return marketplaceSdk
@@ -123,14 +136,12 @@ function reinstallApp(flags, orgUid, type, options) {
123
136
  targetType: type,
124
137
  });
125
138
  }
126
- exports.reinstallApp = reinstallApp;
127
139
  function fetchStack(flags, options) {
128
140
  const { managementSdk } = options;
129
141
  return managementSdk
130
142
  .stack({ api_key: flags["stack-api-key"] })
131
143
  .fetch();
132
144
  }
133
- exports.fetchStack = fetchStack;
134
145
  async function getStacks(options, orgUid, skip = 0, stacks = []) {
135
146
  const { log, managementSdk } = options;
136
147
  const response = await managementSdk
@@ -150,7 +161,6 @@ async function getStacks(options, orgUid, skip = 0, stacks = []) {
150
161
  }
151
162
  return stacks;
152
163
  }
153
- exports.getStacks = getStacks;
154
164
  function uninstallApp(flags, orgUid, options, installationUid) {
155
165
  const { managementSdk } = options;
156
166
  const app = flags["app-uid"];
@@ -160,7 +170,6 @@ function uninstallApp(flags, orgUid, options, installationUid) {
160
170
  .installation(installationUid)
161
171
  .uninstall();
162
172
  }
163
- exports.uninstallApp = uninstallApp;
164
173
  async function fetchInstalledApps(flags, orgUid, options) {
165
174
  const { marketplaceSdk, log } = options;
166
175
  const apps = (await fetchApps(flags, orgUid, options)) || [];
@@ -198,7 +207,6 @@ async function fetchInstalledApps(flags, orgUid, options) {
198
207
  }
199
208
  return batchRequests.flat();
200
209
  }
201
- exports.fetchInstalledApps = fetchInstalledApps;
202
210
  // To remove the relative path
203
211
  const sanitizePath = (str) => str === null || str === void 0 ? void 0 : str.replace(/^(\.\.(\/|\\|$))+/, "");
204
212
  exports.sanitizePath = sanitizePath;
@@ -213,7 +221,6 @@ async function updateApp(flags, orgUid, options, updateReqPayload) {
213
221
  app = Object.assign(app, payload);
214
222
  await app.update();
215
223
  }
216
- exports.updateApp = updateApp;
217
224
  async function getProjects(apolloClient) {
218
225
  const projects = await apolloClient
219
226
  .query({ query: queries_1.projectsQuery, variables: { query: {} } })
@@ -229,7 +236,6 @@ async function getProjects(apolloClient) {
229
236
  });
230
237
  });
231
238
  }
232
- exports.getProjects = getProjects;
233
239
  function getManifestDetails(flags, orgUid, options) {
234
240
  const { managementSdk } = options;
235
241
  const app = flags["app-uid"];
@@ -238,7 +244,6 @@ function getManifestDetails(flags, orgUid, options) {
238
244
  .app(app)
239
245
  .hosting();
240
246
  }
241
- exports.getManifestDetails = getManifestDetails;
242
247
  function setupConfig(configPath) {
243
248
  const configDetails = {};
244
249
  if (configPath) {
@@ -253,7 +258,6 @@ function setupConfig(configPath) {
253
258
  }
254
259
  return configDetails;
255
260
  }
256
- exports.setupConfig = setupConfig;
257
261
  async function disconnectApp(flags, orgUid, options) {
258
262
  const { marketplaceSdk } = options;
259
263
  return marketplaceSdk
@@ -262,11 +266,9 @@ async function disconnectApp(flags, orgUid, options) {
262
266
  .hosting()
263
267
  .disconnect({ provider: "launch" });
264
268
  }
265
- exports.disconnectApp = disconnectApp;
266
269
  function formatUrl(url) {
267
270
  return url ? (url.startsWith("https") ? url : `https://${url}`) : "";
268
271
  }
269
- exports.formatUrl = formatUrl;
270
272
  const handleProjectNameConflict = async (projectName, projects, retry = 1) => {
271
273
  if (retry > 3) {
272
274
  throw new Error(messages_1.deployAppMsg.PROJECT_NAME_CONFLICT_FAILED);
@@ -289,7 +291,6 @@ async function fetchBoilerplateDetails() {
289
291
  throw error;
290
292
  }
291
293
  }
292
- exports.fetchBoilerplateDetails = fetchBoilerplateDetails;
293
294
  async function validateBoilerplate(boilerplateName) {
294
295
  const boilerplates = await fetchBoilerplateDetails();
295
296
  const boilerplate = (0, find_1.default)(boilerplates, (boilerplate) => boilerplate.name === boilerplateName);
@@ -298,4 +299,3 @@ async function validateBoilerplate(boilerplateName) {
298
299
  }
299
300
  return boilerplate;
300
301
  }
301
- exports.validateBoilerplate = validateBoilerplate;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatErrors = void 0;
3
+ exports.formatErrors = formatErrors;
4
4
  function formatErrors(errors) {
5
5
  let errorMessage = "";
6
6
  if (errors.message) {
@@ -8,4 +8,3 @@ function formatErrors(errors) {
8
8
  }
9
9
  return errorMessage;
10
10
  }
11
- exports.formatErrors = formatErrors;
package/lib/util/fs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.writeFile = void 0;
3
+ exports.writeFile = writeFile;
4
4
  const tslib_1 = require("tslib");
5
5
  const fs_1 = require("fs");
6
6
  const path_1 = require("path");
@@ -26,7 +26,6 @@ async function writeFile(dir = process.cwd(), force = false, data = {}, log = co
26
26
  await (0, fs_1.writeFileSync)(target, JSON.stringify(data));
27
27
  log((0, messages_1.$t)(messages_1.default.FILE_WRITTEN_SUCCESS, { file: target }), "info");
28
28
  }
29
- exports.writeFile = writeFile;
30
29
  async function ensureDirectoryExists(dir) {
31
30
  if (!(0, fs_1.existsSync)(dir)) {
32
31
  await (0, fs_1.mkdirSync)(dir, { recursive: true });
@@ -41,4 +41,5 @@ declare function askConfirmation(): Promise<boolean>;
41
41
  declare const askProjectName: (projectName: string) => Promise<string>;
42
42
  declare const selectedBoilerplate: () => Promise<any>;
43
43
  declare const validateAppName: (name: string) => void;
44
- export { getOrg, getAppName, getDirName, getDeveloperHubUrl, getApp, getInstalledApps, getStack, getInstallation, getHostingType, getAppUrl, askProjectType, askConfirmation, selectProject, askProjectName, selectedBoilerplate, validateAppName, };
44
+ declare function getLaunchHubUrl(): string;
45
+ export { getOrg, getAppName, getDirName, getDeveloperHubUrl, getApp, getInstalledApps, getStack, getInstallation, getHostingType, getAppUrl, askProjectType, askConfirmation, selectProject, askProjectName, selectedBoilerplate, validateAppName, getLaunchHubUrl, };
@@ -1,6 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateAppName = exports.selectedBoilerplate = exports.askProjectName = exports.selectProject = exports.askConfirmation = exports.askProjectType = exports.getAppUrl = exports.getHostingType = exports.getInstallation = exports.getStack = exports.getInstalledApps = exports.getApp = exports.getDeveloperHubUrl = exports.getDirName = exports.getAppName = exports.getOrg = void 0;
3
+ exports.validateAppName = exports.selectedBoilerplate = exports.askProjectName = exports.askProjectType = void 0;
4
+ exports.getOrg = getOrg;
5
+ exports.getAppName = getAppName;
6
+ exports.getDirName = getDirName;
7
+ exports.getDeveloperHubUrl = getDeveloperHubUrl;
8
+ exports.getApp = getApp;
9
+ exports.getInstalledApps = getInstalledApps;
10
+ exports.getStack = getStack;
11
+ exports.getInstallation = getInstallation;
12
+ exports.getHostingType = getHostingType;
13
+ exports.getAppUrl = getAppUrl;
14
+ exports.askConfirmation = askConfirmation;
15
+ exports.selectProject = selectProject;
16
+ exports.getLaunchHubUrl = getLaunchHubUrl;
4
17
  const tslib_1 = require("tslib");
5
18
  const find_1 = tslib_1.__importDefault(require("lodash/find"));
6
19
  const isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
@@ -28,7 +41,6 @@ async function getAppName(defaultName = "") {
28
41
  },
29
42
  });
30
43
  }
31
- exports.getAppName = getAppName;
32
44
  /**
33
45
  * @method getDirName
34
46
  *
@@ -56,7 +68,6 @@ async function getDirName(path) {
56
68
  })
57
69
  .then((name) => (0, path_1.join)((0, common_utils_1.sanitizePath)(basePath), (0, common_utils_1.sanitizePath)(name)));
58
70
  }
59
- exports.getDirName = getDirName;
60
71
  /**
61
72
  * @method getOrg
62
73
  *
@@ -82,7 +93,6 @@ async function getOrg(flags, options) {
82
93
  }
83
94
  return orgUid;
84
95
  }
85
- exports.getOrg = getOrg;
86
96
  async function getApp(flags, orgUid, options) {
87
97
  cli_utilities_1.cliux.loader("Loading Apps");
88
98
  const apps = await (0, common_utils_1.fetchApps)(flags, orgUid, options);
@@ -100,7 +110,6 @@ async function getApp(flags, orgUid, options) {
100
110
  .then((name) => { var _a; return (_a = apps.find((app) => app.name === name)) === null || _a === void 0 ? void 0 : _a.uid; });
101
111
  return apps.find((app) => app.uid === flags.app);
102
112
  }
103
- exports.getApp = getApp;
104
113
  async function getInstalledApps(flags, orgUid, options) {
105
114
  cli_utilities_1.cliux.loader("Loading Apps");
106
115
  const apps = await (0, common_utils_1.fetchInstalledApps)(flags, orgUid, options);
@@ -118,7 +127,6 @@ async function getInstalledApps(flags, orgUid, options) {
118
127
  .then((name) => { var _a; return (_a = apps.find((app) => app.name === name)) === null || _a === void 0 ? void 0 : _a.uid; });
119
128
  return apps.find((app) => app.uid === flags.app);
120
129
  }
121
- exports.getInstalledApps = getInstalledApps;
122
130
  /**
123
131
  * @method getDeveloperHubUrl
124
132
  *
@@ -141,7 +149,6 @@ function getDeveloperHubUrl() {
141
149
  : developerHubBaseUrl;
142
150
  return developerHubBaseUrl;
143
151
  }
144
- exports.getDeveloperHubUrl = getDeveloperHubUrl;
145
152
  async function getStack(orgUid, options) {
146
153
  cli_utilities_1.cliux.loader("Loading Stacks");
147
154
  const stacks = (await (0, common_utils_1.getStacks)(options, orgUid)) || [];
@@ -160,7 +167,6 @@ async function getStack(orgUid, options) {
160
167
  .then((name) => stacks.find((stack) => stack.name === name));
161
168
  return selectedStack;
162
169
  }
163
- exports.getStack = getStack;
164
170
  async function getInstallation(flags, orgUid, managementSdkForStacks, appType, options, uninstallAll) {
165
171
  var _a;
166
172
  const { log } = options;
@@ -207,7 +213,6 @@ async function getInstallation(flags, orgUid, managementSdkForStacks, appType, o
207
213
  }), "info");
208
214
  return selectedInstallation;
209
215
  }
210
- exports.getInstallation = getInstallation;
211
216
  function populateMissingDataInInstallations(installations, stacks) {
212
217
  let result = installations.map((installation) => {
213
218
  var _a;
@@ -224,8 +229,8 @@ function populateMissingDataInInstallations(installations, stacks) {
224
229
  }
225
230
  async function getHostingType() {
226
231
  const hostingTypes = [
227
- { name: "Hosting with Launch", value: "Hosting with Launch" },
228
- { name: "Custom Hosting", value: "Custom Hosting" },
232
+ { name: "Hosting with Launch", value: "hosting-with-launch" },
233
+ { name: "Custom Hosting", value: "custom-hosting" },
229
234
  ];
230
235
  return cli_utilities_1.cliux.inquire({
231
236
  type: "list",
@@ -234,7 +239,6 @@ async function getHostingType() {
234
239
  choices: hostingTypes,
235
240
  });
236
241
  }
237
- exports.getHostingType = getHostingType;
238
242
  async function getAppUrl(defaultUrl = "") {
239
243
  return cli_utilities_1.cliux.inquire({
240
244
  type: "input",
@@ -253,7 +257,6 @@ async function getAppUrl(defaultUrl = "") {
253
257
  },
254
258
  });
255
259
  }
256
- exports.getAppUrl = getAppUrl;
257
260
  async function selectProject(projects) {
258
261
  return await cli_utilities_1.cliux
259
262
  .inquire({
@@ -264,7 +267,6 @@ async function selectProject(projects) {
264
267
  })
265
268
  .then((name) => (0, find_1.default)(projects, { name }));
266
269
  }
267
- exports.selectProject = selectProject;
268
270
  const askProjectType = async () => {
269
271
  return await cli_utilities_1.cliux.inquire({
270
272
  type: "list",
@@ -284,7 +286,6 @@ async function askConfirmation() {
284
286
  name: "disconnect_launch_confirmation",
285
287
  });
286
288
  }
287
- exports.askConfirmation = askConfirmation;
288
289
  const askProjectName = async (projectName) => {
289
290
  return await cli_utilities_1.cliux.inquire({
290
291
  type: "input",
@@ -320,3 +321,16 @@ const validateAppName = (name) => {
320
321
  }
321
322
  };
322
323
  exports.validateAppName = validateAppName;
324
+ function getLaunchHubUrl() {
325
+ const { cma } = cli_utilities_1.configHandler.get('region') || {};
326
+ if (!cma) {
327
+ throw new Error('Region not configured. Please set the region with command $ csdx config:set:region');
328
+ }
329
+ let launchHubBaseUrl = cma.replace('api', 'launch-api');
330
+ if (launchHubBaseUrl.startsWith('http')) {
331
+ launchHubBaseUrl = launchHubBaseUrl.split('//')[1];
332
+ }
333
+ launchHubBaseUrl = launchHubBaseUrl.startsWith('dev11') ? launchHubBaseUrl.replace('dev11', 'dev') : launchHubBaseUrl;
334
+ launchHubBaseUrl = launchHubBaseUrl.endsWith('io') ? launchHubBaseUrl.replace('io', 'com') : launchHubBaseUrl;
335
+ return `https://${launchHubBaseUrl}`;
336
+ }
package/lib/util/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.print = void 0;
3
+ exports.print = print;
4
4
  const tslib_1 = require("tslib");
5
5
  const map_1 = tslib_1.__importDefault(require("lodash/map"));
6
6
  const winston_1 = tslib_1.__importDefault(require("winston"));
@@ -147,4 +147,3 @@ function print(printInput) {
147
147
  }).join(" ");
148
148
  cli_utilities_1.cliux.print(str);
149
149
  }
150
- exports.print = print;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/apps-cli",
3
- "version": "1.3.2",
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,40 +20,42 @@
20
20
  "/oclif.manifest.json"
21
21
  ],
22
22
  "dependencies": {
23
- "@apollo/client": "^3.7.9",
24
- "@contentstack/cli-command": "^1.2.18",
25
- "@contentstack/cli-launch": "^1.0.18",
26
- "@contentstack/cli-utilities": "^1.7.0",
27
- "adm-zip": "^0.5.10",
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
- "open": "^9.1.0",
31
32
  "shelljs": "^0.8.5",
32
- "tmp": "^0.2.2",
33
- "winston": "^3.11.0"
33
+ "tmp": "^0.2.3",
34
+ "winston": "^3.15.0"
34
35
  },
35
36
  "devDependencies": {
36
- "@oclif/test": "^2.5.6",
37
+ "@oclif/test": "^4.0.10",
37
38
  "@types/adm-zip": "^0.5.5",
38
- "@types/chai": "^4.3.11",
39
- "@types/lodash": "^4.17.4",
40
- "@types/mocha": "^10.0.6",
41
- "@types/node": "^20.10.7",
39
+ "@types/chai": "^4.3.20",
40
+ "@types/lodash": "^4.17.10",
41
+ "@types/mocha": "^10.0.9",
42
+ "@types/node": "^20.16.11",
42
43
  "@types/shelljs": "^0.8.15",
43
44
  "@types/tmp": "^0.2.6",
44
- "axios": "^1.6.5",
45
- "chai": "^4.3.10",
46
- "dotenv": "^16.3.1",
47
- "eslint": "^8.56.0",
48
- "eslint-config-oclif": "^5.0.0",
49
- "eslint-config-oclif-typescript": "^3.1.0",
50
- "mocha": "^10.2.0",
45
+ "axios": "^1.7.7",
46
+ "chai": "^4.5.0",
47
+ "dotenv": "^16.4.5",
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",
51
53
  "nyc": "^15.1.0",
52
- "oclif": "^3.10.0",
54
+ "oclif": "^3.17.2",
53
55
  "shx": "^0.3.4",
54
56
  "ts-node": "^10.9.2",
55
- "tslib": "^2.6.2",
56
- "typescript": "^5.3.3"
57
+ "tslib": "^2.8.0",
58
+ "typescript": "^5.6.3"
57
59
  },
58
60
  "oclif": {
59
61
  "bin": "csdx",