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

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.25 linux-x64 node-v12.22.7
21
+ @contentstack/cli/0.1.1-beta.28 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.5/src/commands/cm/bootstrap.ts)_
230
+ _See code: [@contentstack/cli-cm-bootstrap](https://github.com/contentstack/cli/blob/v1.0.6/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.10/packages/contentstack-export/src/commands/cm/export.js)_
932
+ _See code: [@contentstack/cli-cm-export](https://github.com/contentstack/cli/blob/v0.1.1-beta.13/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.13/packages/contentstack-import/src/commands/cm/import.js)_
988
+ _See code: [@contentstack/cli-cm-import](https://github.com/contentstack/cli/blob/v0.1.1-beta.16/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.9/src/commands/cm/seed.ts)_
1089
+ _See code: [@contentstack/cli-cm-seed](https://github.com/contentstack/cli/blob/v1.0.11/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.3/src/commands/cm/stack-clone.js)_
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.25/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.28/src/commands/config/get/region.js)_
1125
1125
 
1126
1126
  ## `csdx config:set:region [REGION]`
1127
1127
 
@@ -1135,7 +1135,7 @@ USAGE
1135
1135
  $ csdx config:set:region [REGION]
1136
1136
 
1137
1137
  ARGUMENTS
1138
- REGION (EU|NA) North America(NA), Europe (EU)
1138
+ REGION (EU|NA|AZURE-NA) North America(NA), Europe (EU), AZURE-NA
1139
1139
 
1140
1140
  OPTIONS
1141
1141
  -d, --cda=cda Custom host to set for content delivery API, if this flag is added then cma and name flags are
@@ -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.25/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.28/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/v2.2.3/src/commands/help.ts)_
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
 
@@ -1 +1 @@
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"]}]}}}
1
+ {"version":"0.1.1-beta.28","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), AZURE-NA","options":["EU","NA","AZURE-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.25",
4
+ "version": "0.1.1-beta.28",
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.4",
15
- "@contentstack/cli-cm-export": "^0.1.1-beta.10",
14
+ "@contentstack/cli-cm-clone": "0.1.0-beta.5",
15
+ "@contentstack/cli-cm-export": "^0.1.1-beta.13",
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.14",
20
- "@contentstack/cli-cm-seed": "^1.0.10",
21
- "@contentstack/cli-cm-bootstrap": "^1.0.5",
19
+ "@contentstack/cli-cm-import": "^0.1.1-beta.16",
20
+ "@contentstack/cli-cm-seed": "^1.0.11",
21
+ "@contentstack/cli-cm-bootstrap": "^1.0.6",
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
- cli.log(chalk.green(`Currently using ${currentRegion.name} region`))
9
- cli.log(chalk.green(`CDA HOST: ${currentRegion.cda}`))
10
- cli.log(chalk.green(`CMA HOST: ${currentRegion.cma}`))
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
 
@@ -39,8 +39,8 @@ RegionCommand.description = `Set region for CLI
39
39
 
40
40
  RegionCommand.args = [{
41
41
  name: 'region',
42
- description: 'North America(NA), Europe (EU)',
43
- options: ['EU', 'NA'],
42
+ description: 'North America(NA), Europe (EU), AZURE-NA',
43
+ options: ['EU', 'NA', 'AZURE-NA'],
44
44
  }]
45
45
 
46
46
  RegionCommand.examples = [
@@ -4,12 +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
- console.log(chalk.yellow("Please set a region using `csdx config:set:region <region>`"))
10
+ cli.log(chalk.yellow("Please set a region using `csdx config:set:region <region>`"))
11
11
  command.exit(2)
12
+ } else {
13
+ cli.log(chalk.grey(`Currently using ${region.name} region`))
12
14
  }
13
- cli.log(chalk.grey(`Currently using ${region.name} region`))
14
15
  }
15
16
  }
@@ -39,6 +39,7 @@ function validURL(str) {
39
39
  const regions = {
40
40
  NA: {cma: 'https://api.contentstack.io', cda: 'https://cdn.contentstack.io', name: 'NA'},
41
41
  EU: {cma: 'https://eu-api.contentstack.com', cda: 'https://eu-cdn.contentstack.com', name: 'EU'},
42
+ 'AZURE-NA': {cma: 'https://azure-na-api.contentstack.com', cda: 'https://azure-na-cdn.contentstack.com', name: 'AZURE-NA'},
42
43
  }
43
44
 
44
45
  class UserConfig {