@openfin/core 31.74.6 → 31.74.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "31.74.6",
3
+ "version": "31.74.9",
4
4
  "license": "SEE LICENSE IN LICENSE.MD",
5
5
  "main": "./src/mock.js",
6
6
  "types": "./src/mock.d.ts",
@@ -62,7 +62,7 @@ class Channel extends base_1.EmitterBase {
62
62
  if (entityType === 'iframe') {
63
63
  // @ts-expect-error
64
64
  // TODO: type this correctly (frame types are broken)
65
- const frame = (await this.fin.me.getInfo()).url;
65
+ connectionUrl = (await this.fin.me.getInfo()).url;
66
66
  }
67
67
  else if (entityType === 'window' || entityType === 'view') {
68
68
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -16,4 +16,3 @@ export declare const BROKER_ERRORS: {
16
16
  fdc3GetInfo: string;
17
17
  };
18
18
  export declare const wrapIntentHandler: (handler: OpenFin.IntentHandler, handlerId: string) => (intent: OpenFin.Intent) => Promise<void>;
19
- export declare const generateDefaultLoggingOptions: () => OpenFin.InteropLoggingOptions;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateDefaultLoggingOptions = exports.wrapIntentHandler = exports.BROKER_ERRORS = exports.generateOverrideWarning = exports.generateOverrideError = exports.wrapContextHandler = exports.wrapInTryCatch = exports.generateId = void 0;
3
+ exports.wrapIntentHandler = exports.BROKER_ERRORS = exports.generateOverrideWarning = exports.generateOverrideError = exports.wrapContextHandler = exports.wrapInTryCatch = exports.generateId = void 0;
4
4
  const generateId = () => `${Math.random()}${Date.now()}`;
5
5
  exports.generateId = generateId;
6
6
  const wrapInTryCatch = (f, prefix) => (...args) => {
@@ -59,11 +59,3 @@ const wrapIntentHandler = (handler, handlerId) => {
59
59
  };
60
60
  };
61
61
  exports.wrapIntentHandler = wrapIntentHandler;
62
- const generateDefaultLoggingOptions = () => {
63
- const loggingActions = ['beforeAction', 'afterAction'];
64
- const options = loggingActions.reduce((accumulator, loggingOption) => {
65
- return { ...accumulator, [loggingOption]: { enabled: true } };
66
- }, {});
67
- return options;
68
- };
69
- exports.generateDefaultLoggingOptions = generateDefaultLoggingOptions;
package/src/mock.js CHANGED
@@ -24,6 +24,9 @@ class MockWire extends events_1.EventEmitter {
24
24
  shutdown() {
25
25
  throw new Error('You are not running in OpenFin.');
26
26
  }
27
+ getPort() {
28
+ throw new Error('This transport has no port');
29
+ }
27
30
  // eslint-disable-next-line no-useless-constructor
28
31
  constructor() {
29
32
  super();
@@ -32,11 +32,8 @@ class Transport extends events_1.EventEmitter {
32
32
  };
33
33
  // This function is only used in our tests.
34
34
  this.getPort = () => {
35
- if (this.environment.constructor.name !== 'NodeEnvironment') {
36
- throw new transport_errors_1.NotImplementedError('Not Implemented');
37
- }
38
35
  const wire = __classPrivateFieldGet(this, _Transport_wire, "f");
39
- return wire.wire.url.split(':').slice(-1)[0];
36
+ return wire.getPort();
40
37
  };
41
38
  __classPrivateFieldSet(this, _Transport_wire, new WireType(this.onmessage.bind(this)), "f");
42
39
  this.environment = environment;
@@ -6,6 +6,7 @@ export type Wire = EventEmitter & {
6
6
  connectSync(): any;
7
7
  send(data: any): Promise<any>;
8
8
  shutdown(): Promise<void>;
9
+ getPort(): string;
9
10
  };
10
11
  export type WireConstructor = {
11
12
  new (onmessage: (data: any) => void): Wire;