@salesforce/plugin-auth 3.1.2 → 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 +23 -14
- 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 +5 -4
- package/lib/commands/org/login/sfdx-url.js +28 -10
- 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/messages/sfdxurl.store.md +11 -1
- package/oclif.lock +208 -144
- package/oclif.manifest.json +25 -28
- 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/README.md
CHANGED
|
@@ -107,7 +107,7 @@ EXAMPLES
|
|
|
107
107
|
$ sf org list auth
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
110
|
+
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.0/src/commands/org/list/auth.ts)_
|
|
111
111
|
|
|
112
112
|
## `sf org login access-token`
|
|
113
113
|
|
|
@@ -160,7 +160,7 @@ FLAG DESCRIPTIONS
|
|
|
160
160
|
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
163
|
+
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.0/src/commands/org/login/access-token.ts)_
|
|
164
164
|
|
|
165
165
|
## `sf org login device`
|
|
166
166
|
|
|
@@ -219,7 +219,7 @@ FLAG DESCRIPTIONS
|
|
|
219
219
|
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
222
|
+
_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.0/src/commands/org/login/device.ts)_
|
|
223
223
|
|
|
224
224
|
## `sf org login jwt`
|
|
225
225
|
|
|
@@ -308,27 +308,29 @@ FLAG DESCRIPTIONS
|
|
|
308
308
|
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
-
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
311
|
+
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.0/src/commands/org/login/jwt.ts)_
|
|
312
312
|
|
|
313
313
|
## `sf org login sfdx-url`
|
|
314
314
|
|
|
315
|
-
Authorize an org using a Salesforce DX authorization URL stored in a file.
|
|
315
|
+
Authorize an org using a Salesforce DX authorization URL stored in a file or through standard input (stdin).
|
|
316
316
|
|
|
317
317
|
```
|
|
318
318
|
USAGE
|
|
319
|
-
$ sf org login sfdx-url -f <value> [
|
|
319
|
+
$ sf org login sfdx-url [--json] [-f <value>] [-u <value>] [-d] [-s] [-a <value>]
|
|
320
320
|
|
|
321
321
|
FLAGS
|
|
322
|
-
-a, --alias=<value>
|
|
323
|
-
-d, --set-default-dev-hub
|
|
324
|
-
-f, --sfdx-url-file=<value>
|
|
325
|
-
-s, --set-default
|
|
322
|
+
-a, --alias=<value> Alias for the org.
|
|
323
|
+
-d, --set-default-dev-hub Set the authenticated org as the default Dev Hub.
|
|
324
|
+
-f, --sfdx-url-file=<value> Path to a file that contains the Salesforce DX authorization URL.
|
|
325
|
+
-s, --set-default Set the authenticated org as the default that all org-related commands run against.
|
|
326
|
+
-u, --sfdx-url-stdin=<value> Specify '-' as this flag's value to pipe the Salesforce DX authorization URL through
|
|
327
|
+
standard input (stdin).
|
|
326
328
|
|
|
327
329
|
GLOBAL FLAGS
|
|
328
330
|
--json Format output as json.
|
|
329
331
|
|
|
330
332
|
DESCRIPTION
|
|
331
|
-
Authorize an org using a Salesforce DX authorization URL stored in a file.
|
|
333
|
+
Authorize an org using a Salesforce DX authorization URL stored in a file or through standard input (stdin).
|
|
332
334
|
|
|
333
335
|
The Salesforce DX (SFDX) authorization URL must have the format
|
|
334
336
|
"force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". NOTE: The SFDX authorization URL uses the "force"
|
|
@@ -352,6 +354,9 @@ DESCRIPTION
|
|
|
352
354
|
You can also create a JSON file that has a top-level property named sfdxAuthUrl whose value is the authorization URL.
|
|
353
355
|
Finally, you can create a normal text file that includes just the URL and nothing else.
|
|
354
356
|
|
|
357
|
+
Alternatively, you can pipe the SFDX authorization URL through standard input by using the --sfdx-url-stdin flag and
|
|
358
|
+
providing the '-' character as the value.
|
|
359
|
+
|
|
355
360
|
ALIASES
|
|
356
361
|
$ sf force auth sfdxurl store
|
|
357
362
|
$ sf auth sfdxurl store
|
|
@@ -364,9 +369,13 @@ EXAMPLES
|
|
|
364
369
|
Similar to previous example, but set the org as your default and give it an alias MyDefaultOrg:
|
|
365
370
|
|
|
366
371
|
$ sf org login sfdx-url --sfdx-url-file files/authFile.json --set-default --alias MyDefaultOrg
|
|
372
|
+
|
|
373
|
+
Pipe the SFDX authorization URL from stdin by specifying the '-' value.
|
|
374
|
+
|
|
375
|
+
$ echo url | sf org login sfdx-url --sfdx-url-stdin -
|
|
367
376
|
```
|
|
368
377
|
|
|
369
|
-
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
378
|
+
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.0/src/commands/org/login/sfdx-url.ts)_
|
|
370
379
|
|
|
371
380
|
## `sf org login web`
|
|
372
381
|
|
|
@@ -451,7 +460,7 @@ FLAG DESCRIPTIONS
|
|
|
451
460
|
To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.
|
|
452
461
|
```
|
|
453
462
|
|
|
454
|
-
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
463
|
+
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.0/src/commands/org/login/web.ts)_
|
|
455
464
|
|
|
456
465
|
## `sf org logout`
|
|
457
466
|
|
|
@@ -511,6 +520,6 @@ FLAG DESCRIPTIONS
|
|
|
511
520
|
All orgs includes Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.
|
|
512
521
|
```
|
|
513
522
|
|
|
514
|
-
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.
|
|
523
|
+
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.3.0/src/commands/org/logout.ts)_
|
|
515
524
|
|
|
516
525
|
<!-- commandsstop -->
|
|
@@ -31,16 +31,14 @@ export default class ListAuth extends SfCommand {
|
|
|
31
31
|
return { ...rest, alias: aliases ? aliases.join(',') : '' };
|
|
32
32
|
});
|
|
33
33
|
const hasErrors = auths.filter((auth) => !!auth.error).length > 0;
|
|
34
|
-
|
|
34
|
+
const columns = {
|
|
35
35
|
alias: { header: 'ALIAS' },
|
|
36
36
|
username: { header: 'USERNAME' },
|
|
37
37
|
orgId: { header: 'ORG ID' },
|
|
38
38
|
instanceUrl: { header: 'INSTANCE URL' },
|
|
39
39
|
oauthMethod: { header: 'AUTH METHOD' },
|
|
40
|
+
...(hasErrors ? { error: { header: 'ERROR' } } : {}),
|
|
40
41
|
};
|
|
41
|
-
if (hasErrors) {
|
|
42
|
-
columns = { ...columns, ...{ error: { header: 'ERROR' } } };
|
|
43
|
-
}
|
|
44
42
|
this.styledHeader('authenticated orgs');
|
|
45
43
|
this.table(mappedAuths, columns);
|
|
46
44
|
return mappedAuths;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/commands/org/list/auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/commands/org/list/auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAoB,MAAM,kBAAkB,CAAC;AAGxE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;AAE1E,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAA0B;IACvD,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACj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AAW,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;gBACvC,WAAW,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;gBACtC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACrD,CAAC;YACF,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YACjC,OAAO,WAAW,CAAC;QACrB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;YAChD,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
3
|
import { AuthFields } from '@salesforce/core';
|
|
3
|
-
|
|
4
|
-
import { AuthBaseCommand } from '../../../authBaseCommand.js';
|
|
5
|
-
export default class LoginAccessToken extends AuthBaseCommand<AuthFields> {
|
|
4
|
+
export default class LoginAccessToken extends SfCommand<AuthFields> {
|
|
6
5
|
static readonly summary: string;
|
|
7
6
|
static readonly description: string;
|
|
8
7
|
static readonly examples: string[];
|
|
9
8
|
static readonly deprecateAliases = true;
|
|
10
|
-
static aliases: string[];
|
|
9
|
+
static readonly aliases: string[];
|
|
11
10
|
static readonly flags: {
|
|
12
|
-
'instance-url':
|
|
13
|
-
'set-default-dev-hub':
|
|
14
|
-
'set-default':
|
|
15
|
-
alias:
|
|
16
|
-
'no-prompt':
|
|
17
|
-
loglevel:
|
|
11
|
+
'instance-url': import("@oclif/core/lib/interfaces").OptionFlag<import("url").URL, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'set-default-dev-hub': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'set-default': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
alias: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
'no-prompt': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
17
|
};
|
|
19
18
|
private flags;
|
|
20
19
|
run(): Promise<AuthFields>;
|
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
import { Flags, loglevel } from '@salesforce/sf-plugins-core';
|
|
7
|
+
import { Flags, loglevel, SfCommand } from '@salesforce/sf-plugins-core';
|
|
8
8
|
import { AuthInfo, Messages, matchesAccessToken, SfError, StateAggregator } from '@salesforce/core';
|
|
9
9
|
import { env } from '@salesforce/kit';
|
|
10
|
-
import { AuthBaseCommand } from '../../../authBaseCommand.js';
|
|
11
10
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
11
|
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'accesstoken.store');
|
|
13
12
|
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
|
|
14
13
|
const ACCESS_TOKEN_FORMAT = '"<org id>!<accesstoken>"';
|
|
15
|
-
export default class LoginAccessToken extends
|
|
14
|
+
export default class LoginAccessToken extends SfCommand {
|
|
16
15
|
static summary = messages.getMessage('summary');
|
|
17
16
|
static description = messages.getMessage('description');
|
|
18
17
|
static examples = messages.getMessages('examples');
|
|
@@ -95,13 +94,17 @@ export default class LoginAccessToken extends AuthBaseCommand {
|
|
|
95
94
|
if (!this.flags['no-prompt']) {
|
|
96
95
|
const stateAggregator = await StateAggregator.getInstance();
|
|
97
96
|
if (await stateAggregator.orgs.exists(username)) {
|
|
98
|
-
return this.confirm(messages.getMessage('overwriteAccessTokenAuthUserFile', [username]));
|
|
97
|
+
return this.confirm({ message: messages.getMessage('overwriteAccessTokenAuthUserFile', [username]) });
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
return true;
|
|
102
101
|
}
|
|
103
102
|
async getAccessToken() {
|
|
104
|
-
const accessToken = env.getString('SF_ACCESS_TOKEN') ??
|
|
103
|
+
const accessToken = env.getString('SF_ACCESS_TOKEN') ??
|
|
104
|
+
env.getString('SFDX_ACCESS_TOKEN') ??
|
|
105
|
+
(this.flags['no-prompt'] === true
|
|
106
|
+
? '' // will throw when validating
|
|
107
|
+
: await this.secretPrompt({ message: commonMessages.getMessage('accessTokenStdin') }));
|
|
105
108
|
if (!matchesAccessToken(accessToken)) {
|
|
106
109
|
throw new SfError(messages.getMessage('invalidAccessTokenFormat', [ACCESS_TOKEN_FORMAT]));
|
|
107
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-token.js","sourceRoot":"","sources":["../../../../src/commands/org/login/access-token.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"access-token.js","sourceRoot":"","sources":["../../../../src/commands/org/login/access-token.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAc,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChH,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGtC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,Y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kCAAkC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;YACxG,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,cAAc;QAC1B,MAAM,WAAW,GACf,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC;YAChC,GAAG,CAAC,SAAS,CAAC,mBAAmB,CAAC;YAClC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI;gBAC/B,CAAC,CAAC,EAAE,CAAC,6BAA6B;gBAClC,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC;QAC3F,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAC5F,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { AuthFields } from '@salesforce/core';
|
|
3
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
4
|
import { DeviceCodeResponse } from '@salesforce/core/lib/deviceOauthService.js';
|
|
4
|
-
import { AuthBaseCommand } from '../../../authBaseCommand.js';
|
|
5
5
|
export type DeviceLoginResult = (AuthFields & DeviceCodeResponse) | Record<string, never>;
|
|
6
|
-
export default class LoginDevice extends
|
|
6
|
+
export default class LoginDevice extends SfCommand<DeviceLoginResult> {
|
|
7
7
|
static readonly summary: string;
|
|
8
8
|
static readonly description: string;
|
|
9
9
|
static readonly examples: string[];
|
|
10
|
-
static aliases: string[];
|
|
10
|
+
static readonly aliases: string[];
|
|
11
11
|
static readonly deprecateAliases = true;
|
|
12
12
|
static readonly flags: {
|
|
13
13
|
'client-id': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
@@ -15,7 +15,6 @@ export default class LoginDevice extends AuthBaseCommand<DeviceLoginResult> {
|
|
|
15
15
|
'set-default-dev-hub': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
16
16
|
'set-default': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
17
17
|
alias: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
18
|
-
'disable-masking': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
19
18
|
loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
20
19
|
};
|
|
21
20
|
run(): Promise<DeviceLoginResult>;
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
7
|
import { AuthInfo, DeviceOauthService, Messages } from '@salesforce/core';
|
|
8
|
-
import { Flags, loglevel } from '@salesforce/sf-plugins-core';
|
|
8
|
+
import { Flags, SfCommand, loglevel } from '@salesforce/sf-plugins-core';
|
|
9
9
|
import { ux } from '@oclif/core';
|
|
10
|
-
import
|
|
11
|
-
import { Common } from '../../../common.js';
|
|
10
|
+
import common from '../../../common.js';
|
|
12
11
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
12
|
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'device.login');
|
|
14
13
|
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
|
|
15
|
-
export default class LoginDevice extends
|
|
14
|
+
export default class LoginDevice extends SfCommand {
|
|
16
15
|
static summary = messages.getMessage('summary');
|
|
17
16
|
static description = messages.getMessage('description');
|
|
18
17
|
static examples = messages.getMessages('examples');
|
|
@@ -50,20 +49,14 @@ export default class LoginDevice extends AuthBaseCommand {
|
|
|
50
49
|
deprecateAliases: true,
|
|
51
50
|
aliases: ['setalias'],
|
|
52
51
|
}),
|
|
53
|
-
'disable-masking': Flags.boolean({
|
|
54
|
-
summary: commonMessages.getMessage('flags.disable-masking.summary'),
|
|
55
|
-
hidden: true,
|
|
56
|
-
deprecateAliases: true,
|
|
57
|
-
aliases: ['disablemasking'],
|
|
58
|
-
}),
|
|
59
52
|
loglevel,
|
|
60
53
|
};
|
|
61
54
|
async run() {
|
|
62
55
|
const { flags } = await this.parse(LoginDevice);
|
|
63
|
-
if (await
|
|
56
|
+
if (await common.shouldExitCommand(false))
|
|
64
57
|
return {};
|
|
65
58
|
const oauthConfig = {
|
|
66
|
-
loginUrl: await
|
|
59
|
+
loginUrl: await common.resolveLoginUrl(flags['instance-url']?.href),
|
|
67
60
|
clientId: flags['client-id'],
|
|
68
61
|
};
|
|
69
62
|
const deviceOauthService = await DeviceOauthService.create(oauthConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../src/commands/org/login/device.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAc,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAgB,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../src/commands/org/login/device.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAc,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAgB,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,EAAE,EAAE,EAAE,MAAM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3
4
|
import { Interfaces } from '@oclif/core';
|
|
4
|
-
|
|
5
|
-
export default class LoginJwt extends AuthBaseCommand<AuthFields> {
|
|
5
|
+
export default class LoginJwt extends SfCommand<AuthFields> {
|
|
6
6
|
static readonly summary: string;
|
|
7
7
|
static readonly description: string;
|
|
8
8
|
static readonly examples: string[];
|
|
9
|
-
static aliases: string[];
|
|
9
|
+
static readonly aliases: string[];
|
|
10
10
|
static readonly deprecateAliases = true;
|
|
11
11
|
static readonly flags: {
|
|
12
12
|
username: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
import { Flags, loglevel } from '@salesforce/sf-plugins-core';
|
|
7
|
+
import { Flags, SfCommand, loglevel } from '@salesforce/sf-plugins-core';
|
|
8
8
|
import { AuthInfo, AuthRemover, Logger, Messages } from '@salesforce/core';
|
|
9
|
-
import
|
|
10
|
-
import { Common } from '../../../common.js';
|
|
9
|
+
import common from '../../../common.js';
|
|
11
10
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
11
|
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'jwt.grant');
|
|
13
12
|
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
|
|
14
|
-
export default class LoginJwt extends
|
|
13
|
+
export default class LoginJwt extends SfCommand {
|
|
15
14
|
static summary = messages.getMessage('summary');
|
|
16
15
|
static description = messages.getMessage('description');
|
|
17
16
|
static examples = messages.getMessages('examples');
|
|
@@ -19,6 +18,7 @@ export default class LoginJwt extends AuthBaseCommand {
|
|
|
19
18
|
static deprecateAliases = true;
|
|
20
19
|
static flags = {
|
|
21
20
|
username: Flags.string({
|
|
21
|
+
// eslint-disable-next-line sf-plugin/dash-o
|
|
22
22
|
char: 'o',
|
|
23
23
|
summary: messages.getMessage('flags.username.summary'),
|
|
24
24
|
required: true,
|
|
@@ -80,7 +80,7 @@ export default class LoginJwt extends AuthBaseCommand {
|
|
|
80
80
|
const { flags } = await this.parse(LoginJwt);
|
|
81
81
|
this.flags = flags;
|
|
82
82
|
let result = {};
|
|
83
|
-
if (await
|
|
83
|
+
if (await common.shouldExitCommand(flags['no-prompt']))
|
|
84
84
|
return {};
|
|
85
85
|
try {
|
|
86
86
|
const authInfo = await this.initAuthInfo();
|
|
@@ -107,7 +107,7 @@ export default class LoginJwt extends AuthBaseCommand {
|
|
|
107
107
|
clientId: this.flags['client-id'],
|
|
108
108
|
privateKeyFile: this.flags['jwt-key-file'],
|
|
109
109
|
};
|
|
110
|
-
const loginUrl = await
|
|
110
|
+
const loginUrl = await common.resolveLoginUrl(this.flags['instance-url']?.href);
|
|
111
111
|
const oauth2Options = loginUrl ? Object.assign(oauth2OptionsBase, { loginUrl }) : oauth2OptionsBase;
|
|
112
112
|
let authInfo;
|
|
113
113
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../../../../src/commands/org/login/jwt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../../../../src/commands/org/login/jwt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAc,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAEhG,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAA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
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
1
2
|
import { AuthFields } from '@salesforce/core';
|
|
2
|
-
|
|
3
|
-
export default class LoginSfdxUrl extends AuthBaseCommand<AuthFields> {
|
|
3
|
+
export default class LoginSfdxUrl extends SfCommand<AuthFields> {
|
|
4
4
|
static readonly summary: string;
|
|
5
5
|
static readonly description: string;
|
|
6
6
|
static readonly examples: string[];
|
|
7
|
-
static aliases: string[];
|
|
7
|
+
static readonly aliases: string[];
|
|
8
8
|
static readonly deprecateAliases = true;
|
|
9
9
|
static readonly flags: {
|
|
10
|
-
'sfdx-url-file': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
10
|
+
'sfdx-url-file': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
11
|
+
'sfdx-url-stdin': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
11
12
|
'set-default-dev-hub': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
12
13
|
'set-default': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
13
14
|
alias: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
7
|
import fs from 'node:fs/promises';
|
|
8
|
-
import { Flags, loglevel } from '@salesforce/sf-plugins-core';
|
|
8
|
+
import { Flags, SfCommand, loglevel } from '@salesforce/sf-plugins-core';
|
|
9
9
|
import { AuthInfo, Messages } from '@salesforce/core';
|
|
10
10
|
import { parseJson } from '@salesforce/kit';
|
|
11
|
-
import
|
|
11
|
+
import common from '../../../common.js';
|
|
12
12
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
13
|
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'sfdxurl.store');
|
|
14
14
|
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
|
|
15
15
|
const AUTH_URL_FORMAT = 'force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>';
|
|
16
|
-
export default class LoginSfdxUrl extends
|
|
16
|
+
export default class LoginSfdxUrl extends SfCommand {
|
|
17
17
|
static summary = messages.getMessage('summary');
|
|
18
18
|
static description = messages.getMessage('description', [AUTH_URL_FORMAT]);
|
|
19
19
|
static examples = messages.getMessages('examples');
|
|
@@ -23,9 +23,19 @@ export default class LoginSfdxUrl extends AuthBaseCommand {
|
|
|
23
23
|
'sfdx-url-file': Flags.file({
|
|
24
24
|
char: 'f',
|
|
25
25
|
summary: messages.getMessage('flags.sfdx-url-file.summary'),
|
|
26
|
-
required:
|
|
26
|
+
required: false,
|
|
27
27
|
deprecateAliases: true,
|
|
28
28
|
aliases: ['sfdxurlfile'],
|
|
29
|
+
exactlyOne: ['sfdx-url-file', 'sfdx-url-stdin'],
|
|
30
|
+
}),
|
|
31
|
+
'sfdx-url-stdin': Flags.file({
|
|
32
|
+
char: 'u',
|
|
33
|
+
summary: messages.getMessage('flags.sfdx-url-stdin.summary'),
|
|
34
|
+
required: false,
|
|
35
|
+
deprecateAliases: true,
|
|
36
|
+
aliases: ['sfdxurlstdin'],
|
|
37
|
+
allowStdin: 'only',
|
|
38
|
+
exactlyOne: ['sfdx-url-file', 'sfdx-url-stdin'],
|
|
29
39
|
}),
|
|
30
40
|
'set-default-dev-hub': Flags.boolean({
|
|
31
41
|
char: 'd',
|
|
@@ -57,14 +67,22 @@ export default class LoginSfdxUrl extends AuthBaseCommand {
|
|
|
57
67
|
};
|
|
58
68
|
async run() {
|
|
59
69
|
const { flags } = await this.parse(LoginSfdxUrl);
|
|
60
|
-
if (await
|
|
70
|
+
if (await common.shouldExitCommand(flags['no-prompt']))
|
|
61
71
|
return {};
|
|
62
72
|
const authFile = flags['sfdx-url-file'];
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
const authStdin = flags['sfdx-url-stdin'];
|
|
74
|
+
let sfdxAuthUrl;
|
|
75
|
+
if (authFile) {
|
|
76
|
+
sfdxAuthUrl = authFile.endsWith('.json') ? await getUrlFromJson(authFile) : await fs.readFile(authFile, 'utf8');
|
|
77
|
+
if (!sfdxAuthUrl) {
|
|
78
|
+
throw new Error(`Error getting the auth URL from file ${authFile}. Please ensure it meets the description shown in the documentation for this command.`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else if (authStdin) {
|
|
82
|
+
sfdxAuthUrl = authStdin;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
throw new Error('SFDX Auth URL not found.');
|
|
68
86
|
}
|
|
69
87
|
const oauth2Options = AuthInfo.parseSfdxAuthUrl(sfdxAuthUrl);
|
|
70
88
|
const authInfo = await AuthInfo.create({ oauth2Options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sfdx-url.js","sourceRoot":"","sources":["../../../../src/commands/org/login/sfdx-url.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sfdx-url.js","sourceRoot":"","sources":["../../../../src/commands/org/login/sfdx-url.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAc,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAElE,OAAO,EAAE,SAA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CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACzG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;;AAGH,MAAM,cAAc,GAAG,KAAK,EAAE,QAAgB,EAAmB,EAAE;IACjE,MAAM,YAAY,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,CAAa,CAAC;IACzD,OAAO,YAAY,CAAC,MAAM,EAAE,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC;AACtE,CAAC,CAAC"}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
3
|
import { AuthFields } from '@salesforce/core';
|
|
3
|
-
|
|
4
|
-
import { AuthBaseCommand } from '../../../authBaseCommand.js';
|
|
5
|
-
export default class LoginWeb extends AuthBaseCommand<AuthFields> {
|
|
4
|
+
export default class LoginWeb extends SfCommand<AuthFields> {
|
|
6
5
|
static readonly summary: string;
|
|
7
6
|
static readonly description: string;
|
|
8
7
|
static readonly examples: string[];
|
|
9
8
|
static readonly deprecateAliases = true;
|
|
10
9
|
static readonly aliases: string[];
|
|
11
10
|
static readonly flags: {
|
|
12
|
-
browser:
|
|
13
|
-
'client-id':
|
|
14
|
-
'instance-url':
|
|
15
|
-
'set-default-dev-hub':
|
|
16
|
-
'set-default':
|
|
17
|
-
alias:
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
loglevel: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
11
|
+
browser: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
12
|
+
'client-id': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
13
|
+
'instance-url': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("url").URL | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
14
|
+
'set-default-dev-hub': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
15
|
+
'set-default': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
16
|
+
alias: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
17
|
+
'no-prompt': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
18
|
+
loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
21
19
|
};
|
|
22
|
-
private flags;
|
|
23
20
|
run(): Promise<AuthFields>;
|
|
24
21
|
private executeLoginFlow;
|
|
25
22
|
}
|