@openfin/remote-adapter 46.100.84 → 46.100.87

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.
@@ -2150,6 +2150,10 @@ class BrowserEnvironment extends BaseEnvironment {
2150
2150
  observeBounds(element, onChange) {
2151
2151
  throw new Error('Method not implemented.');
2152
2152
  }
2153
+ onBFCacheRestore(listener) {
2154
+ // Generic browser contexts do not participate in bfcache restoration handling.
2155
+ return () => undefined;
2156
+ }
2153
2157
  layoutAllowedInContext(_fin) {
2154
2158
  return false;
2155
2159
  }
@@ -7287,6 +7291,15 @@ class Transport extends events.EventEmitter {
7287
7291
  const { uuid, name } = config;
7288
7292
  const entityType = this.environment.getCurrentEntityType();
7289
7293
  this.me = getBaseMe(entityType, uuid, name);
7294
+ // Registered here rather than per-caller so that a restoration is logged exactly once,
7295
+ // however many parts of the adapter go on to subscribe.
7296
+ this.environment.onBFCacheRestore(async () => {
7297
+ await this.sendAction('write-to-log', {
7298
+ level: 'verbose',
7299
+ message: `Page restored from the back/forward cache for ${uuid}/${name}`,
7300
+ target: {}
7301
+ });
7302
+ });
7290
7303
  }
7291
7304
  getFin() {
7292
7305
  if (!__classPrivateFieldGet$k(this, _Transport_fin, "f")) {
@@ -10892,7 +10905,7 @@ var __classPrivateFieldSet$d = (undefined && undefined.__classPrivateFieldSet) |
10892
10905
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10893
10906
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10894
10907
  };
10895
- var _ChannelProvider_connections, _ChannelProvider_protectedObj, _ChannelProvider_strategy, _ChannelProvider_removeEndpoint, _ChannelProvider_close;
10908
+ var _a$3, _ChannelProvider_connections, _ChannelProvider_protectedObj, _ChannelProvider_strategy, _ChannelProvider_removeEndpoint, _ChannelProvider_close;
10896
10909
  /**
10897
10910
  * Instance created to enable use of a channel as a provider. Allows for communication with the {@link ChannelClient ChannelClients} by invoking an action on
10898
10911
  * a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
@@ -10940,7 +10953,7 @@ class ChannelProvider extends ChannelBase {
10940
10953
  channel.disconnectListener(payload);
10941
10954
  }
10942
10955
  static setProviderRemoval(provider, remove) {
10943
- ChannelProvider.removalMap.set(provider, remove);
10956
+ _a$3.removalMap.set(provider, remove);
10944
10957
  }
10945
10958
  /**
10946
10959
  * @internal
@@ -10957,7 +10970,7 @@ class ChannelProvider extends ChannelBase {
10957
10970
  });
10958
10971
  // Must be bound.
10959
10972
  this.processAction = async (action, payload, senderIdentity) => {
10960
- if (ChannelProvider.clientIsMultiRuntime(senderIdentity) &&
10973
+ if (_a$3.clientIsMultiRuntime(senderIdentity) &&
10961
10974
  !runtimeUuidMeetsMinimumRuntimeVersion(senderIdentity.runtimeUuid, '18.87.56.0')) {
10962
10975
  this.handleMultiRuntimeLegacyClient(senderIdentity);
10963
10976
  }
@@ -10968,7 +10981,7 @@ class ChannelProvider extends ChannelBase {
10968
10981
  };
10969
10982
  _ChannelProvider_close.set(this, () => {
10970
10983
  __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").close();
10971
- const remove = ChannelProvider.removalMap.get(this);
10984
+ const remove = _a$3.removalMap.get(this);
10972
10985
  if (remove) {
10973
10986
  remove();
10974
10987
  }
@@ -11164,7 +11177,7 @@ class ChannelProvider extends ChannelBase {
11164
11177
  }
11165
11178
  }
11166
11179
  isClientConnected(clientIdentity) {
11167
- if (ChannelProvider.clientIdentityIncludesEndpointId(clientIdentity)) {
11180
+ if (_a$3.clientIdentityIncludesEndpointId(clientIdentity)) {
11168
11181
  return this.connections.some((identity) => {
11169
11182
  return (
11170
11183
  // Might be redundant to check for uuid and name here after we get an endpointId match, but just in case
@@ -11214,7 +11227,7 @@ class ChannelProvider extends ChannelBase {
11214
11227
  await wire.sendAction('destroy-channel', { channelName });
11215
11228
  }
11216
11229
  }
11217
- _ChannelProvider_connections = new WeakMap(), _ChannelProvider_protectedObj = new WeakMap(), _ChannelProvider_strategy = new WeakMap(), _ChannelProvider_removeEndpoint = new WeakMap(), _ChannelProvider_close = new WeakMap();
11230
+ _a$3 = ChannelProvider, _ChannelProvider_connections = new WeakMap(), _ChannelProvider_protectedObj = new WeakMap(), _ChannelProvider_strategy = new WeakMap(), _ChannelProvider_removeEndpoint = new WeakMap(), _ChannelProvider_close = new WeakMap();
11218
11231
  // The following line should be changed following a typescript update.
11219
11232
  // static #removalMap = new WeakMap<ChannelProvider, Function>();
11220
11233
  ChannelProvider.removalMap = new WeakMap();
@@ -12508,7 +12521,7 @@ var __classPrivateFieldGet$b = (undefined && undefined.__classPrivateFieldGet) |
12508
12521
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12509
12522
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12510
12523
  };
12511
- var _Platform_channelName, _Platform_connectToProvider;
12524
+ var _a$2, _Platform_channelName, _Platform_connectToProvider;
12512
12525
  /** Manages the life cycle of windows and views in the application.
12513
12526
  *
12514
12527
  * Enables taking snapshots of itself and applying them to restore a previous configuration
@@ -12530,29 +12543,29 @@ class Platform extends EmitterBase {
12530
12543
  if (identity.uuid !== this.identity.uuid) {
12531
12544
  // I have no idea why we allow passing in a different identity, but we do.
12532
12545
  // Doing this above the analytics call so we only register one call.
12533
- return new Platform(this.wire, identity).getClient();
12546
+ return new _a$2(this.wire, identity).getClient();
12534
12547
  }
12535
12548
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
12536
12549
  // don't expose
12537
12550
  });
12538
- if (!Platform.clientMap.has(__classPrivateFieldGet$b(this, _Platform_channelName, "f"))) {
12551
+ if (!_a$2.clientMap.has(__classPrivateFieldGet$b(this, _Platform_channelName, "f"))) {
12539
12552
  const clientPromise = __classPrivateFieldGet$b(this, _Platform_connectToProvider, "f").call(this);
12540
- Platform.clientMap.set(__classPrivateFieldGet$b(this, _Platform_channelName, "f"), clientPromise);
12553
+ _a$2.clientMap.set(__classPrivateFieldGet$b(this, _Platform_channelName, "f"), clientPromise);
12541
12554
  }
12542
12555
  // we set it above
12543
12556
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12544
- return Platform.clientMap.get(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12557
+ return _a$2.clientMap.get(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12545
12558
  };
12546
12559
  _Platform_connectToProvider.set(this, async () => {
12547
12560
  try {
12548
12561
  const client = await this._channel.connect(__classPrivateFieldGet$b(this, _Platform_channelName, "f"), { wait: false });
12549
12562
  client.onDisconnection(() => {
12550
- Platform.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12563
+ _a$2.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12551
12564
  });
12552
12565
  return client;
12553
12566
  }
12554
12567
  catch (e) {
12555
- Platform.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12568
+ _a$2.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12556
12569
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
12557
12570
  }
12558
12571
  });
@@ -13330,7 +13343,7 @@ class Platform extends EmitterBase {
13330
13343
  return client.dispatch('close-window', { windowId, options });
13331
13344
  }
13332
13345
  }
13333
- _Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
13346
+ _a$2 = Platform, _Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
13334
13347
  /**
13335
13348
  * @internal
13336
13349
  * Reuse clients to avoid overwriting already-registered client in provider
@@ -13432,7 +13445,7 @@ var __classPrivateFieldGet$a = (undefined && undefined.__classPrivateFieldGet) |
13432
13445
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13433
13446
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13434
13447
  };
13435
- var _LayoutNode_client, _TabStack_client, _ColumnOrRow_client;
13448
+ var _a$1, _LayoutNode_client, _TabStack_client, _ColumnOrRow_client;
13436
13449
  /*
13437
13450
  This file includes LayoutNode, ColumnOrRow and TabStack classes, which are all closely
13438
13451
  intertwined, and share members via parent abstract class LayoutNode. To prevent circular
@@ -13522,7 +13535,7 @@ class LayoutNode {
13522
13535
  if (!parent) {
13523
13536
  return undefined;
13524
13537
  }
13525
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13538
+ return _a$1.getEntity(parent, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13526
13539
  };
13527
13540
  /**
13528
13541
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -13574,7 +13587,7 @@ class LayoutNode {
13574
13587
  */
13575
13588
  this.createAdjacentStack = async (views, options) => {
13576
13589
  const entityId = await __classPrivateFieldGet$a(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13577
- return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13590
+ return _a$1.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13578
13591
  };
13579
13592
  /**
13580
13593
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -13606,7 +13619,7 @@ class LayoutNode {
13606
13619
  targetId: this.entityId,
13607
13620
  edge
13608
13621
  });
13609
- return adjacentStacks.map((stack) => LayoutNode.getEntity({
13622
+ return adjacentStacks.map((stack) => _a$1.getEntity({
13610
13623
  type: 'stack',
13611
13624
  entityId: stack.entityId
13612
13625
  }, __classPrivateFieldGet$a(this, _LayoutNode_client, "f")));
@@ -13615,7 +13628,7 @@ class LayoutNode {
13615
13628
  this.entityId = entityId;
13616
13629
  }
13617
13630
  }
13618
- _LayoutNode_client = new WeakMap();
13631
+ _a$1 = LayoutNode, _LayoutNode_client = new WeakMap();
13619
13632
  /**
13620
13633
  * @ignore
13621
13634
  * @internal
@@ -14853,6 +14866,7 @@ class SessionContextGroupClient extends Base {
14853
14866
  }
14854
14867
  }
14855
14868
  _SessionContextGroupClient_clientPromise = new WeakMap();
14869
+ var SessionContextGroupClient$1 = SessionContextGroupClient;
14856
14870
 
14857
14871
  var __classPrivateFieldSet$6 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14858
14872
  if (kind === "m") throw new TypeError("Private method is not writable");
@@ -14879,10 +14893,10 @@ class ChannelEvents {
14879
14893
  _ChannelEvents_isChannelReady.set(this, false);
14880
14894
  _ChannelEvents_getActions.set(this, async () => {
14881
14895
  const channelClient = await __classPrivateFieldGet$6(this, _ChannelEvents_channelClient, "f");
14882
- let actions = __classPrivateFieldGet$6(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
14896
+ let actions = __classPrivateFieldGet$6(_a, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
14883
14897
  if (!actions) {
14884
14898
  actions = {};
14885
- __classPrivateFieldGet$6(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
14899
+ __classPrivateFieldGet$6(_a, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
14886
14900
  }
14887
14901
  return actions;
14888
14902
  });
@@ -15551,7 +15565,7 @@ class InteropClient extends Base {
15551
15565
  if (hasConflict) {
15552
15566
  console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
15553
15567
  }
15554
- const newSessionContextGroup = new SessionContextGroupClient(this.wire, __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15568
+ const newSessionContextGroup = new SessionContextGroupClient$1(this.wire, __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15555
15569
  __classPrivateFieldGet$5(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15556
15570
  return newSessionContextGroup.getUserInstance();
15557
15571
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "46.100.84",
3
+ "version": "46.100.87",
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": "46.100.84"
19
+ "@openfin/core": "46.100.87"
20
20
  },
21
21
  "scripts": {
22
22
  "prebuild": "rimraf ./out",