@openfin/node-adapter 46.100.85 → 46.100.88

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.
@@ -3646,6 +3646,9 @@ class _Window extends WebContents {
3646
3646
  /**
3647
3647
  * Removes focus from the window.
3648
3648
  *
3649
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
3650
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
3651
+ *
3649
3652
  * @example
3650
3653
  * ```js
3651
3654
  * async function blurWindow() {
@@ -9457,16 +9460,21 @@ class InterApplicationBus extends Base {
9457
9460
  * Subscribes to messages from the specified application on the specified topic.
9458
9461
  * @param source This object is described in the Identity in the typedef
9459
9462
  * @param topic The topic on which the message is sent
9460
- * @param listener A function that is called when a message has
9461
- * been received. It is passed the message, uuid and name of the sending application.
9463
+ * @param listener A function that is called when a message has been received. It is passed
9464
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
9462
9465
  * The message can be either a primitive data type (string, number, or boolean) or
9463
9466
  * composite data type (object, array) that is composed of other primitive or composite
9464
9467
  * data types
9465
9468
  *
9469
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
9470
+ * which passes `(message, uuid, name)` as separate arguments.
9471
+ *
9466
9472
  * @example
9467
9473
  * ```js
9468
9474
  * // subscribe to a specified application
9469
- * fin.InterApplicationBus.subscribe(fin.me, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
9475
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
9476
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
9477
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
9470
9478
  *
9471
9479
  * // subscribe to wildcard
9472
9480
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
@@ -17592,11 +17600,15 @@ class NodeEnvironment extends BaseEnvironment {
17592
17600
  };
17593
17601
  }
17594
17602
  getAdapterVersionSync() {
17595
- return "46.100.85";
17603
+ return "46.100.88";
17596
17604
  }
17597
17605
  observeBounds(element, onChange) {
17598
17606
  throw new Error('Method not implemented.');
17599
17607
  }
17608
+ onBFCacheRestore(listener) {
17609
+ // There is no page to restore in a Node.js process.
17610
+ return () => undefined;
17611
+ }
17600
17612
  getDefaultChannelOptions() {
17601
17613
  return { create: {}, connect: {} };
17602
17614
  }
@@ -17751,6 +17763,15 @@ class Transport extends events.EventEmitter {
17751
17763
  const { uuid, name } = config;
17752
17764
  const entityType = this.environment.getCurrentEntityType();
17753
17765
  this.me = getBaseMe(entityType, uuid, name);
17766
+ // Registered here rather than per-caller so that a restoration is logged exactly once,
17767
+ // however many parts of the adapter go on to subscribe.
17768
+ this.environment.onBFCacheRestore(async () => {
17769
+ await this.sendAction('write-to-log', {
17770
+ level: 'verbose',
17771
+ message: `Page restored from the back/forward cache for ${uuid}/${name}`,
17772
+ target: {}
17773
+ });
17774
+ });
17754
17775
  }
17755
17776
  getFin() {
17756
17777
  if (!__classPrivateFieldGet(this, _Transport_fin, "f")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "46.100.85",
3
+ "version": "46.100.88",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -16,11 +16,11 @@
16
16
  ],
17
17
  "author": "OpenFin",
18
18
  "dependencies": {
19
- "@types/node": "^20.14.2",
19
+ "@types/node": "^24.19.2",
20
20
  "es-toolkit": "^1.39.3",
21
21
  "ws": "^7.5.11",
22
22
  "tslib": "2.8.1",
23
- "@openfin/core": "46.100.85"
23
+ "@openfin/core": "46.100.88"
24
24
  },
25
25
  "scripts": {
26
26
  "prebuild": "rimraf ./out",