@salesforce/core-bundle 7.3.11 → 7.4.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.d.ts CHANGED
@@ -1695,7 +1695,9 @@ declare module '@salesforce/core-bundle/index' {
1695
1695
  }
1696
1696
  declare module '@salesforce/core-bundle/lifecycleEvents' {
1697
1697
  import { AnyJson } from '@salesforce/ts-types';
1698
- type callback = (data: any) => Promise<void>;
1698
+ export type callback = (data: any) => Promise<void>;
1699
+ type ListenerMap = Map<string, callback>;
1700
+ export type UniqueListenerMap = Map<string, ListenerMap>;
1699
1701
  /**
1700
1702
  * An asynchronous event listener and emitter that follows the singleton pattern. The singleton pattern allows lifecycle
1701
1703
  * events to be emitted from deep within a library and still be consumed by any other library or tool. It allows other
@@ -1788,6 +1790,7 @@ declare module '@salesforce/core-bundle/lifecycleEvents' {
1788
1790
  */
1789
1791
  emit<T = AnyJson>(eventName: string, data: T): Promise<void>;
1790
1792
  }
1793
+ export const cloneUniqueListeners: (uniqueListeners: UniqueListenerMap) => UniqueListenerMap;
1791
1794
  export {};
1792
1795
 
1793
1796
  }
package/lib/index.js CHANGED
@@ -7604,7 +7604,7 @@ var require_pino = __commonJS({
7604
7604
  return f(p);
7605
7605
  }
7606
7606
  }
7607
- globalThis.__bundlerPathsOverrides = { ...globalThis.__bundlerPathsOverrides || {}, "thread-stream-worker": pinoBundlerAbsolutePath("./thread-stream-worker.js"), "pino-worker": pinoBundlerAbsolutePath("./pino-worker.js"), "pino-pipeline-worker": pinoBundlerAbsolutePath("./pino-pipeline-worker.js"), "pino/file": pinoBundlerAbsolutePath("./pino-file.js"), "pino-pretty": pinoBundlerAbsolutePath("./pino-pretty.js") };
7607
+ globalThis.__bundlerPathsOverrides = { ...globalThis.__bundlerPathsOverrides || {}, "thread-stream-worker": pinoBundlerAbsolutePath("./thread-stream-worker.js"), "pino-worker": pinoBundlerAbsolutePath("./pino-worker.js"), "pino/file": pinoBundlerAbsolutePath("./pino-file.js"), "pino-pipeline-worker": pinoBundlerAbsolutePath("./pino-pipeline-worker.js"), "pino-pretty": pinoBundlerAbsolutePath("./pino-pretty.js") };
7608
7608
  var os = require("os");
7609
7609
  var stdSerializers = require_pino_std_serializers();
7610
7610
  var caller = require_caller();
