@openfin/node-adapter 34.78.78 → 34.78.80

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.
@@ -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_throwIfLayoutManagerNotInitialized;
12758
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _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;
@@ -12827,10 +12827,31 @@ class LayoutModule extends base_1$5.Base {
12827
12827
  // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
12828
12828
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...this.fin.me.identity };
12829
12829
  const layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12830
- return Object.assign(this.wrapSync(layoutIdentity), { layoutManager });
12830
+ return __classPrivateFieldGet$4(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity, layoutManager);
12831
12831
  }
12832
12832
  return this.wrapSync(this.fin.me.identity);
12833
12833
  };
12834
+ _LayoutModule_getLayoutManagerSpy.set(this, (layoutIdentity, layoutManager) => {
12835
+ const msg = '[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.';
12836
+ const managerProxy = new Proxy(layoutManager, {
12837
+ get(target, key) {
12838
+ console.warn(`[Layout-mgr-proxy] accessing ${key.toString()}`);
12839
+ console.warn(msg);
12840
+ return target[key];
12841
+ }
12842
+ });
12843
+ const layout = Object.assign(this.wrapSync(layoutIdentity), { layoutManager: managerProxy });
12844
+ const layoutProxy = new Proxy(layout, {
12845
+ get(target, key) {
12846
+ if (key === 'layoutManager') {
12847
+ console.warn(`[Layout-proxy] accessing ${key.toString()}`);
12848
+ console.warn(msg);
12849
+ }
12850
+ return target[key];
12851
+ }
12852
+ });
12853
+ return layoutProxy;
12854
+ });
12834
12855
  /**
12835
12856
  * Returns the layout manager for the current window
12836
12857
  * @returns
@@ -12944,7 +12965,7 @@ class LayoutModule extends base_1$5.Base {
12944
12965
  }
12945
12966
  }
12946
12967
  Factory$2.LayoutModule = LayoutModule;
12947
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12968
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12948
12969
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
12949
12970
  throw new Error(`You must call init before using the API ${method}`);
12950
12971
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "34.78.78",
3
+ "version": "34.78.80",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",