@contentstack/cli-command 1.0.0 → 1.0.2
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/lib/index.js +1 -1
- package/package.json +11 -3
- package/README.md +0 -70
package/lib/index.js
CHANGED
|
@@ -81,7 +81,7 @@ class ContentstackCommand extends command_1.Command {
|
|
|
81
81
|
this._authToken = cli_utilities_1.configHandler.get('authtoken');
|
|
82
82
|
if (this._authToken)
|
|
83
83
|
return this._authToken;
|
|
84
|
-
throw new
|
|
84
|
+
// throw new CLIError('You are not logged in. Please login with command $ csdx auth:login');
|
|
85
85
|
}
|
|
86
86
|
getToken(alias) {
|
|
87
87
|
if (alias) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-command",
|
|
3
3
|
"description": "Contentstack CLI plugin for configuration",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"format": "eslint src/**/*.ts --fix"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@contentstack/cli-utilities": "^1.0.
|
|
20
|
+
"@contentstack/cli-utilities": "^1.0.3",
|
|
21
21
|
"@contentstack/management": "^1.3.0",
|
|
22
22
|
"@oclif/command": "^1.8.16",
|
|
23
23
|
"contentstack": "^3.10.1"
|
|
@@ -62,5 +62,13 @@
|
|
|
62
62
|
"pre-commit": "npm run lint"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
+
"oclif": {
|
|
66
|
+
"commands": "./src/commands",
|
|
67
|
+
"bin": "csdx",
|
|
68
|
+
"devPlugins": [
|
|
69
|
+
"@oclif/plugin-help"
|
|
70
|
+
],
|
|
71
|
+
"repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-command/<%- commandPath %>"
|
|
72
|
+
},
|
|
65
73
|
"repository": "contentstack/cli"
|
|
66
|
-
}
|
|
74
|
+
}
|
package/README.md
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
@contentstack/cli-auth
|
|
2
|
-
===
|
|
3
|
-
|
|
4
|
-
It is Contentstack’s CLI plugin to perform authentication-related activities. To get started with authenticating yourself with the CLI, refer to the [CLI’s Authentication documentation](https://www.contentstack.com/docs/developers/cli/authentication)
|
|
5
|
-
|
|
6
|
-
[](https://github.com/contentstack/cli/blob/main/LICENSE)
|
|
7
|
-
|
|
8
|
-
<!-- toc -->
|
|
9
|
-
* [Usage](#usage)
|
|
10
|
-
* [Commands](#commands)
|
|
11
|
-
<!-- tocstop -->
|
|
12
|
-
# Usage
|
|
13
|
-
<!-- usage -->
|
|
14
|
-
```sh-session
|
|
15
|
-
$ npm install -g @contentstack/cli-command-test
|
|
16
|
-
$ csdx COMMAND
|
|
17
|
-
running command...
|
|
18
|
-
$ csdx (-v|--version|version)
|
|
19
|
-
@contentstack/cli-command-test/0.1.1-beta.1 linux-x64 node-v12.22.1
|
|
20
|
-
$ csdx --help [COMMAND]
|
|
21
|
-
USAGE
|
|
22
|
-
$ csdx COMMAND
|
|
23
|
-
...
|
|
24
|
-
```
|
|
25
|
-
<!-- usagestop -->
|
|
26
|
-
# Commands
|
|
27
|
-
<!-- commands -->
|
|
28
|
-
* [`csdx config:get:region`](#csdx-configgetregion)
|
|
29
|
-
* [`csdx config:set:region`](#csdx-configsetregion)
|
|
30
|
-
|
|
31
|
-
## `csdx config:get:region`
|
|
32
|
-
|
|
33
|
-
Set region for CLI
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
USAGE
|
|
37
|
-
$ csdx config:get:region
|
|
38
|
-
|
|
39
|
-
EXAMPLE
|
|
40
|
-
$ csdx config:get:region
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
_See code: [src/commands/config/get/region.ts](https://github.com/contentstack/cli/blob/v0.1.1-beta.1/src/commands/config/get/region.ts)_
|
|
44
|
-
|
|
45
|
-
## `csdx config:set:region`
|
|
46
|
-
|
|
47
|
-
Set region for CLI
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
USAGE
|
|
51
|
-
$ csdx config:set: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
|
|
56
|
-
|
|
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
|
|
59
|
-
|
|
60
|
-
-n, --name=name Name for the region, if this flag is added then cda and cma flags are required
|
|
61
|
-
|
|
62
|
-
EXAMPLES
|
|
63
|
-
$ csdx config:set:region EU
|
|
64
|
-
$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --name "India"
|
|
65
|
-
$ csdx config:set:region --cma="https://in-api.contentstack.com" --cda="https://in-cda.contentstack.com"
|
|
66
|
-
--name="India"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
_See code: [src/commands/config/set/region.ts](https://github.com/contentstack/cli/blob/v0.1.1-beta.1/src/commands/config/set/region.ts)_
|
|
70
|
-
<!-- commandsstop -->
|