@contentstack/cli 0.1.1-beta.24 → 0.1.1-beta.25

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.24 linux-x64 node-v12.22.7
21
+ @contentstack/cli/0.1.1-beta.25 linux-x64 node-v12.22.7
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.4/src/commands/cm/bootstrap.ts)_
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
 
@@ -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.24/src/commands/config/get/region.js)_
1124
+ _See code: [src/commands/config/get/region.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.25/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.24/src/commands/config/set/region.js)_
1156
+ _See code: [src/commands/config/set/region.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.25/src/commands/config/set/region.js)_
1157
1157
 
1158
1158
  ## `csdx help [COMMAND]`
1159
1159
 
@@ -1 +1 @@
1
- {"version":"0.1.1-beta.24","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"]}]}}}
1
+ {"version":"0.1.1-beta.25","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.24",
4
+ "version": "0.1.1-beta.25",
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.3",
14
+ "@contentstack/cli-cm-clone": "0.1.0-beta.4",
15
15
  "@contentstack/cli-cm-export": "^0.1.1-beta.10",
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.13",
20
- "@contentstack/cli-cm-seed": "^1.0.9",
21
- "@contentstack/cli-cm-bootstrap": "^1.0.4",
19
+ "@contentstack/cli-cm-import": "^0.1.1-beta.14",
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",
@@ -6,6 +6,10 @@ const command = new Command()
6
6
  module.exports = async function (opts) {
7
7
  if (opts.Command.id !== 'config:get:region') {
8
8
  const region = command.region
9
+ if (!region) {
10
+ console.log(chalk.yellow("Please set a region using `csdx config:set:region <region>`"))
11
+ command.exit(2)
12
+ }
9
13
  cli.log(chalk.grey(`Currently using ${region.name} region`))
10
14
  }
11
15
  }