@salesforce/core 6.7.1 → 6.7.2
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.
|
@@ -111,4 +111,4 @@ var scratchOrgCache_1 = require("./org/scratchOrgCache");
|
|
|
111
111
|
Object.defineProperty(exports, "ScratchOrgCache", { enumerable: true, get: function () { return scratchOrgCache_1.ScratchOrgCache; } });
|
|
112
112
|
// Utility sub-modules
|
|
113
113
|
__exportStar(require("./util/sfdc"), exports);
|
|
114
|
-
//# sourceMappingURL=
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -10,6 +10,7 @@ const node_url_1 = require("node:url");
|
|
|
10
10
|
const kit_1 = require("@salesforce/kit");
|
|
11
11
|
const myDomainResolver_1 = require("../status/myDomainResolver");
|
|
12
12
|
const sfdcUrl_1 = require("./sfdcUrl");
|
|
13
|
+
/** @deprecated. Use sfdcUrl.checkLightningdomain */
|
|
13
14
|
async function checkLightningDomain(url) {
|
|
14
15
|
const domain = `https://${/https?:\/\/([^.]*)/.exec(url)?.slice(1, 2).pop()}.lightning.force.com`;
|
|
15
16
|
const quantity = new kit_1.Env().getNumber('SFDX_DOMAIN_RETRY', 240) ?? 0;
|
package/lib/util/sfdcUrl.js
CHANGED
|
@@ -90,6 +90,7 @@ class SfdcUrl extends node_url_1.URL {
|
|
|
90
90
|
'.salesforceliveagent.com',
|
|
91
91
|
'.secure.force.com',
|
|
92
92
|
'crmforce.mil',
|
|
93
|
+
'.sfcrmproducts.cn',
|
|
93
94
|
];
|
|
94
95
|
const allowlistOfSalesforceHosts = ['developer.salesforce.com', 'trailhead.salesforce.com'];
|
|
95
96
|
return allowlistOfSalesforceDomainPatterns.some((pattern) => this.hostname.endsWith(pattern) || allowlistOfSalesforceHosts.includes(this.hostname));
|
|
@@ -135,6 +136,10 @@ class SfdcUrl extends node_url_1.URL {
|
|
|
135
136
|
if (this.origin.endsWith('.my-salesforce.com')) {
|
|
136
137
|
return this.origin.replace('.my-salesforce.com', '.my-lightning.com');
|
|
137
138
|
}
|
|
139
|
+
// CN Specific domains for Alibaba Cloud
|
|
140
|
+
if (this.origin.endsWith('.my.sfcrmproducts.cn')) {
|
|
141
|
+
return this.origin.replace('.my.sfcrmproducts.cn', '.lightning.sfcrmapps.cn');
|
|
142
|
+
}
|
|
138
143
|
// all non-mil domains
|
|
139
144
|
return `https://${(0, ts_types_1.ensureArray)(/https?:\/\/([^.]*)/.exec(this.origin))
|
|
140
145
|
.slice(1, 2)
|
|
@@ -185,7 +190,7 @@ class SfdcUrl extends node_url_1.URL {
|
|
|
185
190
|
* @returns {boolean} true if this domain is a lightning domain
|
|
186
191
|
*/
|
|
187
192
|
isLightningDomain() {
|
|
188
|
-
return this.origin.includes('.lightning.force.com') || this.origin.includes('.lightning.crmforce.mil');
|
|
193
|
+
return this.origin.includes('.lightning.force.com') || this.origin.includes('.lightning.crmforce.mil') || this.origin.includes('.lightning.sfcrmapps.cn');
|
|
189
194
|
}
|
|
190
195
|
}
|
|
191
196
|
exports.SfdcUrl = SfdcUrl;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "6.7.
|
|
3
|
+
"version": "6.7.2",
|
|
4
4
|
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
|
5
|
-
"main": "lib/
|
|
6
|
-
"types": "lib/
|
|
5
|
+
"main": "lib/index",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=18.0.0"
|
|
File without changes
|