@salesforce/core-bundle 8.7.0 → 8.8.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/index.js +7 -10
- package/package.json +1 -1
package/lib/index.js
CHANGED
@@ -12328,7 +12328,7 @@ var require_package2 = __commonJS({
|
|
12328
12328
|
"package.json"(exports2, module2) {
|
12329
12329
|
module2.exports = {
|
12330
12330
|
name: "@salesforce/core-bundle",
|
12331
|
-
version: "8.
|
12331
|
+
version: "8.8.0",
|
12332
12332
|
description: "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
12333
12333
|
main: "lib/index",
|
12334
12334
|
types: "lib/index.d.ts",
|
@@ -108952,7 +108952,7 @@ var require_authInfo = __commonJS({
|
|
108952
108952
|
* @param sfdxAuthUrl
|
108953
108953
|
*/
|
108954
108954
|
static parseSfdxAuthUrl(sfdxAuthUrl) {
|
108955
|
-
const match = sfdxAuthUrl.match(/^force:\/\/([a-zA-Z0-9._-]+={0,2}):([a-zA-Z0-9._-]*={0,2}):([a-zA-Z0-9._-]+={0,2})@([a-zA-Z0-9
|
108955
|
+
const match = sfdxAuthUrl.match(/^force:\/\/([a-zA-Z0-9._-]+={0,2}):([a-zA-Z0-9._-]*={0,2}):([a-zA-Z0-9._-]+={0,2})@([a-zA-Z0-9:._-]+)/);
|
108956
108956
|
if (!match) {
|
108957
108957
|
throw new sfError_12.SfError(messages.getMessage("invalidSfdxAuthUrlError"), "INVALID_SFDX_AUTH_URL");
|
108958
108958
|
}
|
@@ -109205,14 +109205,11 @@ var require_authInfo = __commonJS({
|
|
109205
109205
|
* **See** [SFDX Authorization](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_auth.htm#cli_reference_force_auth)
|
109206
109206
|
*/
|
109207
109207
|
getSfdxAuthUrl() {
|
109208
|
-
const
|
109209
|
-
const
|
109210
|
-
|
109211
|
-
|
109212
|
-
|
109213
|
-
}
|
109214
|
-
sfdxAuthUrl += `${(0, ts_types_1.ensure)(decryptedFields.refreshToken, "undefined refreshToken")}@${instanceUrl}`;
|
109215
|
-
return sfdxAuthUrl;
|
109208
|
+
const { clientId, clientSecret, refreshToken, instanceUrl } = this.getFields(true);
|
109209
|
+
const url = new URL((0, ts_types_1.ensure)(instanceUrl, "undefined instanceUrl")).host;
|
109210
|
+
const clientIdAndSecret = clientId ? `${clientId}:${clientSecret ?? ""}` : "";
|
109211
|
+
const token = (0, ts_types_1.ensure)(refreshToken, "undefined refreshToken");
|
109212
|
+
return `force://${clientIdAndSecret}:${token}@${url}`;
|
109216
109213
|
}
|
109217
109214
|
/**
|
109218
109215
|
* Convenience function to handle typical side effects encountered when dealing with an AuthInfo.
|