@salesforce/core 3.13.0 → 3.15.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/CHANGELOG.md +18 -0
- package/lib/config/config.d.ts +23 -1
- package/lib/config/config.js +28 -18
- package/lib/config/configAggregator.d.ts +37 -24
- package/lib/config/configAggregator.js +83 -41
- package/lib/config/envVars.js +3 -3
- package/lib/config/sandboxProcessCache.d.ts +15 -0
- package/lib/config/sandboxProcessCache.js +38 -0
- package/lib/exported.d.ts +5 -3
- package/lib/exported.js +8 -2
- package/lib/globalInfo/accessors/sandboxAccessor.d.ts +36 -0
- package/lib/globalInfo/accessors/sandboxAccessor.js +63 -0
- package/lib/globalInfo/globalInfoConfig.d.ts +2 -0
- package/lib/globalInfo/globalInfoConfig.js +5 -0
- package/lib/globalInfo/sfdxDataHandler.d.ts +12 -2
- package/lib/globalInfo/sfdxDataHandler.js +116 -25
- package/lib/globalInfo/types.d.ts +19 -1
- package/lib/globalInfo/types.js +1 -0
- package/lib/org/authInfo.d.ts +2 -1
- package/lib/org/authInfo.js +2 -1
- package/lib/org/connection.js +4 -4
- package/lib/org/org.d.ts +61 -39
- package/lib/org/org.js +261 -159
- package/lib/org/scratchOrgCache.d.ts +19 -0
- package/lib/org/scratchOrgCache.js +33 -0
- package/lib/org/scratchOrgCreate.d.ts +25 -16
- package/lib/org/scratchOrgCreate.js +110 -41
- package/lib/org/scratchOrgErrorCodes.d.ts +8 -2
- package/lib/org/scratchOrgErrorCodes.js +26 -3
- package/lib/org/scratchOrgInfoApi.d.ts +19 -8
- package/lib/org/scratchOrgInfoApi.js +91 -42
- package/lib/org/scratchOrgLifecycleEvents.d.ts +2 -0
- package/lib/org/scratchOrgLifecycleEvents.js +20 -1
- package/lib/org/scratchOrgSettingsGenerator.d.ts +7 -2
- package/lib/org/scratchOrgSettingsGenerator.js +1 -0
- package/lib/sfProject.js +1 -1
- package/lib/status/pollingClient.js +1 -0
- package/lib/testSetup.js +0 -2
- package/messages/org.md +9 -1
- package/messages/scratchOrgCreate.md +20 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonMap } from '@salesforce/ts-types';
|
|
2
|
-
import { ScratchOrgInfo } from './scratchOrgTypes';
|
|
2
|
+
import { ScratchOrgInfo, ObjectSetting } from './scratchOrgTypes';
|
|
3
3
|
import { Org } from './org';
|
|
4
4
|
export declare enum RequestStatus {
|
|
5
5
|
Pending = "Pending",
|
|
@@ -32,7 +32,12 @@ export default class SettingsGenerator {
|
|
|
32
32
|
private shapeDirName;
|
|
33
33
|
constructor();
|
|
34
34
|
/** extract the settings from the scratch def file, if they are present. */
|
|
35
|
-
extract(scratchDef: ScratchOrgInfo): Promise<
|
|
35
|
+
extract(scratchDef: ScratchOrgInfo): Promise<{
|
|
36
|
+
settings: Record<string, unknown> | undefined;
|
|
37
|
+
objectSettings: {
|
|
38
|
+
[objectName: string]: ObjectSetting;
|
|
39
|
+
} | undefined;
|
|
40
|
+
}>;
|
|
36
41
|
/** True if we are currently tracking setting or object setting data. */
|
|
37
42
|
hasSettings(): boolean;
|
|
38
43
|
/** Create temporary deploy directory used to upload the scratch org shape.
|
|
@@ -45,6 +45,7 @@ class SettingsGenerator {
|
|
|
45
45
|
this.settingData = scratchDef.settings;
|
|
46
46
|
this.objectSettingsData = scratchDef.objectSettings;
|
|
47
47
|
this.logger.debug('settings are', this.settingData);
|
|
48
|
+
return { settings: this.settingData, objectSettings: this.objectSettingsData };
|
|
48
49
|
}
|
|
49
50
|
/** True if we are currently tracking setting or object setting data. */
|
|
50
51
|
hasSettings() {
|
package/lib/sfProject.js
CHANGED
|
@@ -537,7 +537,7 @@ class SfProject {
|
|
|
537
537
|
Object.assign(this.projectConfig, configAggregator.getConfig());
|
|
538
538
|
// we don't have a login url yet, so use instanceUrl from config or default
|
|
539
539
|
if (!this.projectConfig.sfdcLoginUrl) {
|
|
540
|
-
this.projectConfig.sfdcLoginUrl = (_a = configAggregator.getConfig()
|
|
540
|
+
this.projectConfig.sfdcLoginUrl = (_a = configAggregator.getConfig()['org-instance-url']) !== null && _a !== void 0 ? _a : sfdcUrl_1.SfdcUrl.PRODUCTION;
|
|
541
541
|
}
|
|
542
542
|
// LEGACY - Allow override of sfdcLoginUrl via env var FORCE_SFDC_LOGIN_URL
|
|
543
543
|
if (process.env.FORCE_SFDC_LOGIN_URL) {
|
|
@@ -87,6 +87,7 @@ class PollingClient extends kit_1.AsyncOptionalCreatable {
|
|
|
87
87
|
if (errorInPollingFunction) {
|
|
88
88
|
throw errorInPollingFunction;
|
|
89
89
|
}
|
|
90
|
+
await lifecycleEvents_1.Lifecycle.getInstance().emit('POLLING_TIME_OUT', error);
|
|
90
91
|
this.logger.debug('Polling timed out');
|
|
91
92
|
throw new sfError_1.SfError('The client has timed out.', (_a = this.options.timeoutErrorName) !== null && _a !== void 0 ? _a : 'PollingClientTimeout');
|
|
92
93
|
}
|
package/lib/testSetup.js
CHANGED
|
@@ -165,8 +165,6 @@ exports.instantiateContext = instantiateContext;
|
|
|
165
165
|
const stubContext = (testContext) => {
|
|
166
166
|
// Turn off the interoperability feature so that we don't have to mock
|
|
167
167
|
// the old .sfdx config files
|
|
168
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
169
|
-
// @ts-ignore
|
|
170
168
|
global_1.Global.SFDX_INTEROPERABILITY = false;
|
|
171
169
|
// Most core files create a child logger so stub this to return our test logger.
|
|
172
170
|
(0, ts_sinon_1.stubMethod)(testContext.SANDBOX, logger_1.Logger, 'child').returns(Promise.resolve(testContext.TEST_LOGGER));
|
package/messages/org.md
CHANGED
|
@@ -28,7 +28,7 @@ The sandbox org deletion failed with a result of %s.
|
|
|
28
28
|
|
|
29
29
|
# sandboxNotFound
|
|
30
30
|
|
|
31
|
-
We can't find a SandboxProcess for the sandbox
|
|
31
|
+
We can't find a SandboxProcess for the sandbox %s.
|
|
32
32
|
|
|
33
33
|
# sandboxInfoCreateFailed
|
|
34
34
|
|
|
@@ -45,3 +45,11 @@ Sandbox status is %s; timed out waiting for completion.
|
|
|
45
45
|
# NotFoundOnDevHub
|
|
46
46
|
|
|
47
47
|
The scratch org does not belong to the dev hub username %s.
|
|
48
|
+
|
|
49
|
+
# AuthInfoOrgIdUndefined
|
|
50
|
+
|
|
51
|
+
AuthInfo orgId is undefined.
|
|
52
|
+
|
|
53
|
+
# sandboxCreateNotComplete
|
|
54
|
+
|
|
55
|
+
The sandbox creation has not completed.
|
|
@@ -25,3 +25,23 @@ Expected 'retry' to be an integer number.
|
|
|
25
25
|
# WaitValidationMaxError
|
|
26
26
|
|
|
27
27
|
Expected 'wait' greater than or equal to %s but received %s.
|
|
28
|
+
|
|
29
|
+
# NoScratchOrgInfoError
|
|
30
|
+
|
|
31
|
+
No ScratchOrgInfo object found in the Dev Hub you specified. Check that the ID and the Dev Hub are correct.
|
|
32
|
+
|
|
33
|
+
# ScratchOrgDeletedError
|
|
34
|
+
|
|
35
|
+
That scratch org has been deleted, so you can't connect to it anymore.
|
|
36
|
+
|
|
37
|
+
# CacheMissError
|
|
38
|
+
|
|
39
|
+
The ScratchOrgInfoId %s was not found in the cache.
|
|
40
|
+
|
|
41
|
+
# StillInProgressError
|
|
42
|
+
|
|
43
|
+
The scratch org is not ready yet (Status = %).
|
|
44
|
+
|
|
45
|
+
# action.StillInProgress
|
|
46
|
+
|
|
47
|
+
Wait for a few minutes, and then try the <%= config.bin %> <%= command.id %> command again
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
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",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@types/mkdirp": "^1.0.2",
|
|
43
43
|
"@types/semver": "^7.3.9",
|
|
44
44
|
"archiver": "^5.3.0",
|
|
45
|
-
"js2xmlparser": "^4.0.1",
|
|
46
45
|
"change-case": "^4.1.2",
|
|
47
46
|
"debug": "^3.2.7",
|
|
48
47
|
"faye": "^1.4.0",
|
|
49
48
|
"form-data": "^4.0.0",
|
|
50
49
|
"graceful-fs": "^4.2.9",
|
|
50
|
+
"js2xmlparser": "^4.0.1",
|
|
51
51
|
"jsen": "0.6.6",
|
|
52
52
|
"jsforce": "2.0.0-beta.7",
|
|
53
53
|
"jsonwebtoken": "8.5.1",
|