@salesforce/core
Advanced tools
Comparing version 7.3.6 to 7.3.7
@@ -24,2 +24,3 @@ "use strict"; | ||
{ name: 'clientsecret' }, | ||
{ name: 'authcode' }, | ||
]; | ||
@@ -43,2 +44,4 @@ const FILTERED_KEYS_FOR_PROCESSING = FILTERED_KEYS.map((key) => ({ | ||
.replace(new RegExp(sfdc_1.sfdxAuthUrlRegex, 'g'), '<REDACTED AUTH URL TOKEN>'), | ||
// conditional replacement for clientId: leave the value if it's the Platform CLI, otherwise redact it | ||
(input) => input.replace(/(['"]client.*Id['"])\s*:\s*(['"][^'"]*['"])/gi, (all, key, value) => value.includes('Platform CLI') ? `${key}:${value}` : `${key}:"<REDACTED CLIENT ID>"`), | ||
]); | ||
@@ -45,0 +48,0 @@ const fullReplacementChain = compose(...replacementFunctions); |
@@ -52,2 +52,3 @@ "use strict"; | ||
const stateAggregator_1 = require("../stateAggregator/stateAggregator"); | ||
const filters_1 = require("../logger/filters"); | ||
const messages_1 = require("../messages"); | ||
@@ -875,3 +876,10 @@ const sfdcUrl_1 = require("../util/sfdcUrl"); | ||
catch (err) { | ||
throw messages.createError('authCodeExchangeError', [err.message]); | ||
const msg = err instanceof Error ? `${err.name}::${err.message}` : typeof err === 'string' ? err : 'UNKNOWN'; | ||
const redacted = (0, filters_1.filterSecrets)(options); | ||
throw sfError_1.SfError.create({ | ||
message: messages.getMessage('authCodeExchangeError', [msg]), | ||
name: 'AuthCodeExchangeError', | ||
...(err instanceof Error ? { cause: err } : {}), | ||
data: ((0, ts_types_1.isArray)(redacted) ? redacted[0] : redacted), | ||
}); | ||
} | ||
@@ -878,0 +886,0 @@ const { orgId } = parseIdUrl(authFields.id); |
{ | ||
"name": "@salesforce/core", | ||
"version": "7.3.6", | ||
"version": "7.3.7", | ||
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1032816
22016