@openfin/node-adapter 47.100.60 → 47.100.61

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.
@@ -9544,27 +9544,11 @@ class InterApplicationBus extends Base {
9544
9544
  subscriberRemoved: 'subscriber-removed'
9545
9545
  };
9546
9546
  this.refCounter = new RefCounter();
9547
- /**
9548
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
9549
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
9550
- */
9551
- this.activeSubscriptions = new Map();
9552
9547
  this.Channel = new Channel(wire);
9553
9548
  this.emitter = new events.EventEmitter();
9554
9549
  wire.registerMessageHandler(this.onmessage.bind(this));
9555
9550
  this.on = this.emitter.on.bind(this.emitter);
9556
9551
  this.removeAllListeners = this.emitter.removeAllListeners.bind(this.emitter);
9557
- wire.environment.onBFCacheRestore(() => {
9558
- Array.from(this.activeSubscriptions.values()).forEach(async (subscription) => {
9559
- try {
9560
- await this.wire.sendAction('subscribe', subscription);
9561
- }
9562
- catch (error) {
9563
- // eslint-disable-next-line no-console
9564
- console.error('Failed to restore InterApplicationBus subscription after bfcache restore', error);
9565
- }
9566
- });
9567
- });
9568
9552
  }
9569
9553
  /**
9570
9554
  * Publishes a message to all applications running on OpenFin Runtime that
@@ -9637,18 +9621,14 @@ class InterApplicationBus extends Base {
9637
9621
  * ```
9638
9622
  */
9639
9623
  subscribe(source, topic, listener) {
9640
- const sourceWindowName = source.name || '*';
9641
- const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9642
- const subscription = {
9643
- sourceUuid: source.uuid,
9644
- sourceWindowName,
9645
- topic,
9646
- destinationWindowName: this.me.name
9647
- };
9624
+ const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
9648
9625
  const sendSubscription = async () => {
9649
- // Journaled before the await so a concurrent unsubscribe can find it.
9650
- this.activeSubscriptions.set(subKey, subscription);
9651
- await this.wire.sendAction('subscribe', subscription);
9626
+ await this.wire.sendAction('subscribe', {
9627
+ sourceUuid: source.uuid,
9628
+ sourceWindowName: source.name || '*',
9629
+ topic,
9630
+ destinationWindowName: this.me.name
9631
+ });
9652
9632
  };
9653
9633
  const alreadySubscribed = () => {
9654
9634
  return Promise.resolve();
@@ -9684,9 +9664,6 @@ class InterApplicationBus extends Base {
9684
9664
  const sourceWindowName = source.name || '*';
9685
9665
  const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9686
9666
  const sendUnsubscription = async () => {
9687
- // Dropped before the await so that a restoration landing while this unsubscribe is
9688
- // still in flight does not replay the subscription being torn down.
9689
- this.activeSubscriptions.delete(subKey);
9690
9667
  await this.wire.sendAction('unsubscribe', {
9691
9668
  sourceUuid: source.uuid,
9692
9669
  sourceWindowName,
@@ -9695,9 +9672,6 @@ class InterApplicationBus extends Base {
9695
9672
  });
9696
9673
  };
9697
9674
  const dontSendUnsubscription = () => {
9698
- // TODO(CORE-2749): never settles - the executor evaluates `r` instead of calling it,
9699
- // so awaiting a non-final unsubscribe hangs the caller. Should be `Promise.resolve()`,
9700
- // but that changes long-standing behavior, so it is tracked separately from CORE-2740.
9701
9675
  return new Promise((r) => r).then(() => undefined);
9702
9676
  };
9703
9677
  this.emitter.removeListener(subKey, listener);
@@ -17808,7 +17782,7 @@ class NodeEnvironment extends BaseEnvironment {
17808
17782
  };
17809
17783
  }
17810
17784
  getAdapterVersionSync() {
17811
- return "47.100.60";
17785
+ return "47.100.61";
17812
17786
  }
17813
17787
  observeBounds(element, onChange) {
17814
17788
  throw new Error('Method not implemented.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "47.100.60",
3
+ "version": "47.100.61",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -20,7 +20,7 @@
20
20
  "es-toolkit": "^1.39.3",
21
21
  "ws": "^7.5.11",
22
22
  "tslib": "2.8.1",
23
- "@openfin/core": "47.100.60"
23
+ "@openfin/core": "47.100.61"
24
24
  },
25
25
  "scripts": {
26
26
  "prebuild": "rimraf ./out",