@salesforce/core 2.36.0 → 2.36.1
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 +6 -0
- package/lib/util/sfdcUrl.d.ts +1 -1
- package/lib/util/sfdcUrl.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.36.1](https://github.com/forcedotcom/sfdx-core/compare/v2.36.0...v2.36.1) (2022-04-14)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- sandbox cname recognition ([#555](https://github.com/forcedotcom/sfdx-core/issues/555)) ([105bc9a](https://github.com/forcedotcom/sfdx-core/commit/105bc9a043b3c984846e060e5176b290fe49b5bc))
|
|
10
|
+
|
|
5
11
|
## [2.36.0](https://github.com/forcedotcom/sfdx-core/compare/v2.35.3...v2.36.0) (2022-03-23)
|
|
6
12
|
|
|
7
13
|
### Features
|
package/lib/util/sfdcUrl.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export declare class SfdcUrl extends URL {
|
|
|
62
62
|
isSandboxUrl(createdOrgInstance?: string): boolean;
|
|
63
63
|
/**
|
|
64
64
|
* Tests whether this url is a sandbox url
|
|
65
|
-
* otherwise
|
|
65
|
+
* otherwise tries to resolve dns cnames and then look if any is sandbox url
|
|
66
66
|
*
|
|
67
67
|
* @param createdOrgInstance The Salesforce instance the org was created on. e.g. `cs42`
|
|
68
68
|
* @returns {Promise<boolean>} true if this domain resolves to sanbox url
|
package/lib/util/sfdcUrl.js
CHANGED
|
@@ -156,13 +156,15 @@ class SfdcUrl extends url_1.URL {
|
|
|
156
156
|
this.origin.endsWith('sandbox.my.salesforce.mil') ||
|
|
157
157
|
/sandbox\.my\.salesforce\.com/gi.test(this.origin) || // enhanced domains >= 230
|
|
158
158
|
/(cs[0-9]+(\.my|)\.salesforce\.com)/gi.test(this.origin) || // my domains on CS instance OR CS instance without my domain
|
|
159
|
+
/(cs[0-9]+\.force\.com)/gi.test(this.origin) || // sandboxes have cnames like cs123.force.com
|
|
160
|
+
/(\w+--\w+\.my\.salesforce\.com)/gi.test(this.origin) || // sandboxes myDomain like foo--bar.my.salesforce.com
|
|
159
161
|
/([a-z]{3}[0-9]+s\.sfdc-.+\.salesforce\.com)/gi.test(this.origin) || // falcon sandbox ex: usa2s.sfdc-whatever.salesforce.com
|
|
160
162
|
/([a-z]{3}[0-9]+s\.sfdc-.+\.force\.com)/gi.test(this.origin) || // falcon sandbox ex: usa2s.sfdc-whatever.force.com
|
|
161
163
|
this.hostname === 'test.salesforce.com');
|
|
162
164
|
}
|
|
163
165
|
/**
|
|
164
166
|
* Tests whether this url is a sandbox url
|
|
165
|
-
* otherwise
|
|
167
|
+
* otherwise tries to resolve dns cnames and then look if any is sandbox url
|
|
166
168
|
*
|
|
167
169
|
* @param createdOrgInstance The Salesforce instance the org was created on. e.g. `cs42`
|
|
168
170
|
* @returns {Promise<boolean>} true if this domain resolves to sanbox url
|