@openfin/remote-adapter 47.100.60 → 47.100.62
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/out/remote-adapter.js +7 -33
- package/package.json +2 -2
package/out/remote-adapter.js
CHANGED
|
@@ -12158,27 +12158,11 @@ class InterApplicationBus extends Base {
|
|
|
12158
12158
|
subscriberRemoved: 'subscriber-removed'
|
|
12159
12159
|
};
|
|
12160
12160
|
this.refCounter = new RefCounter();
|
|
12161
|
-
/**
|
|
12162
|
-
* One entry per subscription the runtime knows about, keyed by the same subscription key the
|
|
12163
|
-
* emitter and the ref counter use. Listeners sharing a key share a single entry.
|
|
12164
|
-
*/
|
|
12165
|
-
this.activeSubscriptions = new Map();
|
|
12166
12161
|
this.Channel = new Channel(wire);
|
|
12167
12162
|
this.emitter = new events.EventEmitter();
|
|
12168
12163
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
|
12169
12164
|
this.on = this.emitter.on.bind(this.emitter);
|
|
12170
12165
|
this.removeAllListeners = this.emitter.removeAllListeners.bind(this.emitter);
|
|
12171
|
-
wire.environment.onBFCacheRestore(() => {
|
|
12172
|
-
Array.from(this.activeSubscriptions.values()).forEach(async (subscription) => {
|
|
12173
|
-
try {
|
|
12174
|
-
await this.wire.sendAction('subscribe', subscription);
|
|
12175
|
-
}
|
|
12176
|
-
catch (error) {
|
|
12177
|
-
// eslint-disable-next-line no-console
|
|
12178
|
-
console.error('Failed to restore InterApplicationBus subscription after bfcache restore', error);
|
|
12179
|
-
}
|
|
12180
|
-
});
|
|
12181
|
-
});
|
|
12182
12166
|
}
|
|
12183
12167
|
/**
|
|
12184
12168
|
* Publishes a message to all applications running on OpenFin Runtime that
|
|
@@ -12251,18 +12235,14 @@ class InterApplicationBus extends Base {
|
|
|
12251
12235
|
* ```
|
|
12252
12236
|
*/
|
|
12253
12237
|
subscribe(source, topic, listener) {
|
|
12254
|
-
const
|
|
12255
|
-
const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
|
|
12256
|
-
const subscription = {
|
|
12257
|
-
sourceUuid: source.uuid,
|
|
12258
|
-
sourceWindowName,
|
|
12259
|
-
topic,
|
|
12260
|
-
destinationWindowName: this.me.name
|
|
12261
|
-
};
|
|
12238
|
+
const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
|
|
12262
12239
|
const sendSubscription = async () => {
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12240
|
+
await this.wire.sendAction('subscribe', {
|
|
12241
|
+
sourceUuid: source.uuid,
|
|
12242
|
+
sourceWindowName: source.name || '*',
|
|
12243
|
+
topic,
|
|
12244
|
+
destinationWindowName: this.me.name
|
|
12245
|
+
});
|
|
12266
12246
|
};
|
|
12267
12247
|
const alreadySubscribed = () => {
|
|
12268
12248
|
return Promise.resolve();
|
|
@@ -12298,9 +12278,6 @@ class InterApplicationBus extends Base {
|
|
|
12298
12278
|
const sourceWindowName = source.name || '*';
|
|
12299
12279
|
const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
|
|
12300
12280
|
const sendUnsubscription = async () => {
|
|
12301
|
-
// Dropped before the await so that a restoration landing while this unsubscribe is
|
|
12302
|
-
// still in flight does not replay the subscription being torn down.
|
|
12303
|
-
this.activeSubscriptions.delete(subKey);
|
|
12304
12281
|
await this.wire.sendAction('unsubscribe', {
|
|
12305
12282
|
sourceUuid: source.uuid,
|
|
12306
12283
|
sourceWindowName,
|
|
@@ -12309,9 +12286,6 @@ class InterApplicationBus extends Base {
|
|
|
12309
12286
|
});
|
|
12310
12287
|
};
|
|
12311
12288
|
const dontSendUnsubscription = () => {
|
|
12312
|
-
// TODO(CORE-2749): never settles - the executor evaluates `r` instead of calling it,
|
|
12313
|
-
// so awaiting a non-final unsubscribe hangs the caller. Should be `Promise.resolve()`,
|
|
12314
|
-
// but that changes long-standing behavior, so it is tracked separately from CORE-2740.
|
|
12315
12289
|
return new Promise((r) => r).then(() => undefined);
|
|
12316
12290
|
};
|
|
12317
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.
|
|
3
|
+
"version": "47.100.62",
|
|
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.
|
|
19
|
+
"@openfin/core": "47.100.62"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"prebuild": "rimraf ./out",
|