@salesforce/core-bundle 8.5.5 → 8.5.6
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 -6
- package/messages/core.md +4 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
@@ -4664,7 +4664,7 @@ var require_package = __commonJS({
|
|
4664
4664
|
"package.json"(exports2, module2) {
|
4665
4665
|
module2.exports = {
|
4666
4666
|
name: "@salesforce/core-bundle",
|
4667
|
-
version: "8.5.
|
4667
|
+
version: "8.5.6",
|
4668
4668
|
description: "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
4669
4669
|
main: "lib/index",
|
4670
4670
|
types: "lib/index.d.ts",
|
@@ -16425,7 +16425,7 @@ var require_orgAccessor = __commonJS({
|
|
16425
16425
|
const config = this.configs.get(username);
|
16426
16426
|
if (throwOnNotFound && config?.keys().length === 0) {
|
16427
16427
|
;
|
16428
|
-
const messages = new messages_12.Messages("@salesforce/core-bundle", "core", /* @__PURE__ */ new Map([["authInfoCreationError", "Must pass a username and/or OAuth options when creating an AuthInfo instance."], ["authInfoOverwriteError", "Cannot create an AuthInfo instance that will overwrite existing auth data."], ["authInfoOverwriteError.actions", ["Create the AuthInfo instance using existing auth data by just passing the username. E.g., `AuthInfo.create({ username: 'my@user.org' });`."]], ["authCodeExchangeError", "Error authenticating with auth code due to: %s"], ["authCodeUsernameRetrievalError", "Could not retrieve the username after successful auth code exchange.\n\nDue to: %s"], ["jwtAuthError", "Error authenticating with JWT config due to: %s"], ["jwtAuthErrors", "Error authenticating with JWT.\nErrors encountered:\n%s"], ["refreshTokenAuthError", "Error authenticating with the refresh token due to: %s"], ["orgDataNotAvailableError", "An attempt to refresh the authentication token failed with a 'Data Not Found Error'. The org identified by username %s does not appear to exist. Likely cause is that the org was deleted by another user or has expired."], ["orgDataNotAvailableError.actions", ["Run `sfdx force:org:list --clean` to remove stale org authentications.", "Use `sfdx force:config:set` to update the defaultusername.", "Use `sfdx force:org:create` to create a new org.", "Use `sfdx auth` to authenticate an existing org."]], ["namedOrgNotFound", "No authorization information found for %s."], ["noAliasesFound", "Nothing to set."], ["invalidFormat", "Setting aliases must be in the format <key>=<value> but found: [%s]."], ["invalidJsonCasing", 'All JSON input must have heads down camelcase keys. E.g., `{ sfdcLoginUrl: "https://login.salesforce.com" }`\nFound "%s" at %s'], ["missingClientId", "Client ID is required for JWT authentication."]]));
|
16428
|
+
const messages = new messages_12.Messages("@salesforce/core-bundle", "core", /* @__PURE__ */ new Map([["authInfoCreationError", "Must pass a username and/or OAuth options when creating an AuthInfo instance."], ["authInfoOverwriteError", "Cannot create an AuthInfo instance that will overwrite existing auth data."], ["authInfoOverwriteError.actions", ["Create the AuthInfo instance using existing auth data by just passing the username. E.g., `AuthInfo.create({ username: 'my@user.org' });`."]], ["authCodeExchangeError", "Error authenticating with auth code due to: %s"], ["authCodeUsernameRetrievalError", "Could not retrieve the username after successful auth code exchange.\n\nDue to: %s"], ["jwtAuthError", "Error authenticating with JWT config due to: %s"], ["jwtAuthErrors", "Error authenticating with JWT.\nErrors encountered:\n%s"], ["refreshTokenAuthError", "Error authenticating with the refresh token due to: %s"], ["invalidSfdxAuthUrlError", `Invalid SFDX authorization URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the "instanceUrl" inside the SFDX authorization URL doesn\\'t include the protocol ("https://"). Run "org display --target-org" on an org to see an example of an SFDX authorization URL.`], ["orgDataNotAvailableError", "An attempt to refresh the authentication token failed with a 'Data Not Found Error'. The org identified by username %s does not appear to exist. Likely cause is that the org was deleted by another user or has expired."], ["orgDataNotAvailableError.actions", ["Run `sfdx force:org:list --clean` to remove stale org authentications.", "Use `sfdx force:config:set` to update the defaultusername.", "Use `sfdx force:org:create` to create a new org.", "Use `sfdx auth` to authenticate an existing org."]], ["namedOrgNotFound", "No authorization information found for %s."], ["noAliasesFound", "Nothing to set."], ["invalidFormat", "Setting aliases must be in the format <key>=<value> but found: [%s]."], ["invalidJsonCasing", 'All JSON input must have heads down camelcase keys. E.g., `{ sfdcLoginUrl: "https://login.salesforce.com" }`\nFound "%s" at %s'], ["missingClientId", "Client ID is required for JWT authentication."]]));
|
16429
16429
|
throw messages.createError("namedOrgNotFound", [username]);
|
16430
16430
|
}
|
16431
16431
|
if (config) {
|
@@ -93949,7 +93949,7 @@ var require_findUppercaseKeys = __commonJS({
|
|
93949
93949
|
var strict_1 = require("node:assert/strict");
|
93950
93950
|
var ts_types_1 = require_lib();
|
93951
93951
|
var messages_12 = require_messages();
|
93952
|
-
var coreMessages = new messages_12.Messages("@salesforce/core-bundle", "core", /* @__PURE__ */ new Map([["authInfoCreationError", "Must pass a username and/or OAuth options when creating an AuthInfo instance."], ["authInfoOverwriteError", "Cannot create an AuthInfo instance that will overwrite existing auth data."], ["authInfoOverwriteError.actions", ["Create the AuthInfo instance using existing auth data by just passing the username. E.g., `AuthInfo.create({ username: 'my@user.org' });`."]], ["authCodeExchangeError", "Error authenticating with auth code due to: %s"], ["authCodeUsernameRetrievalError", "Could not retrieve the username after successful auth code exchange.\n\nDue to: %s"], ["jwtAuthError", "Error authenticating with JWT config due to: %s"], ["jwtAuthErrors", "Error authenticating with JWT.\nErrors encountered:\n%s"], ["refreshTokenAuthError", "Error authenticating with the refresh token due to: %s"], ["orgDataNotAvailableError", "An attempt to refresh the authentication token failed with a 'Data Not Found Error'. The org identified by username %s does not appear to exist. Likely cause is that the org was deleted by another user or has expired."], ["orgDataNotAvailableError.actions", ["Run `sfdx force:org:list --clean` to remove stale org authentications.", "Use `sfdx force:config:set` to update the defaultusername.", "Use `sfdx force:org:create` to create a new org.", "Use `sfdx auth` to authenticate an existing org."]], ["namedOrgNotFound", "No authorization information found for %s."], ["noAliasesFound", "Nothing to set."], ["invalidFormat", "Setting aliases must be in the format <key>=<value> but found: [%s]."], ["invalidJsonCasing", 'All JSON input must have heads down camelcase keys. E.g., `{ sfdcLoginUrl: "https://login.salesforce.com" }`\nFound "%s" at %s'], ["missingClientId", "Client ID is required for JWT authentication."]]));
|
93952
|
+
var coreMessages = new messages_12.Messages("@salesforce/core-bundle", "core", /* @__PURE__ */ new Map([["authInfoCreationError", "Must pass a username and/or OAuth options when creating an AuthInfo instance."], ["authInfoOverwriteError", "Cannot create an AuthInfo instance that will overwrite existing auth data."], ["authInfoOverwriteError.actions", ["Create the AuthInfo instance using existing auth data by just passing the username. E.g., `AuthInfo.create({ username: 'my@user.org' });`."]], ["authCodeExchangeError", "Error authenticating with auth code due to: %s"], ["authCodeUsernameRetrievalError", "Could not retrieve the username after successful auth code exchange.\n\nDue to: %s"], ["jwtAuthError", "Error authenticating with JWT config due to: %s"], ["jwtAuthErrors", "Error authenticating with JWT.\nErrors encountered:\n%s"], ["refreshTokenAuthError", "Error authenticating with the refresh token due to: %s"], ["invalidSfdxAuthUrlError", `Invalid SFDX authorization URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the "instanceUrl" inside the SFDX authorization URL doesn\\'t include the protocol ("https://"). Run "org display --target-org" on an org to see an example of an SFDX authorization URL.`], ["orgDataNotAvailableError", "An attempt to refresh the authentication token failed with a 'Data Not Found Error'. The org identified by username %s does not appear to exist. Likely cause is that the org was deleted by another user or has expired."], ["orgDataNotAvailableError.actions", ["Run `sfdx force:org:list --clean` to remove stale org authentications.", "Use `sfdx force:config:set` to update the defaultusername.", "Use `sfdx force:org:create` to create a new org.", "Use `sfdx auth` to authenticate an existing org."]], ["namedOrgNotFound", "No authorization information found for %s."], ["noAliasesFound", "Nothing to set."], ["invalidFormat", "Setting aliases must be in the format <key>=<value> but found: [%s]."], ["invalidJsonCasing", 'All JSON input must have heads down camelcase keys. E.g., `{ sfdcLoginUrl: "https://login.salesforce.com" }`\nFound "%s" at %s'], ["missingClientId", "Client ID is required for JWT authentication."]]));
|
93953
93953
|
var ensureNoUppercaseKeys = (path) => (allowList = []) => (data) => {
|
93954
93954
|
const keys2 = getKeys(data, allowList);
|
93955
93955
|
const upperCaseKeys = keys2.filter((key) => /^[A-Z]/.test(key)).join(", ");
|
@@ -110744,7 +110744,7 @@ var require_authInfo = __commonJS({
|
|
110744
110744
|
var connection_12 = require_connection3();
|
110745
110745
|
var orgConfigProperties_12 = require_orgConfigProperties();
|
110746
110746
|
var org_12 = require_org();
|
110747
|
-
var messages = new messages_12.Messages("@salesforce/core-bundle", "core", /* @__PURE__ */ new Map([["authInfoCreationError", "Must pass a username and/or OAuth options when creating an AuthInfo instance."], ["authInfoOverwriteError", "Cannot create an AuthInfo instance that will overwrite existing auth data."], ["authInfoOverwriteError.actions", ["Create the AuthInfo instance using existing auth data by just passing the username. E.g., `AuthInfo.create({ username: 'my@user.org' });`."]], ["authCodeExchangeError", "Error authenticating with auth code due to: %s"], ["authCodeUsernameRetrievalError", "Could not retrieve the username after successful auth code exchange.\n\nDue to: %s"], ["jwtAuthError", "Error authenticating with JWT config due to: %s"], ["jwtAuthErrors", "Error authenticating with JWT.\nErrors encountered:\n%s"], ["refreshTokenAuthError", "Error authenticating with the refresh token due to: %s"], ["orgDataNotAvailableError", "An attempt to refresh the authentication token failed with a 'Data Not Found Error'. The org identified by username %s does not appear to exist. Likely cause is that the org was deleted by another user or has expired."], ["orgDataNotAvailableError.actions", ["Run `sfdx force:org:list --clean` to remove stale org authentications.", "Use `sfdx force:config:set` to update the defaultusername.", "Use `sfdx force:org:create` to create a new org.", "Use `sfdx auth` to authenticate an existing org."]], ["namedOrgNotFound", "No authorization information found for %s."], ["noAliasesFound", "Nothing to set."], ["invalidFormat", "Setting aliases must be in the format <key>=<value> but found: [%s]."], ["invalidJsonCasing", 'All JSON input must have heads down camelcase keys. E.g., `{ sfdcLoginUrl: "https://login.salesforce.com" }`\nFound "%s" at %s'], ["missingClientId", "Client ID is required for JWT authentication."]]));
|
110747
|
+
var messages = new messages_12.Messages("@salesforce/core-bundle", "core", /* @__PURE__ */ new Map([["authInfoCreationError", "Must pass a username and/or OAuth options when creating an AuthInfo instance."], ["authInfoOverwriteError", "Cannot create an AuthInfo instance that will overwrite existing auth data."], ["authInfoOverwriteError.actions", ["Create the AuthInfo instance using existing auth data by just passing the username. E.g., `AuthInfo.create({ username: 'my@user.org' });`."]], ["authCodeExchangeError", "Error authenticating with auth code due to: %s"], ["authCodeUsernameRetrievalError", "Could not retrieve the username after successful auth code exchange.\n\nDue to: %s"], ["jwtAuthError", "Error authenticating with JWT config due to: %s"], ["jwtAuthErrors", "Error authenticating with JWT.\nErrors encountered:\n%s"], ["refreshTokenAuthError", "Error authenticating with the refresh token due to: %s"], ["invalidSfdxAuthUrlError", `Invalid SFDX authorization URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the "instanceUrl" inside the SFDX authorization URL doesn\\'t include the protocol ("https://"). Run "org display --target-org" on an org to see an example of an SFDX authorization URL.`], ["orgDataNotAvailableError", "An attempt to refresh the authentication token failed with a 'Data Not Found Error'. The org identified by username %s does not appear to exist. Likely cause is that the org was deleted by another user or has expired."], ["orgDataNotAvailableError.actions", ["Run `sfdx force:org:list --clean` to remove stale org authentications.", "Use `sfdx force:config:set` to update the defaultusername.", "Use `sfdx force:org:create` to create a new org.", "Use `sfdx auth` to authenticate an existing org."]], ["namedOrgNotFound", "No authorization information found for %s."], ["noAliasesFound", "Nothing to set."], ["invalidFormat", "Setting aliases must be in the format <key>=<value> but found: [%s]."], ["invalidJsonCasing", 'All JSON input must have heads down camelcase keys. E.g., `{ sfdcLoginUrl: "https://login.salesforce.com" }`\nFound "%s" at %s'], ["missingClientId", "Client ID is required for JWT authentication."]]));
|
110748
110748
|
function parseIdUrl(idUrl) {
|
110749
110749
|
const idUrls = idUrl.split("/");
|
110750
110750
|
const userId = idUrls.pop();
|
@@ -110879,7 +110879,7 @@ var require_authInfo = __commonJS({
|
|
110879
110879
|
static parseSfdxAuthUrl(sfdxAuthUrl) {
|
110880
110880
|
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._-]+)/);
|
110881
110881
|
if (!match) {
|
110882
|
-
throw new sfError_12.SfError(
|
110882
|
+
throw new sfError_12.SfError(messages.getMessage("invalidSfdxAuthUrlError"), "INVALID_SFDX_AUTH_URL");
|
110883
110883
|
}
|
110884
110884
|
const [, clientId, clientSecret, refreshToken, loginUrl] = match;
|
110885
110885
|
return {
|
@@ -111406,7 +111406,8 @@ var require_authInfo = __commonJS({
|
|
111406
111406
|
try {
|
111407
111407
|
authFieldsBuilder = await oauth2.refreshToken((0, ts_types_1.ensure)(fullOptions.refreshToken));
|
111408
111408
|
} catch (err) {
|
111409
|
-
|
111409
|
+
const cause = err instanceof Error ? err : sfError_12.SfError.wrap(err);
|
111410
|
+
throw messages.createError("refreshTokenAuthError", [cause.message], void 0, cause);
|
111410
111411
|
}
|
111411
111412
|
const { orgId } = parseIdUrl(authFieldsBuilder.id);
|
111412
111413
|
let username = this.getUsername();
|
package/messages/core.md
CHANGED
@@ -34,6 +34,10 @@ Errors encountered:
|
|
34
34
|
|
35
35
|
Error authenticating with the refresh token due to: %s
|
36
36
|
|
37
|
+
# invalidSfdxAuthUrlError
|
38
|
+
|
39
|
+
Invalid SFDX authorization URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the "instanceUrl" inside the SFDX authorization URL doesn\'t include the protocol ("https://"). Run "org display --target-org" on an org to see an example of an SFDX authorization URL.
|
40
|
+
|
37
41
|
# orgDataNotAvailableError
|
38
42
|
|
39
43
|
An attempt to refresh the authentication token failed with a 'Data Not Found Error'. The org identified by username %s does not appear to exist. Likely cause is that the org was deleted by another user or has expired.
|