@salesforce/plugin-auth 3.2.0 → 3.3.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 +7 -7
- package/lib/commands/org/list/auth.js +2 -4
- package/lib/commands/org/list/auth.js.map +1 -1
- package/lib/commands/org/login/access-token.d.ts +9 -10
- package/lib/commands/org/login/access-token.js +8 -5
- package/lib/commands/org/login/access-token.js.map +1 -1
- package/lib/commands/org/login/device.d.ts +3 -4
- package/lib/commands/org/login/device.js +5 -12
- package/lib/commands/org/login/device.js.map +1 -1
- package/lib/commands/org/login/jwt.d.ts +3 -3
- package/lib/commands/org/login/jwt.js +6 -6
- package/lib/commands/org/login/jwt.js.map +1 -1
- package/lib/commands/org/login/sfdx-url.d.ts +3 -3
- package/lib/commands/org/login/sfdx-url.js +4 -4
- package/lib/commands/org/login/sfdx-url.js.map +1 -1
- package/lib/commands/org/login/web.d.ts +10 -13
- package/lib/commands/org/login/web.js +17 -27
- package/lib/commands/org/login/web.js.map +1 -1
- package/lib/commands/org/logout.d.ts +9 -12
- package/lib/commands/org/logout.js +71 -116
- package/lib/commands/org/logout.js.map +1 -1
- package/lib/common.d.ts +5 -3
- package/lib/common.js +30 -23
- package/lib/common.js.map +1 -1
- package/messages/messages.md +0 -4
- package/oclif.lock +208 -144
- package/oclif.manifest.json +7 -24
- package/package.json +11 -9
- package/lib/authBaseCommand.d.ts +0 -9
- package/lib/authBaseCommand.js +0 -46
- package/lib/authBaseCommand.js.map +0 -1
package/oclif.manifest.json
CHANGED
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"pluginType": "core",
|
|
79
79
|
"strict": true,
|
|
80
80
|
"summary": "Log out of a Salesforce org.",
|
|
81
|
+
"enableJsonFlag": true,
|
|
81
82
|
"isESM": true,
|
|
82
83
|
"relativePath": [
|
|
83
84
|
"lib",
|
|
@@ -139,7 +140,6 @@
|
|
|
139
140
|
"strict": true,
|
|
140
141
|
"summary": "List authorization information about the orgs you created or logged into.",
|
|
141
142
|
"enableJsonFlag": true,
|
|
142
|
-
"SF_ENV": "SF_ENV",
|
|
143
143
|
"isESM": true,
|
|
144
144
|
"relativePath": [
|
|
145
145
|
"lib",
|
|
@@ -267,6 +267,7 @@
|
|
|
267
267
|
"pluginType": "core",
|
|
268
268
|
"strict": true,
|
|
269
269
|
"summary": "Authorize an org using an existing Salesforce access token.",
|
|
270
|
+
"enableJsonFlag": true,
|
|
270
271
|
"isESM": true,
|
|
271
272
|
"relativePath": [
|
|
272
273
|
"lib",
|
|
@@ -397,17 +398,6 @@
|
|
|
397
398
|
"multiple": false,
|
|
398
399
|
"type": "option"
|
|
399
400
|
},
|
|
400
|
-
"disable-masking": {
|
|
401
|
-
"aliases": [
|
|
402
|
-
"disablemasking"
|
|
403
|
-
],
|
|
404
|
-
"deprecateAliases": true,
|
|
405
|
-
"hidden": true,
|
|
406
|
-
"name": "disable-masking",
|
|
407
|
-
"summary": "Disable masking of user input; use with problematic terminals.",
|
|
408
|
-
"allowNo": false,
|
|
409
|
-
"type": "boolean"
|
|
410
|
-
},
|
|
411
401
|
"loglevel": {
|
|
412
402
|
"deprecated": {
|
|
413
403
|
"message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
|
|
@@ -427,6 +417,7 @@
|
|
|
427
417
|
"pluginType": "core",
|
|
428
418
|
"strict": true,
|
|
429
419
|
"summary": "Authorize an org using a device code.",
|
|
420
|
+
"enableJsonFlag": true,
|
|
430
421
|
"isESM": true,
|
|
431
422
|
"relativePath": [
|
|
432
423
|
"lib",
|
|
@@ -620,6 +611,7 @@
|
|
|
620
611
|
"pluginType": "core",
|
|
621
612
|
"strict": true,
|
|
622
613
|
"summary": "Log in to a Salesforce org using a JSON web token (JWT).",
|
|
614
|
+
"enableJsonFlag": true,
|
|
623
615
|
"isESM": true,
|
|
624
616
|
"relativePath": [
|
|
625
617
|
"lib",
|
|
@@ -783,6 +775,7 @@
|
|
|
783
775
|
"pluginType": "core",
|
|
784
776
|
"strict": true,
|
|
785
777
|
"summary": "Authorize an org using a Salesforce DX authorization URL stored in a file or through standard input (stdin).",
|
|
778
|
+
"enableJsonFlag": true,
|
|
786
779
|
"isESM": true,
|
|
787
780
|
"relativePath": [
|
|
788
781
|
"lib",
|
|
@@ -931,17 +924,6 @@
|
|
|
931
924
|
"multiple": false,
|
|
932
925
|
"type": "option"
|
|
933
926
|
},
|
|
934
|
-
"disable-masking": {
|
|
935
|
-
"aliases": [
|
|
936
|
-
"disablemasking"
|
|
937
|
-
],
|
|
938
|
-
"deprecateAliases": true,
|
|
939
|
-
"hidden": true,
|
|
940
|
-
"name": "disable-masking",
|
|
941
|
-
"summary": "Disable masking of user input; use with problematic terminals.",
|
|
942
|
-
"allowNo": false,
|
|
943
|
-
"type": "boolean"
|
|
944
|
-
},
|
|
945
927
|
"no-prompt": {
|
|
946
928
|
"aliases": [
|
|
947
929
|
"noprompt"
|
|
@@ -974,6 +956,7 @@
|
|
|
974
956
|
"pluginType": "core",
|
|
975
957
|
"strict": true,
|
|
976
958
|
"summary": "Log in to a Salesforce org using the web server flow.",
|
|
959
|
+
"enableJsonFlag": true,
|
|
977
960
|
"isESM": true,
|
|
978
961
|
"relativePath": [
|
|
979
962
|
"lib",
|
|
@@ -1024,5 +1007,5 @@
|
|
|
1024
1007
|
]
|
|
1025
1008
|
}
|
|
1026
1009
|
},
|
|
1027
|
-
"version": "3.
|
|
1010
|
+
"version": "3.3.0"
|
|
1028
1011
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-auth",
|
|
3
3
|
"description": "plugin for sf auth commands",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@
|
|
9
|
-
"@
|
|
8
|
+
"@inquirer/checkbox": "^1.5.0",
|
|
9
|
+
"@inquirer/select": "^1.3.1",
|
|
10
|
+
"@oclif/core": "^3.18.0",
|
|
11
|
+
"@salesforce/core": "^6.4.6",
|
|
10
12
|
"@salesforce/kit": "^3.0.15",
|
|
11
|
-
"@salesforce/sf-plugins-core": "^
|
|
13
|
+
"@salesforce/sf-plugins-core": "^7.1.1",
|
|
12
14
|
"@salesforce/ts-types": "^2.0.9",
|
|
13
15
|
"chalk": "^5.3.0",
|
|
14
16
|
"open": "^9.1.0"
|
|
@@ -17,10 +19,10 @@
|
|
|
17
19
|
"@oclif/plugin-command-snapshot": "^5.0.5",
|
|
18
20
|
"@salesforce/cli-plugins-testkit": "^5.1.3",
|
|
19
21
|
"@salesforce/dev-scripts": "^8.2.0",
|
|
20
|
-
"@salesforce/plugin-command-reference": "^3.0.
|
|
22
|
+
"@salesforce/plugin-command-reference": "^3.0.61",
|
|
21
23
|
"@salesforce/ts-sinon": "^1.4.19",
|
|
22
|
-
"eslint-plugin-sf-plugin": "^1.17.
|
|
23
|
-
"oclif": "^4.
|
|
24
|
+
"eslint-plugin-sf-plugin": "^1.17.1",
|
|
25
|
+
"oclif": "^4.2.0",
|
|
24
26
|
"shx": "0.3.4",
|
|
25
27
|
"ts-node": "^10.9.2",
|
|
26
28
|
"typescript": "^5.3.3"
|
|
@@ -231,7 +233,7 @@
|
|
|
231
233
|
"exports": "./lib/index.js",
|
|
232
234
|
"type": "module",
|
|
233
235
|
"sfdx": {
|
|
234
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.
|
|
235
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.
|
|
236
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.3.0.crt",
|
|
237
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-auth/3.3.0.sig"
|
|
236
238
|
}
|
|
237
239
|
}
|
package/lib/authBaseCommand.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { Config } from '@oclif/core';
|
|
3
|
-
export declare abstract class AuthBaseCommand<T> extends SfCommand<T> {
|
|
4
|
-
constructor(argv: string[], config: Config);
|
|
5
|
-
protected askForHiddenResponse(messageKey: string, disableMasking?: boolean): Promise<string>;
|
|
6
|
-
protected shouldExitCommand(noPrompt?: boolean, message?: string): Promise<boolean>;
|
|
7
|
-
protected askForClientSecret(disableMasking?: boolean): Promise<string>;
|
|
8
|
-
protected askForAccessToken(disableMasking?: boolean): Promise<string>;
|
|
9
|
-
}
|
package/lib/authBaseCommand.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { Messages, Global, Mode } from '@salesforce/core';
|
|
8
|
-
import chalk from 'chalk';
|
|
9
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
10
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
11
|
-
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
|
|
12
|
-
function dimMessage(message) {
|
|
13
|
-
return chalk.dim(message);
|
|
14
|
-
}
|
|
15
|
-
export class AuthBaseCommand extends SfCommand {
|
|
16
|
-
constructor(argv, config) {
|
|
17
|
-
super(argv, config);
|
|
18
|
-
}
|
|
19
|
-
async askForHiddenResponse(messageKey, disableMasking = false) {
|
|
20
|
-
const msg = dimMessage(messages.getMessage(messageKey));
|
|
21
|
-
const hidden = await this.prompt({
|
|
22
|
-
message: msg,
|
|
23
|
-
type: 'input',
|
|
24
|
-
name: 'response',
|
|
25
|
-
transformer: (input) => (disableMasking ? input : '*'.repeat(input.length)),
|
|
26
|
-
});
|
|
27
|
-
return hidden.response;
|
|
28
|
-
}
|
|
29
|
-
async shouldExitCommand(noPrompt, message) {
|
|
30
|
-
if (Boolean(noPrompt) || Global.getEnvironmentMode() !== Mode.DEMO) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
const msg = dimMessage(message ?? messages.getMessage('warnAuth', [this.config.bin]));
|
|
35
|
-
const answer = await this.confirm(msg);
|
|
36
|
-
return !answer;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
async askForClientSecret(disableMasking = false) {
|
|
40
|
-
return this.askForHiddenResponse('clientSecretStdin', disableMasking);
|
|
41
|
-
}
|
|
42
|
-
async askForAccessToken(disableMasking = false) {
|
|
43
|
-
return this.askForHiddenResponse('accessTokenStdin', disableMasking);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=authBaseCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authBaseCommand.js","sourceRoot":"","sources":["../src/authBaseCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGxD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC5D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC;AAE9E,SAAS,UAAU,CAAC,OAAe;IACjC,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,OAAgB,eAA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