@@ -12075,7 +12075,7 @@ var require_package2 = __commonJS({
12075
12075
  "package.json"(exports2, module2) {
12076
12076
  module2.exports = {
12077
12077
  name: "@salesforce/core-bundle",
12078
- version: "7.3.11",
12078
+ version: "7.4.0",
12079
12079
  description: "Core libraries to interact with SFDX projects, orgs, and APIs.",
12080
12080
  main: "lib/index",
12081
12081
  types: "lib/index.d.ts",
@@ -12146,7 +12146,7 @@ var require_package2 = __commonJS({
12146
12146
  "esbuild-plugin-tsc": "^0.4.0",
12147
12147
  "npm-dts": "^1.3.12",
12148
12148
  "ts-node": "^10.9.2",
12149
- "ts-patch": "^3.1.1",
12149
+ "ts-patch": "^3.2.0",
12150
12150
  typescript: "^5.4.5"
12151
12151
  },
12152
12152
  repository: {
@@ -12284,7 +12284,7 @@ var require_lifecycleEvents = __commonJS({
12284
12284
  return result;
12285
12285
  };
12286
12286
  Object.defineProperty(exports2, "__esModule", { value: true });
12287
- exports2.Lifecycle = void 0;
12287
+ exports2.cloneUniqueListeners = exports2.Lifecycle = void 0;
12288
12288
  var semver_1 = require_semver2();
12289
12289
  var pjson = __importStar2(require_package2());
12290
12290
  var logger_12 = require_logger();
@@ -12315,7 +12315,7 @@ var require_lifecycleEvents = __commonJS({
12315
12315
  (0, semver_1.compare)(global.salesforceCoreLifecycle.version(), _Lifecycle.staticVersion()) === -1
12316
12316
  ) {
12317
12317
  const oldInstance = global.salesforceCoreLifecycle;
12318
- global.salesforceCoreLifecycle = new _Lifecycle({ ...oldInstance.listeners }, oldInstance.uniqueListeners);
12318
+ global.salesforceCoreLifecycle = new _Lifecycle({ ...oldInstance.listeners }, (0, exports2.cloneUniqueListeners)(oldInstance.uniqueListeners));
12319
12319
  Object.keys(oldInstance.listeners).map((eventName) => {
12320
12320
  oldInstance.removeAllListeners(eventName);
12321
12321
  });
@@ -12434,6 +12434,9 @@ var require_lifecycleEvents = __commonJS({
12434
12434
  }
12435
12435
  };
12436
12436
  exports2.Lifecycle = Lifecycle;
12437
+ var cloneListeners = (listeners) => new Map(Array.from(listeners.entries()));
12438
+ var cloneUniqueListeners = (uniqueListeners) => new Map(Array.from(uniqueListeners.entries()).map(([key, value]) => [key, cloneListeners(value)]));
12439
+ exports2.cloneUniqueListeners = cloneUniqueListeners;
12437
12440
  }
12438
12441
  });
12439
12442
 
@@ -93725,7 +93728,9 @@ var require_sfProject = __commonJS({
93725
93728
  */
93726
93729
  getDefaultPackage() {
93727
93730
  if (!this.hasPackages()) {
93728
- throw new sfError_12.SfError("The sfdx-project.json does not have any packageDirectories defined.");
93731
+ throw new sfError_12.SfError("The sfdx-project.json does not have any packageDirectories defined.", "NoPackageDirectories", [
93732
+ `Check ${this.getPath()} for packageDirectories.`
93733
+ ]);
93729
93734
  }
93730
93735
  const defaultPackage = this.findPackage((packageDir) => packageDir.default === true);
93731
93736
  return defaultPackage ?? this.getPackageDirectories()[0];
@@ -122627,6 +122632,7 @@ var require_testSetup = __commonJS({
122627
122632
  Object.values(testContext.SANDBOXES).forEach((theSandbox) => theSandbox.restore());
122628
122633
  testContext.configStubs = {};
122629
122634
  stateAggregator_12.StateAggregator.clearInstance();
122635
+ sfProject_12.SfProject.instances.clear();
122630
122636
  delete configAggregator_12.ConfigAggregator.instance;
122631
122637
  };
122632
122638
  exports2.restoreContext = restoreContext;
package/lib/pino-file.js CHANGED
@@ -4123,7 +4123,7 @@ var require_pino = __commonJS({
4123
4123
  return f(p);
4124
4124
  }
4125
4125
  }
4126
- globalThis.__bundlerPathsOverrides = { ...globalThis.__bundlerPathsOverrides || {}, "thread-stream-worker": pinoBundlerAbsolutePath("./thread-stream-worker.js"), "pino-worker": pinoBundlerAbsolutePath("./pino-worker.js"), "pino-pipeline-worker": pinoBundlerAbsolutePath("./pino-pipeline-worker.js"), "pino/file": pinoBundlerAbsolutePath("./pino-file.js"), "pino-pretty": pinoBundlerAbsolutePath("./pino-pretty.js") };
4126
+ globalThis.__bundlerPathsOverrides = { ...globalThis.__bundlerPathsOverrides || {}, "thread-stream-worker": pinoBundlerAbsolutePath("./thread-stream-worker.js"), "pino-worker": pinoBundlerAbsolutePath("./pino-worker.js"), "pino/file": pinoBundlerAbsolutePath("./pino-file.js"), "pino-pipeline-worker": pinoBundlerAbsolutePath("./pino-pipeline-worker.js"), "pino-pretty": pinoBundlerAbsolutePath("./pino-pretty.js") };
4127
4127
  var os = require("os");
4128
4128
  var stdSerializers = require_pino_std_serializers();
4129
4129
  var caller = require_caller();
@@ -4123,7 +4123,7 @@ var require_pino = __commonJS({
4123
4123
  return f(p);
4124
4124
  }
4125
4125
  }
4126
- globalThis.__bundlerPathsOverrides = { ...globalThis.__bundlerPathsOverrides || {}, "thread-stream-worker": pinoBundlerAbsolutePath("./thread-stream-worker.js"), "pino-worker": pinoBundlerAbsolutePath("./pino-worker.js"), "pino-pipeline-worker": pinoBundlerAbsolutePath("./pino-pipeline-worker.js"), "pino/file": pinoBundlerAbsolutePath("./pino-file.js"), "pino-pretty": pinoBundlerAbsolutePath("./pino-pretty.js") };
4126
+ globalThis.__bundlerPathsOverrides = { ...globalThis.__bundlerPathsOverrides || {}, "thread-stream-worker": pinoBundlerAbsolutePath("./thread-stream-worker.js"), "pino-worker": pinoBundlerAbsolutePath("./pino-worker.js"), "pino/file": pinoBundlerAbsolutePath("./pino-file.js"), "pino-pipeline-worker": pinoBundlerAbsolutePath("./pino-pipeline-worker.js"), "pino-pretty": pinoBundlerAbsolutePath("./pino-pretty.js") };
4127
4127
  var os = require("os");
4128
4128
  var stdSerializers = require_pino_std_serializers();
4129
4129
  var caller = require_caller();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core-bundle",
3
- "version": "7.3.11",
3
+ "version": "7.4.0",
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",
@@ -71,7 +71,7 @@
71
71
  "esbuild-plugin-tsc": "^0.4.0",
72
72
  "npm-dts": "^1.3.12",
73
73
  "ts-node": "^10.9.2",
74
- "ts-patch": "^3.1.1",
74
+ "ts-patch": "^3.2.0",
75
75
  "typescript": "^5.4.5"
76
76
  },
77
77
  "repository": {