@contentstack/cli-config 1.0.3 → 1.1.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 CHANGED
@@ -15,8 +15,8 @@ The config namespace contains all the commands that you will need to configure t
15
15
  $ npm install -g @contentstack/cli-config
16
16
  $ csdx COMMAND
17
17
  running command...
18
- $ csdx (-v|--version|version)
19
- @contentstack/cli-config/1.0.3 linux-x64 node-v16.18.1
18
+ $ csdx (--version)
19
+ @contentstack/cli-config/1.1.0 linux-x64 node-v16.19.0
20
20
  $ csdx --help [COMMAND]
21
21
  USAGE
22
22
  $ csdx COMMAND
@@ -36,7 +36,10 @@ Get current region set for CLI
36
36
  USAGE
37
37
  $ csdx config:get:region
38
38
 
39
- EXAMPLE
39
+ DESCRIPTION
40
+ Get current region set for CLI
41
+
42
+ EXAMPLES
40
43
  $ csdx config:get:region
41
44
  ```
42
45
 
@@ -48,21 +51,25 @@ Set region for CLI
48
51
 
49
52
  ```
50
53
  USAGE
51
- $ csdx config:set:region [REGION]
52
-
53
- OPTIONS
54
- -d, --cda=cda Custom host to set for content delivery API, if this flag is added then cma and name flags are
55
- required
54
+ $ csdx config:set:region [REGION] [-d <value> -m <value> -n <value>]
56
55
 
57
- -m, --cma=cma Custom host to set for content management API, , if this flag is added then cda and name flags are
58
- required
56
+ FLAGS
57
+ -d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma and name flags are
58
+ required
59
+ -m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda and name flags are
60
+ required
61
+ -n, --name=<value> Name for the region, if this flag is added then cda and cma flags are required
59
62
 
60
- -n, --name=name Name for the region, if this flag is added then cda and cma flags are required
63
+ DESCRIPTION
64
+ Set region for CLI
61
65
 
62
66
  EXAMPLES
63
67
  $ csdx config:set:region
68
+
64
69
  $ csdx config:set:region NA
70
+
65
71
  $ csdx config:set:region NA
72
+
66
73
  $ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --name "India"
