@salesforce/core 6.2.0 → 6.2.2-qa.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/lib/org/org.d.ts +1 -1
- package/lib/org/org.js +4 -8
- package/lib/org/scratchOrgInfoApi.js +5 -1
- package/package.json +2 -2
package/lib/org/org.d.ts
CHANGED
|
@@ -546,7 +546,7 @@ export declare namespace Org {
|
|
|
546
546
|
*/
|
|
547
547
|
IS_SCRATCH = "isScratch",
|
|
548
548
|
/**
|
|
549
|
-
* Is the current org a
|
|
549
|
+
* Is the current org a sandbox (not a scratch org on a non-prod instance), but an actual Sandbox org). e.g. Organization has IsSandbox == true and TrialExpirationDate == null.
|
|
550
550
|
*/
|
|
551
551
|
IS_SANDBOX = "isSandbox",
|
|
552
552
|
/**
|
package/lib/org/org.js
CHANGED
|
@@ -485,7 +485,7 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
485
485
|
*/
|
|
486
486
|
async determineIfScratch() {
|
|
487
487
|
let cache = this.getField(Org.Fields.IS_SCRATCH);
|
|
488
|
-
if (
|
|
488
|
+
if (cache === undefined) {
|
|
489
489
|
await this.updateLocalInformation();
|
|
490
490
|
cache = this.getField(Org.Fields.IS_SCRATCH);
|
|
491
491
|
}
|
|
@@ -500,7 +500,7 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
500
500
|
*/
|
|
501
501
|
async determineIfSandbox() {
|
|
502
502
|
let cache = this.getField(Org.Fields.IS_SANDBOX);
|
|
503
|
-
if (
|
|
503
|
+
if (cache === undefined) {
|
|
504
504
|
await this.updateLocalInformation();
|
|
505
505
|
cache = this.getField(Org.Fields.IS_SANDBOX);
|
|
506
506
|
}
|
|
@@ -698,11 +698,7 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
698
698
|
* Returns a map of requested fields.
|
|
699
699
|
*/
|
|
700
700
|
getFields(keys) {
|
|
701
|
-
|
|
702
|
-
return keys.reduce((map, key) => {
|
|
703
|
-
map[key] = this.getField(key);
|
|
704
|
-
return map;
|
|
705
|
-
}, json);
|
|
701
|
+
return Object.fromEntries(keys.map((key) => [key, this.getField(key)]));
|
|
706
702
|
}
|
|
707
703
|
/**
|
|
708
704
|
* Returns the JSForce connection for the org.
|
|
@@ -1294,7 +1290,7 @@ exports.Org = Org;
|
|
|
1294
1290
|
*/
|
|
1295
1291
|
Fields["IS_SCRATCH"] = "isScratch";
|
|
1296
1292
|
/**
|
|
1297
|
-
* Is the current org a
|
|
1293
|
+
* Is the current org a sandbox (not a scratch org on a non-prod instance), but an actual Sandbox org). e.g. Organization has IsSandbox == true and TrialExpirationDate == null.
|
|
1298
1294
|
*/
|
|
1299
1295
|
Fields["IS_SANDBOX"] = "isSandbox";
|
|
1300
1296
|
/**
|
|
@@ -181,7 +181,11 @@ const authorizeScratchOrg = async (options) => {
|
|
|
181
181
|
clientId: scratchOrgInfoComplete.ConnectedAppConsumerKey,
|
|
182
182
|
createdOrgInstance: scratchOrgInfoComplete.SignupInstance,
|
|
183
183
|
isDevHub: false,
|
|
184
|
-
|
|
184
|
+
isScratch: true,
|
|
185
|
+
isSandbox: false,
|
|
186
|
+
// omit optional fields unless they are present
|
|
187
|
+
...(scratchOrgInfoComplete.Namespace ? { namespacePrefix: scratchOrgInfoComplete.Namespace } : {}),
|
|
188
|
+
...(scratchOrgInfoComplete.Snapshot ? { snapshot: scratchOrgInfoComplete.Snapshot } : {}),
|
|
185
189
|
});
|
|
186
190
|
return authInfo;
|
|
187
191
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "6.2.0",
|
|
3
|
+
"version": "6.2.2-qa.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",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@salesforce/kit": "^3.0.15",
|
|
42
42
|
"@salesforce/schemas": "^1.6.1",
|
|
43
43
|
"@salesforce/ts-types": "^2.0.9",
|
|
44
|
-
"@types/semver": "^7.5.
|
|
44
|
+
"@types/semver": "^7.5.6",
|
|
45
45
|
"ajv": "^8.12.0",
|
|
46
46
|
"change-case": "^4.1.2",
|
|
47
47
|
"faye": "^1.4.0",
|