@salesforce/core 3.33.4 → 3.33.6
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/lib/org/org.d.ts +1 -0
- package/lib/org/org.js +13 -2
- package/messages/org.md +4 -0
- package/package.json +4 -4
package/lib/org/org.d.ts
CHANGED
package/lib/org/org.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/* eslint-disable class-methods-use-this */
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.Org = exports.SandboxEvents = exports.OrgTypes = void 0;
|
|
10
|
+
exports.Org = exports.sandboxIsResumable = exports.SandboxEvents = exports.OrgTypes = void 0;
|
|
11
11
|
const path_1 = require("path");
|
|
12
12
|
const fs = require("fs");
|
|
13
13
|
const kit_1 = require("@salesforce/kit");
|
|
@@ -28,7 +28,7 @@ const connection_1 = require("./connection");
|
|
|
28
28
|
const authInfo_1 = require("./authInfo");
|
|
29
29
|
const scratchOrgCreate_1 = require("./scratchOrgCreate");
|
|
30
30
|
const orgConfigProperties_1 = require("./orgConfigProperties");
|
|
31
|
-
const messages = new messages_1.Messages('@salesforce/core', 'org', new Map([["notADevHub", "The provided dev hub username %s is not a valid dev hub."], ["noUsernameFound", "No username found."], ["noDevHubFound", "Unable to associate this scratch org with a DevHub."], ["deleteOrgHubError", "The Dev Hub org cannot be deleted."], ["insufficientAccessToDelete", "You do not have the appropriate permissions to delete a scratch org. Please contact your Salesforce admin."], ["scratchOrgNotFound", "Attempting to delete an expired or deleted org"], ["sandboxDeleteFailed", "The sandbox org deletion failed with a result of %s."], ["sandboxNotFound", "We can't find a SandboxProcess for the sandbox %s."], ["sandboxInfoCreateFailed", "The sandbox org creation failed with a result of %s."], ["missingAuthUsername", "The sandbox %s does not have an authorized username."], ["orgPollingTimeout", "Sandbox status is %s; timed out waiting for completion."], ["NotFoundOnDevHub", "The scratch org does not belong to the dev hub username %s."], ["AuthInfoOrgIdUndefined", "AuthInfo orgId is undefined."], ["sandboxCreateNotComplete", "The sandbox creation has not completed."], ["SandboxProcessNotFoundBySandboxName", "We can't find a SandboxProcess with the SandboxName %s."], ["MultiSandboxProcessNotFoundBySandboxName", "We found more than one SandboxProcess with the SandboxName %s."]]));
|
|
31
|
+
const messages = new messages_1.Messages('@salesforce/core', 'org', new Map([["notADevHub", "The provided dev hub username %s is not a valid dev hub."], ["noUsernameFound", "No username found."], ["noDevHubFound", "Unable to associate this scratch org with a DevHub."], ["deleteOrgHubError", "The Dev Hub org cannot be deleted."], ["insufficientAccessToDelete", "You do not have the appropriate permissions to delete a scratch org. Please contact your Salesforce admin."], ["scratchOrgNotFound", "Attempting to delete an expired or deleted org"], ["sandboxDeleteFailed", "The sandbox org deletion failed with a result of %s."], ["sandboxNotFound", "We can't find a SandboxProcess for the sandbox %s."], ["sandboxInfoCreateFailed", "The sandbox org creation failed with a result of %s."], ["missingAuthUsername", "The sandbox %s does not have an authorized username."], ["orgPollingTimeout", "Sandbox status is %s; timed out waiting for completion."], ["NotFoundOnDevHub", "The scratch org does not belong to the dev hub username %s."], ["AuthInfoOrgIdUndefined", "AuthInfo orgId is undefined."], ["sandboxCreateNotComplete", "The sandbox creation has not completed."], ["SandboxProcessNotFoundBySandboxName", "We can't find a SandboxProcess with the SandboxName %s."], ["MultiSandboxProcessNotFoundBySandboxName", "We found more than one SandboxProcess with the SandboxName %s."], ["sandboxNotResumable", "The sandbox %s cannot resume with status of %s."]]));
|
|
32
32
|
var OrgTypes;
|
|
33
33
|
(function (OrgTypes) {
|
|
34
34
|
OrgTypes["Scratch"] = "scratch";
|
|
@@ -42,6 +42,11 @@ var SandboxEvents;
|
|
|
42
42
|
SandboxEvents["EVENT_AUTH"] = "auth";
|
|
43
43
|
SandboxEvents["EVENT_RESUME"] = "resume";
|
|
44
44
|
})(SandboxEvents = exports.SandboxEvents || (exports.SandboxEvents = {}));
|
|
45
|
+
const resumableSandboxStatus = ['Activating', 'Pending', 'Pending Activation', 'Processing', 'Sampling'];
|
|
46
|
+
function sandboxIsResumable(value) {
|
|
47
|
+
return resumableSandboxStatus.includes(value);
|
|
48
|
+
}
|
|
49
|
+
exports.sandboxIsResumable = sandboxIsResumable;
|
|
45
50
|
/**
|
|
46
51
|
* Provides a way to manage a locally authenticated Org.
|
|
47
52
|
*
|
|
@@ -173,6 +178,12 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
173
178
|
await lifecycleEvents_1.Lifecycle.getInstance().emit(SandboxEvents.EVENT_ASYNC_RESULT, sandboxCreationProgress);
|
|
174
179
|
throw messages.createError('sandboxCreateNotComplete');
|
|
175
180
|
}
|
|
181
|
+
if (!sandboxIsResumable(sandboxCreationProgress.Status)) {
|
|
182
|
+
throw messages.createError('sandboxNotResumable', [
|
|
183
|
+
sandboxCreationProgress.SandboxName,
|
|
184
|
+
sandboxCreationProgress.Status,
|
|
185
|
+
]);
|
|
186
|
+
}
|
|
176
187
|
this.logger.debug(`resume - pollStatusAndAuth sandboxProcessObj ${JSON.stringify(sandboxCreationProgress, undefined, 2)}, max wait time of ${wait.minutes} minutes`);
|
|
177
188
|
return this.pollStatusAndAuth({
|
|
178
189
|
sandboxProcessObj: sandboxCreationProgress,
|
package/messages/org.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "3.33.
|
|
3
|
+
"version": "3.33.6",
|
|
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",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@salesforce/bunyan": "^2.0.0",
|
|
40
40
|
"@salesforce/kit": "^1.9.0",
|
|
41
|
-
"@salesforce/schemas": "^1.
|
|
41
|
+
"@salesforce/schemas": "^1.5.0",
|
|
42
42
|
"@salesforce/ts-types": "^1.7.2",
|
|
43
43
|
"@types/graceful-fs": "^4.1.6",
|
|
44
44
|
"@types/semver": "^7.3.13",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"@types/jsonwebtoken": "8.5.9",
|
|
67
67
|
"@types/lodash": "^4.14.191",
|
|
68
68
|
"@types/shelljs": "0.8.11",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
70
|
-
"@typescript-eslint/parser": "^5.
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
|
70
|
+
"@typescript-eslint/parser": "^5.53.0",
|
|
71
71
|
"chai": "^4.3.7",
|
|
72
72
|
"chai-string": "^1.5.0",
|
|
73
73
|
"commitizen": "^3.1.2",
|