@openfin/remote-adapter 36.79.3 → 36.79.5

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.
@@ -6493,7 +6493,7 @@ class WebSocketTransport extends events_1$4.EventEmitter {
6493
6493
  }
6494
6494
  var _default = websocket.default = WebSocketTransport;
6495
6495
 
6496
- var fin = {};
6496
+ var fin$1 = {};
6497
6497
 
6498
6498
  var system = {};
6499
6499
 
@@ -11953,7 +11953,7 @@ const validate_1 = validate;
11953
11953
  const base_1$6 = base;
11954
11954
  const common_utils_1 = commonUtils;
11955
11955
  const layout_entities_1 = layoutEntities;
11956
- const layout_constants_1 = layout_constants;
11956
+ const layout_constants_1$1 = layout_constants;
11957
11957
  /**
11958
11958
  *
11959
11959
  * Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
@@ -12098,7 +12098,7 @@ class Layout extends base_1$6.Base {
12098
12098
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
12099
12099
  * The client is for {@link LayoutEntitiesController}
12100
12100
  */
12101
- _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1.LAYOUT_CONTROLLER_ID, this.identity)));
12101
+ _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
12102
12102
  /**
12103
12103
  * Replaces a Platform window's layout with a new layout.
12104
12104
  *
@@ -12326,11 +12326,12 @@ var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12326
12326
  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");
12327
12327
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12328
12328
  };
12329
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_waitForBackCompatLayoutManager, _LayoutModule_getSafeLayoutManager;
12329
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getSafeLayoutManager;
12330
12330
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12331
12331
  Factory$2.LayoutModule = void 0;
12332
12332
  const base_1$5 = base;
12333
12333
  const Instance_1$2 = Instance$1;
12334
+ const layout_constants_1 = layout_constants;
12334
12335
  /**
12335
12336
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
12336
12337
  */
@@ -12390,17 +12391,15 @@ class LayoutModule extends base_1$5.Base {
12390
12391
  }
12391
12392
  __classPrivateFieldSet$3(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12392
12393
  __classPrivateFieldSet$3(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12393
- // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
12394
- let backCompatLayoutPromise;
12395
- if (!options.layoutManagerOverride) {
12396
- backCompatLayoutPromise = __classPrivateFieldGet$3(this, _LayoutModule_waitForBackCompatLayoutManager, "f").call(this, this.fin);
12397
- }
12398
12394
  // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
12399
12395
  const platformClient = await this.fin.Platform.getCurrentSync().getClient();
12400
12396
  const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
12401
12397
  await __classPrivateFieldGet$3(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
12402
- if (backCompatLayoutPromise) {
12403
- return backCompatLayoutPromise;
12398
+ if (!options.layoutManagerOverride) {
12399
+ // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
12400
+ const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...this.fin.me.identity };
12401
+ const layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$3(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12402
+ return Object.assign(this.wrapSync(layoutIdentity), { layoutManager });
12404
12403
  }
12405
12404
  // warn user if they do not call create() in the next 30 seconds
12406
12405
  setTimeout(() => {
@@ -12411,23 +12410,6 @@ class LayoutModule extends base_1$5.Base {
12411
12410
  }, 30000);
12412
12411
  return this.wrapSync(this.fin.me.identity);
12413
12412
  };
12414
- // deprecate with CORE-1081
12415
- _LayoutModule_waitForBackCompatLayoutManager.set(this, async (fin) => {
12416
- let layoutManager;
12417
- let resolve;
12418
- const layoutResolved = new Promise((r) => {
12419
- resolve = r;
12420
- });
12421
- // wait for a layout to be created
12422
- await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
12423
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12424
- layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$3(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12425
- // Backward compat - undocumented / not typed openfin-layout as layoutManager
12426
- // TODO: eventually deprecate this
12427
- resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
12428
- });
12429
- return layoutResolved;
12430
- });
12431
12413
  /**
12432
12414
  * Returns the layout manager for the current window
12433
12415
  * @returns
@@ -12537,7 +12519,7 @@ class LayoutModule extends base_1$5.Base {
12537
12519
  }
12538
12520
  }
12539
12521
  Factory$2.LayoutModule = LayoutModule;
12540
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_waitForBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
12522
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
12541
12523
  if (!__classPrivateFieldGet$3(this, _LayoutModule_layoutManager, "f")) {
12542
12524
  throw new Error(`You must call init before using the API ${method}`);
12543
12525
  }
@@ -12651,6 +12633,9 @@ class PlatformModule extends base_1$4.Base {
12651
12633
  * @experimental
12652
12634
  */
12653
12635
  async init(options) {
12636
+ if (!fin.__internal_.isPlatform || fin.me.name !== fin.me.uuid) {
12637
+ throw new Error('fin.Platform.init should only be called from a custom platform provider running in the main window of the application.');
12638
+ }
12654
12639
  return this.wire.environment.initPlatform(this.fin, options);
12655
12640
  }
12656
12641
  /**
@@ -15787,8 +15772,8 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
15787
15772
  __exportStar(Instance, exports);
15788
15773
  } (snapshotSource));
15789
15774
 
15790
- Object.defineProperty(fin, "__esModule", { value: true });
15791
- var Fin_1 = fin.Fin = void 0;
15775
+ Object.defineProperty(fin$1, "__esModule", { value: true });
15776
+ var Fin_1 = fin$1.Fin = void 0;
15792
15777
  const events_1 = require$$0;
15793
15778
  // Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
15794
15779
  const index_1 = system;
@@ -15834,13 +15819,13 @@ class Fin extends events_1.EventEmitter {
15834
15819
  });
15835
15820
  }
15836
15821
  }
15837
- Fin_1 = fin.Fin = Fin;
15822
+ Fin_1 = fin$1.Fin = Fin;
15838
15823
 
15839
15824
  var browser = {};
15840
15825
 
15841
15826
  Object.defineProperty(browser, "__esModule", { value: true });
15842
15827
  browser.remoteConnectInterop = browser.remoteConnect = getRemoteConnectionPayload_1 = browser.getRemoteConnectionPayload = void 0;
15843
- const fin_1 = fin;
15828
+ const fin_1 = fin$1;
15844
15829
  const browser_1 = browser$1;
15845
15830
  const transport_1 = transport;
15846
15831
  const websocket_1 = websocket;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "36.79.3",
3
+ "version": "36.79.5",
4
4
  "description": "Establish intermachine runtime connections using webRTC.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,