@openfin/node-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.
- package/out/node-adapter.js +10 -37
- package/package.json +2 -2
package/out/node-adapter.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
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);
|
|
@@ -10028,9 +10002,8 @@ class ExternalApplicationModule extends Base {
|
|
|
10028
10002
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
10029
10003
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
10030
10004
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
10031
|
-
*
|
|
10032
|
-
*
|
|
10033
|
-
* the same as the parent window's.
|
|
10005
|
+
* Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
|
|
10006
|
+
* its UUID is the same as the parent window's.
|
|
10034
10007
|
*
|
|
10035
10008
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
10036
10009
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -17809,7 +17782,7 @@ class NodeEnvironment extends BaseEnvironment {
|
|
|
17809
17782
|
};
|
|
17810
17783
|
}
|
|
17811
17784
|
getAdapterVersionSync() {
|
|
17812
|
-
return "47.100.
|
|
17785
|
+
return "47.100.61";
|
|
17813
17786
|
}
|
|
17814
17787
|
observeBounds(element, onChange) {
|
|
17815
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.
|
|
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.
|
|
23
|
+
"@openfin/core": "47.100.61"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"prebuild": "rimraf ./out",
|