@contentstack/cli-auth 1.8.0-beta.0 → 1.8.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
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
18
18
  $ csdx COMMAND
19
19
  running command...
20
20
  $ csdx (--version)
21
- @contentstack/cli-auth/1.8.0-beta.0 linux-x64 node-v22.22.0
21
+ @contentstack/cli-auth/1.8.0 linux-x64 node-v22.22.1
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -46,7 +46,10 @@ class LogoutCommand extends base_command_1.BaseCommand {
46
46
  }
47
47
  else {
48
48
  cli_utilities_1.log.debug('User not confirmed or not authenticated, skipping logout', Object.assign(Object.assign({}, this.contextDetails), { confirm, isAuthenticated: cli_utilities_1.authHandler.isAuthenticated() }));
49
- cli_utilities_1.log.success(cli_utilities_1.messageHandler.parse('CLI_AUTH_LOGOUT_ALREADY'), this.contextDetails);
49
+ const messageKey = confirm === false && cli_utilities_1.authHandler.isAuthenticated()
50
+ ? 'CLI_AUTH_LOGOUT_CANCELLED'
51
+ : 'CLI_AUTH_LOGOUT_ALREADY';
52
+ cli_utilities_1.log.success(cli_utilities_1.messageHandler.parse(messageKey), this.contextDetails);
50
53
  }
51
54
  }
52
55
  catch (error) {
@@ -24,7 +24,7 @@ class TokensAddCommand extends base_command_1.BaseCommand {
24
24
  skipAliasReplaceConfirmation }));
25
25
  if (!isDelivery && !isManagement && !Boolean(environment)) {
26
26
  cli_utilities_1.log.debug('No token type specified, requesting user input', this.contextDetails);
27
- let tokenType = await (0, interactive_1.askTokenType)();
27
+ const tokenType = await (0, interactive_1.askTokenType)();
28
28
  isDelivery = tokenType === 'delivery';
29
29
  isManagement = tokenType === 'management';
30
30
  cli_utilities_1.log.debug(`Token type selected: ${tokenType}`, this.contextDetails);
@@ -12,7 +12,7 @@ export interface InquirePayload {
12
12
  name: string;
13
13
  message: string;
14
14
  choices?: Array<any>;
15
- transformer?: Function;
15
+ transformer?: (value: any) => any;
16
16
  }
17
17
  export interface User {
18
18
  email: string;
@@ -18,6 +18,7 @@
18
18
  "CLI_AUTH_LOGOUT_DESCRIPTION": "User session logout",
19
19
  "CLI_AUTH_LOGOUT_FLAG_FORCE": "Force logging out for skipping the confirmation",
20
20
  "CLI_AUTH_LOGOUT_ALREADY": "You're already logged out",
21
+ "CLI_AUTH_LOGOUT_CANCELLED": "Log out cancelled",
21
22
  "CLI_AUTH_LOGOUT_NO_AUTHORIZATIONS": "No authorizations found",
22
23
  "CLI_AUTH_LOGOUT_NO_AUTHORIZATIONS_USER": "No authorizations found for current user",
23
24
  "CLI_AUTH_WHOAMI_LOGGED_IN_AS": "You are currently logged in with email:",
@@ -387,5 +387,5 @@
387
387
  ]
388
388
  }
389
389
  },
390
- "version": "1.8.0-beta.0"
390
+ "version": "1.8.0"
391
391
  }
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.8.0-beta.0",
4
+ "version": "1.8.0",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "scripts": {
@@ -11,23 +11,21 @@
11
11
  "postpack": "rm -f oclif.manifest.json",
12
12
  "prepack": "pnpm compile && oclif manifest && oclif readme",
13
13
  "version": "oclif readme && git add README.md",
14
- "test:report": "tsc -p test && nyc --reporter=lcov --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
15
- "pretest": "tsc -p test",
16
- "test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
17
- "posttest": "npm run lint",
18
- "lint": "eslint src/**/*.ts",
19
- "format": "eslint src/**/*.ts --fix",
20
- "test:integration": "mocha --forbid-only \"test/integration/*.test.ts\"",
21
- "test:unit": "mocha --forbid-only \"test/unit/**/*.test.ts\"",
22
- "test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
14
+ "test": "mocha \"test/unit/**/*.test.ts\"",
15
+ "lint": "eslint src/**/*.ts"
23
16
  },
24
17
  "dependencies": {
25
- "@contentstack/cli-command": "~1.8.0-beta.0",
26
- "@contentstack/cli-utilities": "~1.18.0-beta.0",
27
- "@oclif/core": "^4.3.0",
18
+ "@contentstack/cli-command": "~1.8.0",
19
+ "@contentstack/cli-utilities": "~1.18.0",
20
+ "@oclif/core": "^4.8.3",
28
21
  "@oclif/plugin-help": "^6.2.28",
29
22
  "otplib": "^12.0.1"
30
23
  },
24
+ "overrides": {
25
+ "@oclif/core": {
26
+ "picomatch": "^4.0.4"
27
+ }
28
+ },
31
29
  "devDependencies": {
32
30
  "@fancy-test/nock": "^0.1.1",
33
31
  "@oclif/plugin-help": "^6.2.28",