@contentstack/cli 0.1.1-beta.24 → 0.1.1-beta.27
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
|
|
|
18
18
|
$ csdx COMMAND
|
|
19
19
|
running command...
|
|
20
20
|
$ csdx (-v|--version|version)
|
|
21
|
-
@contentstack/cli/0.1.1-beta.
|
|
21
|
+
@contentstack/cli/0.1.1-beta.27 linux-x64 node-v16.14.2
|
|
22
22
|
$ csdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ csdx COMMAND
|
|
@@ -227,7 +227,7 @@ EXAMPLES
|
|
|
227
227
|
$ csdx cm:bootstrap -t <github access token>
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
_See code: [@contentstack/cli-cm-bootstrap](https://github.com/contentstack/cli/blob/v1.0.
|
|
230
|
+
_See code: [@contentstack/cli-cm-bootstrap](https://github.com/contentstack/cli/blob/v1.0.5/src/commands/cm/bootstrap.ts)_
|
|
231
231
|
|
|
232
232
|
## `csdx cm:bulk-publish`
|
|
233
233
|
|
|
@@ -929,7 +929,7 @@ EXAMPLES
|
|
|
929
929
|
csdx cm:export -A -B [optional] branch name
|
|
930
930
|
```
|
|
931
931
|
|
|
932
|
-
_See code: [@contentstack/cli-cm-export](https://github.com/contentstack/cli/blob/v0.1.1-beta.
|
|
932
|
+
_See code: [@contentstack/cli-cm-export](https://github.com/contentstack/cli/blob/v0.1.1-beta.12/packages/contentstack-export/src/commands/cm/export.js)_
|
|
933
933
|
|
|
934
934
|
## `csdx cm:export-to-csv`
|
|
935
935
|
|
|
@@ -985,7 +985,7 @@ EXAMPLES
|
|
|
985
985
|
csdx cm:import -A -B <branch name>
|
|
986
986
|
```
|
|
987
987
|
|
|
988
|
-
_See code: [@contentstack/cli-cm-import](https://github.com/contentstack/cli/blob/v0.1.1-beta.
|
|
988
|
+
_See code: [@contentstack/cli-cm-import](https://github.com/contentstack/cli/blob/v0.1.1-beta.15/packages/contentstack-import/src/commands/cm/import.js)_
|
|
989
989
|
|
|
990
990
|
## `csdx cm:migrate-rte`
|
|
991
991
|
|
|
@@ -1086,7 +1086,7 @@ EXAMPLES
|
|
|
1086
1086
|
$ csdx cm:seed -r "account/repository" -o "your-org-uid" -n "stack-name" //create a new stack in given org uid
|
|
1087
1087
|
```
|
|
1088
1088
|
|
|
1089
|
-
_See code: [@contentstack/cli-cm-seed](https://github.com/contentstack/cli/blob/v1.0.
|
|
1089
|
+
_See code: [@contentstack/cli-cm-seed](https://github.com/contentstack/cli/blob/v1.0.10/src/commands/cm/seed.ts)_
|
|
1090
1090
|
|
|
1091
1091
|
## `csdx cm:stack-clone`
|
|
1092
1092
|
|
|
@@ -1107,7 +1107,7 @@ EXAMPLE
|
|
|
1107
1107
|
csdx cm:stack-clone
|
|
1108
1108
|
```
|
|
1109
1109
|
|
|
1110
|
-
_See code: [@contentstack/cli-cm-clone](https://github.com/contentstack/cli/blob/v0.1.0-beta.
|
|
1110
|
+
_See code: [@contentstack/cli-cm-clone](https://github.com/contentstack/cli/blob/v0.1.0-beta.5/src/commands/cm/stack-clone.js)_
|
|
1111
1111
|
|
|
1112
1112
|
## `csdx config:get:region`
|
|
1113
1113
|
|
|
@@ -1121,7 +1121,7 @@ USAGE
|
|
|
1121
1121
|
$ csdx config:get:region
|
|
1122
1122
|
```
|
|
1123
1123
|
|
|
1124
|
-
_See code: [src/commands/config/get/region.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.
|
|
1124
|
+
_See code: [src/commands/config/get/region.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.27/src/commands/config/get/region.js)_
|
|
1125
1125
|
|
|
1126
1126
|
## `csdx config:set:region [REGION]`
|
|
1127
1127
|
|
|
@@ -1153,7 +1153,7 @@ EXAMPLES
|
|
|
1153
1153
|
--name="India"
|
|
1154
1154
|
```
|
|
1155
1155
|
|
|
1156
|
-
_See code: [src/commands/config/set/region.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.
|
|
1156
|
+
_See code: [src/commands/config/set/region.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.27/src/commands/config/set/region.js)_
|
|
1157
1157
|
|
|
1158
1158
|
## `csdx help [COMMAND]`
|
|
1159
1159
|
|
|
@@ -1172,7 +1172,7 @@ OPTIONS
|
|
|
1172
1172
|
--all see all commands in CLI
|
|
1173
1173
|
```
|
|
1174
1174
|
|
|
1175
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/
|
|
1175
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_
|
|
1176
1176
|
|
|
1177
1177
|
## `csdx plugins`
|
|
1178
1178
|
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.1-beta.
|
|
1
|
+
{"version":"0.1.1-beta.27","commands":{"config:get:region":{"id":"config:get:region","description":"Get current region set for CLI\n","pluginName":"@contentstack/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"config:set:region":{"id":"config:set:region","description":"Set region for CLI\n","pluginName":"@contentstack/cli","pluginType":"core","aliases":[],"examples":["$ csdx config:set:region EU","$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --name \"India\"","$ csdx config:set:region --cma=\"https://in-api.contentstack.com\" --cda=\"https://in-cda.contentstack.com\" --name=\"India\""],"flags":{"cda":{"name":"cda","type":"option","char":"d","description":"Custom host to set for content delivery API, if this flag is added then cma and name flags are required"},"cma":{"name":"cma","type":"option","char":"m","description":"Custom host to set for content management API, , if this flag is added then cda and name flags are required"},"name":{"name":"name","type":"option","char":"n","description":"Name for the region, if this flag is added then cda and cma flags are required"}},"args":[{"name":"region","description":"North America(NA), Europe (EU)","options":["EU","NA"]}]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli",
|
|
3
3
|
"description": "Command-line tool (CLI) to interact with Contentstack",
|
|
4
|
-
"version": "0.1.1-beta.
|
|
4
|
+
"version": "0.1.1-beta.27",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bin": {
|
|
7
7
|
"csdx": "./bin/run"
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"@contentstack/cli-command": "0.1.1-beta.6",
|
|
12
12
|
"@contentstack/cli-auth": "0.1.1-beta.2",
|
|
13
13
|
"@contentstack/cli-cm-bulk-publish": "0.1.1-beta.5",
|
|
14
|
-
"@contentstack/cli-cm-clone": "0.1.0-beta.
|
|
15
|
-
"@contentstack/cli-cm-export": "^0.1.1-beta.
|
|
14
|
+
"@contentstack/cli-cm-clone": "0.1.0-beta.5",
|
|
15
|
+
"@contentstack/cli-cm-export": "^0.1.1-beta.12",
|
|
16
16
|
"@contentstack/cli-cm-export-to-csv": "0.1.0-beta.2",
|
|
17
17
|
"@contentstack/cli-migration": "0.1.1-beta.2",
|
|
18
18
|
"@contentstack/cli-cm-migrate-rte": "^1.0.4",
|
|
19
|
-
"@contentstack/cli-cm-import": "^0.1.1-beta.
|
|
20
|
-
"@contentstack/cli-cm-seed": "^1.0.
|
|
21
|
-
"@contentstack/cli-cm-bootstrap": "^1.0.
|
|
19
|
+
"@contentstack/cli-cm-import": "^0.1.1-beta.15",
|
|
20
|
+
"@contentstack/cli-cm-seed": "^1.0.10",
|
|
21
|
+
"@contentstack/cli-cm-bootstrap": "^1.0.5",
|
|
22
22
|
"@contentstack/cli-plugins-plugin": "0.1.0-beta",
|
|
23
23
|
"@contentstack/management": "^1.3.0",
|
|
24
24
|
"@oclif/command": "^1.6.1",
|
|
@@ -5,9 +5,13 @@ const chalk = require('chalk')
|
|
|
5
5
|
class RegionCommand extends Command {
|
|
6
6
|
async run() {
|
|
7
7
|
let currentRegion = this.region
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
if (currentRegion) {
|
|
9
|
+
cli.log(chalk.green(`Currently using ${currentRegion.name} region`))
|
|
10
|
+
cli.log(chalk.green(`CDA HOST: ${currentRegion.cda}`))
|
|
11
|
+
cli.log(chalk.green(`CMA HOST: ${currentRegion.cma}`))
|
|
12
|
+
} else {
|
|
13
|
+
cli.log(chalk.yellow("Please set a region using `csdx config:set:region <region>`"))
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
}
|
|
13
17
|
|
|
@@ -4,8 +4,13 @@ const {Command} = require('@contentstack/cli-command')
|
|
|
4
4
|
const command = new Command()
|
|
5
5
|
|
|
6
6
|
module.exports = async function (opts) {
|
|
7
|
-
if (opts.Command.id !== 'config:get:region') {
|
|
7
|
+
if (opts.Command.id !== 'config:get:region' && opts.Command.id !== 'config:set:region') {
|
|
8
8
|
const region = command.region
|
|
9
|
-
|
|
9
|
+
if (!region) {
|
|
10
|
+
cli.log(chalk.yellow("Please set a region using `csdx config:set:region <region>`"))
|
|
11
|
+
command.exit(2)
|
|
12
|
+
} else {
|
|
13
|
+
cli.log(chalk.grey(`Currently using ${region.name} region`))
|
|
14
|
+
}
|
|
10
15
|
}
|
|
11
16
|
}
|