Skip to content

Commit

Permalink
fix: add another internal test env domain
Browse files Browse the repository at this point in the history
@W-9130535@
  • Loading branch information
peternhale committed Apr 13, 2021
1 parent 6a586b8 commit 6ea538f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"@salesforce/bunyan": "^2.0.0",
"@salesforce/kit": "^1.4.3",
"@salesforce/kit": "^1.5.0",
"@salesforce/schemas": "^1.0.1",
"@salesforce/ts-types": "^1.0.0",
"@types/graceful-fs": "^4.1.3",
Expand Down
2 changes: 2 additions & 0 deletions src/util/sfdc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export const sfdc = {
'stm.force.com',
'.blitz.salesforce.com',
'.stm.salesforce.ms',
'.pc-rnd.force.com',
'.pc-rnd.salesforce.com',
];
return (
url.startsWith('https://gs1.') || sfdc.isLocalUrl(url) || INTERNAL_URL_PARTS.some((part) => url.includes(part))
Expand Down
6 changes: 6 additions & 0 deletions test/unit/util/sfdcTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ describe('util/sfdc', () => {
expect(sfdc.isInternalUrl('https://inttestdevhub02-dev-ed.lightning.stmfa.stm.force.com/')).to.equal(true);
expect(sfdc.isLocalUrl('https://inttestdevhub02-dev-ed.lightning.stmfa.stm.force.com/')).to.equal(false);
});
it('pc.rnd is internal but not local', () => {
expect(sfdc.isInternalUrl('https://alm-cidevhubora3test1core4.test1.lightning.pc-rnd.force.com/')).to.equal(true);
expect(sfdc.isLocalUrl('https://alm-cidevhubora3test1core4.test1.lightning.pc-rnd.force.com/')).to.equal(false);
expect(sfdc.isInternalUrl('https://alm-cidevhubora3test1core4.test1.my.pc-rnd.salesforce.com')).to.equal(true);
expect(sfdc.isLocalUrl('https://alm-cidevhubora3test1core4.test1.my.pc-rnd.salesforce.com')).to.equal(false);
});
it('localhost domain is both internal and local, and tolerates local host ports', () => {
expect(sfdc.isInternalUrl('scorpio-ryan-2873-dev-ed.my.localhost.sfdcdev.salesforce.com:6109')).to.equal(true);
expect(sfdc.isLocalUrl('scorpio-ryan-2873-dev-ed.my.localhost.sfdcdev.salesforce.com:6109')).to.equal(true);
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,12 @@
typescript "^3.9.3"
xunit-file "^1.0.0"

"@salesforce/kit@^1.4.3":
version "1.4.3"
resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.4.3.tgz#4d066239868fd79069f2e9ac53e28f37be5e9b96"
integrity sha512-8OuJlEqxTwLtBzX9ur2fiiR9wGx+2k5vi+IQjAXh+5xUJXm9ooWiRwvCsrXsbpgTusHzaG/RYrqcqynJh3RXCA==
"@salesforce/kit@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.5.0.tgz#81ddd712d224bd9007f8bceb32d1fd13ef7aa57f"
integrity sha512-Op7Q6bLfzMccX1fbW3/xiNb94/9a8mTTm+EcxsPPFQOwxRWt12uj2htDYZFUgEvVzBWu8V82Vo+g90NG+pvHXA==
dependencies:
"@salesforce/ts-types" "^1.5.3"
"@salesforce/ts-types" "^1.5.5"
tslib "^1.10.0"

"@salesforce/prettier-config@^0.0.1":
Expand Down Expand Up @@ -427,10 +427,10 @@
dependencies:
tslib "^1.10.0"

"@salesforce/ts-types@^1.5.3":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-1.5.3.tgz#186876adf57c8ef91d9c6f90180bce7215164d97"
integrity sha512-/3bhxY0JSDjA1qaUTLFzDj72OJdtlto+CCsMymo1RUYw6/Bcyc2JcA4KFbPFBMciZxqKMd989TKNGcUbTUBqPQ==
"@salesforce/ts-types@^1.5.5":
version "1.5.5"
resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-1.5.5.tgz#cf6d0fe12a8ba48d79b57f63c54b5592c312e0ba"
integrity sha512-d4YdsA3MBTJcC6ZdqHe2+yv7MWKsoYmgjTlc56SOy8sROrQ9RjJYaUnj1h1Zi1aWGgkGaNCCAOBomcrhMa4crw==
dependencies:
tslib "^1.10.0"

Expand Down

0 comments on commit 6ea538f

Please sign in to comment.