@contentstack/cli-config 1.9.1 → 1.10.0

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.9.1 linux-x64 node-v18.20.6
21
+ @contentstack/cli-config/1.10.0 linux-x64 node-v22.14.0
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -368,6 +368,8 @@ EXAMPLES
368
368
 
369
369
  $ csdx config:set:region GCP-NA
370
370
 
371
+ $ csdx config:set:region GCP-EU
372
+
371
373
  $ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India"
372
374
 
373
375
  $ 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>
@@ -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'].includes(selectedRegion)) {
58
+ else if (['NA', '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}`);
@@ -107,10 +107,10 @@ RegionSetCommand.flags = {
107
107
  'developer-hub': cli_utilities_1.flags.string({
108
108
  description: 'Custom host to set for Developer hub API',
109
109
  }),
110
- 'personalize': cli_utilities_1.flags.string({
110
+ personalize: cli_utilities_1.flags.string({
111
111
  description: 'Custom host to set for Personalize API',
112
112
  }),
113
- 'launch': cli_utilities_1.flags.string({
113
+ launch: cli_utilities_1.flags.string({
114
114
  description: 'Custom host to set for Launch API',
115
115
  }),
116
116
  };
@@ -121,6 +121,7 @@ RegionSetCommand.examples = [
121
121
  '$ csdx config:set:region AZURE-NA',
122
122
  '$ csdx config:set:region AZURE-EU',
123
123
  '$ csdx config:set:region GCP-NA',
124
+ '$ csdx config:set:region GCP-EU',
124
125
  '$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India"',
125
126
  '$ 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>',
126
127
  '$ 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>',
@@ -13,6 +13,7 @@ const askRegions = async () => {
13
13
  { name: 'AZURE-NA', value: 'AZURE-NA' },
14
14
  { name: 'AZURE-EU', value: 'AZURE-EU' },
15
15
  { name: 'GCP-NA', value: 'GCP-NA' },
16
+ { name: 'GCP-EU', value: 'GCP-EU' },
16
17
  { name: 'Custom', value: 'custom' },
17
18
  { name: 'exit', value: 'exit' },
18
19
  ],
@@ -15,49 +15,58 @@ function validURL(str) {
15
15
  // Available region list
16
16
  const regions = {
17
17
  NA: {
18
+ name: 'NA',
18
19
  cma: 'https://api.contentstack.io',
19
20
  cda: 'https://cdn.contentstack.io',
20
21
  uiHost: 'https://app.contentstack.com',
21
- name: 'NA',
22
- 'developerHubUrl': 'https://developerhub-api.contentstack.com',
23
- 'launchHubUrl': 'https://launch-api.contentstack.com',
24
- 'personalizeUrl': 'https://personalize-api.contentstack.com',
22
+ developerHubUrl: 'https://developerhub-api.contentstack.com',
23
+ launchHubUrl: 'https://launch-api.contentstack.com',
24
+ personalizeUrl: 'https://personalize-api.contentstack.com',
25
25
  },
26
26
  EU: {
27
+ name: 'EU',
27
28
  cma: 'https://eu-api.contentstack.com',
28
29
  cda: 'https://eu-cdn.contentstack.com',
29
30
  uiHost: 'https://eu-app.contentstack.com',
30
- name: 'EU',
31
- 'developerHubUrl': 'https://eu-developerhub-api.contentstack.com',
32
- 'launchHubUrl': 'https://eu-launch-api.contentstack.com',
33
- 'personalizeUrl': 'https://eu-personalize-api.contentstack.com',
31
+ developerHubUrl: 'https://eu-developerhub-api.contentstack.com',
32
+ launchHubUrl: 'https://eu-launch-api.contentstack.com',
33
+ personalizeUrl: 'https://eu-personalize-api.contentstack.com',
34
34
  },
35
35
  'AZURE-NA': {
36
+ name: 'AZURE-NA',
36
37
  cma: 'https://azure-na-api.contentstack.com',
37
38
  cda: 'https://azure-na-cdn.contentstack.com',
38
39
  uiHost: 'https://azure-na-app.contentstack.com',
39
- name: 'AZURE-NA',
40
- 'developerHubUrl': 'https://azure-na-developerhub-api.contentstack.com',
41
- 'launchHubUrl': 'https://azure-na-launch-api.contentstack.com',
42
- 'personalizeUrl': 'https://azure-na-personalize-api.contentstack.com',
40
+ developerHubUrl: 'https://azure-na-developerhub-api.contentstack.com',
41
+ launchHubUrl: 'https://azure-na-launch-api.contentstack.com',
42
+ personalizeUrl: 'https://azure-na-personalize-api.contentstack.com',
43
43
  },
44
44
  'AZURE-EU': {
45
+ name: 'AZURE-EU',
45
46
  cma: 'https://azure-eu-api.contentstack.com',
46
47
  cda: 'https://azure-eu-cdn.contentstack.com',
47
48
  uiHost: 'https://azure-eu-app.contentstack.com',
48
- name: 'AZURE-EU',
49
- 'developerHubUrl': 'https://azure-eu-developerhub-api.contentstack.com',
50
- 'launchHubUrl': 'https://azure-eu-launch-api.contentstack.com',
51
- 'personalizeUrl': 'https://azure-eu-personalize-api.contentstack.com',
49
+ developerHubUrl: 'https://azure-eu-developerhub-api.contentstack.com',
50
+ launchHubUrl: 'https://azure-eu-launch-api.contentstack.com',
51
+ personalizeUrl: 'https://azure-eu-personalize-api.contentstack.com',
52
52
  },
53
53
  'GCP-NA': {
54
+ name: 'GCP-NA',
54
55
  cma: 'https://gcp-na-api.contentstack.com',
55
56
  cda: 'https://gcp-na-cdn.contentstack.com',
56
57
  uiHost: 'https://gcp-na-app.contentstack.com',
57
- name: 'GCP-NA',
58
- 'developerHubUrl': 'https://gcp-na-developerhub-api.contentstack.com',
59
- 'launchHubUrl': 'https://gcp-na-launch-api.contentstack.com',
60
- 'personalizeUrl': 'https://gcp-na-personalize-api.contentstack.com',
58
+ developerHubUrl: 'https://gcp-na-developerhub-api.contentstack.com',
59
+ launchHubUrl: 'https://gcp-na-launch-api.contentstack.com',
60
+ personalizeUrl: 'https://gcp-na-personalize-api.contentstack.com',
61
+ },
62
+ 'GCP-EU': {
63
+ name: 'GCP-EU',
64
+ cma: 'https://gcp-eu-api.contentstack.com',
65
+ cda: 'https://gcp-eu-cdn.contentstack.com',
66
+ uiHost: 'https://gcp-eu-app.contentstack.com',
67
+ developerHubUrl: 'https://gcp-eu-developerhub-api.contentstack.com',
68
+ launchHubUrl: 'https://gcp-eu-launch-api.contentstack.com',
69
+ personalizeUrl: 'https://gcp-eu-personalize-api.contentstack.com',
61
70
  },
62
71
  };
63
72
  class UserConfig {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.1",
2
+ "version": "1.10.0",
3
3
  "commands": {
4
4
  "config:get:base-branch": {
5
5
  "id": "config:get:base-branch",
@@ -268,6 +268,7 @@
268
268
  "$ csdx config:set:region AZURE-NA",
269
269
  "$ csdx config:set:region AZURE-EU",
270
270
  "$ csdx config:set:region GCP-NA",
271
+ "$ csdx config:set:region GCP-EU",
271
272
  "$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name \"India\"",
272
273
  "$ 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>",
273
274
  "$ 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>",
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.9.1",
4
+ "version": "1.10.0",
5
5
  "author": "Contentstack",
6
6
  "scripts": {
7
7
  "build": "npm run clean && npm run compile",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@contentstack/cli-command": "~1.3.3",
25
- "@contentstack/cli-utilities": "~1.8.1",
25
+ "@contentstack/cli-utilities": "~1.8.4",
26
26
  "lodash": "^4.17.21"
27
27
  },
28
28
  "devDependencies": {