@contentstack/cli-auth 1.0.3 → 1.0.6

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-auth
18
18
  $ csdx COMMAND
19
19
  running command...
20
20
  $ csdx (-v|--version|version)
21
- @contentstack/cli-auth/1.0.3 darwin-arm64 node-v18.11.0
21
+ @contentstack/cli-auth/1.0.6 linux-x64 node-v16.18.1
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -8,8 +8,8 @@ class LoginCommand extends cli_command_1.Command {
8
8
  const { flags: loginFlags } = this.parse(LoginCommand);
9
9
  utils_1.authHandler.client = this.managementAPIClient;
10
10
  try {
11
- const username = (loginFlags === null || loginFlags === void 0 ? void 0 : loginFlags.username) || await utils_1.interactive.askUsername();
12
- const password = (loginFlags === null || loginFlags === void 0 ? void 0 : loginFlags.password) || await utils_1.interactive.askPassword();
11
+ const username = (loginFlags === null || loginFlags === void 0 ? void 0 : loginFlags.username) || (await utils_1.interactive.askUsername());
12
+ const password = (loginFlags === null || loginFlags === void 0 ? void 0 : loginFlags.password) || (await utils_1.interactive.askPassword());
13
13
  cli_utilities_1.logger.debug('username', username);
14
14
  await this.login(username, password);
15
15
  }
@@ -1 +1 @@
1
- {"version":"1.0.3","commands":{"auth:login":{"id":"auth:login","description":"User sessions login","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["login"],"examples":["$ csdx auth:login","$ csdx auth:login -u <username>","$ csdx auth:login -u <username> -p <password>","$ csdx auth:login --username <username>","$ csdx auth:login --username <username> --password <password>"],"flags":{"username":{"name":"username","type":"option","char":"u","description":"User name","required":false},"password":{"name":"password","type":"option","char":"p","description":"Password","required":false}},"args":[]},"auth:logout":{"id":"auth:logout","description":"User session logout","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["logout"],"examples":["$ csdx auth:logout","$ csdx auth:logout -y","$ csdx auth:logout --yes"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Force log out by skipping the confirmation","required":false,"allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Force log out by skipping the confirmation","hidden":true,"required":false,"allowNo":false}},"args":[]},"auth:whoami":{"id":"auth:whoami","description":"Display current users email address","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["whoami"],"examples":["$ csdx auth:whoami"],"flags":{},"args":[]},"auth:tokens:add":{"id":"auth:tokens:add","description":"Adds management/delivery tokens to your session to use it with other CLI commands","usage":"auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":[],"examples":["$ csdx auth:tokens:add","$ csdx auth:tokens:add -a <alias>","$ csdx auth:tokens:add -k <stack api key>","$ csdx auth:tokens:add --delivery","$ csdx auth:tokens:add --management","$ csdx auth:tokens:add -e <environment>","$ csdx auth:tokens:add --token <token>","$ csdx auth:tokens:add -a <alias> -k <stack api key> --management --token <management token>","$ csdx auth:tokens:add -a <alias> -k <stack api key> --delivery -e <environment> --token <delivery token>","$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --management --token <management token>","$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --delivery -e <environment> --token <delivery token>"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Name of the token alias"},"delivery":{"name":"delivery","type":"boolean","char":"d","description":"Set this flag to save delivery token","allowNo":false},"management":{"name":"management","type":"boolean","char":"m","description":"Set this flag to save management token","allowNo":false},"environment":{"name":"environment","type":"option","char":"e","description":"Environment name for delivery token"},"stack-api-key":{"name":"stack-api-key","type":"option","char":"k","description":"Stack API Key"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Use this flag to skip confirmation","allowNo":false},"token":{"name":"token","type":"option","char":"t","description":"Add the token name"},"api-key":{"name":"api-key","type":"option","description":"API Key","hidden":true},"force":{"name":"force","type":"boolean","char":"f","description":"Force adding","hidden":true,"allowNo":false}},"args":[]},"auth:tokens":{"id":"auth:tokens","description":"Lists all existing tokens added to the session","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["tokens"],"examples":["$ csdx auth:tokens"],"flags":{"columns":{"name":"columns","type":"option","description":"only show provided columns (comma-separated)"},"sort":{"name":"sort","type":"option","description":"property to sort by (prepend '-' for descending)"},"filter":{"name":"filter","type":"option","description":"filter property by partial string matching, ex: name=foo"},"csv":{"name":"csv","type":"boolean","description":"output is csv format [alias: --output=csv]","allowNo":false},"output":{"name":"output","type":"option","description":"output in a more machine friendly format","options":["csv","json","yaml"]},"extended":{"name":"extended","type":"boolean","char":"x","description":"show extra columns","allowNo":false},"no-truncate":{"name":"no-truncate","type":"boolean","description":"do not truncate output to fit screen","allowNo":false},"no-header":{"name":"no-header","type":"boolean","description":"hide table header from output","allowNo":false}},"args":[]},"auth:tokens:remove":{"id":"auth:tokens:remove","description":"Removes selected tokens","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":[],"examples":["$ csdx auth:tokens:remove","$ csdx auth:tokens:remove -a <alias>"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Token alias"},"ignore":{"name":"ignore","type":"boolean","char":"i","description":"Ignore","allowNo":false}},"args":[]}}}
1
+ {"version":"1.0.6","commands":{"auth:login":{"id":"auth:login","description":"User sessions login","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["login"],"examples":["$ csdx auth:login","$ csdx auth:login -u <username>","$ csdx auth:login -u <username> -p <password>","$ csdx auth:login --username <username>","$ csdx auth:login --username <username> --password <password>"],"flags":{"username":{"name":"username","type":"option","char":"u","description":"User name","required":false},"password":{"name":"password","type":"option","char":"p","description":"Password","required":false}},"args":[]},"auth:logout":{"id":"auth:logout","description":"User session logout","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["logout"],"examples":["$ csdx auth:logout","$ csdx auth:logout -y","$ csdx auth:logout --yes"],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Force log out by skipping the confirmation","required":false,"allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Force log out by skipping the confirmation","hidden":true,"required":false,"allowNo":false}},"args":[]},"auth:whoami":{"id":"auth:whoami","description":"Display current users email address","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["whoami"],"examples":["$ csdx auth:whoami"],"flags":{},"args":[]},"auth:tokens:add":{"id":"auth:tokens:add","description":"Adds management/delivery tokens to your session to use it with other CLI commands","usage":"auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":[],"examples":["$ csdx auth:tokens:add","$ csdx auth:tokens:add -a <alias>","$ csdx auth:tokens:add -k <stack api key>","$ csdx auth:tokens:add --delivery","$ csdx auth:tokens:add --management","$ csdx auth:tokens:add -e <environment>","$ csdx auth:tokens:add --token <token>","$ csdx auth:tokens:add -a <alias> -k <stack api key> --management --token <management token>","$ csdx auth:tokens:add -a <alias> -k <stack api key> --delivery -e <environment> --token <delivery token>","$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --management --token <management token>","$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --delivery -e <environment> --token <delivery token>"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Name of the token alias"},"delivery":{"name":"delivery","type":"boolean","char":"d","description":"Set this flag to save delivery token","allowNo":false},"management":{"name":"management","type":"boolean","char":"m","description":"Set this flag to save management token","allowNo":false},"environment":{"name":"environment","type":"option","char":"e","description":"Environment name for delivery token"},"stack-api-key":{"name":"stack-api-key","type":"option","char":"k","description":"Stack API Key"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Use this flag to skip confirmation","allowNo":false},"token":{"name":"token","type":"option","char":"t","description":"Add the token name"},"api-key":{"name":"api-key","type":"option","description":"API Key","hidden":true},"force":{"name":"force","type":"boolean","char":"f","description":"Force adding","hidden":true,"allowNo":false}},"args":[]},"auth:tokens":{"id":"auth:tokens","description":"Lists all existing tokens added to the session","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":["tokens"],"examples":["$ csdx auth:tokens"],"flags":{"columns":{"name":"columns","type":"option","description":"only show provided columns (comma-separated)"},"sort":{"name":"sort","type":"option","description":"property to sort by (prepend '-' for descending)"},"filter":{"name":"filter","type":"option","description":"filter property by partial string matching, ex: name=foo"},"csv":{"name":"csv","type":"boolean","description":"output is csv format [alias: --output=csv]","allowNo":false},"output":{"name":"output","type":"option","description":"output in a more machine friendly format","options":["csv","json","yaml"]},"extended":{"name":"extended","type":"boolean","char":"x","description":"show extra columns","allowNo":false},"no-truncate":{"name":"no-truncate","type":"boolean","description":"do not truncate output to fit screen","allowNo":false},"no-header":{"name":"no-header","type":"boolean","description":"hide table header from output","allowNo":false}},"args":[]},"auth:tokens:remove":{"id":"auth:tokens:remove","description":"Removes selected tokens","pluginName":"@contentstack/cli-auth","pluginType":"core","aliases":[],"examples":["$ csdx auth:tokens:remove","$ csdx auth:tokens:remove -a <alias>"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Token alias"},"ignore":{"name":"ignore","type":"boolean","char":"i","description":"Ignore","allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentstack/cli-auth",
3
3
  "description": "Contentstack CLI plugin for authentication activities",
4
- "version": "1.0.3",
4
+ "version": "1.0.6",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "scripts": {
@@ -21,22 +21,21 @@
21
21
  "test:unit": "mocha --forbid-only \"test/unit/*.test.ts\""
22
22
  },
23
23
  "dependencies": {
24
- "@contentstack/cli-command": "^1.0.2",
25
- "@contentstack/cli-utilities": "^1.0.3",
24
+ "@contentstack/cli-command": "^1.0.4",
25
+ "@contentstack/cli-utilities": "^1.0.5",
26
26
  "@oclif/command": "^1.8.16",
27
27
  "@oclif/config": "^1.18.3",
28
28
  "chalk": "^4.0.0",
29
29
  "debug": "^4.1.1",
30
- "inquirer": "^8.2.4",
30
+ "inquirer": "8.2.4",
31
31
  "winston": "^3.7.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@fancy-test/nock": "^0.1.1",
35
35
  "@oclif/dev-cli": "^1.22.2",
36
- "@oclif/plugin-help": "^5.1.12",
37
36
  "@oclif/test": "^1.2.8",
38
37
  "@types/chai": "^4.2.18",
39
- "@types/inquirer": "^7.3.1",
38
+ "@types/inquirer": "^9.0.3",
40
39
  "@types/mkdirp": "^1.0.1",
41
40
  "@types/mocha": "^8.2.2",
42
41
  "@types/node": "^14.14.32",
@@ -48,13 +47,13 @@
48
47
  "eslint-config-oclif": "^3.1.0",
49
48
  "eslint-config-oclif-typescript": "^0.1.0",
50
49
  "globby": "^10.0.2",
51
- "mocha": "^9.2.2",
50
+ "mocha": "10.1.0",
52
51
  "nyc": "^15.1.0",
53
52
  "rimraf": "^2.7.1",
54
53
  "sinon": "^11.1.1",
55
54
  "tmp": "^0.2.1",
56
55
  "ts-node": "^10.9.1",
57
- "typescript": "^4.7.4"
56
+ "typescript": "^4.9.3"
58
57
  },
59
58
  "engines": {
60
59
  "node": ">=8.0.0"
@@ -75,9 +74,6 @@
75
74
  "oclif": {
76
75
  "commands": "./lib/commands",
77
76
  "bin": "csdx",
78
- "devPlugins": [
79
- "@oclif/plugin-help"
80
- ],
81
77
  "repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-auth/<%- commandPath %>"
82
78
  },
83
79
  "husky": {