@contentstack/cli-config 1.20.4 → 1.21.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 +4 -3
- package/lib/commands/config/set/region.js +19 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/utils/region-handler.d.ts +1 -10
- package/lib/utils/region-handler.js +20 -42
- package/oclif.manifest.json +116 -109
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
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
|
-
[](https://github.com/contentstack/cli/blob/main/LICENSE)
|
|
5
|
+
[](https://github.com/contentstack/cli/blob/main/LICENSE)
|
|
6
6
|
|
|
7
7
|
<!-- toc -->
|
|
8
8
|
* [@contentstack/cli-config](#contentstackcli-config)
|
|
@@ -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.21.0 linux-x64 node-v22.23.1
|
|
22
22
|
$ csdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ csdx COMMAND
|
|
@@ -457,7 +457,7 @@ Set region for CLI
|
|
|
457
457
|
```
|
|
458
458
|
USAGE
|
|
459
459
|
$ csdx config:set:region [REGION] [-d <value> -m <value> --ui-host <value> -n <value>] [--developer-hub <value>]
|
|
460
|
-
[--personalize <value>] [--launch <value>] [--studio <value>]
|
|
460
|
+
[--personalize <value>] [--launch <value>] [--studio <value>] [--auth-api <value>]
|
|
461
461
|
|
|
462
462
|
ARGUMENTS
|
|
463
463
|
[REGION] Name for the region
|
|
@@ -468,6 +468,7 @@ FLAGS
|
|
|
468
468
|
-m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda, ui-host
|
|
469
469
|
and name flags are required
|
|
470
470
|
-n, --name=<value> Name for the region, if this flag is added then cda, cma and ui-host flags are required
|
|
471
|
+
--auth-api=<value> Custom host to set for Auth API
|
|
471
472
|
--developer-hub=<value> Custom host to set for Developer hub API
|
|
472
473
|
--launch=<value> Custom host to set for Launch API
|
|
473
474
|
--personalize=<value> Custom host to set for Personalize API
|
|
@@ -5,6 +5,7 @@ const utils_1 = require("../../../utils");
|
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
6
|
class RegionSetCommand extends base_command_1.BaseCommand {
|
|
7
7
|
async run() {
|
|
8
|
+
var _a;
|
|
8
9
|
const { args, flags: regionSetFlags } = await this.parse(RegionSetCommand);
|
|
9
10
|
let cda = regionSetFlags.cda;
|
|
10
11
|
let cma = regionSetFlags.cma;
|
|
@@ -14,6 +15,7 @@ class RegionSetCommand extends base_command_1.BaseCommand {
|
|
|
14
15
|
let personalizeUrl = regionSetFlags['personalize'];
|
|
15
16
|
let launchHubUrl = regionSetFlags['launch'];
|
|
16
17
|
let composableStudioUrl = regionSetFlags['studio'];
|
|
18
|
+
let authUrl = regionSetFlags['auth-api'];
|
|
17
19
|
let selectedRegion = args.region;
|
|
18
20
|
if (!(cda && cma && uiHost && name) && !selectedRegion) {
|
|
19
21
|
selectedRegion = await utils_1.interactive.askRegions();
|
|
@@ -43,6 +45,9 @@ class RegionSetCommand extends base_command_1.BaseCommand {
|
|
|
43
45
|
if (!composableStudioUrl) {
|
|
44
46
|
composableStudioUrl = this.transformUrl(cma, 'composable-studio-api');
|
|
45
47
|
}
|
|
48
|
+
if (!authUrl) {
|
|
49
|
+
authUrl = this.transformUrl(cma, 'auth-api');
|
|
50
|
+
}
|
|
46
51
|
let customRegion = {
|
|
47
52
|
cda,
|
|
48
53
|
cma,
|
|
@@ -52,6 +57,16 @@ class RegionSetCommand extends base_command_1.BaseCommand {
|
|
|
52
57
|
personalizeUrl,
|
|
53
58
|
launchHubUrl,
|
|
54
59
|
composableStudioUrl,
|
|
60
|
+
endpoints: {
|
|
61
|
+
contentManagement: cma,
|
|
62
|
+
contentDelivery: cda,
|
|
63
|
+
application: uiHost,
|
|
64
|
+
developerHub: developerHubUrl,
|
|
65
|
+
launch: launchHubUrl,
|
|
66
|
+
personalizeManagement: personalizeUrl,
|
|
67
|
+
composableStudio: composableStudioUrl,
|
|
68
|
+
auth: authUrl,
|
|
69
|
+
},
|
|
55
70
|
};
|
|
56
71
|
customRegion = utils_1.regionHandler.setCustomRegion(customRegion);
|
|
57
72
|
await cli_utilities_1.authHandler.setConfigData('logout'); //Todo: Handle this logout flow well through logout command call
|
|
@@ -63,6 +78,7 @@ class RegionSetCommand extends base_command_1.BaseCommand {
|
|
|
63
78
|
cli_utilities_1.cliux.success(`Personalize URL: ${customRegion.personalizeUrl}`);
|
|
64
79
|
cli_utilities_1.cliux.success(`Launch URL: ${customRegion.launchHubUrl}`);
|
|
65
80
|
cli_utilities_1.cliux.success(`Studio URL: ${customRegion.composableStudioUrl}`);
|
|
81
|
+
cli_utilities_1.cliux.success(`Auth API URL: ${(_a = customRegion.endpoints) === null || _a === void 0 ? void 0 : _a.auth}`);
|
|
66
82
|
}
|
|
67
83
|
catch (error) {
|
|
68
84
|
(0, cli_utilities_1.handleAndLogError)(error, Object.assign(Object.assign({}, this.contextDetails), { module: 'config-set-region' }));
|
|
@@ -130,6 +146,9 @@ RegionSetCommand.flags = {
|
|
|
130
146
|
studio: cli_utilities_1.flags.string({
|
|
131
147
|
description: 'Custom host to set for Studio API',
|
|
132
148
|
}),
|
|
149
|
+
'auth-api': cli_utilities_1.flags.string({
|
|
150
|
+
description: 'Custom host to set for Auth API',
|
|
151
|
+
}),
|
|
133
152
|
};
|
|
134
153
|
RegionSetCommand.examples = [
|
|
135
154
|
'$ csdx config:set:region',
|
|
@@ -38,16 +38,7 @@ declare class UserConfig {
|
|
|
38
38
|
* @param { object } regionObject JSON object needs to be sanitized
|
|
39
39
|
* @returns { object } JSON object with only valid keys for region
|
|
40
40
|
*/
|
|
41
|
-
sanitizeRegionObject(regionObject: any):
|
|
42
|
-
cma: any;
|
|
43
|
-
cda: any;
|
|
44
|
-
uiHost: any;
|
|
45
|
-
name: any;
|
|
46
|
-
developerHubUrl: any;
|
|
47
|
-
personalizeUrl: any;
|
|
48
|
-
launchHubUrl: any;
|
|
49
|
-
composableStudioUrl: any;
|
|
50
|
-
};
|
|
41
|
+
sanitizeRegionObject(regionObject: any): import("@contentstack/cli-utilities").CanonicalRegion;
|
|
51
42
|
}
|
|
52
43
|
export { regions };
|
|
53
44
|
declare const _default: UserConfig;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.regions = void 0;
|
|
4
4
|
const cli_utilities_1 = require("@contentstack/cli-utilities");
|
|
5
|
-
const utils_1 = require("@contentstack/utils");
|
|
6
5
|
function validURL(str) {
|
|
7
6
|
const pattern = new RegExp('^(https?:\\/\\/)?' + // protocol (http or https)
|
|
8
7
|
'([a-zA-Z0-9.-]+|' + // domain name
|
|
@@ -20,44 +19,18 @@ function validURL(str) {
|
|
|
20
19
|
* @returns {object} Region object with all necessary URLs
|
|
21
20
|
*/
|
|
22
21
|
function getRegionObject(regionKey) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (typeof endpoints === 'string') {
|
|
27
|
-
throw new Error('Invalid endpoint response');
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
name: regionKey,
|
|
31
|
-
cma: endpoints.contentManagement,
|
|
32
|
-
cda: endpoints.contentDelivery,
|
|
33
|
-
uiHost: endpoints.application,
|
|
34
|
-
developerHubUrl: endpoints.developerHub,
|
|
35
|
-
launchHubUrl: endpoints.launch,
|
|
36
|
-
personalizeUrl: endpoints.personalizeManagement,
|
|
37
|
-
composableStudioUrl: endpoints.composableStudio,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
catch (_a) {
|
|
22
|
+
// resolveCanonicalEndpoints handles all aliases defined in regions.json
|
|
23
|
+
const endpoints = (0, cli_utilities_1.resolveCanonicalEndpoints)(regionKey);
|
|
24
|
+
if (!endpoints)
|
|
41
25
|
return null;
|
|
42
|
-
|
|
26
|
+
return (0, cli_utilities_1.buildRegionFromEndpoints)(regionKey, endpoints);
|
|
43
27
|
}
|
|
44
28
|
/**
|
|
45
29
|
* Get all available regions dynamically
|
|
46
30
|
* This creates a regions object similar to the old hardcoded one but using @contentstack/utils
|
|
47
31
|
*/
|
|
48
32
|
function getAvailableRegions() {
|
|
49
|
-
const regionKeys = [
|
|
50
|
-
'NA',
|
|
51
|
-
'AWS-NA',
|
|
52
|
-
'EU',
|
|
53
|
-
'AWS-EU',
|
|
54
|
-
'AU',
|
|
55
|
-
'AWS-AU',
|
|
56
|
-
'AZURE-NA',
|
|
57
|
-
'AZURE-EU',
|
|
58
|
-
'GCP-NA',
|
|
59
|
-
'GCP-EU',
|
|
60
|
-
];
|
|
33
|
+
const regionKeys = ['NA', 'AWS-NA', 'EU', 'AWS-EU', 'AU', 'AWS-AU', 'AZURE-NA', 'AZURE-EU', 'GCP-NA', 'GCP-EU'];
|
|
61
34
|
const regions = {};
|
|
62
35
|
for (const key of regionKeys) {
|
|
63
36
|
const regionObj = getRegionObject(key);
|
|
@@ -142,17 +115,22 @@ class UserConfig {
|
|
|
142
115
|
* @returns { object } JSON object with only valid keys for region
|
|
143
116
|
*/
|
|
144
117
|
sanitizeRegionObject(regionObject) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
118
|
+
var _a;
|
|
119
|
+
// endpoints is the single source of truth — every friendly field (cma, cda, ...,
|
|
120
|
+
// authUrl) is derived from it below via buildRegionFromEndpoints, same as named
|
|
121
|
+
// regions. Falls back to synthesizing endpoints from the individual raw fields
|
|
122
|
+
// when the caller didn't supply one directly.
|
|
123
|
+
const endpoints = (_a = regionObject['endpoints']) !== null && _a !== void 0 ? _a : {
|
|
124
|
+
contentManagement: regionObject.cma,
|
|
125
|
+
contentDelivery: regionObject.cda,
|
|
126
|
+
application: regionObject.uiHost,
|
|
127
|
+
developerHub: regionObject['developerHubUrl'],
|
|
128
|
+
launch: regionObject['launchHubUrl'],
|
|
129
|
+
personalizeManagement: regionObject['personalizeUrl'],
|
|
130
|
+
composableStudio: regionObject['composableStudioUrl'],
|
|
131
|
+
auth: regionObject['authUrl'],
|
|
154
132
|
};
|
|
155
|
-
return
|
|
133
|
+
return (0, cli_utilities_1.buildRegionFromEndpoints)(regionObject.name, endpoints);
|
|
156
134
|
}
|
|
157
135
|
}
|
|
158
136
|
exports.default = new UserConfig();
|
package/oclif.manifest.json
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"config:
|
|
3
|
+
"config:remove:base-branch": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Remove branch config for CLI",
|
|
7
7
|
"examples": [
|
|
8
|
-
"$ csdx config:
|
|
8
|
+
"$ csdx config:remove:base-branch",
|
|
9
|
+
"$ csdx config:remove:base-branch --stack-api-key <value>"
|
|
9
10
|
],
|
|
10
|
-
"flags": {
|
|
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
|
+
"yes": {
|
|
21
|
+
"char": "y",
|
|
22
|
+
"description": "Force remove.",
|
|
23
|
+
"name": "yes",
|
|
24
|
+
"allowNo": false,
|
|
25
|
+
"type": "boolean"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
11
28
|
"hasDynamicHelp": false,
|
|
12
29
|
"hiddenAliases": [],
|
|
13
|
-
"id": "config:
|
|
30
|
+
"id": "config:remove:base-branch",
|
|
14
31
|
"pluginAlias": "@contentstack/cli-config",
|
|
15
32
|
"pluginName": "@contentstack/cli-config",
|
|
16
33
|
"pluginType": "core",
|
|
@@ -20,23 +37,39 @@
|
|
|
20
37
|
"lib",
|
|
21
38
|
"commands",
|
|
22
39
|
"config",
|
|
23
|
-
"
|
|
40
|
+
"remove",
|
|
24
41
|
"base-branch.js"
|
|
25
42
|
]
|
|
26
43
|
},
|
|
27
|
-
"config:
|
|
44
|
+
"config:remove:early-access-header": {
|
|
28
45
|
"aliases": [
|
|
29
|
-
"config:
|
|
46
|
+
"config:remove:ea-header"
|
|
30
47
|
],
|
|
31
48
|
"args": {},
|
|
32
|
-
"description": "
|
|
49
|
+
"description": "Remove Early Access header",
|
|
33
50
|
"examples": [
|
|
34
|
-
"$ <%= config.bin %> <%= command.id %>"
|
|
51
|
+
"$ <%= config.bin %> <%= command.id %>",
|
|
52
|
+
"$ <%= config.bin %> <%= command.id %> --header-alias <value>"
|
|
35
53
|
],
|
|
36
|
-
"flags": {
|
|
54
|
+
"flags": {
|
|
55
|
+
"header-alias": {
|
|
56
|
+
"description": "(optional) Provide the Early Access header alias name.",
|
|
57
|
+
"name": "header-alias",
|
|
58
|
+
"hasDynamicHelp": false,
|
|
59
|
+
"multiple": false,
|
|
60
|
+
"type": "option"
|
|
61
|
+
},
|
|
62
|
+
"yes": {
|
|
63
|
+
"char": "y",
|
|
64
|
+
"description": "(optional) Force the removal of Early Access header configuration by skipping the confirmation.",
|
|
65
|
+
"name": "yes",
|
|
66
|
+
"allowNo": false,
|
|
67
|
+
"type": "boolean"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
37
70
|
"hasDynamicHelp": false,
|
|
38
71
|
"hiddenAliases": [],
|
|
39
|
-
"id": "config:
|
|
72
|
+
"id": "config:remove:early-access-header",
|
|
40
73
|
"pluginAlias": "@contentstack/cli-config",
|
|
41
74
|
"pluginName": "@contentstack/cli-config",
|
|
42
75
|
"pluginType": "core",
|
|
@@ -46,21 +79,21 @@
|
|
|
46
79
|
"lib",
|
|
47
80
|
"commands",
|
|
48
81
|
"config",
|
|
49
|
-
"
|
|
82
|
+
"remove",
|
|
50
83
|
"early-access-header.js"
|
|
51
84
|
]
|
|
52
85
|
},
|
|
53
|
-
"config:
|
|
86
|
+
"config:remove:proxy": {
|
|
54
87
|
"aliases": [],
|
|
55
88
|
"args": {},
|
|
56
|
-
"description": "
|
|
89
|
+
"description": "Remove proxy configuration from global config",
|
|
57
90
|
"examples": [
|
|
58
|
-
"csdx config:
|
|
91
|
+
"csdx config:remove:proxy"
|
|
59
92
|
],
|
|
60
93
|
"flags": {},
|
|
61
94
|
"hasDynamicHelp": false,
|
|
62
95
|
"hiddenAliases": [],
|
|
63
|
-
"id": "config:
|
|
96
|
+
"id": "config:remove:proxy",
|
|
64
97
|
"pluginAlias": "@contentstack/cli-config",
|
|
65
98
|
"pluginName": "@contentstack/cli-config",
|
|
66
99
|
"pluginType": "core",
|
|
@@ -70,21 +103,29 @@
|
|
|
70
103
|
"lib",
|
|
71
104
|
"commands",
|
|
72
105
|
"config",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
106
|
+
"remove",
|
|
107
|
+
"proxy.js"
|
|
75
108
|
]
|
|
76
109
|
},
|
|
77
|
-
"config:
|
|
110
|
+
"config:remove:rate-limit": {
|
|
78
111
|
"aliases": [],
|
|
79
112
|
"args": {},
|
|
80
|
-
"description": "
|
|
113
|
+
"description": "Remove rate-limit of the organization",
|
|
81
114
|
"examples": [
|
|
82
|
-
"csdx config:
|
|
115
|
+
"$ csdx config:remove:rate-limit --org <<org_uid>>"
|
|
83
116
|
],
|
|
84
|
-
"flags": {
|
|
117
|
+
"flags": {
|
|
118
|
+
"org": {
|
|
119
|
+
"description": "Provide the organization UID",
|
|
120
|
+
"name": "org",
|
|
121
|
+
"hasDynamicHelp": false,
|
|
122
|
+
"multiple": false,
|
|
123
|
+
"type": "option"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
85
126
|
"hasDynamicHelp": false,
|
|
86
127
|
"hiddenAliases": [],
|
|
87
|
-
"id": "config:
|
|
128
|
+
"id": "config:remove:rate-limit",
|
|
88
129
|
"pluginAlias": "@contentstack/cli-config",
|
|
89
130
|
"pluginName": "@contentstack/cli-config",
|
|
90
131
|
"pluginType": "core",
|
|
@@ -94,21 +135,21 @@
|
|
|
94
135
|
"lib",
|
|
95
136
|
"commands",
|
|
96
137
|
"config",
|
|
97
|
-
"
|
|
98
|
-
"
|
|
138
|
+
"remove",
|
|
139
|
+
"rate-limit.js"
|
|
99
140
|
]
|
|
100
141
|
},
|
|
101
|
-
"config:get:
|
|
142
|
+
"config:get:base-branch": {
|
|
102
143
|
"aliases": [],
|
|
103
144
|
"args": {},
|
|
104
|
-
"description": "Get
|
|
145
|
+
"description": "Get current branch set for CLI",
|
|
105
146
|
"examples": [
|
|
106
|
-
"$ csdx config:get:
|
|
147
|
+
"$ csdx config:get:base-branch"
|
|
107
148
|
],
|
|
108
149
|
"flags": {},
|
|
109
150
|
"hasDynamicHelp": false,
|
|
110
151
|
"hiddenAliases": [],
|
|
111
|
-
"id": "config:get:
|
|
152
|
+
"id": "config:get:base-branch",
|
|
112
153
|
"pluginAlias": "@contentstack/cli-config",
|
|
113
154
|
"pluginName": "@contentstack/cli-config",
|
|
114
155
|
"pluginType": "core",
|
|
@@ -119,20 +160,22 @@
|
|
|
119
160
|
"commands",
|
|
120
161
|
"config",
|
|
121
162
|
"get",
|
|
122
|
-
"
|
|
163
|
+
"base-branch.js"
|
|
123
164
|
]
|
|
124
165
|
},
|
|
125
|
-
"config:get:
|
|
126
|
-
"aliases": [
|
|
166
|
+
"config:get:early-access-header": {
|
|
167
|
+
"aliases": [
|
|
168
|
+
"config:get:ea-header"
|
|
169
|
+
],
|
|
127
170
|
"args": {},
|
|
128
|
-
"description": "
|
|
171
|
+
"description": "Display Early Access headers",
|
|
129
172
|
"examples": [
|
|
130
|
-
"$
|
|
173
|
+
"$ <%= config.bin %> <%= command.id %>"
|
|
131
174
|
],
|
|
132
175
|
"flags": {},
|
|
133
176
|
"hasDynamicHelp": false,
|
|
134
177
|
"hiddenAliases": [],
|
|
135
|
-
"id": "config:get:
|
|
178
|
+
"id": "config:get:early-access-header",
|
|
136
179
|
"pluginAlias": "@contentstack/cli-config",
|
|
137
180
|
"pluginName": "@contentstack/cli-config",
|
|
138
181
|
"pluginType": "core",
|
|
@@ -143,37 +186,20 @@
|
|
|
143
186
|
"commands",
|
|
144
187
|
"config",
|
|
145
188
|
"get",
|
|
146
|
-
"
|
|
189
|
+
"early-access-header.js"
|
|
147
190
|
]
|
|
148
191
|
},
|
|
149
|
-
"config:
|
|
192
|
+
"config:get:log": {
|
|
150
193
|
"aliases": [],
|
|
151
194
|
"args": {},
|
|
152
|
-
"description": "
|
|
195
|
+
"description": "Get logging configuration for CLI",
|
|
153
196
|
"examples": [
|
|
154
|
-
"
|
|
155
|
-
"$ csdx config:remove:base-branch --stack-api-key <value>"
|
|
197
|
+
"csdx config:get:log"
|
|
156
198
|
],
|
|
157
|
-
"flags": {
|
|
158
|
-
"stack-api-key": {
|
|
159
|
-
"char": "k",
|
|
160
|
-
"description": "Stack API key.",
|
|
161
|
-
"name": "stack-api-key",
|
|
162
|
-
"hasDynamicHelp": false,
|
|
163
|
-
"multiple": false,
|
|
164
|
-
"type": "option"
|
|
165
|
-
},
|
|
166
|
-
"yes": {
|
|
167
|
-
"char": "y",
|
|
168
|
-
"description": "Force remove.",
|
|
169
|
-
"name": "yes",
|
|
170
|
-
"allowNo": false,
|
|
171
|
-
"type": "boolean"
|
|
172
|
-
}
|
|
173
|
-
},
|
|
199
|
+
"flags": {},
|
|
174
200
|
"hasDynamicHelp": false,
|
|
175
201
|
"hiddenAliases": [],
|
|
176
|
-
"id": "config:
|
|
202
|
+
"id": "config:get:log",
|
|
177
203
|
"pluginAlias": "@contentstack/cli-config",
|
|
178
204
|
"pluginName": "@contentstack/cli-config",
|
|
179
205
|
"pluginType": "core",
|
|
@@ -183,39 +209,21 @@
|
|
|
183
209
|
"lib",
|
|
184
210
|
"commands",
|
|
185
211
|
"config",
|
|
186
|
-
"
|
|
187
|
-
"
|
|
212
|
+
"get",
|
|
213
|
+
"log.js"
|
|
188
214
|
]
|
|
189
215
|
},
|
|
190
|
-
"config:
|
|
191
|
-
"aliases": [
|
|
192
|
-
"config:remove:ea-header"
|
|
193
|
-
],
|
|
216
|
+
"config:get:proxy": {
|
|
217
|
+
"aliases": [],
|
|
194
218
|
"args": {},
|
|
195
|
-
"description": "
|
|
219
|
+
"description": "Get proxy configuration for CLI",
|
|
196
220
|
"examples": [
|
|
197
|
-
"
|
|
198
|
-
"$ <%= config.bin %> <%= command.id %> --header-alias <value>"
|
|
221
|
+
"csdx config:get:proxy"
|
|
199
222
|
],
|
|
200
|
-
"flags": {
|
|
201
|
-
"header-alias": {
|
|
202
|
-
"description": "(optional) Provide the Early Access header alias name.",
|
|
203
|
-
"name": "header-alias",
|
|
204
|
-
"hasDynamicHelp": false,
|
|
205
|
-
"multiple": false,
|
|
206
|
-
"type": "option"
|
|
207
|
-
},
|
|
208
|
-
"yes": {
|
|
209
|
-
"char": "y",
|
|
210
|
-
"description": "(optional) Force the removal of Early Access header configuration by skipping the confirmation.",
|
|
211
|
-
"name": "yes",
|
|
212
|
-
"allowNo": false,
|
|
213
|
-
"type": "boolean"
|
|
214
|
-
}
|
|
215
|
-
},
|
|
223
|
+
"flags": {},
|
|
216
224
|
"hasDynamicHelp": false,
|
|
217
225
|
"hiddenAliases": [],
|
|
218
|
-
"id": "config:
|
|
226
|
+
"id": "config:get:proxy",
|
|
219
227
|
"pluginAlias": "@contentstack/cli-config",
|
|
220
228
|
"pluginName": "@contentstack/cli-config",
|
|
221
229
|
"pluginType": "core",
|
|
@@ -225,21 +233,21 @@
|
|
|
225
233
|
"lib",
|
|
226
234
|
"commands",
|
|
227
235
|
"config",
|
|
228
|
-
"
|
|
229
|
-
"
|
|
236
|
+
"get",
|
|
237
|
+
"proxy.js"
|
|
230
238
|
]
|
|
231
239
|
},
|
|
232
|
-
"config:
|
|
240
|
+
"config:get:rate-limit": {
|
|
233
241
|
"aliases": [],
|
|
234
242
|
"args": {},
|
|
235
|
-
"description": "
|
|
243
|
+
"description": "Get rate-limit of organizations",
|
|
236
244
|
"examples": [
|
|
237
|
-
"csdx config:
|
|
245
|
+
"$ csdx config:get:rate-limit"
|
|
238
246
|
],
|
|
239
247
|
"flags": {},
|
|
240
248
|
"hasDynamicHelp": false,
|
|
241
249
|
"hiddenAliases": [],
|
|
242
|
-
"id": "config:
|
|
250
|
+
"id": "config:get:rate-limit",
|
|
243
251
|
"pluginAlias": "@contentstack/cli-config",
|
|
244
252
|
"pluginName": "@contentstack/cli-config",
|
|
245
253
|
"pluginType": "core",
|
|
@@ -249,29 +257,21 @@
|
|
|
249
257
|
"lib",
|
|
250
258
|
"commands",
|
|
251
259
|
"config",
|
|
252
|
-
"
|
|
253
|
-
"
|
|
260
|
+
"get",
|
|
261
|
+
"rate-limit.js"
|
|
254
262
|
]
|
|
255
263
|
},
|
|
256
|
-
"config:
|
|
264
|
+
"config:get:region": {
|
|
257
265
|
"aliases": [],
|
|
258
266
|
"args": {},
|
|
259
|
-
"description": "
|
|
267
|
+
"description": "Get current region set for CLI",
|
|
260
268
|
"examples": [
|
|
261
|
-
"$ csdx config:
|
|
269
|
+
"$ csdx config:get:region"
|
|
262
270
|
],
|
|
263
|
-
"flags": {
|
|
264
|
-
"org": {
|
|
265
|
-
"description": "Provide the organization UID",
|
|
266
|
-
"name": "org",
|
|
267
|
-
"hasDynamicHelp": false,
|
|
268
|
-
"multiple": false,
|
|
269
|
-
"type": "option"
|
|
270
|
-
}
|
|
271
|
-
},
|
|
271
|
+
"flags": {},
|
|
272
272
|
"hasDynamicHelp": false,
|
|
273
273
|
"hiddenAliases": [],
|
|
274
|
-
"id": "config:
|
|
274
|
+
"id": "config:get:region",
|
|
275
275
|
"pluginAlias": "@contentstack/cli-config",
|
|
276
276
|
"pluginName": "@contentstack/cli-config",
|
|
277
277
|
"pluginType": "core",
|
|
@@ -281,8 +281,8 @@
|
|
|
281
281
|
"lib",
|
|
282
282
|
"commands",
|
|
283
283
|
"config",
|
|
284
|
-
"
|
|
285
|
-
"
|
|
284
|
+
"get",
|
|
285
|
+
"region.js"
|
|
286
286
|
]
|
|
287
287
|
},
|
|
288
288
|
"config:set:base-branch": {
|
|
@@ -648,6 +648,13 @@
|
|
|
648
648
|
"hasDynamicHelp": false,
|
|
649
649
|
"multiple": false,
|
|
650
650
|
"type": "option"
|
|
651
|
+
},
|
|
652
|
+
"auth-api": {
|
|
653
|
+
"description": "Custom host to set for Auth API",
|
|
654
|
+
"name": "auth-api",
|
|
655
|
+
"hasDynamicHelp": false,
|
|
656
|
+
"multiple": false,
|
|
657
|
+
"type": "option"
|
|
651
658
|
}
|
|
652
659
|
},
|
|
653
660
|
"hasDynamicHelp": false,
|
|
@@ -667,5 +674,5 @@
|
|
|
667
674
|
]
|
|
668
675
|
}
|
|
669
676
|
},
|
|
670
|
-
"version": "1.
|
|
677
|
+
"version": "1.21.0"
|
|
671
678
|
}
|
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.21.0",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm compile && oclif manifest && oclif readme",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"lint": "eslint src/**/*.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@contentstack/cli-command": "~1.8.
|
|
18
|
-
"@contentstack/cli-utilities": "~1.
|
|
17
|
+
"@contentstack/cli-command": "~1.8.5",
|
|
18
|
+
"@contentstack/cli-utilities": "~1.19.0",
|
|
19
19
|
"@contentstack/utils": "~1.9.1",
|
|
20
20
|
"@oclif/core": "^4.11.4"
|
|
21
21
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "^14.18.63",
|
|
32
32
|
"@types/sinon": "^21.0.0",
|
|
33
33
|
"chai": "^4.5.0",
|
|
34
|
-
"eslint": "^
|
|
34
|
+
"eslint": "^10.5.0",
|
|
35
35
|
"eslint-config-oclif": "^6.0.62",
|
|
36
36
|
"eslint-config-oclif-typescript": "^3.1.14",
|
|
37
37
|
"mocha": "10.8.2",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"typescript": "^4.9.5"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
45
|
+
"node": ">=22.0.0"
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"/lib",
|
|
@@ -91,4 +91,4 @@
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"repository": "contentstack/cli"
|
|
94
|
-
}
|
|
94
|
+
}
|