@openfin/node-adapter 35.78.29 → 36.78.1

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.
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4755,7 +4755,7 @@ declare type DownloadShelfOptions = {
4755
4755
  */
4756
4756
  size?: number;
4757
4757
  /**
4758
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4758
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4759
4759
  * if absent.
4760
4760
  */
4761
4761
  color?: string;
@@ -6568,6 +6568,8 @@ declare type InitPlatformOptions = {
6568
6568
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6569
6569
  };
6570
6570
 
6571
+ declare type InjectionType = 'none' | 'global';
6572
+
6571
6573
  /**
6572
6574
  * Generated when the value of the element changes.
6573
6575
  * @interface
@@ -7412,8 +7414,6 @@ declare type InteropBrokerOptions = {
7412
7414
  };
7413
7415
 
7414
7416
  /**
7415
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7416
- *
7417
7417
  * The Interop Client API is broken up into two groups:
7418
7418
  *
7419
7419
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7816,7 +7816,7 @@ declare class InteropClient extends Base {
7816
7816
  * ```
7817
7817
  */
7818
7818
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7819
- static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7819
+ /* Excluded from this release type: ferryFdc3Call */
7820
7820
  }
7821
7821
 
7822
7822
  /**
@@ -9726,6 +9726,7 @@ declare namespace OpenFin {
9726
9726
  ResizeRegion,
9727
9727
  Accelerator,
9728
9728
  Api,
9729
+ InjectionType,
9729
9730
  NavigationRules,
9730
9731
  ContentNavigation,
9731
9732
  ContentRedirect,
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4755,7 +4755,7 @@ declare type DownloadShelfOptions = {
4755
4755
  */
4756
4756
  size?: number;
4757
4757
  /**
4758
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4758
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4759
4759
  * if absent.
4760
4760
  */
4761
4761
  color?: string;
@@ -6568,6 +6568,8 @@ declare type InitPlatformOptions = {
6568
6568
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6569
6569
  };
6570
6570
 
6571
+ declare type InjectionType = 'none' | 'global';
6572
+
6571
6573
  /**
6572
6574
  * Generated when the value of the element changes.
6573
6575
  * @interface
@@ -7412,8 +7414,6 @@ declare type InteropBrokerOptions = {
7412
7414
  };
7413
7415
 
7414
7416
  /**
7415
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7416
- *
7417
7417
  * The Interop Client API is broken up into two groups:
7418
7418
  *
7419
7419
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7816,7 +7816,7 @@ declare class InteropClient extends Base {
7816
7816
  * ```
7817
7817
  */
7818
7818
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7819
- static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7819
+ /* Excluded from this release type: ferryFdc3Call */
7820
7820
  }
7821
7821
 
7822
7822
  /**
@@ -9726,6 +9726,7 @@ declare namespace OpenFin {
9726
9726
  ResizeRegion,
9727
9727
  Accelerator,
9728
9728
  Api,
9729
+ InjectionType,
9729
9730
  NavigationRules,
9730
9731
  ContentNavigation,
9731
9732
  ContentRedirect,
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4755,7 +4755,7 @@ declare type DownloadShelfOptions = {
4755
4755
  */
4756
4756
  size?: number;
4757
4757
  /**
4758
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4758
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4759
4759
  * if absent.
4760
4760
  */
4761
4761
  color?: string;
@@ -6568,6 +6568,8 @@ declare type InitPlatformOptions = {
6568
6568
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6569
6569
  };
6570
6570
 
6571
+ declare type InjectionType = 'none' | 'global';
6572
+
6571
6573
  /**
6572
6574
  * Generated when the value of the element changes.
6573
6575
  * @interface
@@ -7412,8 +7414,6 @@ declare type InteropBrokerOptions = {
7412
7414
  };
7413
7415
 
7414
7416
  /**
7415
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7416
- *
7417
7417
  * The Interop Client API is broken up into two groups:
7418
7418
  *
7419
7419
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7816,7 +7816,7 @@ declare class InteropClient extends Base {
7816
7816
  * ```
7817
7817
  */
7818
7818
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7819
- static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7819
+ /* Excluded from this release type: ferryFdc3Call */
7820
7820
  }
7821
7821
 
7822
7822
  /**
@@ -9726,6 +9726,7 @@ declare namespace OpenFin {
9726
9726
  ResizeRegion,
9727
9727
  Accelerator,
9728
9728
  Api,
9729
+ InjectionType,
9729
9730
  NavigationRules,
9730
9731
  ContentNavigation,
9731
9732
  ContentRedirect,
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4798,7 +4798,7 @@ declare type DownloadShelfOptions = {
4798
4798
  */
4799
4799
  size?: number;
4800
4800
  /**
4801
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4801
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4802
4802
  * if absent.
4803
4803
  */
4804
4804
  color?: string;
@@ -6668,6 +6668,8 @@ declare type InitPlatformOptions = {
6668
6668
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6669
6669
  };
