@openfin/node-adapter 34.78.66 → 34.78.69

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.
Files changed (2) hide show
  1. package/out/node-adapter.js +29 -43
  2. package/package.json +1 -1
@@ -12382,7 +12382,7 @@ const validate_1 = validate;
12382
12382
  const base_1$6 = base$1;
12383
12383
  const common_utils_1 = commonUtils;
12384
12384
  const layout_entities_1 = layoutEntities;
12385
- const layout_constants_1 = layout_constants;
12385
+ const layout_constants_1$1 = layout_constants;
12386
12386
  /**
12387
12387
  *
12388
12388
  * Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
@@ -12527,7 +12527,7 @@ class Layout extends base_1$6.Base {
12527
12527
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
12528
12528
  * The client is for {@link LayoutEntitiesController}
12529
12529
  */
12530
- _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)));
12530
+ _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)));
12531
12531
  /**
12532
12532
  * Replaces a Platform window's layout with a new layout.
12533
12533
  *
@@ -12755,11 +12755,12 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12755
12755
  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");
12756
12756
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12757
12757
  };
12758
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_waitForBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12758
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12759
12759
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12760
12760
  Factory$2.LayoutModule = void 0;
12761
12761
  const base_1$5 = base$1;
12762
12762
  const Instance_1$2 = Instance$1;
12763
+ const layout_constants_1 = layout_constants;
12763
12764
  /**
12764
12765
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
12765
12766
  */
@@ -12819,17 +12820,15 @@ class LayoutModule extends base_1$5.Base {
12819
12820
  }
12820
12821
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12821
12822
  __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12822
- // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
12823
- let backCompatLayoutPromise;
12824
- if (!options.layoutManagerOverride) {
12825
- backCompatLayoutPromise = __classPrivateFieldGet$4(this, _LayoutModule_waitForBackCompatLayoutManager, "f").call(this, this.fin);
12826
- }
12827
12823
  // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
12828
12824
  const platformClient = await this.fin.Platform.getCurrentSync().getClient();
12829
12825
  const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
12830
12826
  await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
12831
- if (backCompatLayoutPromise) {
12832
- return backCompatLayoutPromise;
12827
+ if (!options.layoutManagerOverride) {
12828
+ // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
12829
+ const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...this.fin.me.identity };
12830
+ const layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12831
+ return Object.assign(this.wrapSync(layoutIdentity), { layoutManager });
12833
12832
  }
12834
12833
  // warn user if they do not call create() in the next 30 seconds
12835
12834
  setTimeout(() => {
@@ -12840,23 +12839,6 @@ class LayoutModule extends base_1$5.Base {
12840
12839
  }, 30000);
12841
12840
  return this.wrapSync(this.fin.me.identity);
12842
12841
  };
12843
- // deprecate with CORE-1081
12844
- _LayoutModule_waitForBackCompatLayoutManager.set(this, async (fin) => {
12845
- let layoutManager;
12846
- let resolve;
12847
- const layoutResolved = new Promise((r) => {
12848
- resolve = r;
12849
- });
12850
- // wait for a layout to be created
12851
- await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
12852
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12853
- layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12854
- // Backward compat - undocumented / not typed openfin-layout as layoutManager
12855
- // TODO: eventually deprecate this
12856
- resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
12857
- });
12858
- return layoutResolved;
12859
- });
12860
12842
  /**
12861
12843
  * Returns the layout manager for the current window
12862
12844
  * @returns
@@ -12970,7 +12952,7 @@ class LayoutModule extends base_1$5.Base {
12970
12952
  }
12971
12953
  }
12972
12954
  Factory$2.LayoutModule = LayoutModule;
12973
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_waitForBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12955
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12974
12956
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
12975
12957
  throw new Error(`You must call init before using the API ${method}`);
12976
12958
  }
@@ -16037,29 +16019,33 @@ function requireOverrideCheck () {
16037
16019
  if (hasRequiredOverrideCheck) return overrideCheck;
16038
16020
  hasRequiredOverrideCheck = 1;
16039
16021
  Object.defineProperty(overrideCheck, "__esModule", { value: true });
16040
- overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
16022
+ overrideCheck.overrideCheck = overrideCheck.checkFDC32Overrides = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
16041
16023
  const InteropBroker_1 = requireInteropBroker();
16042
16024
  function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
16043
16025
  const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
16044
16026
  return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
16045
16027
  }
16046
16028
  overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
16047
- // TODO: Unit test this
16029
+ function checkFDC32Overrides(overriddenBroker) {
16030
+ // These are the APIs that must be overridden for FDC3 2.0 compliance
16031
+ const mustOverrideAPIs = [
16032
+ 'fdc3HandleFindInstances',
16033
+ 'handleInfoForIntent',
16034
+ 'handleInfoForIntentsByContext',
16035
+ 'fdc3HandleGetAppMetadata',
16036
+ 'fdc3HandleGetInfo',
16037
+ 'fdc3HandleOpen',
16038
+ 'handleFiredIntent',
16039
+ 'handleFiredIntentForContext'
16040
+ ];
16041
+ return mustOverrideAPIs.filter((api) => {
16042
+ return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
16043
+ });
16044
+ }
16045
+ overrideCheck.checkFDC32Overrides = checkFDC32Overrides;
16048
16046
  function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
16049
16047
  if (fdc3InteropApi && fdc3InteropApi === '2.0') {
16050
- const mustOverrideAPIs = [
16051
- 'fdc3HandleFindInstances',
16052
- 'handleInfoForIntent',
16053
- 'handleInfoForIntentsByContext',
16054
- 'fdc3HandleGetAppMetadata',
16055
- 'fdc3HandleGetInfo',
16056
- 'fdc3HandleOpen',
16057
- 'handleFiredIntent',
16058
- 'handleFiredIntentForContext'
16059
- ];
16060
- const notOverridden = mustOverrideAPIs.filter((api) => {
16061
- return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
16062
- });
16048
+ const notOverridden = checkFDC32Overrides(overriddenBroker);
16063
16049
  if (notOverridden.length > 0) {
16064
16050
  console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${notOverridden.join('\n')}`);
16065
16051
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "34.78.66",
3
+ "version": "34.78.69",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",