@salesforce/b2c-cli 0.8.0 → 0.10.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.
Files changed (138) hide show
  1. package/dist/commands/auth/client/index.d.ts +32 -0
  2. package/dist/commands/auth/client/index.js +181 -0
  3. package/dist/commands/auth/client/index.js.map +1 -0
  4. package/dist/commands/auth/client/renew.d.ts +20 -0
  5. package/dist/commands/auth/client/renew.js +88 -0
  6. package/dist/commands/auth/client/renew.js.map +1 -0
  7. package/dist/commands/auth/client/token.d.ts +24 -0
  8. package/dist/commands/auth/client/token.js +66 -0
  9. package/dist/commands/auth/client/token.js.map +1 -0
  10. package/dist/commands/auth/login.d.ts +20 -0
  11. package/dist/commands/auth/login.js +83 -0
  12. package/dist/commands/auth/login.js.map +1 -0
  13. package/dist/commands/auth/logout.d.ts +12 -0
  14. package/dist/commands/auth/logout.js +23 -0
  15. package/dist/commands/auth/logout.js.map +1 -0
  16. package/dist/commands/cip/describe.d.ts +3 -3
  17. package/dist/commands/cip/query.d.ts +3 -3
  18. package/dist/commands/cip/report/customer-registration-trends.d.ts +3 -3
  19. package/dist/commands/cip/report/ocapi-requests.d.ts +3 -3
  20. package/dist/commands/cip/report/payment-method-performance.d.ts +3 -3
  21. package/dist/commands/cip/report/product-co-purchase-analysis.d.ts +3 -3
  22. package/dist/commands/cip/report/promotion-discount-analysis.d.ts +3 -3
  23. package/dist/commands/cip/report/sales-analytics.d.ts +3 -3
  24. package/dist/commands/cip/report/sales-summary.d.ts +3 -3
  25. package/dist/commands/cip/report/search-query-performance.d.ts +3 -3
  26. package/dist/commands/cip/report/top-referrers.d.ts +3 -3
  27. package/dist/commands/cip/report/top-selling-products.d.ts +3 -3
  28. package/dist/commands/cip/tables.d.ts +3 -3
  29. package/dist/commands/code/activate.d.ts +4 -3
  30. package/dist/commands/code/activate.js +1 -0
  31. package/dist/commands/code/activate.js.map +1 -1
  32. package/dist/commands/code/delete.d.ts +4 -3
  33. package/dist/commands/code/delete.js +1 -0
  34. package/dist/commands/code/delete.js.map +1 -1
  35. package/dist/commands/code/deploy.d.ts +4 -3
  36. package/dist/commands/code/deploy.js +1 -0
  37. package/dist/commands/code/deploy.js.map +1 -1
  38. package/dist/commands/code/list.d.ts +1 -0
  39. package/dist/commands/code/list.js +1 -0
  40. package/dist/commands/code/list.js.map +1 -1
  41. package/dist/commands/code/watch.d.ts +3 -3
  42. package/dist/commands/content/export.d.ts +3 -3
  43. package/dist/commands/content/list.d.ts +3 -3
  44. package/dist/commands/content/validate.d.ts +39 -0
  45. package/dist/commands/content/validate.js +110 -0
  46. package/dist/commands/content/validate.js.map +1 -0
  47. package/dist/commands/docs/download.d.ts +3 -3
  48. package/dist/commands/docs/schema.d.ts +7 -1
  49. package/dist/commands/docs/schema.js +15 -2
  50. package/dist/commands/docs/schema.js.map +1 -1
  51. package/dist/commands/ecdn/cache/purge.d.ts +3 -3
  52. package/dist/commands/ecdn/certificates/add.d.ts +3 -3
  53. package/dist/commands/ecdn/certificates/delete.d.ts +3 -3
  54. package/dist/commands/ecdn/certificates/list.d.ts +3 -3
  55. package/dist/commands/ecdn/certificates/update.d.ts +3 -3
  56. package/dist/commands/ecdn/certificates/validate.d.ts +3 -3
  57. package/dist/commands/ecdn/cipher-suites/get.d.ts +3 -3
  58. package/dist/commands/ecdn/cipher-suites/update.d.ts +3 -3
  59. package/dist/commands/ecdn/logpush/jobs/create.d.ts +3 -3
  60. package/dist/commands/ecdn/logpush/jobs/delete.d.ts +3 -3
  61. package/dist/commands/ecdn/logpush/jobs/get.d.ts +3 -3
  62. package/dist/commands/ecdn/logpush/jobs/list.d.ts +3 -3
  63. package/dist/commands/ecdn/logpush/jobs/update.d.ts +3 -3
  64. package/dist/commands/ecdn/logpush/ownership.d.ts +3 -3
  65. package/dist/commands/ecdn/mrt-rules/create.d.ts +3 -3
  66. package/dist/commands/ecdn/mrt-rules/delete.d.ts +3 -3
  67. package/dist/commands/ecdn/mrt-rules/get.d.ts +3 -3
  68. package/dist/commands/ecdn/mrt-rules/rules/delete.d.ts +3 -3
  69. package/dist/commands/ecdn/mrt-rules/rules/update.d.ts +3 -3
  70. package/dist/commands/ecdn/mrt-rules/update.d.ts +3 -3
  71. package/dist/commands/ecdn/mtls/create.d.ts +3 -3
  72. package/dist/commands/ecdn/mtls/delete.d.ts +3 -3
  73. package/dist/commands/ecdn/mtls/get.d.ts +3 -3
  74. package/dist/commands/ecdn/mtls/list.d.ts +3 -3
  75. package/dist/commands/ecdn/origin-headers/delete.d.ts +3 -3
  76. package/dist/commands/ecdn/origin-headers/get.d.ts +3 -3
  77. package/dist/commands/ecdn/origin-headers/set.d.ts +3 -3
  78. package/dist/commands/ecdn/page-shield/notifications/create.d.ts +3 -3
  79. package/dist/commands/ecdn/page-shield/notifications/delete.d.ts +3 -3
  80. package/dist/commands/ecdn/page-shield/notifications/list.d.ts +3 -3
  81. package/dist/commands/ecdn/page-shield/policies/create.d.ts +3 -3
  82. package/dist/commands/ecdn/page-shield/policies/delete.d.ts +3 -3
  83. package/dist/commands/ecdn/page-shield/policies/get.d.ts +3 -3
  84. package/dist/commands/ecdn/page-shield/policies/list.d.ts +3 -3
  85. package/dist/commands/ecdn/page-shield/policies/update.d.ts +3 -3
  86. package/dist/commands/ecdn/page-shield/scripts/get.d.ts +3 -3
  87. package/dist/commands/ecdn/page-shield/scripts/list.d.ts +3 -3
  88. package/dist/commands/ecdn/security/get.d.ts +3 -3
  89. package/dist/commands/ecdn/security/update.d.ts +3 -3
  90. package/dist/commands/ecdn/speed/get.d.ts +3 -3
  91. package/dist/commands/ecdn/speed/update.d.ts +3 -3
  92. package/dist/commands/ecdn/waf/groups/list.d.ts +3 -3
  93. package/dist/commands/ecdn/waf/groups/update.d.ts +3 -3
  94. package/dist/commands/ecdn/waf/managed-rules/list.d.ts +3 -3
  95. package/dist/commands/ecdn/waf/managed-rules/update.d.ts +3 -3
  96. package/dist/commands/ecdn/waf/migrate.d.ts +3 -3
  97. package/dist/commands/ecdn/waf/owasp/get.d.ts +3 -3
  98. package/dist/commands/ecdn/waf/owasp/update.d.ts +3 -3
  99. package/dist/commands/ecdn/waf/rules/get.d.ts +3 -3
  100. package/dist/commands/ecdn/waf/rules/list.d.ts +3 -3
  101. package/dist/commands/ecdn/waf/rules/update.d.ts +3 -3
  102. package/dist/commands/ecdn/waf/rulesets/list.d.ts +3 -3
  103. package/dist/commands/ecdn/waf/rulesets/update.d.ts +3 -3
  104. package/dist/commands/ecdn/zones/create.d.ts +3 -3
  105. package/dist/commands/ecdn/zones/list.d.ts +3 -3
  106. package/dist/commands/job/export.d.ts +3 -3
  107. package/dist/commands/job/import.d.ts +3 -3
  108. package/dist/commands/job/log.d.ts +3 -3
  109. package/dist/commands/job/run.d.ts +4 -3
  110. package/dist/commands/job/run.js +1 -0
  111. package/dist/commands/job/run.js.map +1 -1
  112. package/dist/commands/job/search.d.ts +3 -3
  113. package/dist/commands/job/wait.d.ts +3 -3
  114. package/dist/commands/logs/get.d.ts +3 -3
  115. package/dist/commands/logs/list.d.ts +3 -3
  116. package/dist/commands/logs/tail.d.ts +3 -3
  117. package/dist/commands/scapi/custom/status.d.ts +3 -3
  118. package/dist/commands/scapi/schemas/get.d.ts +3 -3
  119. package/dist/commands/scapi/schemas/list.d.ts +3 -3
  120. package/dist/commands/slas/client/create.d.ts +3 -3
  121. package/dist/commands/slas/client/delete.d.ts +3 -3
  122. package/dist/commands/slas/client/get.d.ts +3 -3
  123. package/dist/commands/slas/client/list.d.ts +3 -3
  124. package/dist/commands/slas/client/update.d.ts +3 -3
  125. package/dist/commands/slas/token.d.ts +3 -3
  126. package/dist/commands/webdav/get.d.ts +3 -3
  127. package/dist/commands/webdav/rm.d.ts +3 -3
  128. package/dist/i18n/locales/de.d.ts +26 -0
  129. package/dist/i18n/locales/de.js +24 -0
  130. package/dist/i18n/locales/de.js.map +1 -1
  131. package/dist/i18n/locales/en.d.ts +26 -0
  132. package/dist/i18n/locales/en.js +26 -0
  133. package/dist/i18n/locales/en.js.map +1 -1
  134. package/dist/i18n/locales/index.d.ts +52 -0
  135. package/dist/utils/cip/command.d.ts +3 -3
  136. package/dist/utils/ecdn/zone-command.d.ts +3 -3
  137. package/oclif.manifest.json +2051 -1046
  138. package/package.json +4 -4
