@salesforce/core 3.19.0 → 3.19.3
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/CHANGELOG.md +14 -0
- package/README.md +6 -18
- package/lib/config/aliasesConfig.d.ts +12 -0
- package/lib/config/aliasesConfig.js +27 -0
- package/lib/config/authInfoConfig.d.ts +19 -0
- package/lib/config/authInfoConfig.js +35 -0
- package/lib/config/configAggregator.d.ts +7 -5
- package/lib/config/configAggregator.js +25 -9
- package/lib/config/configFile.js +2 -2
- package/lib/config/configGroup.d.ts +141 -0
- package/lib/config/configGroup.js +224 -0
- package/lib/config/configStore.d.ts +2 -2
- package/lib/config/configStore.js +1 -2
- package/lib/config/envVars.d.ts +2 -3
- package/lib/config/envVars.js +8 -13
- package/lib/config/tokensConfig.d.ts +10 -0
- package/lib/config/tokensConfig.js +28 -0
- package/lib/crypto/keyChainImpl.js +1 -1
- package/lib/exported.d.ts +1 -1
- package/lib/exported.js +6 -5
- package/lib/global.d.ts +8 -0
- package/lib/global.js +10 -0
- package/lib/org/authInfo.d.ts +3 -2
- package/lib/org/authInfo.js +55 -37
- package/lib/org/authRemover.d.ts +6 -5
- package/lib/org/authRemover.js +22 -16
- package/lib/org/connection.js +3 -2
- package/lib/org/org.d.ts +12 -4
- package/lib/org/org.js +28 -26
- package/lib/org/scratchOrgCreate.js +5 -8
- package/lib/{globalInfo → stateAggregator}/accessors/aliasAccessor.d.ts +79 -1
- package/lib/{globalInfo → stateAggregator}/accessors/aliasAccessor.js +119 -2
- package/lib/stateAggregator/accessors/orgAccessor.d.ts +50 -0
- package/lib/stateAggregator/accessors/orgAccessor.js +197 -0
- package/lib/{globalInfo → stateAggregator}/accessors/sandboxAccessor.d.ts +12 -1
- package/lib/{globalInfo → stateAggregator}/accessors/sandboxAccessor.js +22 -2
- package/lib/stateAggregator/accessors/tokenAccessor.d.ts +28 -0
- package/lib/{globalInfo → stateAggregator}/accessors/tokenAccessor.js +34 -2
- package/lib/{globalInfo → stateAggregator}/globalInfoConfig.d.ts +11 -8
- package/lib/{globalInfo → stateAggregator}/globalInfoConfig.js +7 -4
- package/lib/stateAggregator/index.d.ts +7 -0
- package/lib/{globalInfo → stateAggregator}/index.js +5 -1
- package/lib/{globalInfo → stateAggregator}/sfdxDataHandler.d.ts +7 -1
- package/lib/{globalInfo → stateAggregator}/sfdxDataHandler.js +25 -2
- package/lib/stateAggregator/stateAggregator.d.ts +20 -0
- package/lib/stateAggregator/stateAggregator.js +38 -0
- package/lib/{globalInfo → stateAggregator}/types.d.ts +25 -10
- package/lib/{globalInfo → stateAggregator}/types.js +3 -0
- package/lib/testSetup.d.ts +30 -6
- package/lib/testSetup.js +79 -11
- package/lib/util/sfdcUrl.d.ts +3 -9
- package/lib/util/sfdcUrl.js +29 -28
- package/messages/core.md +10 -0
- package/messages/scratchOrgCreate.md +0 -4
- package/messages/scratchOrgInfoApi.md +4 -0
- package/package.json +4 -4
- package/lib/globalInfo/accessors/orgAccessor.d.ts +0 -13
- package/lib/globalInfo/accessors/orgAccessor.js +0 -45
- package/lib/globalInfo/accessors/tokenAccessor.d.ts +0 -13
- package/lib/globalInfo/index.d.ts +0 -6
package/messages/core.md
CHANGED
|
@@ -24,6 +24,12 @@ Due to: %s
|
|
|
24
24
|
|
|
25
25
|
Error authenticating with JWT config due to: %s
|
|
26
26
|
|
|
27
|
+
# jwtAuthErrors
|
|
28
|
+
|
|
29
|
+
Error authenticating with JWT.
|
|
30
|
+
Errors encountered:
|
|
31
|
+
%s
|
|
32
|
+
|
|
27
33
|
# refreshTokenAuthError
|
|
28
34
|
|
|
29
35
|
Error authenticating with the refresh token due to: %s
|
|
@@ -55,3 +61,7 @@ Setting aliases must be in the format <key>=<value> but found: [%s].
|
|
|
55
61
|
|
|
56
62
|
All JSON input must have heads down camelcase keys. E.g., `{ sfdcLoginUrl: "https://login.salesforce.com" }`
|
|
57
63
|
Found "%s" at %s
|
|
64
|
+
|
|
65
|
+
# missingClientId
|
|
66
|
+
|
|
67
|
+
Client ID is required for JWT authentication.
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Org snapshots don’t support one or more options you specified: %s.
|
|
4
4
|
|
|
5
|
-
# SourceStatusResetFailureError
|
|
6
|
-
|
|
7
|
-
Successfully created org with ID: %s and name: %s. Unfortunately, source tracking isn’t working as expected. If you run force:source:status, the results may be incorrect. Try again by creating another scratch org.
|
|
8
|
-
|
|
9
5
|
# DurationDaysValidationMinError
|
|
10
6
|
|
|
11
7
|
Expected 'durationDays' greater than or equal to %s but received %s.
|
|
@@ -9,3 +9,7 @@ You cannot use 'settings' and `'orgPreferences' in your scratch definition file,
|
|
|
9
9
|
# DeprecatedPrefFormat
|
|
10
10
|
|
|
11
11
|
We've deprecated OrgPreferences. Update the scratch org definition file to replace OrgPreferences with their corresponding settings.
|
|
12
|
+
|
|
13
|
+
# SourceStatusResetFailureError
|
|
14
|
+
|
|
15
|
+
Successfully created org with ID: %s and name: %s. Unfortunately, source tracking isn’t working as expected. If you run force:source:status, the results may be incorrect. Try again by creating another scratch org.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.3",
|
|
4
4
|
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"@typescript-eslint/parser": "4.33.0",
|
|
69
69
|
"chai": "^4.3.4",
|
|
70
70
|
"commitizen": "^3.1.2",
|
|
71
|
-
"eslint": "^
|
|
71
|
+
"eslint": "^7.27.0",
|
|
72
72
|
"eslint-config-prettier": "^6.15.0",
|
|
73
73
|
"eslint-config-salesforce": "^0.1.6",
|
|
74
74
|
"eslint-config-salesforce-license": "^0.1.6",
|
|
75
75
|
"eslint-config-salesforce-typescript": "^0.2.8",
|
|
76
|
-
"eslint-plugin-header": "
|
|
76
|
+
"eslint-plugin-header": "3.0.0",
|
|
77
77
|
"eslint-plugin-import": "^2.25.4",
|
|
78
|
-
"eslint-plugin-jsdoc": "^
|
|
78
|
+
"eslint-plugin-jsdoc": "^35.1.2",
|
|
79
79
|
"eslint-plugin-prettier": "^3.1.3",
|
|
80
80
|
"husky": "^7.0.4",
|
|
81
81
|
"mocha": "^9.1.3",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Optional } from '@salesforce/ts-types';
|
|
2
|
-
import { GlobalInfo } from '../globalInfoConfig';
|
|
3
|
-
import { SfOrgs, SfOrg } from '../types';
|
|
4
|
-
export declare class OrgAccessor {
|
|
5
|
-
private globalInfo;
|
|
6
|
-
constructor(globalInfo: GlobalInfo);
|
|
7
|
-
getAll(decrypt?: boolean): SfOrgs;
|
|
8
|
-
get(username: string, decrypt?: boolean): Optional<SfOrg>;
|
|
9
|
-
has(username: string): boolean;
|
|
10
|
-
set(username: string, org: SfOrg): void;
|
|
11
|
-
update(username: string, org: Partial<SfOrg>): void;
|
|
12
|
-
unset(username: string): void;
|
|
13
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.OrgAccessor = void 0;
|
|
10
|
-
const types_1 = require("../types");
|
|
11
|
-
class OrgAccessor {
|
|
12
|
-
constructor(globalInfo) {
|
|
13
|
-
this.globalInfo = globalInfo;
|
|
14
|
-
}
|
|
15
|
-
getAll(decrypt = false) {
|
|
16
|
-
return this.globalInfo.get(types_1.SfInfoKeys.ORGS, decrypt);
|
|
17
|
-
}
|
|
18
|
-
get(username, decrypt = false) {
|
|
19
|
-
const auth = this.globalInfo.get(`${types_1.SfInfoKeys.ORGS}["${username}"]`, decrypt);
|
|
20
|
-
// For legacy, some things wants the username in the returned auth info.
|
|
21
|
-
if (auth && !auth.username)
|
|
22
|
-
auth.username = username;
|
|
23
|
-
return auth;
|
|
24
|
-
}
|
|
25
|
-
has(username) {
|
|
26
|
-
return !!this.getAll()[username];
|
|
27
|
-
}
|
|
28
|
-
set(username, org) {
|
|
29
|
-
// For legacy, and to keep things standard, some things wants the username in auth info.
|
|
30
|
-
if (!org.username)
|
|
31
|
-
org.username = username;
|
|
32
|
-
this.globalInfo.set(`${types_1.SfInfoKeys.ORGS}["${username}"]`, org);
|
|
33
|
-
}
|
|
34
|
-
update(username, org) {
|
|
35
|
-
// For legacy, and to keep things standard, some things wants the username in auth info.
|
|
36
|
-
if (!org.username)
|
|
37
|
-
org.username = username;
|
|
38
|
-
this.globalInfo.update(`${types_1.SfInfoKeys.ORGS}["${username}"]`, org);
|
|
39
|
-
}
|
|
40
|
-
unset(username) {
|
|
41
|
-
delete this.globalInfo.get(types_1.SfInfoKeys.ORGS)[username];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.OrgAccessor = OrgAccessor;
|
|
45
|
-
//# sourceMappingURL=orgAccessor.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Optional } from '@salesforce/ts-types';
|
|
2
|
-
import { GlobalInfo } from '../globalInfoConfig';
|
|
3
|
-
import { SfTokens, SfToken, Timestamp } from '../types';
|
|
4
|
-
export declare class TokenAccessor {
|
|
5
|
-
private globalInfo;
|
|
6
|
-
constructor(globalInfo: GlobalInfo);
|
|
7
|
-
getAll(decrypt?: boolean): SfTokens;
|
|
8
|
-
get(name: string, decrypt?: boolean): Optional<SfToken & Timestamp>;
|
|
9
|
-
has(name: string): boolean;
|
|
10
|
-
set(name: string, token: SfToken): void;
|
|
11
|
-
update(name: string, token: Partial<SfToken>): void;
|
|
12
|
-
unset(name: string): void;
|
|
13
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './globalInfoConfig';
|
|
2
|
-
export * from './sfdxDataHandler';
|
|
3
|
-
export * from './types';
|
|
4
|
-
export { OrgAccessor } from './accessors/orgAccessor';
|
|
5
|
-
export { AliasAccessor } from './accessors/aliasAccessor';
|
|
6
|
-
export { TokenAccessor } from './accessors/tokenAccessor';
|