67
74
  ```
68
75
 
@@ -5,7 +5,7 @@ const cli_utilities_1 = require("@contentstack/cli-utilities");
5
5
  const utils_1 = require("../../../utils");
6
6
  class RegionSetCommand extends cli_command_1.Command {
7
7
  async run() {
8
- const { args, flags: regionSetFlags } = this.parse(RegionSetCommand);
8
+ const { args, flags: regionSetFlags } = await this.parse(RegionSetCommand);
9
9
  let cda = regionSetFlags.cda;
10
10
  let cma = regionSetFlags.cma;
11
11
  let name = regionSetFlags.name;
@@ -1 +1,74 @@
1
- {"version":"1.0.3","commands":{"config:get:region":{"id":"config:get:region","description":"Get current region set for CLI","pluginName":"@contentstack/cli-config","pluginType":"core","aliases":[],"examples":["$ csdx config:get:region"],"flags":{},"args":[]},"config:set:region":{"id":"config:set:region","description":"Set region for CLI","pluginName":"@contentstack/cli-config","pluginType":"core","aliases":[],"examples":["$ csdx config:set:region","$ csdx config:set:region NA","$ csdx config:set:region NA","$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --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"}]}}}
1
+ {
2
+ "version": "1.1.0",
3
+ "commands": {
4
+ "config:get:region": {
5
+ "id": "config:get:region",
6
+ "description": "Get current region set for CLI",
7
+ "strict": true,
8
+ "pluginName": "@contentstack/cli-config",
9
+ "pluginAlias": "@contentstack/cli-config",
10
+ "pluginType": "core",
11
+ "aliases": [],
12
+ "examples": [
13
+ "$ csdx config:get:region"
14
+ ],
15
+ "flags": {},
16
+ "args": {}
17
+ },
18
+ "config:set:region": {
19
+ "id": "config:set:region",
20
+ "description": "Set region for CLI",
21
+ "strict": true,
22
+ "pluginName": "@contentstack/cli-config",
23
+ "pluginAlias": "@contentstack/cli-config",
24
+ "pluginType": "core",
25
+ "aliases": [],
26
+ "examples": [
27
+ "$ csdx config:set:region",
28
+ "$ csdx config:set:region NA",
29
+ "$ csdx config:set:region NA",
30
+ "$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --name \"India\""
31
+ ],
32
+ "flags": {
33
+ "cda": {
34
+ "name": "cda",
35
+ "type": "option",
36
+ "char": "d",
37
+ "description": "Custom host to set for content delivery API, if this flag is added then cma and name flags are required",
38
+ "multiple": false,
39
+ "dependsOn": [
40
+ "cma",
41
+ "name"
42
+ ]
43
+ },
44
+ "cma": {
45
+ "name": "cma",
46
+ "type": "option",
47
+ "char": "m",
48
+ "description": "Custom host to set for content management API, , if this flag is added then cda and name flags are required",
49
+ "multiple": false,
50
+ "dependsOn": [
51
+ "cda",
52
+ "name"
53
+ ]
54
+ },
55
+ "name": {
56
+ "name": "name",
57
+ "type": "option",
58
+ "char": "n",
59
+ "description": "Name for the region, if this flag is added then cda and cma flags are required",
60
+ "multiple": false,
61
+ "dependsOn": [
62
+ "cda",
63
+ "cma"
64
+ ]
65
+ }
66
+ },
67
+ "args": {
68
+ "region": {
69
+ "name": "region"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@contentstack/cli-config",
3
3
  "description": "Contentstack CLI plugin for configuration",
4
- "version": "1.0.3",
4
+ "version": "1.1.0",
5
5
  "author": "Contentstack",
6
6
  "scripts": {
7
7
  "build": "npm run clean && npm run compile",
8
8
  "clean": "rm -rf ./lib && rm -rf tsconfig.build.tsbuildinfo",
9
9
  "compile": "tsc -b tsconfig.json",
10
10
  "postpack": "rm -f oclif.manifest.json",
11
- "prepack": "npm run build && oclif-dev manifest && oclif-dev readme",
12
- "version": "oclif-dev readme && git add README.md",
11
+ "prepack": "npm run build && oclif manifest && oclif readme",
12
+ "version": "oclif readme && git add README.md",
13
13
  "test:report": "tsc -p test && nyc --reporter=lcov --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
14
14
  "pretest": "tsc -p test",
15
15
  "test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
@@ -20,19 +20,16 @@
20
20
  "test:unit": "mocha --forbid-only \"test/unit/*.test.ts\" --unit-test"
21
21
  },
22
22
  "dependencies": {
23
- "@contentstack/cli-command": "^1.0.3",
24
- "@contentstack/cli-utilities": "^1.0.4",
25
- "@oclif/command": "^1.8.16",
26
- "@oclif/config": "^1.18.3",
23
+ "@contentstack/cli-command": "^1.1.0",
24
+ "@contentstack/cli-utilities": "^1.1.0",
27
25
  "chalk": "^4.0.0",
28
26
  "debug": "^4.1.1",
29
27
  "inquirer": "8.2.4",
30
28
  "winston": "^3.7.2"
31
29
  },
32
30
  "devDependencies": {
33
- "@oclif/dev-cli": "^1.22.2",
34
- "@oclif/plugin-help": "^5.1.12",
35
- "@oclif/test": "^1.2.8",
31
+ "oclif": "^3.1.2",
32
+ "@oclif/test": "^2.2.10",
36
33
  "@types/chai": "^4.2.18",
37
34
  "@types/inquirer": "^9.0.3",
38
35
  "@types/mkdirp": "^1.0.1",
@@ -48,7 +45,7 @@
48
45
  "mocha": "10.1.0",
49
46
  "nyc": "^15.1.0",
50
47
  "rimraf": "^2.7.1",
51
- "sinon": "^11.1.1",
48
+ "sinon": "^15.0.1",
52
49
  "tmp": "^0.2.1",
53
50
  "ts-node": "^10.9.1",
54
51
  "typescript": "^4.9.3"
@@ -71,9 +68,6 @@
71
68
  "oclif": {
72
69
  "commands": "./lib/commands",
73
70
  "bin": "csdx",
74
- "devPlugins": [
75
- "@oclif/plugin-help"
76
- ],
77
71
  "protected": [
78
72
  "config:get:region"
79
73
  ],