@contentstack/cli-config 1.11.0 → 1.12.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 CHANGED
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
18
18
  $ csdx COMMAND
19
19
  running command...
20
20
  $ csdx (--version)
21
- @contentstack/cli-config/1.11.0 linux-x64 node-v22.14.0
21
+ @contentstack/cli-config/1.12.1 linux-x64 node-v22.15.0
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -362,6 +362,10 @@ EXAMPLES
362
362
 
363
363
  $ csdx config:set:region EU
364
364
 
365
+ $ csdx config:set:region AWS-NA
366
+
367
+ $ csdx config:set:region AWS-EU
368
+
365
369
  $ csdx config:set:region AZURE-NA
366
370
 
367
371
  $ csdx config:set:region AZURE-EU
@@ -55,7 +55,7 @@ class RegionSetCommand extends base_command_1.BaseCommand {
55
55
  cli_utilities_1.cliux.error(`Failed to set region due to: ${error.message}`);
56
56
  }
57
57
  }
58
- else if (['NA', 'EU', 'AZURE-NA', 'AZURE-EU', 'GCP-NA', 'GCP-EU'].includes(selectedRegion)) {
58
+ else if (['NA', 'EU', 'AWS-NA', 'AWS-EU', 'AZURE-NA', 'AZURE-EU', 'GCP-NA', 'GCP-EU'].includes(selectedRegion)) {
59
59
  const regionDetails = utils_1.regionHandler.setRegion(selectedRegion);
60
60
  await cli_utilities_1.authHandler.setConfigData('logout'); //Todo: Handle this logout flow well through logout command call
61
61
  cli_utilities_1.cliux.success(`Region has been set to ${regionDetails.name}`);
@@ -75,7 +75,7 @@ class RegionSetCommand extends base_command_1.BaseCommand {
75
75
  if (transformedUrl.startsWith('http')) {
76
76
  transformedUrl = transformedUrl.split('//')[1];
77
77
  }
78
- transformedUrl = transformedUrl.startsWith('dev11') ? transformedUrl.replace('dev11', 'dev') : transformedUrl;
78
+ transformedUrl = transformedUrl.replace(/^dev\d+/, 'dev'); // Replaces any 'dev1', 'dev2', etc. with 'dev'
79
79
  transformedUrl = transformedUrl.endsWith('io') ? transformedUrl.replace('io', 'com') : transformedUrl;
80
80
  return `https://${transformedUrl}`;
81
81
  }
@@ -118,6 +118,8 @@ RegionSetCommand.examples = [
118
118
  '$ csdx config:set:region',
119
119
  '$ csdx config:set:region NA',
120
120
  '$ csdx config:set:region EU',
121
+ '$ csdx config:set:region AWS-NA',
122
+ '$ csdx config:set:region AWS-EU',
121
123
  '$ csdx config:set:region AZURE-NA',
122
124
  '$ csdx config:set:region AZURE-EU',
123
125
  '$ csdx config:set:region GCP-NA',
@@ -10,12 +10,14 @@ const askRegions = async () => {
10
10
  choices: [
11
11
  { name: 'NA', value: 'NA' },
12
12
  { name: 'EU', value: 'EU' },
13
+ { name: 'AWS-NA', value: 'AWS-NA' },
14
+ { name: 'AWS-EU', value: 'AWS-EU' },
13
15
  { name: 'AZURE-NA', value: 'AZURE-NA' },
14
16
  { name: 'AZURE-EU', value: 'AZURE-EU' },
15
17
  { name: 'GCP-NA', value: 'GCP-NA' },
16
18
  { name: 'GCP-EU', value: 'GCP-EU' },
17
19
  { name: 'Custom', value: 'custom' },
18
- { name: 'exit', value: 'exit' },
20
+ { name: 'Exit', value: 'exit' },
19
21
  ],
20
22
  });
21
23
  };
@@ -28,7 +28,7 @@ class RateLimitHandler {
28
28
  const organizations = await client.organization(config.org).fetch({ include_plan: true });
29
29
  const features = ((_a = organizations.plan) === null || _a === void 0 ? void 0 : _a.features) || [];
30
30
  const limitsToUpdate = Object.assign({}, rateLimit[config.org]);
31
- let utilizationMap = {};
31
+ const utilizationMap = {};
32
32
  limitNames.forEach((name, index) => {
33
33
  if (utilizeValues[index] !== undefined) {
34
34
  utilizationMap[name] = utilizeValues[index];
@@ -62,6 +62,7 @@ class RateLimitHandler {
62
62
  });
63
63
  }
64
64
  catch (error) {
65
+ console.log('Something went wrong while setting rate limit for org:', (0, cli_utilities_1.formatError)(error));
65
66
  throw new Error(error);
66
67
  }
67
68
  }
@@ -36,7 +36,15 @@ declare class UserConfig {
36
36
  * @param { object } regionObject JSON object needs to be sanitized
37
37
  * @returns { object } JSON object with only valid keys for region
38
38
  */
39
- sanitizeRegionObject(regionObject: any): any;
39
+ sanitizeRegionObject(regionObject: any): {
40
+ cma: any;
41
+ cda: any;
42
+ uiHost: any;
43
+ name: any;
44
+ developerHubUrl: any;
45
+ personalizeUrl: any;
46
+ launchHubUrl: any;
47
+ };
40
48
  }
41
49
  declare const _default: UserConfig;
42
50
  export default _default;
@@ -23,6 +23,15 @@ const regions = {
23
23
  launchHubUrl: 'https://launch-api.contentstack.com',
24
24
  personalizeUrl: 'https://personalize-api.contentstack.com',
25
25
  },
26
+ 'AWS-NA': {
27
+ name: 'AWS-NA',
28
+ cma: 'https://api.contentstack.io',
29
+ cda: 'https://cdn.contentstack.io',
30
+ uiHost: 'https://app.contentstack.com',
31
+ developerHubUrl: 'https://developerhub-api.contentstack.com',
32
+ launchHubUrl: 'https://launch-api.contentstack.com',
33
+ personalizeUrl: 'https://personalize-api.contentstack.com',
34
+ },
26
35
  EU: {
27
36
  name: 'EU',
28
37
  cma: 'https://eu-api.contentstack.com',
@@ -32,6 +41,15 @@ const regions = {
32
41
  launchHubUrl: 'https://eu-launch-api.contentstack.com',
33
42
  personalizeUrl: 'https://eu-personalize-api.contentstack.com',
34
43
  },
44
+ 'AWS-EU': {
45
+ name: 'AWS-EU',
46
+ cma: 'https://eu-api.contentstack.com',
47
+ cda: 'https://eu-cdn.contentstack.com',
48
+ uiHost: 'https://eu-app.contentstack.com',
49
+ developerHubUrl: 'https://eu-developerhub-api.contentstack.com',
50
+ launchHubUrl: 'https://eu-launch-api.contentstack.com',
51
+ personalizeUrl: 'https://eu-personalize-api.contentstack.com',
52
+ },
35
53
  'AZURE-NA': {
36
54
  name: 'AZURE-NA',
37
55
  cma: 'https://azure-na-api.contentstack.com',
@@ -77,7 +95,7 @@ class UserConfig {
77
95
  * @returns {object} region object with cma, cda, region property
78
96
  */
79
97
  setRegion(region) {
80
- let selectedRegion = regions[region];
98
+ const selectedRegion = regions[region];
81
99
  if (selectedRegion) {
82
100
  cli_utilities_1.configHandler.set('region', selectedRegion);
83
101
  return selectedRegion;
@@ -141,8 +159,7 @@ class UserConfig {
141
159
  * @returns { object } JSON object with only valid keys for region
142
160
  */
143
161
  sanitizeRegionObject(regionObject) {
144
- let sanitizedRegion;
145
- sanitizedRegion = {
162
+ const sanitizedRegion = {
146
163
  cma: regionObject.cma,
147
164
  cda: regionObject.cda,
148
165
  uiHost: regionObject.uiHost,
@@ -1,33 +1,16 @@
1
1
  {
2
2
  "commands": {
3
- "config:set:base-branch": {
3
+ "config:get:base-branch": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "Set branch for CLI",
6
+ "description": "Get current branch set for CLI",
7
7
  "examples": [
8
- "$ csdx config:set:base-branch",
9
- "$ csdx config:set:base-branch --stack-api-key <value> --base-branch <value>"
8
+ "$ csdx config:get:base-branch"
10
9
  ],
11
- "flags": {
12
- "stack-api-key": {
13
- "char": "k",
14
- "description": "Stack API key",
15
- "name": "stack-api-key",
16
- "hasDynamicHelp": false,
17
- "multiple": false,
18
- "type": "option"
19
- },
20
- "base-branch": {
21
- "description": "Base branch (Target branch).",
22
- "name": "base-branch",
23
- "hasDynamicHelp": false,
24
- "multiple": false,
25
- "type": "option"
26
- }
27
- },
10
+ "flags": {},
28
11
  "hasDynamicHelp": false,
29
12
  "hiddenAliases": [],
30
- "id": "config:set:base-branch",
13
+ "id": "config:get:base-branch",
31
14
  "pluginAlias": "@contentstack/cli-config",
32
15
  "pluginName": "@contentstack/cli-config",
33
16
  "pluginType": "core",
@@ -37,39 +20,23 @@
37
20
  "lib",
38
21
  "commands",
39
22
  "config",
40
- "set",
23
+ "get",
41
24
  "base-branch.js"
42
25
  ]
43
26
  },
44
- "config:set:early-access-header": {
27
+ "config:get:early-access-header": {
45
28
  "aliases": [
46
- "config:set:ea-header"
29
+ "config:get:ea-header"
47
30
  ],
48
31
  "args": {},
49
- "description": "Set Early Access header",
32
+ "description": "Display Early Access headers",
50
33
  "examples": [
51
- "$ <%= config.bin %> <%= command.id %>",
52
- "$ <%= config.bin %> <%= command.id %> --header <value> --header-alias <value>"
34
+ "$ <%= config.bin %> <%= command.id %>"
53
35
  ],
54
- "flags": {
55
- "header-alias": {
56
- "description": "(optional) Provide the Early Access header value.",
57
- "name": "header-alias",
58
- "hasDynamicHelp": false,
59
- "multiple": false,
60
- "type": "option"
61
- },
62
- "header": {
63
- "description": "(optional) Provide the Early Access header alias name.",
64
- "name": "header",
65
- "hasDynamicHelp": false,
66
- "multiple": false,
67
- "type": "option"
68
- }
69
- },
36
+ "flags": {},
70
37
  "hasDynamicHelp": false,
71
38
  "hiddenAliases": [],
72
- "id": "config:set:early-access-header",
39
+ "id": "config:get:early-access-header",
73
40
  "pluginAlias": "@contentstack/cli-config",
74
41
  "pluginName": "@contentstack/cli-config",
75
42
  "pluginType": "core",
@@ -79,52 +46,21 @@
79
46
  "lib",
80
47
  "commands",
81
48
  "config",
82
- "set",
49
+ "get",
83
50
  "early-access-header.js"
84
51
  ]
85
52
  },
86
- "config:set:rate-limit": {
53
+ "config:get:rate-limit": {
87
54
  "aliases": [],
88
55
  "args": {},
89
- "description": "Set rate-limit for CLI",
56
+ "description": "Get rate-limit of organizations",
90
57
  "examples": [
91
- "$ csdx config:set:rate-limit --org <<org_uid>>",
92
- "$ csdx config:set:rate-limit --org <<org_uid>> --utilize 70,80 --limit-name getLimit,limit",
93
- "$ csdx config:set:rate-limit --org <<org_uid>> --default"
58
+ "$ csdx config:get:rate-limit"
94
59
  ],
95
- "flags": {
96
- "org": {
97
- "description": "Provide the organization UID",
98
- "name": "org",
99
- "hasDynamicHelp": false,
100
- "multiple": false,
101
- "type": "option"
102
- },
103
- "utilize": {
104
- "description": "Provide the utilization percentages for rate limit, separated by commas",
105
- "name": "utilize",
106
- "default": "50",
107
- "hasDynamicHelp": false,
108
- "multiple": false,
109
- "type": "option"
110
- },
111
- "limit-name": {
112
- "description": "[Optional] Provide the limit names separated by commas ['limit', 'getLimit', 'bulkLimit']",
113
- "name": "limit-name",
114
- "hasDynamicHelp": false,
115
- "multiple": true,
116
- "type": "option"
117
- },
118
- "default": {
119
- "description": "Reset to default rate limit",
120
- "name": "default",
121
- "allowNo": false,
122
- "type": "boolean"
123
- }
124
- },
60
+ "flags": {},
125
61
  "hasDynamicHelp": false,
126
62
  "hiddenAliases": [],
127
- "id": "config:set:rate-limit",
63
+ "id": "config:get:rate-limit",
128
64
  "pluginAlias": "@contentstack/cli-config",
129
65
  "pluginName": "@contentstack/cli-config",
130
66
  "pluginType": "core",
@@ -134,110 +70,21 @@
134
70
  "lib",
135
71
  "commands",
136
72
  "config",
137
- "set",
73
+ "get",
138
74
  "rate-limit.js"
139
75
  ]
140
76
  },
141
- "config:set:region": {
77
+ "config:get:region": {
142
78
  "aliases": [],
143
- "args": {
144
- "region": {
145
- "description": "Name for the region",
146
- "name": "region"
147
- }
148
- },
149
- "description": "Set region for CLI",
79
+ "args": {},
80
+ "description": "Get current region set for CLI",
150
81
  "examples": [
151
- "$ csdx config:set:region",
152
- "$ csdx config:set:region NA",
153
- "$ csdx config:set:region EU",
154
- "$ csdx config:set:region AZURE-NA",
155
- "$ csdx config:set:region AZURE-EU",
156
- "$ csdx config:set:region GCP-NA",
157
- "$ csdx config:set:region GCP-EU",
158
- "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\"",
159
- "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\" --developer-hub <custom_developer_hub_url>",
160
- "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\" --personalize <custom_personalize_url>",
161
- "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\" --launch <custom_launch_url>",
162
- "$ csdx config:set:region --cda <custom_cda_host_url> --cma <custom_cma_host_url> --ui-host <custom_ui_host_url> --name \"India\" --developer-hub <custom_developer_hub_url> --launch <custom_launch_url> --personalize <custom_personalize_url>"
82
+ "$ csdx config:get:region"
163
83
  ],
164
- "flags": {
165
- "cda": {
166
- "char": "d",
167
- "dependsOn": [
168
- "cma",
169
- "ui-host",
170
- "name"
171
- ],
172
- "description": "Custom host to set for content delivery API, if this flag is added then cma, ui-host and name flags are required",
173
- "name": "cda",
174
- "hasDynamicHelp": false,
175
- "multiple": false,
176
- "type": "option"
177
- },
178
- "cma": {
179
- "char": "m",
180
- "dependsOn": [
181
- "cda",
182
- "ui-host",
183
- "name"
184
- ],
185
- "description": "Custom host to set for content management API, , if this flag is added then cda, ui-host and name flags are required",
186
- "name": "cma",
187
- "hasDynamicHelp": false,
188
- "multiple": false,
189
- "type": "option"
190
- },
191
- "ui-host": {
192
- "dependsOn": [
193
- "cda",
194
- "cma",
195
- "name"
196
- ],
197
- "description": "Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are required",
198
- "name": "ui-host",
199
- "hasDynamicHelp": false,
200
- "multiple": false,
201
- "type": "option"
202
- },
203
- "name": {
204
- "char": "n",
205
- "dependsOn": [
206
- "cda",
207
- "cma",
208
- "ui-host"
209
- ],
210
- "description": "Name for the region, if this flag is added then cda, cma and ui-host flags are required",
211
- "name": "name",
212
- "hasDynamicHelp": false,
213
- "multiple": false,
214
- "type": "option"
215
- },
216
- "developer-hub": {
217
- "description": "Custom host to set for Developer hub API",
218
- "name": "developer-hub",
219
- "hasDynamicHelp": false,
220
- "multiple": false,
221
- "type": "option"
222
- },
223
- "personalize": {
224
- "description": "Custom host to set for Personalize API",
225
- "name": "personalize",
226
- "hasDynamicHelp": false,
227
- "multiple": false,
228
- "type": "option"
229
- },
230
- "launch": {
231
- "description": "Custom host to set for Launch API",
232
- "name": "launch",
233
- "hasDynamicHelp": false,
234
- "multiple": false,
235
- "type": "option"
236
- }
237
- },
84
+ "flags": {},
238
85
  "hasDynamicHelp": false,
239
86
  "hiddenAliases": [],
240
- "id": "config:set:region",
87
+ "id": "config:get:region",
241
88
  "pluginAlias": "@contentstack/cli-config",
242
89
  "pluginName": "@contentstack/cli-config",
243
90
  "pluginType": "core",
@@ -247,7 +94,7 @@
247
94
  "lib",
248
95
  "commands",
249
96
  "config",
250
- "set",
97
+ "get",
251
98
  "region.js"
252
99
  ]
253
100
  },
@@ -366,17 +213,34 @@
366
213
  "rate-limit.js"
367
214
  ]
368
215
  },
369
- "config:get:base-branch": {
216
+ "config:set:base-branch": {
370
217
  "aliases": [],
371
218
  "args": {},
372
- "description": "Get current branch set for CLI",
219
+ "description": "Set branch for CLI",
373
220
  "examples": [
374
- "$ csdx config:get:base-branch"
221
+ "$ csdx config:set:base-branch",
222
+ "$ csdx config:set:base-branch --stack-api-key <value> --base-branch <value>"
375
223
  ],
376
- "flags": {},
224
+ "flags": {
225
+ "stack-api-key": {
226
+ "char": "k",
227
+ "description": "Stack API key",
228
+ "name": "stack-api-key",
229
+ "hasDynamicHelp": false,
230
+ "multiple": false,
231
+ "type": "option"
232
+ },
233
+ "base-branch": {
234
+ "description": "Base branch (Target branch).",
235
+ "name": "base-branch",
236
+ "hasDynamicHelp": false,
237
+ "multiple": false,
238
+ "type": "option"
239
+ }
240
+ },
377
241
  "hasDynamicHelp": false,
378
242
  "hiddenAliases": [],
379
- "id": "config:get:base-branch",
243
+ "id": "config:set:base-branch",
380
244
  "pluginAlias": "@contentstack/cli-config",
381
245
  "pluginName": "@contentstack/cli-config",
382
246
  "pluginType": "core",
@@ -386,23 +250,39 @@
386
250
  "lib",
387
251
  "commands",
388
252
  "config",
389
- "get",
253
+ "set",
390
254
  "base-branch.js"
391
255
  ]
392
256
  },
393
- "config:get:early-access-header": {
257
+ "config:set:early-access-header": {
394
258
  "aliases": [
395
- "config:get:ea-header"
259
+ "config:set:ea-header"
396
260
  ],
397
261
  "args": {},
398
- "description": "Display Early Access headers",
262
+ "description": "Set Early Access header",
399
263
  "examples": [
400
- "$ <%= config.bin %> <%= command.id %>"
264
+ "$ <%= config.bin %> <%= command.id %>",
265
+ "$ <%= config.bin %> <%= command.id %> --header <value> --header-alias <value>"
401
266
  ],
402
- "flags": {},
267
+ "flags": {
268
+ "header-alias": {
269
+ "description": "(optional) Provide the Early Access header value.",
270
+ "name": "header-alias",
271
+ "hasDynamicHelp": false,
272
+ "multiple": false,
273
+ "type": "option"
274
+ },
275
+ "header": {
276
+ "description": "(optional) Provide the Early Access header alias name.",
277
+ "name": "header",
278
+ "hasDynamicHelp": false,
279
+ "multiple": false,
280
+ "type": "option"
281
+ }
282
+ },
403
283
  "hasDynamicHelp": false,
404
284
  "hiddenAliases": [],
405
- "id": "config:get:early-access-header",
285
+ "id": "config:set:early-access-header",
406
286
  "pluginAlias": "@contentstack/cli-config",
407
287
  "pluginName": "@contentstack/cli-config",
408
288
  "pluginType": "core",
@@ -412,21 +292,52 @@
412
292
  "lib",
413
293
  "commands",
414
294
  "config",
415
- "get",
295
+ "set",
416
296
  "early-access-header.js"
417
297
  ]
418
298
  },
419
- "config:get:rate-limit": {
299
+ "config:set:rate-limit": {
420
300
  "aliases": [],
421
301
  "args": {},
422
- "description": "Get rate-limit of organizations",
302
+ "description": "Set rate-limit for CLI",
423
303
  "examples": [
424
- "$ csdx config:get:rate-limit"
304
+ "$ csdx config:set:rate-limit --org <<org_uid>>",
305
+ "$ csdx config:set:rate-limit --org <<org_uid>> --utilize 70,80 --limit-name getLimit,limit",
306
+ "$ csdx config:set:rate-limit --org <<org_uid>> --default"
425
307
  ],
426
- "flags": {},
308
+ "flags": {
309
+ "org": {
310
+ "description": "Provide the organization UID",
311
+ "name": "org",
312
+ "hasDynamicHelp": false,
313
+ "multiple": false,
314
+ "type": "option"
315
+ },
316
+ "utilize": {
317
+ "description": "Provide the utilization percentages for rate limit, separated by commas",
318
+ "name": "utilize",
319
+ "default": "50",
320
+ "hasDynamicHelp": false,
321
+ "multiple": false,
322
+ "type": "option"
323
+ },
324
+ "limit-name": {
325
+ "description": "[Optional] Provide the limit names separated by commas ['limit', 'getLimit', 'bulkLimit']",
326
+ "name": "limit-name",
327
+ "hasDynamicHelp": false,
328
+ "multiple": true,
329
+ "type": "option"
330
+ },
331
+ "default": {
332
+ "description": "Reset to default rate limit",
333
+ "name": "default",
334
+ "allowNo": false,
335
+ "type": "boolean"
336
+ }
337
+ },
427
338
  "hasDynamicHelp": false,
428
339
  "hiddenAliases": [],
429
- "id": "config:get:rate-limit",
340
+ "id": "config:set:rate-limit",
430
341
  "pluginAlias": "@contentstack/cli-config",
431
342
  "pluginName": "@contentstack/cli-config",
432
343
  "pluginType": "core",
@@ -436,21 +347,112 @@
436
347
  "lib",
437
348
  "commands",
438
349
  "config",
439
- "get",
350
+ "set",
440
351
  "rate-limit.js"
441
352
  ]
442
353
  },
443
- "config:get:region": {
354
+ "config:set:region": {
444
355
  "aliases": [],
445
- "args": {},
446
- "description": "Get current region set for CLI",
356
+ "args": {
357
+ "region": {
358
+ "description": "Name for the region",
359
+ "name": "region"
360
+ }
361
+ },
362
+ "description": "Set region for CLI",
447
363
  "examples": [
448
- "$ csdx config:get:region"
364
+ "$ csdx config:set:region",
365
+ "$ csdx config:set:region NA",
366
+ "$ csdx config:set:region EU",
367
+ "$ csdx config:set:region AWS-NA",
368
+ "$ csdx config:set:region AWS-EU",
369
+ "$ csdx config:set:region AZURE-NA",
370
+ "$ csdx config:set:region AZURE-EU",
371
+ "$ csdx config:set:region GCP-NA",
372
+ "$ csdx config:set:region GCP-EU",
373
+ "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\"",
374
+ "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\" --developer-hub <custom_developer_hub_url>",
375
+ "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\" --personalize <custom_personalize_url>",
376
+ "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\" --launch <custom_launch_url>",
377
+ "$ csdx config:set:region --cda <custom_cda_host_url> --cma <custom_cma_host_url> --ui-host <custom_ui_host_url> --name \"India\" --developer-hub <custom_developer_hub_url> --launch <custom_launch_url> --personalize <custom_personalize_url>"
449
378
  ],
450
- "flags": {},
379
+ "flags": {
380
+ "cda": {
381
+ "char": "d",
382
+ "dependsOn": [
383
+ "cma",
384
+ "ui-host",
385
+ "name"
386
+ ],
387
+ "description": "Custom host to set for content delivery API, if this flag is added then cma, ui-host and name flags are required",
388
+ "name": "cda",
389
+ "hasDynamicHelp": false,
390
+ "multiple": false,
391
+ "type": "option"
392
+ },
393
+ "cma": {
394
+ "char": "m",
395
+ "dependsOn": [
396
+ "cda",
397
+ "ui-host",
398
+ "name"
399
+ ],
400
+ "description": "Custom host to set for content management API, , if this flag is added then cda, ui-host and name flags are required",
401
+ "name": "cma",
402
+ "hasDynamicHelp": false,
403
+ "multiple": false,
404
+ "type": "option"
405
+ },
406
+ "ui-host": {
407
+ "dependsOn": [
408
+ "cda",
409
+ "cma",
410
+ "name"
411
+ ],
412
+ "description": "Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are required",
413
+ "name": "ui-host",
414
+ "hasDynamicHelp": false,
415
+ "multiple": false,
416
+ "type": "option"
417
+ },
418
+ "name": {
419
+ "char": "n",
420
+ "dependsOn": [
421
+ "cda",
422
+ "cma",
423
+ "ui-host"
424
+ ],
425
+ "description": "Name for the region, if this flag is added then cda, cma and ui-host flags are required",
426
+ "name": "name",
427
+ "hasDynamicHelp": false,
428
+ "multiple": false,
429
+ "type": "option"
430
+ },
431
+ "developer-hub": {
432
+ "description": "Custom host to set for Developer hub API",
433
+ "name": "developer-hub",
434
+ "hasDynamicHelp": false,
435
+ "multiple": false,
436
+ "type": "option"
437
+ },
438
+ "personalize": {
439
+ "description": "Custom host to set for Personalize API",
440
+ "name": "personalize",
441
+ "hasDynamicHelp": false,
442
+ "multiple": false,
443
+ "type": "option"
444
+ },
445
+ "launch": {
446
+ "description": "Custom host to set for Launch API",
447
+ "name": "launch",
448
+ "hasDynamicHelp": false,
449
+ "multiple": false,
450
+ "type": "option"
451
+ }
452
+ },
451
453
  "hasDynamicHelp": false,
452
454
  "hiddenAliases": [],
453
- "id": "config:get:region",
455
+ "id": "config:set:region",
454
456
  "pluginAlias": "@contentstack/cli-config",
455
457
  "pluginName": "@contentstack/cli-config",
456
458
  "pluginType": "core",
@@ -460,10 +462,10 @@
460
462
  "lib",
461
463
  "commands",
462
464
  "config",
463
- "get",
465
+ "set",
464
466
  "region.js"
465
467
  ]
466
468
  }
467
469
  },
468
- "version": "1.11.0"
470
+ "version": "1.12.1"
469
471
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentstack/cli-config",
3
3
  "description": "Contentstack CLI plugin for configuration",
4
- "version": "1.11.0",
4
+ "version": "1.12.1",
5
5
  "author": "Contentstack",
6
6
  "scripts": {
7
7
  "build": "npm run clean && npm run compile",
@@ -12,7 +12,7 @@
12
12
  "version": "oclif readme && git add README.md",
13
13
  "test:report": "tsc -p test && nyc --reporter=lcov --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
14
14
  "pretest": "tsc -p test",
15
- "test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
15
+ "test": "mocha --require ts-node/register 'test/**/*.test.ts'",
16
16
  "posttest": "npm run lint",
17
17
  "lint": "eslint src/**/*.ts",
18
18
  "format": "eslint src/**/*.ts --fix",
@@ -22,23 +22,23 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@contentstack/cli-command": "~1.5.0",
25
- "@contentstack/cli-utilities": "~1.11.0",
25
+ "@contentstack/cli-utilities": "~1.12.0",
26
26
  "lodash": "^4.17.21"
27
27
  },
28
28
  "devDependencies": {
29
- "@oclif/test": "^4.1.6",
29
+ "@oclif/test": "^4.1.13",
30
30
  "@types/chai": "^4.3.20",
31
31
  "@types/mocha": "^8.2.3",
32
32
  "@types/node": "^14.18.63",
33
33
  "@types/sinon": "^10.0.20",
34
34
  "chai": "^4.5.0",
35
35
  "eslint": "^8.57.1",
36
- "eslint-config-oclif": "^6.0.15",
37
- "eslint-config-oclif-typescript": "^3.1.13",
36
+ "eslint-config-oclif": "^6.0.62",
37
+ "eslint-config-oclif-typescript": "^3.1.14",
38
38
  "mocha": "10.8.2",
39
39
  "nyc": "^15.1.0",
40
- "oclif": "^4.17.30",
41
- "sinon": "^19.0.2",
40
+ "oclif": "^4.17.46",
41
+ "sinon": "^19.0.5",
42
42
  "ts-node": "^10.9.2",
43
43
  "typescript": "^4.9.5"
44
44
  },