@contentstack/cli-config 1.12.1 → 1.13.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.
|
|
21
|
+
@contentstack/cli-config/1.13.0 linux-x64 node-v22.16.0
|
|
22
22
|
$ csdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ csdx COMMAND
|
|
@@ -358,14 +358,12 @@ DESCRIPTION
|
|
|
358
358
|
EXAMPLES
|
|
359
359
|
$ csdx config:set:region
|
|
360
360
|
|
|
361
|
-
$ csdx config:set:region NA
|
|
362
|
-
|
|
363
|
-
$ csdx config:set:region EU
|
|
364
|
-
|
|
365
361
|
$ csdx config:set:region AWS-NA
|
|
366
362
|
|
|
367
363
|
$ csdx config:set:region AWS-EU
|
|
368
364
|
|
|
365
|
+
$ csdx config:set:region AWS-AU
|
|
366
|
+
|
|
369
367
|
$ csdx config:set:region AZURE-NA
|
|
370
368
|
|
|
371
369
|
$ 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', 'AWS-NA', 'AWS-EU', 'AZURE-NA', 'AZURE-EU', 'GCP-NA', 'GCP-EU'].includes(selectedRegion)) {
|
|
58
|
+
else if (['NA', 'EU', 'AU', 'AWS-NA', 'AWS-EU', 'AWS-AU', '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}`);
|
|
@@ -116,10 +116,9 @@ RegionSetCommand.flags = {
|
|
|
116
116
|
};
|
|
117
117
|
RegionSetCommand.examples = [
|
|
118
118
|
'$ csdx config:set:region',
|
|
119
|
-
'$ csdx config:set:region NA',
|
|
120
|
-
'$ csdx config:set:region EU',
|
|
121
119
|
'$ csdx config:set:region AWS-NA',
|
|
122
120
|
'$ csdx config:set:region AWS-EU',
|
|
121
|
+
'$ csdx config:set:region AWS-AU',
|
|
123
122
|
'$ csdx config:set:region AZURE-NA',
|
|
124
123
|
'$ csdx config:set:region AZURE-EU',
|
|
125
124
|
'$ csdx config:set:region GCP-NA',
|
package/lib/utils/interactive.js
CHANGED
|
@@ -8,10 +8,9 @@ const askRegions = async () => {
|
|
|
8
8
|
name: 'selectedRegion',
|
|
9
9
|
message: 'CLI_CONFIG_SELECT_REGION',
|
|
10
10
|
choices: [
|
|
11
|
-
{ name: 'NA', value: 'NA' },
|
|
12
|
-
{ name: 'EU', value: 'EU' },
|
|
13
11
|
{ name: 'AWS-NA', value: 'AWS-NA' },
|
|
14
12
|
{ name: 'AWS-EU', value: 'AWS-EU' },
|
|
13
|
+
{ name: 'AWS-AU', value: 'AWS-AU' },
|
|
15
14
|
{ name: 'AZURE-NA', value: 'AZURE-NA' },
|
|
16
15
|
{ name: 'AZURE-EU', value: 'AZURE-EU' },
|
|
17
16
|
{ name: 'GCP-NA', value: 'GCP-NA' },
|
|
@@ -2,7 +2,7 @@ declare class UserConfig {
|
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* Set region to config store
|
|
5
|
-
* @param {string} region It Can be NA, EU
|
|
5
|
+
* @param {string} region It Can be AWS-NA, AWS-EU, AWS-AU, AZURE-NA, AZURE-EU, GCP-NA, GCP-EU
|
|
6
6
|
* @returns {object} region object with cma, cda, region property
|
|
7
7
|
*/
|
|
8
8
|
setRegion(region: any): any;
|
|
@@ -50,6 +50,24 @@ const regions = {
|
|
|
50
50
|
launchHubUrl: 'https://eu-launch-api.contentstack.com',
|
|
51
51
|
personalizeUrl: 'https://eu-personalize-api.contentstack.com',
|
|
52
52
|
},
|
|
53
|
+
AU: {
|
|
54
|
+
name: 'AU',
|
|
55
|
+
cma: 'https://au-api.contentstack.com',
|
|
56
|
+
cda: 'https://au-cdn.contentstack.com',
|
|
57
|
+
uiHost: 'https://au-app.contentstack.com',
|
|
58
|
+
developerHubUrl: 'https://au-developerhub-api.contentstack.com',
|
|
59
|
+
launchHubUrl: 'https://au-launch-api.contentstack.com',
|
|
60
|
+
personalizeUrl: 'https://au-personalize-api.contentstack.com',
|
|
61
|
+
},
|
|
62
|
+
'AWS-AU': {
|
|
63
|
+
name: 'AWS-AU',
|
|
64
|
+
cma: 'https://au-api.contentstack.com',
|
|
65
|
+
cda: 'https://au-cdn.contentstack.com',
|
|
66
|
+
uiHost: 'https://au-app.contentstack.com',
|
|
67
|
+
developerHubUrl: 'https://au-developerhub-api.contentstack.com',
|
|
68
|
+
launchHubUrl: 'https://au-launch-api.contentstack.com',
|
|
69
|
+
personalizeUrl: 'https://au-personalize-api.contentstack.com',
|
|
70
|
+
},
|
|
53
71
|
'AZURE-NA': {
|
|
54
72
|
name: 'AZURE-NA',
|
|
55
73
|
cma: 'https://azure-na-api.contentstack.com',
|
|
@@ -91,7 +109,7 @@ class UserConfig {
|
|
|
91
109
|
/**
|
|
92
110
|
*
|
|
93
111
|
* Set region to config store
|
|
94
|
-
* @param {string} region It Can be NA, EU
|
|
112
|
+
* @param {string} region It Can be AWS-NA, AWS-EU, AWS-AU, AZURE-NA, AZURE-EU, GCP-NA, GCP-EU
|
|
95
113
|
* @returns {object} region object with cma, cda, region property
|
|
96
114
|
*/
|
|
97
115
|
setRegion(region) {
|
|
@@ -110,8 +128,8 @@ class UserConfig {
|
|
|
110
128
|
const regionDetails = cli_utilities_1.configHandler.get('region');
|
|
111
129
|
if (regionDetails)
|
|
112
130
|
return regionDetails;
|
|
113
|
-
// returns NA region if not found in config
|
|
114
|
-
return regions
|
|
131
|
+
// returns AWS-NA region if not found in config
|
|
132
|
+
return regions['AWS-NA'];
|
|
115
133
|
}
|
|
116
134
|
/**
|
|
117
135
|
*
|
package/messages/index.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"CLI_CONFIG_SET_REGION_DESCRIPTION": "Set region for CLI",
|
|
3
3
|
"CLI_CONFIG_SET_REGION_FLAG_D_DESCRIPTION": "Custom host to set for content delivery API, if this flag is added then cma and name flags are required",
|
|
4
|
-
"CLI_CONFIG_SET_REGION_FLAG_M_DESCRIPTION": "Custom host to set for content management API,
|
|
4
|
+
"CLI_CONFIG_SET_REGION_FLAG_M_DESCRIPTION": "Custom host to set for content management API, if this flag is added then cda and name flags are required",
|
|
5
5
|
"CLI_CONFIG_SET_REGION_FLAG_N_DESCRIPTION": "Name for the region, if this flag is added then cda and cma flags are required",
|
|
6
|
-
"CLI_CONFIG_SET_REGION_DEFAULT": "No argument or custom flag provided. Setting region to default NA",
|
|
6
|
+
"CLI_CONFIG_SET_REGION_DEFAULT": "No argument or custom flag provided. Setting region to default AWS-NA",
|
|
7
7
|
"CLI_CONFIG_GET_REGION_DESCRIPTION": "Get current region set for CLI",
|
|
8
8
|
"CLI_CONFIG_GET_REGION_NOT_FOUND": "No region found, please set by running command $ csdx config:set:region",
|
|
9
9
|
"CLI_CONFIG_INQUIRE_REGION_NAME": "Enter custom region name",
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_VALUE": "Please enter Early Access header value",
|
|
17
17
|
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_ALIAS": "Please enter Early Access header alias",
|
|
18
18
|
"CLI_BRANCH_REQUIRED_FIELD": "Please enter the required field details"
|
|
19
|
-
}
|
|
19
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -362,10 +362,9 @@
|
|
|
362
362
|
"description": "Set region for CLI",
|
|
363
363
|
"examples": [
|
|
364
364
|
"$ csdx config:set:region",
|
|
365
|
-
"$ csdx config:set:region NA",
|
|
366
|
-
"$ csdx config:set:region EU",
|
|
367
365
|
"$ csdx config:set:region AWS-NA",
|
|
368
366
|
"$ csdx config:set:region AWS-EU",
|
|
367
|
+
"$ csdx config:set:region AWS-AU",
|
|
369
368
|
"$ csdx config:set:region AZURE-NA",
|
|
370
369
|
"$ csdx config:set:region AZURE-EU",
|
|
371
370
|
"$ csdx config:set:region GCP-NA",
|
|
@@ -467,5 +466,5 @@
|
|
|
467
466
|
]
|
|
468
467
|
}
|
|
469
468
|
},
|
|
470
|
-
"version": "1.
|
|
469
|
+
"version": "1.13.0"
|
|
471
470
|
}
|
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.
|
|
4
|
+
"version": "1.13.0",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npm run clean && npm run compile",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@contentstack/cli-command": "~1.5.0",
|
|
25
25
|
"@contentstack/cli-utilities": "~1.12.0",
|
|
26
|
+
"@oclif/core": "^4.3.0",
|
|
27
|
+
"@oclif/plugin-help": "^6.2.28",
|
|
26
28
|
"lodash": "^4.17.21"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|