@openfin/core 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.
@@ -7174,11 +7174,6 @@ declare class InterApplicationBus extends Base {
7174
7174
  subscriberRemoved: string;
7175
7175
  };
7176
7176
  private refCounter;
7177
- /**
7178
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7179
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7180
- */
7181
- private activeSubscriptions;
7182
7177
  protected emitter: EventEmitter;
7183
7178
  on: any;
7184
7179
  removeAllListeners: any;
@@ -7174,11 +7174,6 @@ declare class InterApplicationBus extends Base {
7174
7174
  subscriberRemoved: string;
7175
7175
  };
7176
7176
  private refCounter;
7177
- /**
7178
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7179
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7180
- */
7181
- private activeSubscriptions;
7182
7177
  protected emitter: EventEmitter;
7183
7178
  on: any;
7184
7179
  removeAllListeners: any;
@@ -7174,11 +7174,6 @@ declare class InterApplicationBus extends Base {
7174
7174
  subscriberRemoved: string;
7175
7175
  };
7176
7176
  private refCounter;
7177
- /**
7178
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7179
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7180
- */
7181
- private activeSubscriptions;
7182
7177
  protected emitter: EventEmitter;
7183
7178
  on: any;
7184
7179
  removeAllListeners: any;
package/out/stub.d.ts CHANGED
@@ -7337,11 +7337,6 @@ declare class InterApplicationBus extends Base {
7337
7337
  subscriberRemoved: string;
7338
7338
  };
7339
7339
  private refCounter;
7340
- /**
7341
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7342
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7343
- */
7344
- private activeSubscriptions;
7345
7340
  protected emitter: EventEmitter;
7346
7341
  on: any;
7347
7342
  removeAllListeners: any;
package/out/stub.js CHANGED
@@ -9712,27 +9712,11 @@ class InterApplicationBus extends Base {
9712
9712
  subscriberRemoved: 'subscriber-removed'
9713
9713
  };
9714
9714
  this.refCounter = new RefCounter();
9715
- /**
9716
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
9717
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
9718
- */
9719
- this.activeSubscriptions = new Map();
9720
9715
  this.Channel = new Channel(wire);
9721
9716
  this.emitter = new events.EventEmitter();
9722
9717
  wire.registerMessageHandler(this.onmessage.bind(this));
9723
9718
  this.on = this.emitter.on.bind(this.emitter);
9724
9719
  this.removeAllListeners = this.emitter.removeAllListeners.bind(this.emitter);
9725
- wire.environment.onBFCacheRestore(() => {
9726
- Array.from(this.activeSubscriptions.values()).forEach(async (subscription) => {
9727
- try {
9728
- await this.wire.sendAction('subscribe', subscription);
9729
- }
9730
- catch (error) {
9731
- // eslint-disable-next-line no-console
9732
- console.error('Failed to restore InterApplicationBus subscription after bfcache restore', error);
9733
- }
9734
- });
9735
- });
9736
9720
  }
9737
9721
  /**
9738
9722
  * Publishes a message to all applications running on OpenFin Runtime that
@@ -9805,18 +9789,14 @@ class InterApplicationBus extends Base {
9805
9789
  * ```
9806
9790
  */
