@salesforce/core-bundle 8.5.4 → 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 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.4",
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",
@@ -4713,7 +4713,7 @@ var require_package = __commonJS({
4713
4713
  js2xmlparser: "^4.0.1",
4714
4714
  jsonwebtoken: "9.0.2",
4715
4715
  jszip: "3.10.1",
4716
- pino: "^9.3.2",
4716
+ pino: "^9.4.0",
4717
4717
  "pino-abstract-transport": "^1.2.0",
4718
4718
  "pino-pretty": "^11.2.2",
4719
4719
  "proper-lockfile": "^4.1.2",
@@ -8008,7 +8008,7 @@ var require_levels = __commonJS({
8008
8008
  var require_meta = __commonJS({
8009
8009
  "node_modules/pino/lib/meta.js"(exports2, module2) {
8010
8010
  "use strict";
8011
- module2.exports = { version: "9.3.2" };
8011
+ module2.exports = { version: "9.4.0" };
8012
8012
  }
8013
8013
  });
8014
8014
 
@@ -9058,6 +9058,8 @@ var require_pino = __commonJS({
9058
9058
  function pino(...args) {
9059
9059
  const instance = {};
9060
9060
  const { opts, stream } = normalize(instance, caller(), ...args);
9061
+ if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0)
9062
+ opts.level = opts.level.toLowerCase();
9061
9063
  const {
9062
9064
  redact,
9063
9065
  crlf,
@@ -16423,7 +16425,7 @@ var require_orgAccessor = __commonJS({
16423
16425
  const config = this.configs.get(username);
16424
16426
  if (throwOnNotFound && config?.keys().length === 0) {
16425
16427
  ;
16426
- 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."]]));
16427
16429
  throw messages.createError("namedOrgNotFound", [username]);
16428
16430
  }
16429
16431
  if (config) {
@@ -93947,7 +93949,7 @@ var require_findUppercaseKeys = __commonJS({
93947
93949
  var strict_1 = require("node:assert/strict");
93948
93950
  var ts_types_1 = require_lib();
93949
93951
  var messages_12 = require_messages();
93950
- 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."]]));
93951
93953
  var ensureNoUppercaseKeys = (path) => (allowList = []) => (data) => {
93952
93954
  const keys2 = getKeys(data, allowList);
93953
93955
  const upperCaseKeys = keys2.filter((key) => /^[A-Z]/.test(key)).join(", ");
@@ -110742,7 +110744,7 @@ var require_authInfo = __commonJS({
110742
110744
  var connection_12 = require_connection3();
110743
110745
  var orgConfigProperties_12 = require_orgConfigProperties();
110744
110746
  var org_12 = require_org();
110745
- 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."]]));
110746
110748
  function parseIdUrl(idUrl) {
110747
110749
  const idUrls = idUrl.split("/");
110748
110750
  const userId = idUrls.pop();
@@ -110877,7 +110879,7 @@ var require_authInfo = __commonJS({
110877
110879
  static parseSfdxAuthUrl(sfdxAuthUrl) {
110878
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._-]+)/);
110879
110881
  if (!match) {
110880
- throw new sfError_12.SfError(`Invalid SFDX auth URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the SFDX auth URL uses the "force" protocol, and not "http" or "https". Also note that the "instanceUrl" inside the SFDX auth URL doesn't include the protocol ("https://").`, "INVALID_SFDX_AUTH_URL");
110882
+ throw new sfError_12.SfError(messages.getMessage("invalidSfdxAuthUrlError"), "INVALID_SFDX_AUTH_URL");
110881
110883
  }
110882
110884
  const [, clientId, clientSecret, refreshToken, loginUrl] = match;
110883
110885
  return {
@@ -111404,7 +111406,8 @@ var require_authInfo = __commonJS({
111404
111406
  try {
111405
111407
  authFieldsBuilder = await oauth2.refreshToken((0, ts_types_1.ensure)(fullOptions.refreshToken));
111406
111408
  } catch (err) {
111407
- throw messages.createError("refreshTokenAuthError", [err.message]);
111409
+ const cause = err instanceof Error ? err : sfError_12.SfError.wrap(err);
111410
+ throw messages.createError("refreshTokenAuthError", [cause.message], void 0, cause);
111408
111411
  }
111409
111412
  const { orgId } = parseIdUrl(authFieldsBuilder.id);
111410
111413
  let username = this.getUsername();
package/lib/pino-file.js CHANGED
@@ -3174,7 +3174,7 @@ var require_levels = __commonJS({
3174
3174
  var require_meta = __commonJS({
3175
3175
  "node_modules/pino/lib/meta.js"(exports2, module2) {
3176
3176
  "use strict";
3177
- module2.exports = { version: "9.3.2" };
3177
+ module2.exports = { version: "9.4.0" };
3178
3178
  }
3179
3179
  });
3180
3180
 
@@ -4224,6 +4224,8 @@ var require_pino = __commonJS({
4224
4224
  function pino2(...args) {
4225
4225
  const instance = {};
4226
4226
  const { opts, stream } = normalize(instance, caller(), ...args);
4227
+ if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0)
4228
+ opts.level = opts.level.toLowerCase();
4227
4229
  const {
4228
4230
  redact,
4229
4231
  crlf,
@@ -3174,7 +3174,7 @@ var require_levels = __commonJS({
3174
3174
  var require_meta = __commonJS({
3175
3175
  "node_modules/pino/lib/meta.js"(exports2, module2) {
3176
3176
  "use strict";
3177
- module2.exports = { version: "9.3.2" };
3177
+ module2.exports = { version: "9.4.0" };
3178
3178
  }
3179
3179
  });
3180
3180
 
@@ -4224,6 +4224,8 @@ var require_pino = __commonJS({
4224
4224
  function pino2(...args) {
4225
4225
  const instance = {};
4226
4226
  const { opts, stream } = normalize(instance, caller(), ...args);
4227
+ if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0)
4228
+ opts.level = opts.level.toLowerCase();
4227
4229
  const {
4228
4230
  redact,
4229
4231
  crlf,
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core-bundle",
3
- "version": "8.5.4",
3
+ "version": "8.5.6",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "js2xmlparser": "^4.0.1",
50
50
  "jsonwebtoken": "9.0.2",
51
51
  "jszip": "3.10.1",
52
- "pino": "^9.3.2",
52
+ "pino": "^9.4.0",
53
53
  "pino-abstract-transport": "^1.2.0",
54
54
  "pino-pretty": "^11.2.2",
55
55
  "proper-lockfile": "^4.1.2",