@contentstack/cli-config 1.4.1 → 1.4.2
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @contentstack/cli-config
|
|
2
2
|
|
|
3
|
-
The config namespace contains all the commands that you will need to configure the CLI as per your requirements. Contentstack currently supports
|
|
3
|
+
The config namespace contains all the commands that you will need to configure the CLI as per your requirements. Contentstack currently supports four regions: North America, Europe, Azure North America and Azure Europe. [Configure the CLI documentation](https://www.contentstack.com/docs/developers/cli/configure-the-cli)
|
|
4
4
|
|
|
5
5
|
[](https://github.com/contentstack/cli/blob/main/LICENSE)
|
|
6
6
|
|
|
@@ -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.4.
|
|
21
|
+
@contentstack/cli-config/1.4.2 linux-x64 node-v16.20.0
|
|
22
22
|
$ csdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ csdx COMMAND
|
|
@@ -144,6 +144,10 @@ EXAMPLES
|
|
|
144
144
|
|
|
145
145
|
$ csdx config:set:region EU
|
|
146
146
|
|
|
147
|
+
$ csdx config:set:region AZURE-NA
|
|
148
|
+
|
|
149
|
+
$ csdx config:set:region AZURE-EU
|
|
150
|
+
|
|
147
151
|
$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India"
|
|
148
152
|
```
|
|
149
153
|
|
|
@@ -40,7 +40,7 @@ class RegionSetCommand extends cli_command_1.Command {
|
|
|
40
40
|
cli_utilities_1.cliux.error(`Failed to set region due to: ${error.message}`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
else if (['NA', 'EU', 'AZURE-NA'].includes(selectedRegion)) {
|
|
43
|
+
else if (['NA', 'EU', 'AZURE-NA', 'AZURE-EU'].includes(selectedRegion)) {
|
|
44
44
|
const regionDetails = utils_1.regionHandler.setRegion(selectedRegion);
|
|
45
45
|
await cli_utilities_1.authHandler.setConfigData('logout'); //Todo: Handle this logout flow well through logout command call
|
|
46
46
|
cli_utilities_1.cliux.success(`Region has been set to ${regionDetails.name}`);
|
|
@@ -82,6 +82,8 @@ RegionSetCommand.examples = [
|
|
|
82
82
|
'$ csdx config:set:region',
|
|
83
83
|
'$ csdx config:set:region NA',
|
|
84
84
|
'$ csdx config:set:region EU',
|
|
85
|
+
'$ csdx config:set:region AZURE-NA',
|
|
86
|
+
'$ csdx config:set:region AZURE-EU',
|
|
85
87
|
'$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India"',
|
|
86
88
|
];
|
|
87
89
|
RegionSetCommand.args = {
|
package/lib/utils/interactive.js
CHANGED
|
@@ -12,6 +12,7 @@ const askRegions = async () => {
|
|
|
12
12
|
{ name: 'NA', value: 'NA' },
|
|
13
13
|
{ name: 'EU', value: 'EU' },
|
|
14
14
|
{ name: 'AZURE-NA', value: 'AZURE-NA' },
|
|
15
|
+
{ name: 'AZURE-EU', value: 'AZURE-EU' },
|
|
15
16
|
{ name: 'Custom', value: 'custom' },
|
|
16
17
|
{ name: 'exit', value: 'exit' },
|
|
17
18
|
],
|
|
@@ -30,6 +30,12 @@ const regions = {
|
|
|
30
30
|
uiHost: 'https://azure-na-app.contentstack.com',
|
|
31
31
|
name: 'AZURE-NA',
|
|
32
32
|
},
|
|
33
|
+
'AZURE-EU': {
|
|
34
|
+
cma: 'https://azure-eu-api.contentstack.com',
|
|
35
|
+
cda: 'https://azure-eu-cdn.contentstack.com',
|
|
36
|
+
uiHost: 'https://azure-eu-app.contentstack.com',
|
|
37
|
+
name: 'AZURE-EU',
|
|
38
|
+
},
|
|
33
39
|
};
|
|
34
40
|
class UserConfig {
|
|
35
41
|
/**
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.4.
|
|
2
|
+
"version": "1.4.2",
|
|
3
3
|
"commands": {
|
|
4
4
|
"config:get:base-branch": {
|
|
5
5
|
"id": "config:get:base-branch",
|
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
"$ csdx config:set:region",
|
|
101
101
|
"$ csdx config:set:region NA",
|
|
102
102
|
"$ csdx config:set:region EU",
|
|
103
|
+
"$ csdx config:set:region AZURE-NA",
|
|
104
|
+
"$ csdx config:set:region AZURE-EU",
|
|
103
105
|
"$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name \"India\""
|
|
104
106
|
],
|
|
105
107
|
"flags": {
|