@openfin/remote-adapter 47.100.59 → 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.
@@ -6899,9 +6899,8 @@ _View_providerChannelClient = new WeakMap();
6899
6899
  * To be able to directly address this context for eventing and messaging purposes, it needs a
6900
6900
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
6901
6901
  * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
6902
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
6903
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
6904
- * the same as the parent window's.
6902
+ * Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
6903
+ * its UUID is the same as the parent window's.
6905
6904
  *
6906
6905
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
6907
6906
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
@@ -12159,27 +12158,11 @@ class InterApplicationBus extends Base {
12159
12158
  subscriberRemoved: 'subscriber-removed'
12160
12159
  };
12161
12160
  this.refCounter = new RefCounter();
12162
- /**
12163
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
12164
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
12165
- */
12166
- this.activeSubscriptions = new Map();
12167
12161
  this.Channel = new Channel(wire);
12168
12162
  this.emitter = new events.EventEmitter();
12169
12163
  wire.registerMessageHandler(this.onmessage.bind(this));
12170
12164
  this.on = this.emitter.on.bind(this.emitter);
12171
12165
  this.removeAllListeners = this.emitter.removeAllListeners.bind(this.emitter);
12172
- wire.environment.onBFCacheRestore(() => {
12173
- Array.from(this.activeSubscriptions.values()).forEach(async (subscription) => {
12174
- try {
12175
- await this.wire.sendAction('subscribe', subscription);
12176
- }
12177
- catch (error) {
12178
- // eslint-disable-next-line no-console
12179
- console.error('Failed to restore InterApplicationBus subscription after bfcache restore', error);
12180
- }
12181
- });
12182
- });
12183
12166
  }
12184
12167
  /**
12185
12168
  * Publishes a message to all applications running on OpenFin Runtime that
@@ -12252,18 +12235,14 @@ class InterApplicationBus extends Base {
12252
12235
  * ```
12253
12236
  */
12254
12237
  subscribe(source, topic, listener) {
12255
- const sourceWindowName = source.name || '*';
12256
- const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
12257
- const subscription = {
12258
- sourceUuid: source.uuid,
12259
- sourceWindowName,
12260
- topic,
12261
- destinationWindowName: this.me.name
12262
- };
12238
+ const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
12263
12239
  const sendSubscription = async () => {
12264
- // Journaled before the await so a concurrent unsubscribe can find it.
12265
- this.activeSubscriptions.set(subKey, subscription);
12266
- await this.wire.sendAction('subscribe', subscription);
12240
+ await this.wire.sendAction('subscribe', {
12241
+ sourceUuid: source.uuid,
12242
+ sourceWindowName: source.name || '*',
12243
+ topic,
12244
+ destinationWindowName: this.me.name
12245
+ });
12267
12246
  };
12268
12247
  const alreadySubscribed = () => {
12269
12248
  return Promise.resolve();
@@ -12299,9 +12278,6 @@ class InterApplicationBus extends Base {
12299
12278
  const sourceWindowName = source.name || '*';
12300
12279
  const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
12301
12280
  const sendUnsubscription = async () => {
12302
- // Dropped before the await so that a restoration landing while this unsubscribe is
12303
- // still in flight does not replay the subscription being torn down.
12304
- this.activeSubscriptions.delete(subKey);
12305
12281
  await this.wire.sendAction('unsubscribe', {
12306
12282
  sourceUuid: source.uuid,
12307
12283
  sourceWindowName,
@@ -12310,9 +12286,6 @@ class InterApplicationBus extends Base {
12310
12286
  });
12311
12287
  };
12312
12288
  const dontSendUnsubscription = () => {
12313
- // TODO(CORE-2749): never settles - the executor evaluates `r` instead of calling it,
12314
- // so awaiting a non-final unsubscribe hangs the caller. Should be `Promise.resolve()`,
12315
- // but that changes long-standing behavior, so it is tracked separately from CORE-2740.
12316
12289
  return new Promise((r) => r).then(() => undefined);
12317
12290
  };
12318
12291
  this.emitter.removeListener(subKey, listener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "47.100.59",
3
+ "version": "47.100.61",
4
4
  "description": "Establish intermachine runtime connections using webRTC.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "es-toolkit": "^1.39.3",
18
18
  "tslib": "2.8.1",
19
- "@openfin/core": "47.100.59"
19
+ "@openfin/core": "47.100.61"
20
20
  },
21
21
  "scripts": {
22
22
  "prebuild": "rimraf ./out",