6670
6670
 
6671
+ declare type InjectionType = 'none' | 'global';
6672
+
6671
6673
  /**
6672
6674
  * Generated when the value of the element changes.
6673
6675
  * @interface
@@ -7527,8 +7529,6 @@ declare type InteropBrokerOptions = {
7527
7529
  };
7528
7530
 
7529
7531
  /**
7530
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7531
- *
7532
7532
  * The Interop Client API is broken up into two groups:
7533
7533
  *
7534
7534
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7934,6 +7934,11 @@ declare class InteropClient extends Base {
7934
7934
  * ```
7935
7935
  */
7936
7936
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7937
+ /**
7938
+ * @internal
7939
+ *
7940
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
7941
+ */
7937
7942
  static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7938
7943
  }
7939
7944
 
@@ -10038,6 +10043,7 @@ declare namespace OpenFin {
10038
10043
  ResizeRegion,
10039
10044
  Accelerator,
10040
10045
  Api,
10046
+ InjectionType,
10041
10047
  NavigationRules,
10042
10048
  ContentNavigation,
10043
10049
  ContentRedirect,
@@ -8054,7 +8054,8 @@ function errorToPOJO(error) {
8054
8054
  stack: error.stack,
8055
8055
  name: error.name,
8056
8056
  message: error.message,
8057
- toString: error.toString
8057
+ // support the case where stack is empty or missing
8058
+ toString: () => error.stack || error.toString()
8058
8059
  };
8059
8060
  }
8060
8061
  errors.errorToPOJO = errorToPOJO;
@@ -11659,7 +11660,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
11659
11660
  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");
11660
11661
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11661
11662
  };
11662
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
11663
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_getSafeLayoutManager;
11663
11664
  Object.defineProperty(Factory$2, "__esModule", { value: true });
11664
11665
  Factory$2.LayoutModule = void 0;
11665
11666
  const base_1$5 = base$1;
@@ -11732,7 +11733,7 @@ class LayoutModule extends base_1$5.Base {
11732
11733
  }
11733
11734
  // warn user if they do not call create() in the next 30 seconds
11734
11735
  setTimeout(() => {
11735
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").size() === 0) {
11736
+ if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")?.size() === 0) {
11736
11737
  console.warn(`[Layout.init] Layout.init was called 30s ago, but no layouts have been created yet. Make sure you ` +
11737
11738
  `override LayoutManager.applyLayoutSnapshot, and then call fin.Platform.Layout.create()`);
11738
11739
  }
@@ -11747,6 +11748,7 @@ class LayoutModule extends base_1$5.Base {
11747
11748
  });
11748
11749
  // wait for a layout to be created
11749
11750
  await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
11751
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
11750
11752
  layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11751
11753
  // Backward compat - undocumented / not typed openfin-layout as layoutManager
11752
11754
  // TODO: eventually deprecate this
@@ -11759,17 +11761,13 @@ class LayoutModule extends base_1$5.Base {
11759
11761
  * @returns
11760
11762
  */
11761
11763
  this.getCurrentLayoutManagerSync = () => {
11762
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11763
- // @ts-expect-error User may have implemented their own snapshot type when overriding LayoutManager
11764
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
11764
+ return __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11765
11765
  };
11766
11766
  this.create = async (options) => {
11767
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.create()`);
11768
- return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
11767
+ return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
11769
11768
  };
11770
11769
  this.destroy = async (layoutIdentity) => {
11771
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.destroy()`);
11772
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11770
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
11773
11771
  };
11774
11772
  }
11775
11773
  /**
@@ -11867,10 +11865,11 @@ class LayoutModule extends base_1$5.Base {
11867
11865
  }
11868
11866
  }
11869
11867
  Factory$2.LayoutModule = LayoutModule;
11870
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
11868
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
11871
11869
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
11872
11870
  throw new Error(`You must call init before using the API ${method}`);
11873
11871
  }
11872
+ return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
11874
11873
  };
11875
11874
 
11876
11875
  (function (exports) {
@@ -14208,8 +14207,6 @@ const base_1$2 = base$1;
14208
14207
  const SessionContextGroupClient_1 = SessionContextGroupClient$1;
14209
14208
  const utils_1$2 = utils$1;
14210
14209
  /**
14211
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
14212
- *
14213
14210
  * The Interop Client API is broken up into two groups:
14214
14211
  *
14215
14212
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -14775,7 +14772,11 @@ class InteropClient extends base_1$2.Base {
14775
14772
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
14776
14773
  });
14777
14774
  }
14778
- // used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
14775
+ /**
14776
+ * @internal
14777
+ *
14778
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
14779
+ */
14779
14780
  static async ferryFdc3Call(interopClient, action, payload) {
14780
14781
  const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
14781
14782
  return client.dispatch(action, payload || null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "35.78.29",
3
+ "version": "36.78.1",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",