@openfin/node-adapter 34.78.65 → 34.78.67

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.
@@ -9954,7 +9954,7 @@ declare type MutableWindowOptions = {
9954
9954
  showTaskbarIcon: boolean;
9955
9955
  interop: InteropConfig;
9956
9956
  /* Excluded from this release type: _internalWorkspaceData */
9957
- workspacePlatform: unknown;
9957
+ /* Excluded from this release type: workspacePlatform */
9958
9958
  };
9959
9959
 
9960
9960
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9954,7 +9954,7 @@ declare type MutableWindowOptions = {
9954
9954
  showTaskbarIcon: boolean;
9955
9955
  interop: InteropConfig;
9956
9956
  /* Excluded from this release type: _internalWorkspaceData */
9957
- workspacePlatform: unknown;
9957
+ /* Excluded from this release type: workspacePlatform */
9958
9958
  };
9959
9959
 
9960
9960
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9954,7 +9954,7 @@ declare type MutableWindowOptions = {
9954
9954
  showTaskbarIcon: boolean;
9955
9955
  interop: InteropConfig;
9956
9956
  /* Excluded from this release type: _internalWorkspaceData */
9957
- workspacePlatform: unknown;
9957
+ /* Excluded from this release type: workspacePlatform */
9958
9958
  };
9959
9959
 
9960
9960
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10261,7 +10261,11 @@ declare type MutableWindowOptions = {
10261
10261
  * Used by Workspace to store custom data. Overwriting or modifying this field may impact the functionality of Workspace
10262
10262
  */
10263
10263
  _internalWorkspaceData: any;
10264
- workspacePlatform: unknown;
10264
+ /**
10265
+ * @internal
10266
+ * Used by workspace to stork platform specific options. Overwriting or modifying this field may impact the functionality of Workspace
10267
+ */
10268
+ workspacePlatform: WorkspacePlatformOptions;
10265
10269
  };
10266
10270
 
10267
10271
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -12755,7 +12755,7 @@ 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_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12758
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_waitForBackCompatLayoutManager, _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;
@@ -12819,12 +12819,17 @@ class LayoutModule extends base_1$5.Base {
12819
12819
  }
12820
12820
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12821
12821
  __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
+ }
12822
12827
  // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
12823
12828
  const platformClient = await this.fin.Platform.getCurrentSync().getClient();
12824
12829
  const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
12825
12830
  await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
12826
- if (!options.layoutManagerOverride) {
12827
- return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
12831
+ if (backCompatLayoutPromise) {
12832
+ return backCompatLayoutPromise;
12828
12833
  }
12829
12834
  // warn user if they do not call create() in the next 30 seconds
12830
12835
  setTimeout(() => {
@@ -12835,7 +12840,8 @@ class LayoutModule extends base_1$5.Base {
12835
12840
  }, 30000);
12836
12841
  return this.wrapSync(this.fin.me.identity);
12837
12842
  };
12838
- _LayoutModule_getBackCompatLayoutManager.set(this, async (fin) => {
12843
+ // deprecate with CORE-1081
12844
+ _LayoutModule_waitForBackCompatLayoutManager.set(this, async (fin) => {
12839
12845
  let layoutManager;
12840
12846
  let resolve;
12841
12847
  const layoutResolved = new Promise((r) => {
@@ -12964,7 +12970,7 @@ class LayoutModule extends base_1$5.Base {
12964
12970
  }
12965
12971
  }
12966
12972
  Factory$2.LayoutModule = LayoutModule;
12967
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12973
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_waitForBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12968
12974
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
12969
12975
  throw new Error(`You must call init before using the API ${method}`);
12970
12976
  }
@@ -16031,29 +16037,33 @@ function requireOverrideCheck () {
16031
16037
  if (hasRequiredOverrideCheck) return overrideCheck;
16032
16038
  hasRequiredOverrideCheck = 1;
16033
16039
  Object.defineProperty(overrideCheck, "__esModule", { value: true });
16034
- overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
16040
+ overrideCheck.overrideCheck = overrideCheck.checkFDC32Overrides = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
16035
16041
  const InteropBroker_1 = requireInteropBroker();
16036
16042
  function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
16037
16043
  const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
16038
16044
  return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
16039
16045
  }
16040
16046
  overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
16041
- // TODO: Unit test this
16047
+ function checkFDC32Overrides(overriddenBroker) {
16048
+ // These are the APIs that must be overridden for FDC3 2.0 compliance
16049
+ const mustOverrideAPIs = [
16050
+ 'fdc3HandleFindInstances',
16051
+ 'handleInfoForIntent',
16052
+ 'handleInfoForIntentsByContext',
16053
+ 'fdc3HandleGetAppMetadata',
16054
+ 'fdc3HandleGetInfo',
16055
+ 'fdc3HandleOpen',
16056
+ 'handleFiredIntent',
16057
+ 'handleFiredIntentForContext'
16058
+ ];
16059
+ return mustOverrideAPIs.filter((api) => {
16060
+ return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
16061
+ });
16062
+ }
16063
+ overrideCheck.checkFDC32Overrides = checkFDC32Overrides;
16042
16064
  function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
16043
16065
  if (fdc3InteropApi && fdc3InteropApi === '2.0') {
16044
- const mustOverrideAPIs = [
16045
- 'fdc3HandleFindInstances',
16046
- 'handleInfoForIntent',
16047
- 'handleInfoForIntentsByContext',
16048
- 'fdc3HandleGetAppMetadata',
16049
- 'fdc3HandleGetInfo',
16050
- 'fdc3HandleOpen',
16051
- 'handleFiredIntent',
16052
- 'handleFiredIntentForContext'
16053
- ];
16054
- const notOverridden = mustOverrideAPIs.filter((api) => {
16055
- return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
16056
- });
16066
+ const notOverridden = checkFDC32Overrides(overriddenBroker);
16057
16067
  if (notOverridden.length > 0) {
16058
16068
  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')}`);
16059
16069
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "34.78.65",
3
+ "version": "34.78.67",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",