9807
9791
  subscribe(source, topic, listener) {
9808
- const sourceWindowName = source.name || '*';
9809
- const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9810
- const subscription = {
9811
- sourceUuid: source.uuid,
9812
- sourceWindowName,
9813
- topic,
9814
- destinationWindowName: this.me.name
9815
- };
9792
+ const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
9816
9793
  const sendSubscription = async () => {
9817
- // Journaled before the await so a concurrent unsubscribe can find it.
9818
- this.activeSubscriptions.set(subKey, subscription);
9819
- await this.wire.sendAction('subscribe', subscription);
9794
+ await this.wire.sendAction('subscribe', {
9795
+ sourceUuid: source.uuid,
9796
+ sourceWindowName: source.name || '*',
9797
+ topic,
9798
+ destinationWindowName: this.me.name
9799
+ });
9820
9800
  };
9821
9801
  const alreadySubscribed = () => {
9822
9802
  return Promise.resolve();
@@ -9852,9 +9832,6 @@ class InterApplicationBus extends Base {
9852
9832
  const sourceWindowName = source.name || '*';
9853
9833
  const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9854
9834
  const sendUnsubscription = async () => {
9855
- // Dropped before the await so that a restoration landing while this unsubscribe is
9856
- // still in flight does not replay the subscription being torn down.
9857
- this.activeSubscriptions.delete(subKey);
9858
9835
  await this.wire.sendAction('unsubscribe', {
9859
9836
  sourceUuid: source.uuid,
9860
9837
  sourceWindowName,
@@ -9863,9 +9840,6 @@ class InterApplicationBus extends Base {
9863
9840
  });
9864
9841
  };
9865
9842
  const dontSendUnsubscription = () => {
9866
- // TODO(CORE-2749): never settles - the executor evaluates `r` instead of calling it,
9867
- // so awaiting a non-final unsubscribe hangs the caller. Should be `Promise.resolve()`,
9868
- // but that changes long-standing behavior, so it is tracked separately from CORE-2740.
9869
9843
  return new Promise((r) => r).then(() => undefined);
9870
9844
  };
9871
9845
  this.emitter.removeListener(subKey, listener);
package/out/stub.mjs CHANGED
@@ -9709,27 +9709,11 @@ class InterApplicationBus extends Base {
9709
9709
  subscriberRemoved: 'subscriber-removed'
9710
9710
  };
9711
9711
  this.refCounter = new RefCounter();
9712
- /**
9713
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
9714
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
9715
- */
9716
- this.activeSubscriptions = new Map();
9717
9712
  this.Channel = new Channel(wire);
9718
9713
  this.emitter = new EventEmitter();
9719
9714
  wire.registerMessageHandler(this.onmessage.bind(this));
9720
9715
  this.on = this.emitter.on.bind(this.emitter);
9721
9716
  this.removeAllListeners = this.emitter.removeAllListeners.bind(this.emitter);
9722
- wire.environment.onBFCacheRestore(() => {
9723
- Array.from(this.activeSubscriptions.values()).forEach(async (subscription) => {
9724
- try {
9725
- await this.wire.sendAction('subscribe', subscription);
9726
- }
9727
- catch (error) {
9728
- // eslint-disable-next-line no-console
9729
- console.error('Failed to restore InterApplicationBus subscription after bfcache restore', error);
9730
- }
9731
- });
9732
- });
9733
9717
  }
9734
9718
  /**
9735
9719
  * Publishes a message to all applications running on OpenFin Runtime that
@@ -9802,18 +9786,14 @@ class InterApplicationBus extends Base {
9802
9786
  * ```
9803
9787
  */
9804
9788
  subscribe(source, topic, listener) {
9805
- const sourceWindowName = source.name || '*';
9806
- const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9807
- const subscription = {
9808
- sourceUuid: source.uuid,
9809
- sourceWindowName,
9810
- topic,
9811
- destinationWindowName: this.me.name
9812
- };
9789
+ const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
9813
9790
  const sendSubscription = async () => {
9814
- // Journaled before the await so a concurrent unsubscribe can find it.
9815
- this.activeSubscriptions.set(subKey, subscription);
9816
- await this.wire.sendAction('subscribe', subscription);
9791
+ await this.wire.sendAction('subscribe', {
9792
+ sourceUuid: source.uuid,
9793
+ sourceWindowName: source.name || '*',
9794
+ topic,
9795
+ destinationWindowName: this.me.name
9796
+ });
9817
9797
  };
9818
9798
  const alreadySubscribed = () => {
9819
9799
  return Promise.resolve();
@@ -9849,9 +9829,6 @@ class InterApplicationBus extends Base {
9849
9829
  const sourceWindowName = source.name || '*';
9850
9830
  const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9851
9831
  const sendUnsubscription = async () => {
9852
- // Dropped before the await so that a restoration landing while this unsubscribe is
9853
- // still in flight does not replay the subscription being torn down.
9854
- this.activeSubscriptions.delete(subKey);
9855
9832
  await this.wire.sendAction('unsubscribe', {
9856
9833
  sourceUuid: source.uuid,
9857
9834
  sourceWindowName,
@@ -9860,9 +9837,6 @@ class InterApplicationBus extends Base {
9860
9837
  });
9861
9838
  };
9862
9839
  const dontSendUnsubscription = () => {
9863
- // TODO(CORE-2749): never settles - the executor evaluates `r` instead of calling it,
9864
- // so awaiting a non-final unsubscribe hangs the caller. Should be `Promise.resolve()`,
9865
- // but that changes long-standing behavior, so it is tracked separately from CORE-2740.
9866
9840
  return new Promise((r) => r).then(() => undefined);
9867
9841
  };
9868
9842
  this.emitter.removeListener(subKey, listener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "47.100.60",
3
+ "version": "47.100.61",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",