@@ -0,0 +1,32 @@
1
+ import { BaseCommand } from '@salesforce/b2c-tooling-sdk/cli';
2
+ /**
3
+ * Authenticate an API client (client_credentials or password grant) and persist the session.
4
+ * Mirrors sfcc-ci `client:auth` command behavior. Uses the same stateful store so tokens
5
+ * are shared with sfcc-ci, b2c auth:login, and subsequent CLI commands.
6
+ *
7
+ * Grant type is auto-detected based on credentials provided:
8
+ * - client_credentials: when only --client-id + --client-secret are given
9
+ * - password: when --user + --user-password are also provided
10
+ *
11
+ * Use --renew to enable automatic token renewal for later use with `auth client renew`.
12
+ */
13
+ export default class AuthClient extends BaseCommand<typeof AuthClient> {
14
+ static hiddenAliases: string[];
15
+ static description: string;
16
+ static examples: string[];
17
+ static flags: {
18
+ 'client-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
19
+ 'client-secret': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
20
+ 'account-manager-host': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
21
+ 'auth-scope': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ renew: import("@oclif/core/interfaces").BooleanFlag<boolean>;
23
+ 'grant-type': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
+ user: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ 'user-password': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ };
27
+ protected loadConfiguration(): Promise<import("@salesforce/b2c-tooling-sdk").ResolvedB2CConfig>;
28
+ run(): Promise<void>;
29
+ private extractUser;
30
+ private parseErrorMessage;
31
+ private resolveGrantType;
32
+ }
@@ -0,0 +1,181 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import { Flags } from '@oclif/core';
7
+ import { BaseCommand, loadConfig } from '@salesforce/b2c-tooling-sdk/cli';
8
+ import { setStoredSession, decodeJWT } from '@salesforce/b2c-tooling-sdk/auth';
9
+ import { DEFAULT_ACCOUNT_MANAGER_HOST } from '@salesforce/b2c-tooling-sdk';
10
+ import { t } from '../../../i18n/index.js';
11
+ /**
12
+ * Authenticate an API client (client_credentials or password grant) and persist the session.
13
+ * Mirrors sfcc-ci `client:auth` command behavior. Uses the same stateful store so tokens
14
+ * are shared with sfcc-ci, b2c auth:login, and subsequent CLI commands.
15
+ *
16
+ * Grant type is auto-detected based on credentials provided:
17
+ * - client_credentials: when only --client-id + --client-secret are given
18
+ * - password: when --user + --user-password are also provided
19
+ *
20
+ * Use --renew to enable automatic token renewal for later use with `auth client renew`.
21
+ */
22
+ export default class AuthClient extends BaseCommand {
23
+ static hiddenAliases = ['client:auth'];
24
+ static description = t('commands.auth.client.description', 'Authenticate an API client and save session');
25
+ static examples = [
26
+ '<%= config.bin %> <%= command.id %> --client-id <id> --client-secret <secret>',
27
+ '<%= config.bin %> <%= command.id %> --client-id <id> --client-secret <secret> --renew',
28
+ '<%= config.bin %> <%= command.id %> --client-id <id> --client-secret <secret> --user <email> --user-password <pwd>',
29
+ '<%= config.bin %> <%= command.id %> --client-id <id> --client-secret <secret> --grant-type client_credentials',
30
+ ];
31
+ static flags = {
32
+ 'client-id': Flags.string({
33
+ description: 'Client ID for OAuth',
34
+ env: 'SFCC_CLIENT_ID',
35
+ default: async () => process.env.SFCC_OAUTH_CLIENT_ID || undefined,
36
+ helpGroup: 'AUTH',
37
+ }),
38
+ 'client-secret': Flags.string({
39
+ description: 'Client secret for OAuth',
40
+ env: 'SFCC_CLIENT_SECRET',
41
+ default: async () => process.env.SFCC_OAUTH_CLIENT_SECRET || undefined,
42
+ helpGroup: 'AUTH',
43
+ }),
44
+ 'account-manager-host': Flags.string({
45
+ description: `Account Manager hostname for OAuth (default: ${DEFAULT_ACCOUNT_MANAGER_HOST})`,
46
+ env: 'SFCC_ACCOUNT_MANAGER_HOST',
47
+ default: async () => process.env.SFCC_LOGIN_URL || undefined,
48
+ helpGroup: 'AUTH',
49
+ }),
50
+ 'auth-scope': Flags.string({
51
+ description: 'OAuth scopes to request (comma-separated)',
52
+ env: 'SFCC_OAUTH_SCOPES',
53
+ multiple: true,
54
+ multipleNonGreedy: true,
55
+ delimiter: ',',
56
+ helpGroup: 'AUTH',
57
+ }),
58
+ renew: Flags.boolean({
59
+ char: 'r',
60
+ description: 'Enable automatic token renewal (stores credentials for later refresh)',
61
+ default: false,
62
+ }),
63
+ 'grant-type': Flags.string({
64
+ char: 't',
65
+ description: 'OAuth grant type (default: auto-detect based on provided credentials)',
66
+ options: ['client_credentials', 'password'],
67
+ }),
68
+ user: Flags.string({
69
+ description: 'Username for resource owner password credentials grant',
70
+ env: 'SFCC_OAUTH_USER_NAME',
71
+ }),
72
+ 'user-password': Flags.string({
73
+ description: 'Password for resource owner password credentials grant',
74
+ env: 'SFCC_OAUTH_USER_PASSWORD',
75
+ }),
76
+ };
77
+ loadConfiguration() {
78
+ const scopes = this.flags['auth-scope'];
79
+ return loadConfig({
80
+ clientId: this.flags['client-id'],
81
+ clientSecret: this.flags['client-secret'],
82
+ accountManagerHost: this.flags['account-manager-host'],
83
+ scopes: scopes && scopes.length > 0 ? scopes : undefined,
84
+ }, this.getBaseConfigOptions());
85
+ }
86
+ async run() {
87
+ const clientId = this.resolvedConfig.values.clientId;
88
+ const clientSecret = this.resolvedConfig.values.clientSecret;
89
+ if (!clientId || !clientSecret) {
90
+ this.error(t('commands.auth.client.credentialsRequired', 'Client ID and client secret are required. Provide --client-id and --client-secret or set SFCC_CLIENT_ID and SFCC_CLIENT_SECRET.'));
91
+ }
92
+ const user = this.flags.user;
93
+ const userPassword = this.flags['user-password'];
94
+ const grantType = this.resolveGrantType(this.flags['grant-type'], user);
95
+ const autoRenew = this.flags.renew;
96
+ if (grantType === 'password' && (!user || !userPassword)) {
97
+ this.error(t('commands.auth.client.userRequired', 'Username and password are required for password grant. Provide --user and --user-password.'));
98
+ }
99
+ const accountManagerHost = this.resolvedConfig.values.accountManagerHost ?? DEFAULT_ACCOUNT_MANAGER_HOST;
100
+ const scopes = this.resolvedConfig.values.scopes;
101
+ const grantPayload = { grant_type: grantType };
102
+ if (grantType === 'password') {
103
+ grantPayload.username = user;
104
+ grantPayload.password = userPassword;
105
+ }
106
+ if (scopes && scopes.length > 0) {
107
+ grantPayload.scope = scopes.join(' ');
108
+ }
109
+ const credentials = Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
110
+ const url = `https://${accountManagerHost}/dwsso/oauth2/access_token`;
111
+ const method = 'POST';
112
+ const body = new URLSearchParams(grantPayload).toString();
113
+ this.logger.debug({ grantType, clientId }, `[StatefulAuth] Using OAuth ${grantType} grant for client: ${clientId}`);
114
+ this.logger.debug({ method, url }, `[StatefulAuth REQ] ${method} ${url}`);
115
+ this.logger.trace({ method, url, body }, `[StatefulAuth REQ BODY] ${method} ${url}`);
116
+ const startTime = Date.now();
117
+ const response = await fetch(url, {
118
+ method,
119
+ headers: {
120
+ Authorization: `Basic ${credentials}`,
121
+ 'Content-Type': 'application/x-www-form-urlencoded',
122
+ },
123
+ body,
124
+ });
125
+ const duration = Date.now() - startTime;
126
+ this.logger.debug({ method, url, status: response.status, duration }, `[StatefulAuth RESP] ${method} ${url} ${response.status} ${duration}ms`);
127
+ if (!response.ok) {
128
+ const errorText = await response.text();
129
+ this.logger.trace({ method, url, body: errorText }, `[StatefulAuth RESP BODY] ${method} ${url}`);
130
+ this.error(t('commands.auth.client.failed', 'Authentication failed: {{error}}', {
131
+ error: this.parseErrorMessage(errorText),
132
+ }));
133
+ }
134
+ const data = (await response.json());
135
+ this.logger.trace({ method, url, body: data }, `[StatefulAuth RESP BODY] ${method} ${url}`);
136
+ try {
137
+ const decoded = decodeJWT(data.access_token);
138
+ this.logger.trace({ jwt: decoded.payload }, '[StatefulAuth] JWT payload');
139
+ }
140
+ catch {
141
+ // not a JWT; ignore
142
+ }
143
+ setStoredSession({
144
+ clientId,
145
+ accessToken: data.access_token,
146
+ refreshToken: data.refresh_token ?? null,
147
+ renewBase: autoRenew ? credentials : null,
148
+ user: this.extractUser(data.id_token),
149
+ });
150
+ const renewMsg = autoRenew ? ' Auto-renewal enabled.' : '';
151
+ this.log(t('commands.auth.client.success', 'Authentication succeeded.{{renewMsg}}', { renewMsg }));
152
+ }
153
+ extractUser(idToken) {
154
+ if (!idToken)
155
+ return null;
156
+ try {
157
+ const decoded = decodeJWT(idToken);
158
+ return typeof decoded.payload.sub === 'string' ? decoded.payload.sub : null;
159
+ }
160
+ catch {
161
+ return null;
162
+ }
163
+ }
164
+ parseErrorMessage(errorText) {
165
+ try {
166
+ const parsed = JSON.parse(errorText);
167
+ return parsed.error_description ?? errorText;
168
+ }
169
+ catch {
170
+ return errorText;
171
+ }
172
+ }
173
+ resolveGrantType(grantTypeFlag, user) {
174
+ if (grantTypeFlag)
175
+ return grantTypeFlag;
176
+ if (user)
177
+ return 'password';
178
+ return 'client_credentials';
179
+ }
180
+ }
181
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/auth/client/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAC,4BAA4B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C,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;YACnC,OAAO,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9E,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAEO,iBAAiB,CAAC,SAAiB;QACzC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAiC,CAAC;YACrE,OAAO,MAAM,CAAC,iBAAiB,IAAI,SAAS,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAEO,gBAAgB,CAAC,aAAiC,EAAE,IAAwB;QAClF,IAAI,aAAa;YAAE,OAAO,aAAa,CAAC;QACxC,IAAI,IAAI;YAAE,OAAO,UAAU,CAAC;QAC5B,OAAO,oBAAoB,CAAC;IAC9B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { BaseCommand } from '@salesforce/b2c-tooling-sdk/cli';
2
+ /**
3
+ * Renew the client authentication token using stored credentials.
4
+ * Mirrors sfcc-ci `client:auth:renew` command behavior. Requires that the initial
5
+ * authentication was done with the --renew flag (which stores the credentials needed
6
+ * for renewal).
7
+ *
8
+ * Uses refresh_token grant when a refresh token is stored, otherwise falls back
9
+ * to client_credentials grant using the stored base64-encoded client:secret.
10
+ */
11
+ export default class AuthClientRenew extends BaseCommand<typeof AuthClientRenew> {
12
+ static hiddenAliases: string[];
13
+ static description: string;
14
+ static examples: string[];
15
+ static flags: {
16
+ 'account-manager-host': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
17
+ };
18
+ protected loadConfiguration(): Promise<import("@salesforce/b2c-tooling-sdk").ResolvedB2CConfig>;
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import { Flags } from '@oclif/core';
7
+ import { BaseCommand, loadConfig } from '@salesforce/b2c-tooling-sdk/cli';
8
+ import { getStoredSession, setStoredSession } from '@salesforce/b2c-tooling-sdk/auth';
9
+ import { DEFAULT_ACCOUNT_MANAGER_HOST } from '@salesforce/b2c-tooling-sdk';
10
+ import { t } from '../../../i18n/index.js';
11
+ /**
12
+ * Renew the client authentication token using stored credentials.
13
+ * Mirrors sfcc-ci `client:auth:renew` command behavior. Requires that the initial
14
+ * authentication was done with the --renew flag (which stores the credentials needed
15
+ * for renewal).
16
+ *
17
+ * Uses refresh_token grant when a refresh token is stored, otherwise falls back
18
+ * to client_credentials grant using the stored base64-encoded client:secret.
19
+ */
20
+ export default class AuthClientRenew extends BaseCommand {
21
+ static hiddenAliases = ['client:auth:renew'];
22
+ static description = t('commands.auth.client.renew.description', 'Renew the client authentication token');
23
+ static examples = ['<%= config.bin %> <%= command.id %>'];
24
+ static flags = {
25
+ 'account-manager-host': Flags.string({
26
+ description: `Account Manager hostname for OAuth (default: ${DEFAULT_ACCOUNT_MANAGER_HOST})`,
27
+ env: 'SFCC_ACCOUNT_MANAGER_HOST',
28
+ default: async () => process.env.SFCC_LOGIN_URL || undefined,
29
+ helpGroup: 'AUTH',
30
+ }),
31
+ };
32
+ loadConfiguration() {
33
+ return loadConfig({ accountManagerHost: this.flags['account-manager-host'] }, this.getBaseConfigOptions());
34
+ }
35
+ async run() {
36
+ const session = getStoredSession();
37
+ if (!session?.renewBase) {
38
+ this.error(t('commands.auth.client.renew.notRenewable', 'Authentication renewal not possible. Ensure initial authentication is done with --renew flag.'));
39
+ }
40
+ const accountManagerHost = this.resolvedConfig.values.accountManagerHost ?? DEFAULT_ACCOUNT_MANAGER_HOST;
41
+ const url = `https://${accountManagerHost}/dwsso/oauth2/access_token`;
42
+ // Use refresh_token grant if available, otherwise client_credentials
43
+ const grantPayload = session.refreshToken !== null && session.refreshToken !== undefined && session.refreshToken !== ''
44
+ ? { grant_type: 'refresh_token', refresh_token: session.refreshToken }
45
+ : { grant_type: 'client_credentials' };
46
+ const method = 'POST';
47
+ const body = new URLSearchParams(grantPayload).toString();
48
+ this.logger.debug({ grantType: grantPayload.grant_type, clientId: session.clientId }, `[StatefulAuth] Renewing token using OAuth ${grantPayload.grant_type} grant for client: ${session.clientId}`);
49
+ this.logger.debug({ method, url }, `[StatefulAuth REQ] ${method} ${url}`);
50
+ this.logger.trace({ method, url, body }, `[StatefulAuth REQ BODY] ${method} ${url}`);
51
+ const startTime = Date.now();
52
+ const response = await fetch(url, {
53
+ method,
54
+ headers: {
55
+ Authorization: `Basic ${session.renewBase}`,
56
+ 'Content-Type': 'application/x-www-form-urlencoded',
57
+ },
58
+ body,
59
+ });
60
+ const duration = Date.now() - startTime;
61
+ this.logger.debug({ method, url, status: response.status, duration }, `[StatefulAuth RESP] ${method} ${url} ${response.status} ${duration}ms`);
62
+ if (!response.ok) {
63
+ const errorText = await response.text();
64
+ this.logger.trace({ method, url, body: errorText }, `[StatefulAuth RESP BODY] ${method} ${url}`);
65
+ let errorMsg;
66
+ try {
67
+ const parsed = JSON.parse(errorText);
68
+ errorMsg = parsed.error_description ?? errorText;
69
+ }
70
+ catch {
71
+ errorMsg = errorText;
72
+ }
73
+ this.error(t('commands.auth.client.renew.failed', 'Authentication renewal failed: {{error}}', { error: errorMsg }));
74
+ }
75
+ const data = (await response.json());
76
+ this.logger.trace({ method, url, body: data }, `[StatefulAuth RESP BODY] ${method} ${url}`);
77
+ // Update stored session with new token (server may issue a new refresh token)
78
+ setStoredSession({
79
+ clientId: session.clientId,
80
+ accessToken: data.access_token,
81
+ refreshToken: data.refresh_token ?? session.refreshToken ?? null,
82
+ renewBase: session.renewBase,
83
+ user: session.user ?? null,
84
+ });
85
+ this.log(t('commands.auth.client.renew.success', 'Authentication renewal succeeded.'));
86
+ }
87
+ }
88
+ //# sourceMappingURL=renew.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renew.js","sourceRoot":"","sources":["../../../../src/commands/auth/client/renew.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,4BAA4B,EAAC,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAC,CAAC,EAAC,MAAM,wBAAwB,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAmC;IAC9E,MAAM,CAAC,aAAa,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAE7C,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,wCAAwC,EAAE,uCAAuC,CAAC,CAAC;IAE1G,MAAM,CAAC,QAAQ,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAE1D,MAAM,CAAC,KAAK,GAAG;QACb,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC;YACnC,WAAW,EAAE,gDAAgD,4BAA4B,GAAG;YAC5F,GAAG,EAAE,2BAA2B;YAChC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,SAAS;YAC5D,SAAS,EAAE,MAAM;SAClB,CAAC;KACH,CAAC;IAEiB,iBAAiB;QAClC,OAAO,UAAU,CACf,EAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAuB,EAAC,EAC9E,IAAI,CAAC,oBAAoB,EAAE,CAC5B,CAAC;I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,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC,EAAE,4BAA4B,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC;QAE1F,8EAA8E;QAC9E,gBAAgB,CAAC;YACf,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,YAAY,EAAE,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,YAAY,IAAI,IAAI;YAChE,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;SAC3B,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,oCAAoC,EAAE,mCAAmC,CAAC,CAAC,CAAC;IACzF,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { BaseCommand } from '@salesforce/b2c-tooling-sdk/cli';
2
+ /**
3
+ * JSON output structure for the auth client token command.
4
+ */
5
+ interface AuthClientTokenOutput {
6
+ accessToken: string;
7
+ clientId: string;
8
+ expires: string;
9
+ renewable: boolean;
10
+ scopes: string[];
11
+ user: null | string;
12
+ }
13
+ /**
14
+ * Return the current authentication token from the stateful store.
15
+ * Mirrors sfcc-ci `client:auth:token` command behavior.
16
+ */
17
+ export default class AuthClientToken extends BaseCommand<typeof AuthClientToken> {
18
+ static hiddenAliases: string[];
19
+ static description: string;
20
+ static enableJsonFlag: boolean;
21
+ static examples: string[];
22
+ run(): Promise<AuthClientTokenOutput>;
23
+ }
24
+ export {};
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import { ux } from '@oclif/core';
7
+ import { BaseCommand } from '@salesforce/b2c-tooling-sdk/cli';
8
+ import { getStoredSession, isStatefulTokenValid, decodeJWT } from '@salesforce/b2c-tooling-sdk/auth';
9
+ import { t } from '../../../i18n/index.js';
10
+ /**
11
+ * Return the current authentication token from the stateful store.
12
+ * Mirrors sfcc-ci `client:auth:token` command behavior.
13
+ */
14
+ export default class AuthClientToken extends BaseCommand {
15
+ static hiddenAliases = ['client:auth:token'];
16
+ static description = t('commands.auth.client.token.description', 'Return the current authentication token (stateful)');
17
+ static enableJsonFlag = true;
18
+ static examples = ['<%= config.bin %> <%= command.id %>', '<%= config.bin %> <%= command.id %> --json'];
19
+ async run() {
20
+ this.logger.debug('[StatefulAuth] Reading stored session from stateful store');
21
+ const session = getStoredSession();
22
+ if (!session?.accessToken) {
23
+ this.logger.debug('[StatefulAuth] No stored session found');
24
+ this.error(t('commands.auth.client.token.noToken', 'No authentication token found. Run `auth client` to authenticate first.'));
25
+ }
26
+ this.logger.debug({ clientId: session.clientId, user: session.user }, `[StatefulAuth] Found session for client: ${session.clientId}`);
27
+ // Decode JWT to extract metadata
28
+ let expires = '';
29
+ let scopes = [];
30
+ try {
31
+ const decoded = decodeJWT(session.accessToken);
32
+ const exp = decoded.payload.exp;
33
+ if (typeof exp === 'number') {
34
+ expires = new Date(exp * 1000).toISOString();
35
+ }
36
+ const scope = decoded.payload.scope;
37
+ scopes = scope === null || scope === undefined ? [] : Array.isArray(scope) ? scope : scope.split(' ');
38
+ this.logger.debug({ expires, scopes }, '[StatefulAuth] Decoded JWT claims');
39
+ this.logger.trace({ jwt: decoded.payload }, '[StatefulAuth] JWT payload');
40
+ }
41
+ catch {
42
+ this.logger.debug('[StatefulAuth] Token is not a valid JWT; returning raw token');
43
+ }
44
+ const valid = isStatefulTokenValid(session);
45
+ const renewable = session.renewBase !== null && session.renewBase !== undefined && session.renewBase !== '';
46
+ this.logger.debug({ valid, renewable }, `[StatefulAuth] Token valid: ${valid}, renewable: ${renewable}`);
47
+ const output = {
48
+ accessToken: session.accessToken,
49
+ clientId: session.clientId,
50
+ expires,
51
+ renewable,
52
+ scopes,
53
+ user: session.user ?? null,
54
+ };
55
+ if (this.jsonEnabled()) {
56
+ if (!valid) {
57
+ this.warn(t('commands.auth.client.token.expired', 'Token is expired or invalid. Run `auth client renew` or `auth client` to refresh.'));
58
+ }
59
+ return output;
60
+ }
61
+ // In normal mode, output just the raw token to stdout (matches sfcc-ci behavior)
62
+ ux.stdout(session.accessToken);
63
+ return output;
64
+ }
65
+ }
66
+ //# sourceMappingURL=token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../src/commands/auth/client/token.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,EAAE,EAAC,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAE,SAAS,EAAC,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAC,CAAC,EAAC,MAAM,wBAAwB,CAAC;AAczC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAmC;IAC9E,MAAM,CAAC,aAAa,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAE7C,MAAM,CAAC,WAAW,GAAG,CAAC,CACpB,wCAAwC,EACxC,oDAAoD,CACrD,CAAC;IAEF,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IAE7B,MAAM,CAAC,QAAQ,GAAG,CAAC,qCAAqC,EAAE,4CAA4C,CAAC,CAAC;IAExG,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;QAE/E,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;QAEnC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC5D,IAAI,CAAC,KAAK,CACR,CAAC,CACC,oCAAoC,EACpC,yEAAyE,CAC1E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;QAC5C,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,IAAI,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE,CAAC;QAE5G,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,KAAK,EAAE,SAAS,EAAC,EAAE,+BAA+B,KAAK,gBAAgB,SAAS,EAAE,CAAC,CAAC;QAEvG,MAAM,MAAM,GAA0B;YACpC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,OAAO;YACP,SAAS;YACT,MAAM;YACN,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;SAC3B,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACvB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,IAAI,CAAC,IAAI,CACP,CAAC,CACC,oCAAoC,EACpC,mFAAmF,CACpF,CACF,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,iFAAiF;QACjF,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE/B,OAAO,MAAM,CAAC;IAChB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { BaseCommand } from '@salesforce/b2c-tooling-sdk/cli';
2
+ /**
3
+ * Log in via browser (implicit OAuth) and persist the session for stateful auth.
4
+ * Uses the same storage as sfcc-ci; when valid, subsequent commands use this token
5
+ * until it expires or you run auth:logout.
6
+ */
7
+ export default class AuthLogin extends BaseCommand<typeof AuthLogin> {
8
+ static hiddenAliases: string[];
9
+ static args: {
10
+ clientId: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
11
+ };
12
+ static description: string;
13
+ static examples: string[];
14
+ static flags: {
15
+ 'account-manager-host': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
+ 'auth-scope': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ };
18
+ protected loadConfiguration(): Promise<import("@salesforce/b2c-tooling-sdk").ResolvedB2CConfig>;
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import { Args, Flags } from '@oclif/core';
7
+ import { BaseCommand, loadConfig } from '@salesforce/b2c-tooling-sdk/cli';
8
+ import { ImplicitOAuthStrategy, setStoredSession, decodeJWT } from '@salesforce/b2c-tooling-sdk/auth';
9
+ import { DEFAULT_ACCOUNT_MANAGER_HOST } from '@salesforce/b2c-tooling-sdk';
10
+ import { t, withDocs } from '../../i18n/index.js';
11
+ /**
12
+ * Log in via browser (implicit OAuth) and persist the session for stateful auth.
13
+ * Uses the same storage as sfcc-ci; when valid, subsequent commands use this token
14
+ * until it expires or you run auth:logout.
15
+ */
16
+ export default class AuthLogin extends BaseCommand {
17
+ static hiddenAliases = ['auth:login'];
18
+ static args = {
19
+ clientId: Args.string({
20
+ description: 'Client ID for OAuth (falls back to SFCC_CLIENT_ID env var)',
21
+ required: false,
22
+ }),
23
+ };
24
+ static description = withDocs(t('commands.auth.login.description', 'Log in via browser and save session (stateful auth)'), '/cli/auth.html#b2c-auth-login');
25
+ static examples = ['<%= config.bin %> <%= command.id %>', '<%= config.bin %> <%= command.id %> your-client-id'];
26
+ static flags = {
27
+ 'account-manager-host': Flags.string({
28
+ description: `Account Manager hostname for OAuth (default: ${DEFAULT_ACCOUNT_MANAGER_HOST})`,
29
+ env: 'SFCC_ACCOUNT_MANAGER_HOST',
30
+ default: async () => process.env.SFCC_LOGIN_URL || undefined,
31
+ helpGroup: 'AUTH',
32
+ }),
33
+ 'auth-scope': Flags.string({
34
+ description: 'OAuth scopes to request (comma-separated)',
35
+ env: 'SFCC_OAUTH_SCOPES',
36
+ multiple: true,
37
+ multipleNonGreedy: true,
38
+ delimiter: ',',
39
+ helpGroup: 'AUTH',
40
+ }),
41
+ };
42
+ loadConfiguration() {
43
+ const scopes = this.flags['auth-scope'];
44
+ return loadConfig({
45
+ clientId: this.args.clientId ?? process.env.SFCC_CLIENT_ID,
46
+ accountManagerHost: this.flags['account-manager-host'],
47
+ scopes: scopes && scopes.length > 0 ? scopes : undefined,
48
+ }, this.getBaseConfigOptions());
49
+ }
50
+ async run() {
51
+ const clientId = this.resolvedConfig.values.clientId;
52
+ if (!clientId) {
53
+ this.error(t('error.oauthClientIdRequired', 'OAuth client ID required. Provide a client ID argument or set SFCC_CLIENT_ID.'));
54
+ }
55
+ const accountManagerHost = this.resolvedConfig.values.accountManagerHost ?? DEFAULT_ACCOUNT_MANAGER_HOST;
56
+ const scopes = this.resolvedConfig.values.scopes;
57
+ const strategy = new ImplicitOAuthStrategy({
58
+ clientId,
59
+ scopes,
60
+ accountManagerHost,
61
+ });
62
+ const tokenResponse = await strategy.getTokenResponse();
63
+ let user = null;
64
+ try {
65
+ const decoded = decodeJWT(tokenResponse.accessToken);
66
+ if (typeof decoded.payload.sub === 'string') {
67
+ user = decoded.payload.sub;
68
+ }
69
+ }
70
+ catch {
71
+ // ignore
72
+ }
73
+ setStoredSession({
74
+ clientId,
75
+ accessToken: tokenResponse.accessToken,
76
+ refreshToken: null,
77
+ renewBase: null,
78
+ user,
79
+ });
80
+ this.log(t('commands.auth.login.success', 'Login succeeded. Session saved for stateful auth.'));
81
+ }
82
+ }
83
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/commands/auth/login.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,iCAAiC,CAAC;AACxE,OAA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Aa,CAAC,WAAW;YACtC,YAAY,EAAE,IAAI;YAClB,SAAS,EAAE,IAAI;YACf,IAAI;SACL,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,6BAA6B,EAAE,mDAAmD,CAAC,CAAC,CAAC;IAClG,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { BaseCommand } from '@salesforce/b2c-tooling-sdk/cli';
2
+ /**
3
+ * Clear the stored OAuth session (stateful auth).
4
+ * Uses the same storage as sfcc-ci; after logout, commands use stateless auth
5
+ * (client credentials or implicit) when configured.
6
+ */
7
+ export default class AuthLogout extends BaseCommand<typeof AuthLogout> {
8
+ static hiddenAliases: string[];
9
+ static description: string;
10
+ static examples: string[];
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * SPDX-License-Identifier: Apache-2
4
+ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import { BaseCommand } from '@salesforce/b2c-tooling-sdk/cli';
7
+ import { clearStoredSession } from '@salesforce/b2c-tooling-sdk/auth';
8
+ import { t, withDocs } from '../../i18n/index.js';
9
+ /**
10
+ * Clear the stored OAuth session (stateful auth).
11
+ * Uses the same storage as sfcc-ci; after logout, commands use stateless auth
12
+ * (client credentials or implicit) when configured.
13
+ */
14
+ export default class AuthLogout extends BaseCommand {
15
+ static hiddenAliases = ['auth:logout'];
16
+ static description = withDocs(t('commands.auth.logout.description', 'Clear stored session (stateful auth)'), '/cli/auth.html#b2c-auth-logout');
17
+ static examples = ['<%= config.bin %> <%= command.id %>'];
18
+ async run() {
19
+ clearStoredSession();
20
+ this.log(t('commands.auth.logout.success', 'Logged out. Stored session cleared.'));
21
+ }
22
+ }
23
+ //# sourceMappingURL=logout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../src/commands/auth/logout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAC,CAAC,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAA8B;IACpE,MAAM,CAAC,aAAa,GAAG,CAAC,aAAa,CAAC,CAAC;IAEvC,MAAM,CAAC,WAAW,GAAG,QAAQ,CAC3B,CAAC,CAAC,kCAAkC,EAAE,sCAAsC,CAAC,EAC7E,gCAAgC,CACjC,CAAC;IAEF,MAAM,CAAC,QAAQ,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAE1D,KAAK,CAAC,GAAG;QACP,kBAAkB,EAAE,CAAC;QACrB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,8BAA8B,EAAE,qCAAqC,CAAC,CAAC,CAAC;IACrF,CAAC"}
@@ -22,14 +22,14 @@ export default class CipDescribe extends CipCommand<typeof CipDescribe> {
22
22
  staging: import("@oclif/core/interfaces").BooleanFlag<boolean>;
23
23
  format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
24
24
  'fetch-size': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
25
- 'client-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
- 'client-secret': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ 'client-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
26
+ 'client-secret': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
27
27
  'auth-scope': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
28
28
  'short-code': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
29
  'tenant-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
30
30
  'auth-methods': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
31
31
  'user-auth': import("@oclif/core/interfaces").BooleanFlag<boolean>;
32
- 'account-manager-host': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
32
+ 'account-manager-host': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
33
33
  'log-level': import("@oclif/core/interfaces").OptionFlag<"trace" | "debug" | "info" | "warn" | "error" | "silent" | undefined, import("@oclif/core/interfaces").CustomOptions>;
34
34
  debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
35
35
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;