@openfin/node-adapter 38.81.44 → 38.81.46
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/out/node-adapter-alpha.d.ts +23 -17878
- package/out/node-adapter-beta.d.ts +23 -17878
- package/out/node-adapter-public.d.ts +23 -17878
- package/out/node-adapter.d.ts +23 -18359
- package/out/node-adapter.js +311 -702
- package/package.json +2 -1
package/out/node-adapter.js
CHANGED
@@ -1,23 +1,22 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
3
|
var require$$0 = require('events');
|
6
4
|
var require$$3 = require('lodash');
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var
|
10
|
-
var
|
11
|
-
var
|
12
|
-
var
|
13
|
-
var
|
14
|
-
var
|
15
|
-
var
|
5
|
+
var fs = require('fs');
|
6
|
+
var crypto = require('crypto');
|
7
|
+
var _WS = require('ws');
|
8
|
+
var net = require('net');
|
9
|
+
var os = require('os');
|
10
|
+
var path = require('path');
|
11
|
+
var timers = require('timers');
|
12
|
+
var child_process = require('child_process');
|
13
|
+
var node_url = require('node:url');
|
16
14
|
|
17
|
-
function
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
function _interopNamespaceDefault(e) {
|
16
|
+
var n = Object.create(null);
|
17
|
+
if (e) {
|
18
|
+
Object.keys(e).forEach(function (k) {
|
19
|
+
if (k !== 'default') {
|
21
20
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
22
21
|
Object.defineProperty(n, k, d.get ? d : {
|
23
22
|
enumerable: true,
|
@@ -25,38 +24,39 @@ function _mergeNamespaces(n, m) {
|
|
25
24
|
});
|
26
25
|
}
|
27
26
|
});
|
28
|
-
}
|
27
|
+
}
|
28
|
+
n.default = e;
|
29
29
|
return Object.freeze(n);
|
30
30
|
}
|
31
31
|
|
32
|
-
var
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
33
|
+
var _WS__namespace = /*#__PURE__*/_interopNamespaceDefault(_WS);
|
34
|
+
var net__namespace = /*#__PURE__*/_interopNamespaceDefault(net);
|
35
|
+
var os__namespace = /*#__PURE__*/_interopNamespaceDefault(os);
|
36
|
+
var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
37
37
|
|
38
|
-
var
|
38
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
39
39
|
|
40
40
|
var fin$1 = {};
|
41
41
|
|
42
|
-
var system
|
42
|
+
var system = {};
|
43
43
|
|
44
|
-
var base
|
44
|
+
var base = {};
|
45
45
|
|
46
46
|
var promises = {};
|
47
47
|
|
48
48
|
Object.defineProperty(promises, "__esModule", { value: true });
|
49
|
-
promises.promiseMapSerial = promises.serial = promises.promiseMap = promises.promisify = void 0;
|
49
|
+
promises.promiseMapSerial = promises.serial = promiseMap_1 = promises.promiseMap = promisify_1 = promises.promisify = void 0;
|
50
50
|
function promisify(func) {
|
51
51
|
return (...args) => new Promise((resolve, reject) => {
|
52
52
|
func(...args, (err, val) => (err ? reject(err) : resolve(val)));
|
53
53
|
});
|
54
54
|
}
|
55
|
-
promises.promisify = promisify;
|
55
|
+
var promisify_1 = promises.promisify = promisify;
|
56
56
|
async function promiseMap(arr, asyncF) {
|
57
57
|
return Promise.all(arr.map(asyncF));
|
58
58
|
}
|
59
|
-
promises.promiseMap = promiseMap;
|
59
|
+
var promiseMap_1 = promises.promiseMap = promiseMap;
|
60
60
|
async function serial(arr) {
|
61
61
|
const ret = [];
|
62
62
|
for (const func of arr) {
|
@@ -84,9 +84,9 @@ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
84
84
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
85
85
|
};
|
86
86
|
var _EmitterBase_emitterAccessor;
|
87
|
-
Object.defineProperty(base
|
88
|
-
base
|
89
|
-
const promises_1
|
87
|
+
Object.defineProperty(base, "__esModule", { value: true });
|
88
|
+
base.Reply = base.EmitterBase = base.Base = void 0;
|
89
|
+
const promises_1 = promises;
|
90
90
|
class Base {
|
91
91
|
/**
|
92
92
|
* @internal
|
@@ -129,7 +129,7 @@ class Base {
|
|
129
129
|
return this.wire.me;
|
130
130
|
}
|
131
131
|
}
|
132
|
-
base
|
132
|
+
base.Base = Base;
|
133
133
|
/**
|
134
134
|
* An entity that emits OpenFin events.
|
135
135
|
*
|
@@ -316,7 +316,7 @@ class EmitterBase extends Base {
|
|
316
316
|
}
|
317
317
|
else if (this.hasEmitter()) {
|
318
318
|
const events = this.getOrCreateEmitter().eventNames();
|
319
|
-
await (0, promises_1
|
319
|
+
await (0, promises_1.promiseMap)(events, removeByEvent);
|
320
320
|
}
|
321
321
|
return this;
|
322
322
|
}
|
@@ -326,16 +326,16 @@ class EmitterBase extends Base {
|
|
326
326
|
}
|
327
327
|
}
|
328
328
|
}
|
329
|
-
base
|
329
|
+
base.EmitterBase = EmitterBase;
|
330
330
|
_EmitterBase_emitterAccessor = new WeakMap();
|
331
331
|
class Reply {
|
332
332
|
}
|
333
|
-
base
|
333
|
+
base.Reply = Reply;
|
334
334
|
|
335
335
|
var transportErrors = {};
|
336
336
|
|
337
337
|
Object.defineProperty(transportErrors, "__esModule", { value: true });
|
338
|
-
transportErrors.RuntimeError = transportErrors.NotSupportedError = transportErrors.NotImplementedError = transportErrors.NoAckError = transportErrors.DuplicateCorrelationError = transportErrors.UnexpectedActionError = transportErrors.DisconnectedError = void 0;
|
338
|
+
transportErrors.RuntimeError = NotSupportedError_1 = transportErrors.NotSupportedError = NotImplementedError_1 = transportErrors.NotImplementedError = transportErrors.NoAckError = transportErrors.DuplicateCorrelationError = transportErrors.UnexpectedActionError = transportErrors.DisconnectedError = void 0;
|
339
339
|
class DisconnectedError extends Error {
|
340
340
|
constructor(readyState) {
|
341
341
|
super(`Expected websocket state OPEN but found ${readyState}`);
|
@@ -354,10 +354,10 @@ class NoAckError extends Error {
|
|
354
354
|
transportErrors.NoAckError = NoAckError;
|
355
355
|
class NotImplementedError extends Error {
|
356
356
|
}
|
357
|
-
transportErrors.NotImplementedError = NotImplementedError;
|
357
|
+
var NotImplementedError_1 = transportErrors.NotImplementedError = NotImplementedError;
|
358
358
|
class NotSupportedError extends Error {
|
359
359
|
}
|
360
|
-
transportErrors.NotSupportedError = NotSupportedError;
|
360
|
+
var NotSupportedError_1 = transportErrors.NotSupportedError = NotSupportedError;
|
361
361
|
class InternalError extends Error {
|
362
362
|
constructor(err) {
|
363
363
|
const { message, name, stack, ...rest } = err;
|
@@ -412,7 +412,7 @@ class RuntimeError extends Error {
|
|
412
412
|
}
|
413
413
|
transportErrors.RuntimeError = RuntimeError;
|
414
414
|
|
415
|
-
var window$
|
415
|
+
var window$1 = {};
|
416
416
|
|
417
417
|
var Factory$8 = {};
|
418
418
|
|
@@ -431,13 +431,13 @@ validate.validateIdentity = validateIdentity;
|
|
431
431
|
|
432
432
|
var Instance$7 = {};
|
433
433
|
|
434
|
-
var application
|
434
|
+
var application = {};
|
435
435
|
|
436
436
|
var Factory$7 = {};
|
437
437
|
|
438
438
|
var Instance$6 = {};
|
439
439
|
|
440
|
-
var view
|
440
|
+
var view = {};
|
441
441
|
|
442
442
|
var Factory$6 = {};
|
443
443
|
|
@@ -462,7 +462,7 @@ function requireFactory$3 () {
|
|
462
462
|
hasRequiredFactory$3 = 1;
|
463
463
|
Object.defineProperty(Factory$6, "__esModule", { value: true });
|
464
464
|
Factory$6.ViewModule = void 0;
|
465
|
-
const base_1 = base
|
465
|
+
const base_1 = base;
|
466
466
|
const validate_1 = validate;
|
467
467
|
const index_1 = requireView();
|
468
468
|
const warnings_1 = warnings;
|
@@ -1336,7 +1336,7 @@ var main = {};
|
|
1336
1336
|
|
1337
1337
|
Object.defineProperty(main, "__esModule", { value: true });
|
1338
1338
|
main.WebContents = void 0;
|
1339
|
-
const base_1$j = base
|
1339
|
+
const base_1$j = base;
|
1340
1340
|
class WebContents extends base_1$j.EmitterBase {
|
1341
1341
|
/**
|
1342
1342
|
* @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
|
@@ -2973,7 +2973,7 @@ function requireInstance$2 () {
|
|
2973
2973
|
var hasRequiredView;
|
2974
2974
|
|
2975
2975
|
function requireView () {
|
2976
|
-
if (hasRequiredView) return view
|
2976
|
+
if (hasRequiredView) return view;
|
2977
2977
|
hasRequiredView = 1;
|
2978
2978
|
(function (exports) {
|
2979
2979
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -3004,8 +3004,8 @@ function requireView () {
|
|
3004
3004
|
*/
|
3005
3005
|
__exportStar(requireFactory$3(), exports);
|
3006
3006
|
__exportStar(requireInstance$2(), exports);
|
3007
|
-
} (view
|
3008
|
-
return view
|
3007
|
+
} (view));
|
3008
|
+
return view;
|
3009
3009
|
}
|
3010
3010
|
|
3011
3011
|
var hasRequiredInstance$1;
|
@@ -3016,7 +3016,7 @@ function requireInstance$1 () {
|
|
3016
3016
|
Object.defineProperty(Instance$6, "__esModule", { value: true });
|
3017
3017
|
Instance$6.Application = void 0;
|
3018
3018
|
/* eslint-disable import/prefer-default-export */
|
3019
|
-
const base_1 = base
|
3019
|
+
const base_1 = base;
|
3020
3020
|
const window_1 = requireWindow();
|
3021
3021
|
const view_1 = requireView();
|
3022
3022
|
/**
|
@@ -3827,7 +3827,7 @@ function requireFactory$2 () {
|
|
3827
3827
|
hasRequiredFactory$2 = 1;
|
3828
3828
|
Object.defineProperty(Factory$7, "__esModule", { value: true });
|
3829
3829
|
Factory$7.ApplicationModule = void 0;
|
3830
|
-
const base_1 = base
|
3830
|
+
const base_1 = base;
|
3831
3831
|
const validate_1 = validate;
|
3832
3832
|
const Instance_1 = requireInstance$1();
|
3833
3833
|
/**
|
@@ -4103,7 +4103,7 @@ function requireFactory$2 () {
|
|
4103
4103
|
var hasRequiredApplication;
|
4104
4104
|
|
4105
4105
|
function requireApplication () {
|
4106
|
-
if (hasRequiredApplication) return application
|
4106
|
+
if (hasRequiredApplication) return application;
|
4107
4107
|
hasRequiredApplication = 1;
|
4108
4108
|
(function (exports) {
|
4109
4109
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -4134,8 +4134,8 @@ function requireApplication () {
|
|
4134
4134
|
*/
|
4135
4135
|
__exportStar(requireFactory$2(), exports);
|
4136
4136
|
__exportStar(requireInstance$1(), exports);
|
4137
|
-
} (application
|
4138
|
-
return application
|
4137
|
+
} (application));
|
4138
|
+
return application;
|
4139
4139
|
}
|
4140
4140
|
|
4141
4141
|
var promisifySubscription$1 = {};
|
@@ -5436,7 +5436,7 @@ function requireFactory$1 () {
|
|
5436
5436
|
hasRequiredFactory$1 = 1;
|
5437
5437
|
Object.defineProperty(Factory$8, "__esModule", { value: true });
|
5438
5438
|
Factory$8._WindowModule = void 0;
|
5439
|
-
const base_1 = base
|
5439
|
+
const base_1 = base;
|
5440
5440
|
const validate_1 = validate;
|
5441
5441
|
const Instance_1 = requireInstance();
|
5442
5442
|
/**
|
@@ -5586,7 +5586,7 @@ function requireFactory$1 () {
|
|
5586
5586
|
var hasRequiredWindow;
|
5587
5587
|
|
5588
5588
|
function requireWindow () {
|
5589
|
-
if (hasRequiredWindow) return window$
|
5589
|
+
if (hasRequiredWindow) return window$1;
|
5590
5590
|
hasRequiredWindow = 1;
|
5591
5591
|
(function (exports) {
|
5592
5592
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -5619,8 +5619,8 @@ function requireWindow () {
|
|
5619
5619
|
*/
|
5620
5620
|
__exportStar(requireFactory$1(), exports);
|
5621
5621
|
__exportStar(requireInstance(), exports);
|
5622
|
-
} (window$
|
5623
|
-
return window$
|
5622
|
+
} (window$1));
|
5623
|
+
return window$1;
|
5624
5624
|
}
|
5625
5625
|
|
5626
5626
|
/**
|
@@ -5630,10 +5630,10 @@ function requireWindow () {
|
|
5630
5630
|
*
|
5631
5631
|
* @packageDocumentation
|
5632
5632
|
*/
|
5633
|
-
Object.defineProperty(system
|
5634
|
-
system
|
5635
|
-
const base_1$i = base
|
5636
|
-
const transport_errors_1$
|
5633
|
+
Object.defineProperty(system, "__esModule", { value: true });
|
5634
|
+
system.System = void 0;
|
5635
|
+
const base_1$i = base;
|
5636
|
+
const transport_errors_1$2 = transportErrors;
|
5637
5637
|
const window_1 = requireWindow();
|
5638
5638
|
const events_1$6 = require$$0;
|
5639
5639
|
/**
|
@@ -6711,9 +6711,9 @@ class System extends base_1$i.EmitterBase {
|
|
6711
6711
|
});
|
6712
6712
|
// node.js environment not supported
|
6713
6713
|
if (this.wire.environment.type !== 'openfin') {
|
6714
|
-
throw new transport_errors_1$
|
6714
|
+
throw new transport_errors_1$2.NotSupportedError('downloadAsset only supported in an OpenFin Render process');
|
6715
6715
|
}
|
6716
|
-
const callSite = transport_errors_1$
|
6716
|
+
const callSite = transport_errors_1$2.RuntimeError.getCallSite();
|
6717
6717
|
const downloadId = this.wire.environment.getNextMessageId().toString();
|
6718
6718
|
const dlProgressKey = `asset-download-progress-${downloadId}`;
|
6719
6719
|
const dlErrorKey = `asset-download-error-${downloadId}`;
|
@@ -6733,7 +6733,7 @@ class System extends base_1$i.EmitterBase {
|
|
6733
6733
|
const dlError = (payload) => {
|
6734
6734
|
cleanListeners();
|
6735
6735
|
const { reason, err: error } = payload;
|
6736
|
-
reject(new transport_errors_1$
|
6736
|
+
reject(new transport_errors_1$2.RuntimeError({ reason, error }, callSite));
|
6737
6737
|
};
|
6738
6738
|
const dlComplete = () => {
|
6739
6739
|
cleanListeners();
|
@@ -6784,11 +6784,11 @@ class System extends base_1$i.EmitterBase {
|
|
6784
6784
|
* ```
|
6785
6785
|
*/
|
6786
6786
|
downloadRuntime(options, progressListener) {
|
6787
|
-
const callsites = transport_errors_1$
|
6787
|
+
const callsites = transport_errors_1$2.RuntimeError.getCallSite();
|
6788
6788
|
return new Promise((resolve, reject) => {
|
6789
6789
|
// node.js environment not supported
|
6790
6790
|
if (this.wire.environment.type !== 'openfin') {
|
6791
|
-
reject(new transport_errors_1$
|
6791
|
+
reject(new transport_errors_1$2.NotSupportedError('downloadRuntime only supported in an OpenFin Render process'));
|
6792
6792
|
return;
|
6793
6793
|
}
|
6794
6794
|
const downloadId = this.wire.environment.getNextMessageId().toString();
|
@@ -6810,7 +6810,7 @@ class System extends base_1$i.EmitterBase {
|
|
6810
6810
|
const dlError = (payload) => {
|
6811
6811
|
cleanListeners();
|
6812
6812
|
const { reason, err: error } = payload;
|
6813
|
-
reject(new transport_errors_1$
|
6813
|
+
reject(new transport_errors_1$2.RuntimeError({ reason, error }, callsites));
|
6814
6814
|
};
|
6815
6815
|
const dlComplete = () => {
|
6816
6816
|
cleanListeners();
|
@@ -7479,7 +7479,7 @@ class System extends base_1$i.EmitterBase {
|
|
7479
7479
|
await this.wire.sendAction('set-domain-settings', { domainSettings, ...this.identity });
|
7480
7480
|
}
|
7481
7481
|
}
|
7482
|
-
system
|
7482
|
+
system.System = System;
|
7483
7483
|
|
7484
7484
|
var interappbus = {};
|
7485
7485
|
|
@@ -8448,7 +8448,7 @@ var iceManager = {};
|
|
8448
8448
|
|
8449
8449
|
Object.defineProperty(iceManager, "__esModule", { value: true });
|
8450
8450
|
iceManager.RTCICEManager = void 0;
|
8451
|
-
const base_1$h = base
|
8451
|
+
const base_1$h = base;
|
8452
8452
|
/*
|
8453
8453
|
Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
|
8454
8454
|
*/
|
@@ -8947,7 +8947,7 @@ var messageReceiver$1 = {};
|
|
8947
8947
|
Object.defineProperty(messageReceiver$1, "__esModule", { value: true });
|
8948
8948
|
messageReceiver$1.MessageReceiver = void 0;
|
8949
8949
|
const client_1$1 = client;
|
8950
|
-
const base_1$g = base
|
8950
|
+
const base_1$g = base;
|
8951
8951
|
/*
|
8952
8952
|
This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
|
8953
8953
|
It needs to be a singleton because there can only be one per wire. It tracks both clients and providers' processAction passed in via the strategy.
|
@@ -9135,7 +9135,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
|
|
9135
9135
|
Object.defineProperty(connectionManager, "__esModule", { value: true });
|
9136
9136
|
connectionManager.ConnectionManager = void 0;
|
9137
9137
|
const exhaustive_1 = exhaustive;
|
9138
|
-
const base_1$f = base
|
9138
|
+
const base_1$f = base;
|
9139
9139
|
const strategy_1 = strategy$3;
|
9140
9140
|
const strategy_2 = strategy$2;
|
9141
9141
|
const ice_manager_1 = iceManager;
|
@@ -9391,7 +9391,7 @@ channel$1.Channel = void 0;
|
|
9391
9391
|
/* eslint-disable no-console */
|
9392
9392
|
const events_1$5 = require$$0;
|
9393
9393
|
const lazy_1$1 = lazy;
|
9394
|
-
const base_1$e = base
|
9394
|
+
const base_1$e = base;
|
9395
9395
|
const client_1 = client;
|
9396
9396
|
const connection_manager_1 = connectionManager;
|
9397
9397
|
const provider_1 = provider;
|
@@ -9717,7 +9717,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
|
|
9717
9717
|
* @packageDocumentation
|
9718
9718
|
*/
|
9719
9719
|
const events_1$4 = require$$0;
|
9720
|
-
const base_1$d = base
|
9720
|
+
const base_1$d = base;
|
9721
9721
|
const ref_counter_1 = refCounter;
|
9722
9722
|
const index_1$2 = channel$1;
|
9723
9723
|
const validate_1$3 = validate;
|
@@ -9931,7 +9931,7 @@ var clipboard = {};
|
|
9931
9931
|
*/
|
9932
9932
|
Object.defineProperty(clipboard, "__esModule", { value: true });
|
9933
9933
|
clipboard.Clipboard = void 0;
|
9934
|
-
const base_1$c = base
|
9934
|
+
const base_1$c = base;
|
9935
9935
|
/**
|
9936
9936
|
* The Clipboard API allows reading and writing to the clipboard in multiple formats.
|
9937
9937
|
*
|
@@ -10116,7 +10116,7 @@ class Clipboard extends base_1$c.Base {
|
|
10116
10116
|
}
|
10117
10117
|
clipboard.Clipboard = Clipboard;
|
10118
10118
|
|
10119
|
-
var externalApplication
|
10119
|
+
var externalApplication = {};
|
10120
10120
|
|
10121
10121
|
var Factory$5 = {};
|
10122
10122
|
|
@@ -10125,7 +10125,7 @@ var Instance$4 = {};
|
|
10125
10125
|
Object.defineProperty(Instance$4, "__esModule", { value: true });
|
10126
10126
|
Instance$4.ExternalApplication = void 0;
|
10127
10127
|
/* eslint-disable import/prefer-default-export */
|
10128
|
-
const base_1$b = base
|
10128
|
+
const base_1$b = base;
|
10129
10129
|
/**
|
10130
10130
|
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
10131
10131
|
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
@@ -10164,7 +10164,7 @@ Instance$4.ExternalApplication = ExternalApplication;
|
|
10164
10164
|
|
10165
10165
|
Object.defineProperty(Factory$5, "__esModule", { value: true });
|
10166
10166
|
Factory$5.ExternalApplicationModule = void 0;
|
10167
|
-
const base_1$a = base
|
10167
|
+
const base_1$a = base;
|
10168
10168
|
const Instance_1$4 = Instance$4;
|
10169
10169
|
/**
|
10170
10170
|
* Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
|
@@ -10240,9 +10240,9 @@ Factory$5.ExternalApplicationModule = ExternalApplicationModule;
|
|
10240
10240
|
*/
|
10241
10241
|
__exportStar(Factory$5, exports);
|
10242
10242
|
__exportStar(Instance$4, exports);
|
10243
|
-
} (externalApplication
|
10243
|
+
} (externalApplication));
|
10244
10244
|
|
10245
|
-
var frame
|
10245
|
+
var frame = {};
|
10246
10246
|
|
10247
10247
|
var Factory$4 = {};
|
10248
10248
|
|
@@ -10251,7 +10251,7 @@ var Instance$3 = {};
|
|
10251
10251
|
Object.defineProperty(Instance$3, "__esModule", { value: true });
|
10252
10252
|
Instance$3._Frame = void 0;
|
10253
10253
|
/* eslint-disable import/prefer-default-export */
|
10254
|
-
const base_1$9 = base
|
10254
|
+
const base_1$9 = base;
|
10255
10255
|
/**
|
10256
10256
|
* An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
|
10257
10257
|
* has its own DOM and global JS context (which may or may not be linked to that of the parent depending
|
@@ -10318,7 +10318,7 @@ Instance$3._Frame = _Frame;
|
|
10318
10318
|
|
10319
10319
|
Object.defineProperty(Factory$4, "__esModule", { value: true });
|
10320
10320
|
Factory$4._FrameModule = void 0;
|
10321
|
-
const base_1$8 = base
|
10321
|
+
const base_1$8 = base;
|
10322
10322
|
const validate_1$2 = validate;
|
10323
10323
|
const Instance_1$3 = Instance$3;
|
10324
10324
|
/**
|
@@ -10439,13 +10439,13 @@ Factory$4._FrameModule = _FrameModule;
|
|
10439
10439
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10440
10440
|
__exportStar(Factory$4, exports);
|
10441
10441
|
__exportStar(Instance$3, exports);
|
10442
|
-
} (frame
|
10442
|
+
} (frame));
|
10443
10443
|
|
10444
|
-
var globalHotkey
|
10444
|
+
var globalHotkey = {};
|
10445
10445
|
|
10446
|
-
Object.defineProperty(globalHotkey
|
10447
|
-
globalHotkey
|
10448
|
-
const base_1$7 = base
|
10446
|
+
Object.defineProperty(globalHotkey, "__esModule", { value: true });
|
10447
|
+
globalHotkey.GlobalHotkey = void 0;
|
10448
|
+
const base_1$7 = base;
|
10449
10449
|
/**
|
10450
10450
|
* The GlobalHotkey module can register/unregister a global hotkeys.
|
10451
10451
|
*
|
@@ -10576,9 +10576,9 @@ class GlobalHotkey extends base_1$7.EmitterBase {
|
|
10576
10576
|
return data;
|
10577
10577
|
}
|
10578
10578
|
}
|
10579
|
-
globalHotkey
|
10579
|
+
globalHotkey.GlobalHotkey = GlobalHotkey;
|
10580
10580
|
|
10581
|
-
var platform
|
10581
|
+
var platform = {};
|
10582
10582
|
|
10583
10583
|
var Factory$3 = {};
|
10584
10584
|
|
@@ -10593,7 +10593,7 @@ var _Platform_connectToProvider;
|
|
10593
10593
|
Object.defineProperty(Instance$2, "__esModule", { value: true });
|
10594
10594
|
Instance$2.Platform = void 0;
|
10595
10595
|
/* eslint-disable import/prefer-default-export, no-undef */
|
10596
|
-
const base_1$6 = base
|
10596
|
+
const base_1$6 = base;
|
10597
10597
|
const validate_1$1 = validate;
|
10598
10598
|
// Reuse clients to avoid overwriting already-registered client in provider
|
10599
10599
|
const clientMap = new Map();
|
@@ -11452,7 +11452,7 @@ Object.defineProperty(Instance$1, "__esModule", { value: true });
|
|
11452
11452
|
Instance$1.Layout = void 0;
|
11453
11453
|
const lazy_1 = lazy;
|
11454
11454
|
const validate_1 = validate;
|
11455
|
-
const base_1$5 = base
|
11455
|
+
const base_1$5 = base;
|
11456
11456
|
const common_utils_1 = commonUtils;
|
11457
11457
|
const layout_entities_1 = layoutEntities;
|
11458
11458
|
const layout_constants_1$1 = layout_constants;
|
@@ -11831,7 +11831,7 @@ var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
11831
11831
|
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
|
11832
11832
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
11833
11833
|
Factory$2.LayoutModule = void 0;
|
11834
|
-
const base_1$4 = base
|
11834
|
+
const base_1$4 = base;
|
11835
11835
|
const Instance_1$2 = Instance$1;
|
11836
11836
|
const layout_constants_1 = layout_constants;
|
11837
11837
|
/**
|
@@ -12074,7 +12074,7 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
|
|
12074
12074
|
|
12075
12075
|
Object.defineProperty(Factory$3, "__esModule", { value: true });
|
12076
12076
|
Factory$3.PlatformModule = void 0;
|
12077
|
-
const base_1$3 = base
|
12077
|
+
const base_1$3 = base;
|
12078
12078
|
const Instance_1$1 = Instance$2;
|
12079
12079
|
const index_1$1 = layout;
|
12080
12080
|
/**
|
@@ -12338,7 +12338,7 @@ Factory$3.PlatformModule = PlatformModule;
|
|
12338
12338
|
*/
|
12339
12339
|
__exportStar(Factory$3, exports);
|
12340
12340
|
__exportStar(Instance$2, exports);
|
12341
|
-
} (platform
|
12341
|
+
} (platform));
|
12342
12342
|
|
12343
12343
|
var me = {};
|
12344
12344
|
|
@@ -12346,9 +12346,9 @@ var me = {};
|
|
12346
12346
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12347
12347
|
exports.getMe = exports.getBaseMe = exports.environmentUnsupportedMessage = void 0;
|
12348
12348
|
const view_1 = requireView();
|
12349
|
-
const frame_1 = frame
|
12349
|
+
const frame_1 = frame;
|
12350
12350
|
const window_1 = requireWindow();
|
12351
|
-
const external_application_1 = externalApplication
|
12351
|
+
const external_application_1 = externalApplication;
|
12352
12352
|
exports.environmentUnsupportedMessage = 'You are not running in OpenFin.';
|
12353
12353
|
function getBaseMe(entityType, uuid, name) {
|
12354
12354
|
const entityTypeHelpers = {
|
@@ -13020,7 +13020,7 @@ function requireInteropBroker () {
|
|
13020
13020
|
var _InteropBroker_fdc3Info, _InteropBroker_contextGroups, _InteropBroker_providerPromise;
|
13021
13021
|
Object.defineProperty(InteropBroker, "__esModule", { value: true });
|
13022
13022
|
InteropBroker.InteropBroker = void 0;
|
13023
|
-
const base_1 = base
|
13023
|
+
const base_1 = base;
|
13024
13024
|
const SessionContextGroupBroker_1 = requireSessionContextGroupBroker();
|
13025
13025
|
const utils_1 = utils$3;
|
13026
13026
|
const lodash_1 = require$$3;
|
@@ -14317,7 +14317,7 @@ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
14317
14317
|
};
|
14318
14318
|
var _SessionContextGroupClient_clientPromise;
|
14319
14319
|
Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
|
14320
|
-
const base_1$2 = base
|
14320
|
+
const base_1$2 = base;
|
14321
14321
|
const utils_1$2 = utils$3;
|
14322
14322
|
class SessionContextGroupClient extends base_1$2.Base {
|
14323
14323
|
constructor(wire, client, id) {
|
@@ -15557,7 +15557,7 @@ function requireInteropClient () {
|
|
15557
15557
|
var _InteropClient_clientPromise, _InteropClient_sessionContextGroups;
|
15558
15558
|
Object.defineProperty(InteropClient, "__esModule", { value: true });
|
15559
15559
|
InteropClient.InteropClient = void 0;
|
15560
|
-
const base_1 = base
|
15560
|
+
const base_1 = base;
|
15561
15561
|
const SessionContextGroupClient_1 = SessionContextGroupClient$1;
|
15562
15562
|
const fdc3_1_2_1 = requireFdc31_2();
|
15563
15563
|
const fdc3_2_0_1 = requireFdc32_0();
|
@@ -16202,7 +16202,7 @@ function requireFactory () {
|
|
16202
16202
|
Factory$1.InteropModule = void 0;
|
16203
16203
|
const lodash_1 = require$$3;
|
16204
16204
|
const inaccessibleObject_1 = inaccessibleObject;
|
16205
|
-
const base_1 = base
|
16205
|
+
const base_1 = base;
|
16206
16206
|
const InteropBroker_1 = requireInteropBroker();
|
16207
16207
|
const InteropClient_1 = requireInteropClient();
|
16208
16208
|
const overrideCheck_1 = requireOverrideCheck();
|
@@ -16361,7 +16361,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
|
|
16361
16361
|
Object.defineProperty(Instance, "__esModule", { value: true });
|
16362
16362
|
Instance.SnapshotSource = void 0;
|
16363
16363
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
16364
|
-
const base_1$1 = base
|
16364
|
+
const base_1$1 = base;
|
16365
16365
|
const utils_1$1 = utils;
|
16366
16366
|
const connectionMap = new Map();
|
16367
16367
|
/**
|
@@ -16504,7 +16504,7 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
|
|
16504
16504
|
|
16505
16505
|
Object.defineProperty(Factory, "__esModule", { value: true });
|
16506
16506
|
Factory.SnapshotSourceModule = void 0;
|
16507
|
-
const base_1 = base
|
16507
|
+
const base_1 = base;
|
16508
16508
|
const Instance_1 = Instance;
|
16509
16509
|
const utils_1 = utils;
|
16510
16510
|
/**
|
@@ -16617,19 +16617,19 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
|
|
16617
16617
|
} (snapshotSource));
|
16618
16618
|
|
16619
16619
|
Object.defineProperty(fin$1, "__esModule", { value: true });
|
16620
|
-
fin$1.Fin = void 0;
|
16620
|
+
var Fin_1 = fin$1.Fin = void 0;
|
16621
16621
|
const events_1$3 = require$$0;
|
16622
16622
|
// Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
|
16623
|
-
const index_1 = system
|
16623
|
+
const index_1 = system;
|
16624
16624
|
const index_2 = requireWindow();
|
16625
16625
|
const index_3 = requireApplication();
|
16626
16626
|
const index_4 = interappbus;
|
16627
16627
|
const index_5 = clipboard;
|
16628
|
-
const index_6 = externalApplication
|
16629
|
-
const index_7 = frame
|
16630
|
-
const index_8 = globalHotkey
|
16628
|
+
const index_6 = externalApplication;
|
16629
|
+
const index_7 = frame;
|
16630
|
+
const index_8 = globalHotkey;
|
16631
16631
|
const index_9 = requireView();
|
16632
|
-
const index_10 = platform
|
16632
|
+
const index_10 = platform;
|
16633
16633
|
const me_1$1 = me;
|
16634
16634
|
const interop_1 = requireInterop();
|
16635
16635
|
const snapshot_source_1 = snapshotSource;
|
@@ -16663,19 +16663,19 @@ class Fin extends events_1$3.EventEmitter {
|
|
16663
16663
|
});
|
16664
16664
|
}
|
16665
16665
|
}
|
16666
|
-
fin$1.Fin = Fin;
|
16666
|
+
Fin_1 = fin$1.Fin = Fin;
|
16667
16667
|
|
16668
16668
|
var wire = {};
|
16669
16669
|
|
16670
16670
|
Object.defineProperty(wire, "__esModule", { value: true });
|
16671
|
-
wire.isInternalConnectConfig = wire.isPortDiscoveryConfig = wire.isNewConnectConfig = wire.isConfigWithReceiver = wire.isRemoteConfig = wire.isExistingConnectConfig = wire.isExternalConfig = void 0;
|
16671
|
+
var isInternalConnectConfig_1 = wire.isInternalConnectConfig = isPortDiscoveryConfig_1 = wire.isPortDiscoveryConfig = wire.isNewConnectConfig = wire.isConfigWithReceiver = wire.isRemoteConfig = wire.isExistingConnectConfig = isExternalConfig_1 = wire.isExternalConfig = void 0;
|
16672
16672
|
function isExternalConfig(config) {
|
16673
16673
|
if (typeof config.manifestUrl === 'string') {
|
16674
16674
|
return true;
|
16675
16675
|
}
|
16676
16676
|
return false;
|
16677
16677
|
}
|
16678
|
-
wire.isExternalConfig = isExternalConfig;
|
16678
|
+
var isExternalConfig_1 = wire.isExternalConfig = isExternalConfig;
|
16679
16679
|
function isExistingConnectConfig(config) {
|
16680
16680
|
return hasUuid(config) && typeof config.address === 'string';
|
16681
16681
|
}
|
@@ -16701,143 +16701,111 @@ wire.isNewConnectConfig = isNewConnectConfig;
|
|
16701
16701
|
function isPortDiscoveryConfig(config) {
|
16702
16702
|
return (isExternalConfig(config) && hasRuntimeVersion(config)) || isNewConnectConfig(config);
|
16703
16703
|
}
|
16704
|
-
wire.isPortDiscoveryConfig = isPortDiscoveryConfig;
|
16704
|
+
var isPortDiscoveryConfig_1 = wire.isPortDiscoveryConfig = isPortDiscoveryConfig;
|
16705
16705
|
function isInternalConnectConfig(config) {
|
16706
16706
|
return isExistingConnectConfig(config) || isNewConnectConfig(config);
|
16707
16707
|
}
|
16708
|
-
wire.isInternalConnectConfig = isInternalConnectConfig;
|
16709
|
-
|
16710
|
-
var nodeEnv = {};
|
16711
|
-
|
16712
|
-
var environment = {};
|
16713
|
-
|
16714
|
-
Object.defineProperty(environment, "__esModule", { value: true });
|
16715
|
-
environment.notImplementedEnvErrorMsg = void 0;
|
16716
|
-
environment.notImplementedEnvErrorMsg = 'Not implemented in this environment';
|
16708
|
+
isInternalConnectConfig_1 = wire.isInternalConnectConfig = isInternalConnectConfig;
|
16717
16709
|
|
16718
|
-
var
|
16710
|
+
var environment$1 = {};
|
16719
16711
|
|
16720
|
-
|
16712
|
+
Object.defineProperty(environment$1, "__esModule", { value: true });
|
16713
|
+
var notImplementedEnvErrorMsg = environment$1.notImplementedEnvErrorMsg = void 0;
|
16714
|
+
notImplementedEnvErrorMsg = environment$1.notImplementedEnvErrorMsg = 'Not implemented in this environment';
|
16721
16715
|
|
16722
|
-
|
16723
|
-
|
16724
|
-
|
16725
|
-
|
16726
|
-
|
16727
|
-
|
16728
|
-
|
16729
|
-
|
16730
|
-
|
16731
|
-
|
16732
|
-
|
16733
|
-
|
16734
|
-
|
16735
|
-
|
16736
|
-
|
16737
|
-
|
16738
|
-
|
16739
|
-
|
16740
|
-
|
16741
|
-
|
16742
|
-
|
16743
|
-
|
16744
|
-
|
16745
|
-
|
16746
|
-
|
16747
|
-
|
16748
|
-
|
16749
|
-
|
16750
|
-
|
16751
|
-
|
16752
|
-
|
16753
|
-
|
16754
|
-
|
16755
|
-
|
16756
|
-
|
16757
|
-
|
16758
|
-
|
16759
|
-
|
16760
|
-
|
16761
|
-
|
16762
|
-
|
16763
|
-
|
16764
|
-
|
16765
|
-
|
16766
|
-
|
16767
|
-
|
16768
|
-
|
16769
|
-
|
16770
|
-
|
16771
|
-
|
16772
|
-
|
16773
|
-
|
16774
|
-
|
16775
|
-
|
16776
|
-
|
16777
|
-
|
16778
|
-
|
16779
|
-
|
16780
|
-
|
16781
|
-
|
16782
|
-
|
16783
|
-
|
16784
|
-
|
16785
|
-
|
16786
|
-
|
16787
|
-
|
16788
|
-
|
16789
|
-
|
16790
|
-
|
16791
|
-
|
16792
|
-
|
16793
|
-
|
16794
|
-
|
16795
|
-
|
16796
|
-
|
16797
|
-
|
16798
|
-
|
16799
|
-
|
16800
|
-
|
16801
|
-
|
16802
|
-
|
16803
|
-
|
16804
|
-
|
16805
|
-
|
16806
|
-
|
16807
|
-
|
16808
|
-
|
16809
|
-
|
16810
|
-
|
16811
|
-
|
16812
|
-
|
16813
|
-
response.pipe(file);
|
16814
|
-
file.on('finish', () => {
|
16815
|
-
file.close();
|
16816
|
-
resolve();
|
16817
|
-
});
|
16818
|
-
});
|
16819
|
-
}
|
16820
|
-
catch (e) {
|
16821
|
-
reject(e);
|
16822
|
-
}
|
16823
|
-
});
|
16824
|
-
};
|
16825
|
-
exports.downloadFile = downloadFile;
|
16826
|
-
const fetchJson = async (url) => {
|
16827
|
-
const res = await (0, exports.fetch)(url);
|
16828
|
-
return JSON.parse(res);
|
16829
|
-
};
|
16830
|
-
exports.fetchJson = fetchJson;
|
16831
|
-
} (http));
|
16716
|
+
const getProxyVar = () => {
|
16717
|
+
return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy;
|
16718
|
+
};
|
16719
|
+
const getProxy = () => {
|
16720
|
+
const parsedUrl = new node_url.URL(getProxyVar());
|
16721
|
+
return {
|
16722
|
+
port: parsedUrl.port,
|
16723
|
+
host: parsedUrl.hostname,
|
16724
|
+
username: parsedUrl.username,
|
16725
|
+
password: parsedUrl.password
|
16726
|
+
};
|
16727
|
+
};
|
16728
|
+
const getRequestOptions = (url) => {
|
16729
|
+
const parsedUrl = new node_url.URL(url);
|
16730
|
+
let options;
|
16731
|
+
if (getProxyVar() && parsedUrl.hostname !== 'localhost' && parsedUrl.hostname.substring(0, 3) !== '127') {
|
16732
|
+
options = {};
|
16733
|
+
const proxy = getProxy();
|
16734
|
+
options.host = proxy.host;
|
16735
|
+
options.port = proxy.port;
|
16736
|
+
options.path = url;
|
16737
|
+
options.headers = { Host: parsedUrl.hostname };
|
16738
|
+
if (proxy.username && proxy.password) {
|
16739
|
+
const auth = `Basic ${Buffer.from(`${proxy.username}:${proxy.password}`).toString('base64')}`;
|
16740
|
+
Object.assign(options.headers, { 'Proxy-Authorization': auth });
|
16741
|
+
}
|
16742
|
+
}
|
16743
|
+
else {
|
16744
|
+
options = parsedUrl;
|
16745
|
+
}
|
16746
|
+
return options;
|
16747
|
+
};
|
16748
|
+
function protocolFromUrl(url) {
|
16749
|
+
const parsed = node_url.parse(url);
|
16750
|
+
if (!parsed.protocol) {
|
16751
|
+
throw new Error(`Invalid protocol for url ${url}`);
|
16752
|
+
}
|
16753
|
+
return parsed.protocol.slice(0, -1) === 'http' ? 'http' : 'https';
|
16754
|
+
}
|
16755
|
+
const fetch = async (url) => {
|
16756
|
+
const requestUrl = getProxyVar() ?? url;
|
16757
|
+
const proto = protocolFromUrl(requestUrl);
|
16758
|
+
const fetcher = (await import(proto));
|
16759
|
+
return new Promise((resolve, reject) => {
|
16760
|
+
const options = getRequestOptions(url);
|
16761
|
+
const request = fetcher.get(options, (response) => {
|
16762
|
+
if (!response) {
|
16763
|
+
reject(new Error(`Failed to load url: ${url}, no response`));
|
16764
|
+
return;
|
16765
|
+
}
|
16766
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
16767
|
+
if (response.statusCode < 200 || response.statusCode > 299) {
|
16768
|
+
reject(new Error(`Failed to load url: ${url}, status code:${response.statusCode}`));
|
16769
|
+
return;
|
16770
|
+
}
|
16771
|
+
const body = [];
|
16772
|
+
response.on('data', (chunk) => {
|
16773
|
+
body.push(chunk);
|
16774
|
+
});
|
16775
|
+
response.on('end', () => resolve(body.join('')));
|
16776
|
+
});
|
16777
|
+
request.on('error', (err) => {
|
16778
|
+
reject(err);
|
16779
|
+
});
|
16780
|
+
});
|
16781
|
+
};
|
16782
|
+
const downloadFile = async (url, writeLocation) => {
|
16783
|
+
const requestUrl = getProxyVar() ?? url;
|
16784
|
+
const proto = protocolFromUrl(requestUrl);
|
16785
|
+
const fetcher = await import(proto);
|
16786
|
+
return new Promise((resolve, reject) => {
|
16787
|
+
try {
|
16788
|
+
const options = getRequestOptions(url);
|
16789
|
+
fetcher.get(options, (response) => {
|
16790
|
+
const file = fs__namespace.createWriteStream(writeLocation);
|
16791
|
+
response.pipe(file);
|
16792
|
+
file.on('finish', () => {
|
16793
|
+
file.close();
|
16794
|
+
resolve();
|
16795
|
+
});
|
16796
|
+
});
|
16797
|
+
}
|
16798
|
+
catch (e) {
|
16799
|
+
reject(e);
|
16800
|
+
}
|
16801
|
+
});
|
16802
|
+
};
|
16803
|
+
const fetchJson = async (url) => {
|
16804
|
+
const res = await fetch(url);
|
16805
|
+
return JSON.parse(res);
|
16806
|
+
};
|
16832
16807
|
|
16833
|
-
|
16834
|
-
util.resolveDir = util.first = util.resolveRuntimeVersion = util.rmDir = util.unzip = util.exists = void 0;
|
16835
|
-
const path$4 = require$$1;
|
16836
|
-
const fs$3 = require$$0$2;
|
16837
|
-
const child_process_1$2 = require$$2;
|
16838
|
-
const promises_1$2 = promises;
|
16839
|
-
const http_1$2 = http;
|
16840
|
-
const stat = (0, promises_1$2.promisify)(fs$3.stat);
|
16808
|
+
const stat = promisify_1(fs__namespace.stat);
|
16841
16809
|
async function exists(filePath) {
|
16842
16810
|
try {
|
16843
16811
|
const existed = await stat(filePath);
|
@@ -16847,16 +16815,14 @@ async function exists(filePath) {
|
|
16847
16815
|
return false;
|
16848
16816
|
}
|
16849
16817
|
}
|
16850
|
-
util.exists = exists;
|
16851
16818
|
async function unzip(file, dest) {
|
16852
|
-
const ex = (
|
16819
|
+
const ex = promisify_1(child_process.exec);
|
16853
16820
|
return ex(`unzip ${file} -d ${dest}`, { encoding: 'utf8' });
|
16854
16821
|
}
|
16855
|
-
|
16856
|
-
const
|
16857
|
-
const
|
16858
|
-
const
|
16859
|
-
const rmdir = (0, promises_1$2.promisify)(fs$3.rmdir);
|
16822
|
+
const lstat = promisify_1(fs__namespace.lstat);
|
16823
|
+
const unlink = promisify_1(fs__namespace.unlink);
|
16824
|
+
const readdir = promisify_1(fs__namespace.readdir);
|
16825
|
+
const rmdir = promisify_1(fs__namespace.rmdir);
|
16860
16826
|
async function rmDir(dirPath, removeSelf = true) {
|
16861
16827
|
let files;
|
16862
16828
|
try {
|
@@ -16866,7 +16832,7 @@ async function rmDir(dirPath, removeSelf = true) {
|
|
16866
16832
|
return;
|
16867
16833
|
}
|
16868
16834
|
if (files.length > 0) {
|
16869
|
-
await (
|
16835
|
+
await promiseMap_1(files, async (f) => {
|
16870
16836
|
const filePath = `${dirPath}/${f}`;
|
16871
16837
|
const file = await lstat(filePath);
|
16872
16838
|
if (file.isFile() || file.isSymbolicLink()) {
|
@@ -16881,14 +16847,13 @@ async function rmDir(dirPath, removeSelf = true) {
|
|
16881
16847
|
await rmdir(dirPath);
|
16882
16848
|
}
|
16883
16849
|
}
|
16884
|
-
util.rmDir = rmDir;
|
16885
16850
|
async function resolveRuntimeVersion(versionOrChannel) {
|
16886
16851
|
const splitVersion = versionOrChannel.split('.');
|
16887
16852
|
const isVersion = splitVersion.length > 1 && splitVersion.every((x) => x === '*' || /^\d+$/.test(x));
|
16888
16853
|
if (isVersion) {
|
16889
16854
|
const mustMatch = takeWhile(splitVersion, (x) => x !== '*');
|
16890
16855
|
if (4 - mustMatch.length > 0) {
|
16891
|
-
const res = await
|
16856
|
+
const res = await fetch('https://cdn.openfin.co/release/runtimeVersions');
|
16892
16857
|
const versions = res.split('\n');
|
16893
16858
|
const match = first(versions, (v) => v.split('.').slice(0, mustMatch.length).join('.') === mustMatch.join('.'));
|
16894
16859
|
if (match) {
|
@@ -16900,13 +16865,12 @@ async function resolveRuntimeVersion(versionOrChannel) {
|
|
16900
16865
|
}
|
16901
16866
|
}
|
16902
16867
|
try {
|
16903
|
-
return await
|
16868
|
+
return await fetch(`https://cdn.openfin.co/release/runtime/${versionOrChannel}`);
|
16904
16869
|
}
|
16905
16870
|
catch (err) {
|
16906
16871
|
throw Error('Could not resolve runtime version');
|
16907
16872
|
}
|
16908
16873
|
}
|
16909
|
-
util.resolveRuntimeVersion = resolveRuntimeVersion;
|
16910
16874
|
function first(arr, func) {
|
16911
16875
|
for (let i = 0; i < arr.length; i++) {
|
16912
16876
|
if (func(arr[i], i, arr)) {
|
@@ -16915,71 +16879,58 @@ function first(arr, func) {
|
|
16915
16879
|
}
|
16916
16880
|
return null;
|
16917
16881
|
}
|
16918
|
-
util.first = first;
|
16919
16882
|
function takeWhile(arr, func) {
|
16920
16883
|
return arr.reduce(({ take, vals }, x, i, r) => take && func(x, i, r) ? { take: true, vals: [...vals, x] } : { take: false, vals }, { take: true, vals: [] }).vals;
|
16921
16884
|
}
|
16922
|
-
const mkdir$1 = (
|
16885
|
+
const mkdir$1 = promisify_1(fs__namespace.mkdir);
|
16923
16886
|
async function resolveDir(base, paths) {
|
16924
16887
|
return paths.reduce(async (p, next) => {
|
16925
16888
|
try {
|
16926
16889
|
const prev = await p;
|
16927
|
-
await mkdir$1(
|
16928
|
-
return
|
16890
|
+
await mkdir$1(path__namespace.resolve(prev, next));
|
16891
|
+
return path__namespace.join(prev, next);
|
16929
16892
|
}
|
16930
16893
|
catch (err) {
|
16931
16894
|
return err.code === 'EEXIST' ? err.path : Promise.reject(err);
|
16932
16895
|
}
|
16933
16896
|
}, Promise.resolve(base));
|
16934
16897
|
}
|
16935
|
-
util.resolveDir = resolveDir;
|
16936
16898
|
|
16937
|
-
|
16938
|
-
nixLaunch.launch = nixLaunch.install = nixLaunch.getRuntimePath = nixLaunch.download = nixLaunch.getUrl = void 0;
|
16939
|
-
const fs$2 = require$$0$2;
|
16940
|
-
const path$3 = require$$1;
|
16941
|
-
const child_process_1$1 = require$$2;
|
16942
|
-
const promises_1$1 = promises;
|
16943
|
-
const util_1$1 = util;
|
16944
|
-
const http_1$1 = http;
|
16945
|
-
const mkdir = (0, promises_1$1.promisify)(fs$2.mkdir);
|
16899
|
+
const mkdir = promisify_1(fs__namespace.mkdir);
|
16946
16900
|
const downloads = {};
|
16947
16901
|
function getUrl(version, urlPath) {
|
16948
16902
|
const runtimeRoot = process.env.assetsUrl || 'https://cdn.openfin.co/release/runtime/';
|
16949
16903
|
return `${runtimeRoot}${urlPath}/${version}`;
|
16950
16904
|
}
|
16951
|
-
nixLaunch.getUrl = getUrl;
|
16952
16905
|
async function download(version, folder, osConfig) {
|
16953
16906
|
const url = getUrl(version, osConfig.urlPath);
|
16954
16907
|
const tmp = 'tmp';
|
16955
|
-
await
|
16956
|
-
await mkdir(
|
16908
|
+
await rmDir(folder, false);
|
16909
|
+
await mkdir(path__namespace.join(folder, tmp)).catch(() => {
|
16957
16910
|
// empty block
|
16958
16911
|
});
|
16959
|
-
const file =
|
16960
|
-
await
|
16961
|
-
await
|
16962
|
-
await
|
16912
|
+
const file = path__namespace.join(folder, tmp, 'tmp');
|
16913
|
+
await downloadFile(url, file);
|
16914
|
+
await unzip(file, folder);
|
16915
|
+
await rmDir(path__namespace.join(folder, tmp), true);
|
16963
16916
|
return folder;
|
16964
16917
|
}
|
16965
|
-
nixLaunch.download = download;
|
16966
16918
|
async function getRuntimePath(version) {
|
16967
16919
|
if (process.env.runtimeDirectory) {
|
16968
|
-
return
|
16920
|
+
return resolveDir(process.env.runtimeDirectory, ['Runtime', version]);
|
16969
16921
|
}
|
16970
16922
|
const versionPath = ['OpenFin', 'Runtime', version];
|
16971
16923
|
const { HOME } = process.env;
|
16972
16924
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
16973
|
-
return
|
16925
|
+
return resolveDir(HOME, versionPath);
|
16974
16926
|
}
|
16975
|
-
nixLaunch.getRuntimePath = getRuntimePath;
|
16976
16927
|
async function install(versionOrChannel, osConfig) {
|
16977
|
-
const version = await
|
16928
|
+
const version = await resolveRuntimeVersion(versionOrChannel);
|
16978
16929
|
const rtFolder = await getRuntimePath(version);
|
16979
|
-
const rtPath =
|
16980
|
-
const rtExists = await
|
16930
|
+
const rtPath = path__namespace.join(rtFolder, osConfig.executablePath);
|
16931
|
+
const rtExists = await exists(rtPath);
|
16981
16932
|
if (rtExists) {
|
16982
|
-
await (
|
16933
|
+
await promisify_1(fs__namespace.chmod)(rtPath, 0o755);
|
16983
16934
|
}
|
16984
16935
|
else {
|
16985
16936
|
try {
|
@@ -16991,14 +16942,13 @@ async function install(versionOrChannel, osConfig) {
|
|
16991
16942
|
}
|
16992
16943
|
catch (err) {
|
16993
16944
|
console.error(`Failed to download, attempting to empty ${rtFolder}`);
|
16994
|
-
await
|
16945
|
+
await rmDir(rtFolder, false);
|
16995
16946
|
throw Error(`Could not install runtime ${versionOrChannel} (${version})`);
|
16996
16947
|
}
|
16997
16948
|
}
|
16998
16949
|
return rtPath;
|
16999
16950
|
}
|
17000
|
-
|
17001
|
-
async function launch$1(config, osConfig) {
|
16951
|
+
async function launch$2(config, osConfig) {
|
17002
16952
|
try {
|
17003
16953
|
let fb = false;
|
17004
16954
|
const runtimePath = await install(config.runtime.version, osConfig).catch((e) => {
|
@@ -17025,35 +16975,26 @@ async function launch$1(config, osConfig) {
|
|
17025
16975
|
args.push('--attach-console');
|
17026
16976
|
}
|
17027
16977
|
warnIfServicesProvided(config);
|
17028
|
-
return
|
16978
|
+
return child_process.spawn(runtimePath, args);
|
17029
16979
|
}
|
17030
16980
|
catch (e) {
|
17031
16981
|
console.error('Failed to launch\n', e);
|
17032
16982
|
throw e;
|
17033
16983
|
}
|
17034
16984
|
}
|
17035
|
-
nixLaunch.launch = launch$1;
|
17036
16985
|
function warnIfServicesProvided(config) {
|
17037
16986
|
if (typeof config.services !== 'undefined' && config.services !== null) {
|
17038
16987
|
console.warn('services are deprecated and will be ignored');
|
17039
16988
|
}
|
17040
16989
|
}
|
17041
16990
|
|
17042
|
-
var rvmLaunch = {};
|
17043
|
-
|
17044
|
-
Object.defineProperty(rvmLaunch, "__esModule", { value: true });
|
17045
|
-
rvmLaunch.launch = void 0;
|
17046
|
-
const child_process_1 = require$$2;
|
17047
|
-
const os$2 = require$$1$1;
|
17048
|
-
const path$2 = require$$1;
|
17049
|
-
const util_1 = util;
|
17050
16991
|
const getRvmPath = () => {
|
17051
16992
|
switch (process.platform) {
|
17052
16993
|
case 'darwin':
|
17053
|
-
return
|
16994
|
+
return path__namespace.resolve(os__namespace.homedir(), 'Applications', 'OpenFinRVM.app', 'Contents', 'MacOS', 'OpenFinRVM');
|
17054
16995
|
case 'win32':
|
17055
16996
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
17056
|
-
return
|
16997
|
+
return path__namespace.resolve(process.env.LOCALAPPDATA, 'OpenFin', 'OpenFinRVM.exe');
|
17057
16998
|
default:
|
17058
16999
|
throw new Error(`Unsupported platform: ${process.platform}`);
|
17059
17000
|
}
|
@@ -17061,9 +17002,9 @@ const getRvmPath = () => {
|
|
17061
17002
|
const getRvmLocalPath = () => {
|
17062
17003
|
switch (process.platform) {
|
17063
17004
|
case 'darwin':
|
17064
|
-
return
|
17005
|
+
return path__namespace.resolve(__dirname, '..', 'resources', 'darwin', 'OpenFinRVM.app', 'Contents', 'MacOS', 'OpenFinRVM');
|
17065
17006
|
case 'win32':
|
17066
|
-
return
|
17007
|
+
return path__namespace.resolve(__dirname, '..', 'resources', 'win', 'OpenFinRVM.exe');
|
17067
17008
|
default:
|
17068
17009
|
throw new Error(`Unsupported platform: ${process.platform}`);
|
17069
17010
|
}
|
@@ -17082,11 +17023,11 @@ function launchRVM(config, manifestLocation, namedPipeName, rvm) {
|
|
17082
17023
|
if (config.assetsUrl) {
|
17083
17024
|
rvmArgs.push(`--assetsUrl=${config.assetsUrl}`);
|
17084
17025
|
}
|
17085
|
-
return
|
17026
|
+
return child_process.spawn(rvm, rvmArgs, { stdio: ['pipe', 'ignore', 'pipe'], detached: true });
|
17086
17027
|
}
|
17087
17028
|
async function checkRvmPath() {
|
17088
17029
|
const rvmPath = getRvmPath();
|
17089
|
-
if (!(await
|
17030
|
+
if (!(await exists(rvmPath))) {
|
17090
17031
|
// TODO: update win RVM exe to v13
|
17091
17032
|
const newRvmPath = getRvmLocalPath();
|
17092
17033
|
console.log(`[OpenFin Launcher] RVM not found at ${rvmPath}, spwaning locally pacakged RVM at ${newRvmPath}`);
|
@@ -17095,11 +17036,10 @@ async function checkRvmPath() {
|
|
17095
17036
|
return rvmPath;
|
17096
17037
|
}
|
17097
17038
|
const checkRVM = makeQueued(checkRvmPath);
|
17098
|
-
async function launch(config, manifestLocation, namedPipeName) {
|
17039
|
+
async function launch$1(config, manifestLocation, namedPipeName) {
|
17099
17040
|
const rvmPath = await checkRVM();
|
17100
17041
|
return launchRVM(config, manifestLocation, namedPipeName, rvmPath);
|
17101
17042
|
}
|
17102
|
-
rvmLaunch.launch = launch;
|
17103
17043
|
function makeQueued(func) {
|
17104
17044
|
let initial;
|
17105
17045
|
return async function (...args) {
|
@@ -17112,49 +17052,39 @@ function makeQueued(func) {
|
|
17112
17052
|
};
|
17113
17053
|
}
|
17114
17054
|
|
17115
|
-
Object.defineProperty(launcher$1, "__esModule", { value: true });
|
17116
|
-
const os$1 = require$$1$1;
|
17117
|
-
const path$1 = require$$1;
|
17118
|
-
const nix_launch_1 = nixLaunch;
|
17119
|
-
const rvm_launch_1 = rvmLaunch;
|
17120
17055
|
class Launcher {
|
17121
17056
|
constructor() {
|
17122
|
-
this.Installer_Work_Dir =
|
17057
|
+
this.Installer_Work_Dir = path__namespace.join(os__namespace.tmpdir(), 'openfinnode');
|
17123
17058
|
this.Security_Realm_Config_Key = '--security-realm=';
|
17124
17059
|
if (!Launcher.IS_SUPPORTED()) {
|
17125
|
-
throw new Error(`Launching not supported on ${
|
17060
|
+
throw new Error(`Launching not supported on ${os__namespace.platform()}`);
|
17126
17061
|
}
|
17127
17062
|
}
|
17128
17063
|
async launch(config, manifestLocation, namedPipeName) {
|
17129
17064
|
if (Launcher.RVM_SUPPORTED()) {
|
17130
|
-
return
|
17065
|
+
return launch$1(config, manifestLocation, namedPipeName);
|
17131
17066
|
}
|
17132
|
-
if (
|
17067
|
+
if (os__namespace.platform() === 'linux') {
|
17133
17068
|
const osConfig = {
|
17134
17069
|
manifestLocation,
|
17135
17070
|
namedPipeName,
|
17136
|
-
urlPath: `linux/${
|
17071
|
+
urlPath: `linux/${os__namespace.arch()}`,
|
17137
17072
|
executablePath: 'openfin'
|
17138
17073
|
};
|
17139
|
-
return
|
17074
|
+
return launch$2(config, osConfig);
|
17140
17075
|
}
|
17141
|
-
throw new Error(`Launching not supported on ${
|
17076
|
+
throw new Error(`Launching not supported on ${os__namespace.platform()}`);
|
17142
17077
|
}
|
17143
17078
|
static IS_SUPPORTED() {
|
17144
|
-
const platform =
|
17079
|
+
const platform = os__namespace.platform();
|
17145
17080
|
return ['win32', 'darwin', 'linux'].includes(platform);
|
17146
17081
|
}
|
17147
17082
|
static RVM_SUPPORTED() {
|
17148
|
-
const platform =
|
17083
|
+
const platform = os__namespace.platform();
|
17149
17084
|
return ['win32', 'darwin'].includes(platform);
|
17150
17085
|
}
|
17151
17086
|
}
|
17152
|
-
launcher$1.default = Launcher;
|
17153
17087
|
|
17154
|
-
var bufferReader = {};
|
17155
|
-
|
17156
|
-
Object.defineProperty(bufferReader, "__esModule", { value: true });
|
17157
|
-
bufferReader.BufferReader = void 0;
|
17158
17088
|
/**
|
17159
17089
|
* Really simple buffer reader that reads from a buffer and keeps track of the offset.
|
17160
17090
|
* Ripped from runtime test helpers: https://gitlab.com/openfin/runtime/runtime/-/commit/d5f8e356911d70f92d78f4f62874f659f36f3667
|
@@ -17181,19 +17111,9 @@ class BufferReader {
|
|
17181
17111
|
return result;
|
17182
17112
|
}
|
17183
17113
|
}
|
17184
|
-
bufferReader.BufferReader = BufferReader;
|
17185
17114
|
|
17186
|
-
Object.defineProperty(portDiscovery, "__esModule", { value: true });
|
17187
17115
|
/* eslint-disable @typescript-eslint/naming-convention */
|
17188
|
-
const
|
17189
|
-
const net = require$$1$2;
|
17190
|
-
const os = require$$1$1;
|
17191
|
-
const path = require$$1;
|
17192
|
-
const timers_1 = require$$4;
|
17193
|
-
const launcher_1 = launcher$1;
|
17194
|
-
const buffer_reader_1 = bufferReader;
|
17195
|
-
const wire_1$2 = wire;
|
17196
|
-
const launcher = new launcher_1.default();
|
17116
|
+
const launcher = new Launcher();
|
17197
17117
|
// value for message_type
|
17198
17118
|
var ChromiumMessageType;
|
17199
17119
|
(function (ChromiumMessageType) {
|
@@ -17248,7 +17168,7 @@ function generateManifest(config) {
|
|
17248
17168
|
return manifest;
|
17249
17169
|
}
|
17250
17170
|
function onRuntimeHello(data, conn) {
|
17251
|
-
const reader = new
|
17171
|
+
const reader = new BufferReader(data);
|
17252
17172
|
const header = readHeader(reader);
|
17253
17173
|
if (header.message_type === ChromiumMessageType.RUNTIME_HELLO_MESSAGE) {
|
17254
17174
|
conn.write(data);
|
@@ -17258,7 +17178,7 @@ function onRuntimeHello(data, conn) {
|
|
17258
17178
|
}
|
17259
17179
|
}
|
17260
17180
|
function onDiscoverMessage(data) {
|
17261
|
-
const reader = new
|
17181
|
+
const reader = new BufferReader(data);
|
17262
17182
|
const header = readHeader(reader);
|
17263
17183
|
if (header.message_type === ChromiumMessageType.RUNTIME_STRING_MESSAGE) {
|
17264
17184
|
const messageLength = reader.readInt32();
|
@@ -17294,7 +17214,7 @@ function readHeader(reader) {
|
|
17294
17214
|
header.message_type = reader.readInt32();
|
17295
17215
|
header.flags = reader.readInt32();
|
17296
17216
|
header.attachment_count = reader.readInt32();
|
17297
|
-
header.os =
|
17217
|
+
header.os = os__namespace.platform();
|
17298
17218
|
if (header.os !== 'win32') {
|
17299
17219
|
header.num_fds = reader.readInt16();
|
17300
17220
|
header.pad = reader.readInt16();
|
@@ -17321,7 +17241,7 @@ class PortDiscovery {
|
|
17321
17241
|
openfin.stdout.pipe(process.stdout);
|
17322
17242
|
openfin.stderr.pipe(process.stderr);
|
17323
17243
|
}
|
17324
|
-
this.timeoutTimer =
|
17244
|
+
this.timeoutTimer = timers.setTimeout(() => {
|
17325
17245
|
// provide a log to aid in debugging in case of a hanging promise
|
17326
17246
|
console.warn('Port Discovery is taking a while. Either the runtime is downloading or it failed to retrieve the port.');
|
17327
17247
|
}, 30 * 1000);
|
@@ -17342,11 +17262,11 @@ class PortDiscovery {
|
|
17342
17262
|
let unix = false;
|
17343
17263
|
const randomNum = this.environment.getRandomId();
|
17344
17264
|
this.namedPipeName = `NodeAdapter.${randomNum}`;
|
17345
|
-
this.namedPipeServer =
|
17346
|
-
const pipePath =
|
17347
|
-
?
|
17348
|
-
:
|
17349
|
-
if (
|
17265
|
+
this.namedPipeServer = net__namespace.createServer();
|
17266
|
+
const pipePath = os__namespace.platform() === 'win32'
|
17267
|
+
? path__namespace.join('\\\\.\\pipe\\', `chrome.${this.namedPipeName}`)
|
17268
|
+
: path__namespace.join(os__namespace.tmpdir(), `${this.namedPipeName}.sock`);
|
17269
|
+
if (os__namespace.platform() !== 'win32') {
|
17350
17270
|
unix = true;
|
17351
17271
|
this.namedPipeName = pipePath;
|
17352
17272
|
}
|
@@ -17354,7 +17274,7 @@ class PortDiscovery {
|
|
17354
17274
|
if (unix) {
|
17355
17275
|
const address = this.namedPipeServer.address();
|
17356
17276
|
this.namedPipeName = address;
|
17357
|
-
|
17277
|
+
fs__namespace.chmodSync(pipePath, 0o777);
|
17358
17278
|
}
|
17359
17279
|
resolve();
|
17360
17280
|
});
|
@@ -17387,14 +17307,14 @@ class PortDiscovery {
|
|
17387
17307
|
}
|
17388
17308
|
createManifest() {
|
17389
17309
|
return new Promise((resolve, reject) => {
|
17390
|
-
if ((
|
17310
|
+
if (isExternalConfig_1(this.savedConfig)) {
|
17391
17311
|
this.manifestLocation = this.savedConfig.manifestUrl;
|
17392
17312
|
resolve();
|
17393
17313
|
}
|
17394
17314
|
else {
|
17395
17315
|
const manifestFileName = `NodeAdapter-${this.savedConfig.uuid.replace(/ /g, '-')}.json`;
|
17396
17316
|
try {
|
17397
|
-
|
17317
|
+
fs__namespace.mkdirSync(launcher.Installer_Work_Dir);
|
17398
17318
|
}
|
17399
17319
|
catch (e) {
|
17400
17320
|
if (!e.message.includes('file already exists')) {
|
@@ -17402,8 +17322,8 @@ class PortDiscovery {
|
|
17402
17322
|
return;
|
17403
17323
|
}
|
17404
17324
|
}
|
17405
|
-
this.manifestLocation =
|
17406
|
-
const wr =
|
17325
|
+
this.manifestLocation = path__namespace.join(launcher.Installer_Work_Dir, manifestFileName);
|
17326
|
+
const wr = fs__namespace.createWriteStream(this.manifestLocation);
|
17407
17327
|
const manifest = generateManifest(this.savedConfig);
|
17408
17328
|
wr.on('error', (err) => {
|
17409
17329
|
reject(err);
|
@@ -17429,12 +17349,11 @@ class PortDiscovery {
|
|
17429
17349
|
}
|
17430
17350
|
}
|
17431
17351
|
}
|
17432
|
-
portDiscovery.default = PortDiscovery;
|
17433
17352
|
|
17434
17353
|
var baseEnv = {};
|
17435
17354
|
|
17436
17355
|
Object.defineProperty(baseEnv, "__esModule", { value: true });
|
17437
|
-
baseEnv.BaseEnvironment = void 0;
|
17356
|
+
var BaseEnvironment_1 = baseEnv.BaseEnvironment = void 0;
|
17438
17357
|
const overrideCheck_1 = requireOverrideCheck();
|
17439
17358
|
class BaseEnvironment {
|
17440
17359
|
async getInteropInfo(fin) {
|
@@ -17453,23 +17372,15 @@ class BaseEnvironment {
|
|
17453
17372
|
};
|
17454
17373
|
}
|
17455
17374
|
}
|
17456
|
-
baseEnv.BaseEnvironment = BaseEnvironment;
|
17375
|
+
BaseEnvironment_1 = baseEnv.BaseEnvironment = BaseEnvironment;
|
17457
17376
|
|
17458
|
-
Object.defineProperty(nodeEnv, "__esModule", { value: true });
|
17459
17377
|
/* eslint-disable class-methods-use-this */
|
17460
|
-
const fs_1 = require$$0$2;
|
17461
|
-
const crypto_1 = require$$1$3;
|
17462
|
-
const _WS = require$$2$1;
|
17463
|
-
const environment_1 = environment;
|
17464
|
-
const port_discovery_1 = portDiscovery;
|
17465
|
-
const transport_errors_1$2 = transportErrors;
|
17466
|
-
const base_env_1 = baseEnv;
|
17467
17378
|
// Due to https://github.com/rollup/rollup/issues/1267, we need this guard
|
17468
17379
|
// to ensure the import works with and without the 'esModuleInterop' ts flag.
|
17469
17380
|
// This is due to our mocha tests not being compatible with esModuleInterop,
|
17470
17381
|
// whereas rollup enforces it.
|
17471
|
-
const WS =
|
17472
|
-
class NodeEnvironment extends
|
17382
|
+
const WS = _WS__namespace.default || _WS__namespace;
|
17383
|
+
class NodeEnvironment extends BaseEnvironment_1 {
|
17473
17384
|
constructor() {
|
17474
17385
|
super(...arguments);
|
17475
17386
|
this.type = 'node';
|
@@ -17477,11 +17388,11 @@ class NodeEnvironment extends base_env_1.BaseEnvironment {
|
|
17477
17388
|
this.childViews = false;
|
17478
17389
|
this.writeToken = (path, token) => {
|
17479
17390
|
return new Promise((resolve) => {
|
17480
|
-
|
17391
|
+
fs.writeFile(path, token, () => resolve(token));
|
17481
17392
|
});
|
17482
17393
|
};
|
17483
17394
|
this.retrievePort = (config) => {
|
17484
|
-
const pd = new
|
17395
|
+
const pd = new PortDiscovery(config, this);
|
17485
17396
|
return pd.retrievePort();
|
17486
17397
|
};
|
17487
17398
|
this.getNextMessageId = () => {
|
@@ -17489,22 +17400,22 @@ class NodeEnvironment extends base_env_1.BaseEnvironment {
|
|
17489
17400
|
return this.messageCounter++;
|
17490
17401
|
};
|
17491
17402
|
this.getRandomId = () => {
|
17492
|
-
return
|
17403
|
+
return crypto.randomBytes(16).toString('hex');
|
17493
17404
|
};
|
17494
17405
|
this.getWebWindow = (identity) => {
|
17495
|
-
throw new
|
17406
|
+
throw new NotSupportedError_1('Not supported outside of OpenFin web context');
|
17496
17407
|
};
|
17497
17408
|
this.getCurrentEntityIdentity = () => {
|
17498
|
-
throw new
|
17409
|
+
throw new NotImplementedError_1(notImplementedEnvErrorMsg);
|
17499
17410
|
};
|
17500
17411
|
this.getCurrentEntityType = () => {
|
17501
17412
|
return 'external connection';
|
17502
17413
|
};
|
17503
17414
|
this.raiseEvent = (eventName, eventArgs) => {
|
17504
|
-
throw new
|
17415
|
+
throw new NotImplementedError_1(notImplementedEnvErrorMsg);
|
17505
17416
|
};
|
17506
17417
|
this.getUrl = () => {
|
17507
|
-
throw new
|
17418
|
+
throw new NotImplementedError_1('Not Implemented');
|
17508
17419
|
};
|
17509
17420
|
}
|
17510
17421
|
observeBounds(element, onChange) {
|
@@ -17516,7 +17427,7 @@ class NodeEnvironment extends base_env_1.BaseEnvironment {
|
|
17516
17427
|
getRtcPeer() {
|
17517
17428
|
throw new Error('Method not implemented.');
|
17518
17429
|
}
|
17519
|
-
layoutAllowedInContext(
|
17430
|
+
layoutAllowedInContext() {
|
17520
17431
|
throw new Error('Method not implemented.');
|
17521
17432
|
}
|
17522
17433
|
async initLayoutManager() {
|
@@ -17541,14 +17452,13 @@ class NodeEnvironment extends base_env_1.BaseEnvironment {
|
|
17541
17452
|
return Promise.resolve();
|
17542
17453
|
}
|
17543
17454
|
createChildContent(options) {
|
17544
|
-
throw new
|
17455
|
+
throw new NotImplementedError_1('Not Implemented');
|
17545
17456
|
}
|
17546
17457
|
getWsConstructor() {
|
17547
17458
|
// @ts-expect-error
|
17548
17459
|
return WS;
|
17549
17460
|
}
|
17550
17461
|
}
|
17551
|
-
nodeEnv.default = NodeEnvironment;
|
17552
17462
|
|
17553
17463
|
var transport = {};
|
17554
17464
|
|
@@ -17639,9 +17549,9 @@ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFie
|
|
17639
17549
|
};
|
17640
17550
|
var _Transport_wire, _Transport_fin;
|
17641
17551
|
Object.defineProperty(transport, "__esModule", { value: true });
|
17642
|
-
transport.Transport = void 0;
|
17552
|
+
var Transport_1 = transport.Transport = void 0;
|
17643
17553
|
const events_1$1 = require$$0;
|
17644
|
-
const wire_1
|
17554
|
+
const wire_1 = wire;
|
17645
17555
|
const transport_errors_1$1 = transportErrors;
|
17646
17556
|
const eventAggregator_1 = eventAggregator;
|
17647
17557
|
const me_1 = me;
|
@@ -17697,17 +17607,17 @@ class Transport extends events_1$1.EventEmitter {
|
|
17697
17607
|
return wire.shutdown();
|
17698
17608
|
}
|
17699
17609
|
async connect(config) {
|
17700
|
-
if ((0, wire_1
|
17610
|
+
if ((0, wire_1.isConfigWithReceiver)(config)) {
|
17701
17611
|
await __classPrivateFieldGet(this, _Transport_wire, "f").connect(config.receiver);
|
17702
17612
|
return this.authorize(config);
|
17703
17613
|
}
|
17704
|
-
if ((0, wire_1
|
17614
|
+
if ((0, wire_1.isRemoteConfig)(config)) {
|
17705
17615
|
return this.connectRemote(config);
|
17706
17616
|
}
|
17707
|
-
if ((0, wire_1
|
17617
|
+
if ((0, wire_1.isExistingConnectConfig)(config)) {
|
17708
17618
|
return this.connectByPort(config);
|
17709
17619
|
}
|
17710
|
-
if ((0, wire_1
|
17620
|
+
if ((0, wire_1.isNewConnectConfig)(config)) {
|
17711
17621
|
const port = await this.environment.retrievePort(config);
|
17712
17622
|
return this.connectByPort({ ...config, address: `ws://localhost:${port}` });
|
17713
17623
|
}
|
@@ -17851,7 +17761,7 @@ class Transport extends events_1$1.EventEmitter {
|
|
17851
17761
|
return true;
|
17852
17762
|
}
|
17853
17763
|
}
|
17854
|
-
transport.Transport = Transport;
|
17764
|
+
Transport_1 = transport.Transport = Transport;
|
17855
17765
|
_Transport_wire = new WeakMap(), _Transport_fin = new WeakMap();
|
17856
17766
|
|
17857
17767
|
var websocket = {};
|
@@ -17925,28 +17835,19 @@ class WebSocketTransport extends events_1.EventEmitter {
|
|
17925
17835
|
return this.wire.url.split(':').slice(-1)[0];
|
17926
17836
|
}
|
17927
17837
|
}
|
17928
|
-
websocket.default = WebSocketTransport;
|
17838
|
+
var _default = websocket.default = WebSocketTransport;
|
17929
17839
|
|
17930
|
-
var normalizeConfig$1 = {};
|
17931
|
-
|
17932
|
-
Object.defineProperty(normalizeConfig$1, "__esModule", { value: true });
|
17933
|
-
normalizeConfig$1.validateConfig = normalizeConfig$1.normalizeConfig = void 0;
|
17934
|
-
const fs = require$$0$2;
|
17935
|
-
const node_url_1 = require$$0$1; // This must explicitly use node builtin to avoid accidentally bundling npm:url
|
17936
|
-
const wire_1 = wire;
|
17937
|
-
const promises_1 = promises;
|
17938
|
-
const http_1 = http;
|
17939
17840
|
async function readLocalConfig(location) {
|
17940
17841
|
let pathToFile = location;
|
17941
17842
|
if (location.startsWith('file')) {
|
17942
|
-
pathToFile =
|
17843
|
+
pathToFile = node_url.fileURLToPath(location);
|
17943
17844
|
}
|
17944
|
-
const txt = await (
|
17845
|
+
const txt = await promisify_1(fs__namespace.readFile)(pathToFile);
|
17945
17846
|
return JSON.parse(txt.toString());
|
17946
17847
|
}
|
17947
17848
|
async function loadConfig(config) {
|
17948
17849
|
try {
|
17949
|
-
return await
|
17850
|
+
return await fetchJson(config.manifestUrl);
|
17950
17851
|
}
|
17951
17852
|
catch (e) {
|
17952
17853
|
try {
|
@@ -17959,7 +17860,7 @@ async function loadConfig(config) {
|
|
17959
17860
|
}
|
17960
17861
|
async function normalizeConfig(config) {
|
17961
17862
|
const testThisConfig = config;
|
17962
|
-
if ((
|
17863
|
+
if (isExternalConfig_1(config)) {
|
17963
17864
|
const loadedConfig = await loadConfig(config);
|
17964
17865
|
testThisConfig.runtime = loadedConfig.runtime;
|
17965
17866
|
if (typeof loadedConfig.assetsUrl === 'string') {
|
@@ -17968,326 +17869,34 @@ async function normalizeConfig(config) {
|
|
17968
17869
|
}
|
17969
17870
|
return testThisConfig;
|
17970
17871
|
}
|
17971
|
-
normalizeConfig$1.normalizeConfig = normalizeConfig;
|
17972
17872
|
async function validateConfig(config) {
|
17973
17873
|
const normalized = await normalizeConfig(config);
|
17974
|
-
if ((
|
17874
|
+
if (isInternalConnectConfig_1(normalized)) {
|
17975
17875
|
return normalized;
|
17976
17876
|
}
|
17977
17877
|
throw new Error('Invalid Config');
|
17978
17878
|
}
|
17979
|
-
normalizeConfig$1.validateConfig = validateConfig;
|
17980
|
-
|
17981
|
-
(function (exports) {
|
17982
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17983
|
-
exports.ChannelProvider = exports.ChannelClient = exports.Frame = exports.View = exports.System = exports.Window = exports.Application = exports.Fin = exports.launch = exports.connect = void 0;
|
17984
|
-
const fin_1 = fin$1;
|
17985
|
-
Object.defineProperty(exports, "Fin", { enumerable: true, get: function () { return fin_1.Fin; } });
|
17986
|
-
const index_1 = requireApplication();
|
17987
|
-
Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return index_1.Application; } });
|
17988
|
-
const window_1 = requireWindow();
|
17989
|
-
Object.defineProperty(exports, "Window", { enumerable: true, get: function () { return window_1._Window; } });
|
17990
|
-
const view_1 = requireView();
|
17991
|
-
Object.defineProperty(exports, "View", { enumerable: true, get: function () { return view_1.View; } });
|
17992
|
-
const client_1 = client;
|
17993
|
-
Object.defineProperty(exports, "ChannelClient", { enumerable: true, get: function () { return client_1.ChannelClient; } });
|
17994
|
-
const provider_1 = provider;
|
17995
|
-
Object.defineProperty(exports, "ChannelProvider", { enumerable: true, get: function () { return provider_1.ChannelProvider; } });
|
17996
|
-
const frame_1 = frame$1;
|
17997
|
-
Object.defineProperty(exports, "Frame", { enumerable: true, get: function () { return frame_1._Frame; } });
|
17998
|
-
const system_1 = system$1;
|
17999
|
-
Object.defineProperty(exports, "System", { enumerable: true, get: function () { return system_1.System; } });
|
18000
|
-
const wire_1 = wire;
|
18001
|
-
const node_env_1 = nodeEnv;
|
18002
|
-
const transport_1 = transport;
|
18003
|
-
const websocket_1 = websocket;
|
18004
|
-
const port_discovery_1 = portDiscovery;
|
18005
|
-
const normalize_config_1 = normalizeConfig$1;
|
18006
|
-
const environment = new node_env_1.default();
|
18007
|
-
// Connect to an OpenFin Runtime
|
18008
|
-
async function connect(config) {
|
18009
|
-
const normalized = await (0, normalize_config_1.validateConfig)(config);
|
18010
|
-
const wire = new transport_1.Transport(websocket_1.default, environment, {
|
18011
|
-
...normalized,
|
18012
|
-
name: normalized.name ?? normalized.uuid
|
18013
|
-
});
|
18014
|
-
await wire.connect(normalized);
|
18015
|
-
return new fin_1.Fin(wire);
|
18016
|
-
}
|
18017
|
-
exports.connect = connect;
|
18018
|
-
async function launch(config) {
|
18019
|
-
const normalized = await (0, normalize_config_1.normalizeConfig)(config);
|
18020
|
-
if (!(0, wire_1.isPortDiscoveryConfig)(normalized)) {
|
18021
|
-
throw new Error('Invalid Config');
|
18022
|
-
}
|
18023
|
-
const pd = new port_discovery_1.default(normalized, environment);
|
18024
|
-
return pd.retrievePort();
|
18025
|
-
}
|
18026
|
-
exports.launch = launch;
|
18027
|
-
} (main$1));
|
18028
|
-
|
18029
|
-
var OpenFin$2 = {};
|
18030
|
-
|
18031
|
-
var events = {};
|
18032
|
-
|
18033
|
-
var application = {};
|
18034
|
-
|
18035
|
-
/**
|
18036
|
-
* Namespace for events that can be emitted by an {@link OpenFin.Application}. Includes events
|
18037
|
-
* re-propagated from the {@link OpenFin.Window} (and, transitively, {@link OpenFin.View}) level, prefixed with `window-` (and also, if applicable, `view-`).
|
18038
|
-
* For example, a view's "attached" event will fire as 'window-view-attached' at the application level.
|
18039
|
-
*
|
18040
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18041
|
-
*
|
18042
|
-
* This namespace contains only payload shapes for events that are unique to `Application`. Events that propagate to `Application` from
|
18043
|
-
* child {@link OpenFin.Window windows} and {@link OpenFin.View views} are defined in the {@link OpenFin.WindowEvents} and
|
18044
|
-
* {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all* application events, see {@link Application.on Application.on}.
|
18045
|
-
*
|
18046
|
-
* {@link ApplicationSourcedEvent Application-sourced events} (i.e. those that have not propagated from {@link OpenFin.ViewEvents Views}
|
18047
|
-
* or {@link OpenFin.WindowEvents Windows} re-propagate to {@link OpenFin.SystemEvents System} with their type string prefixed with `application-`.
|
18048
|
-
* {@link ApplicationWindowEvent Application events that are tied to Windows but do not propagate from them}
|
18049
|
-
* are propagated to `System` without any type string prefixing.
|
18050
|
-
*
|
18051
|
-
* "Requested" events (e.g. {@link RunRequestedEvent}) do not propagate.
|
18052
|
-
*
|
18053
|
-
* @packageDocumentation
|
18054
|
-
*/
|
18055
|
-
Object.defineProperty(application, "__esModule", { value: true });
|
18056
|
-
|
18057
|
-
var base = {};
|
18058
|
-
|
18059
|
-
/**
|
18060
|
-
* Namespace for shared event payloads and utility types common to all event emitters.
|
18061
|
-
*
|
18062
|
-
* @packageDocumentation
|
18063
|
-
*/
|
18064
|
-
Object.defineProperty(base, "__esModule", { value: true });
|
18065
|
-
|
18066
|
-
var externalApplication = {};
|
18067
|
-
|
18068
|
-
/**
|
18069
|
-
* Namespace for events that can be transmitted by an {@link OpenFin.ExternalApplication}.
|
18070
|
-
*
|
18071
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18072
|
-
*
|
18073
|
-
* For a list of valid string keys for external application events, see {@link ExternalApplication.on ExternalApplication.on}.
|
18074
|
-
*
|
18075
|
-
* @packageDocumentation
|
18076
|
-
*/
|
18077
|
-
Object.defineProperty(externalApplication, "__esModule", { value: true });
|
18078
|
-
|
18079
|
-
var frame = {};
|
18080
|
-
|
18081
|
-
Object.defineProperty(frame, "__esModule", { value: true });
|
18082
|
-
|
18083
|
-
var globalHotkey = {};
|
18084
|
-
|
18085
|
-
/**
|
18086
|
-
*
|
18087
|
-
* Namespace for events that can be transmitted by {@link GlobalHotkey.GlobalHotkey}.
|
18088
|
-
*
|
18089
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18090
|
-
*
|
18091
|
-
* For a list of valid string keys for global hotkey events, see {@link GlobalHotkey.GlobalHotkey.on GlobalHotkey.on}.
|
18092
|
-
*
|
18093
|
-
* @packageDocumentation
|
18094
|
-
*/
|
18095
|
-
Object.defineProperty(globalHotkey, "__esModule", { value: true });
|
18096
|
-
|
18097
|
-
var platform = {};
|
18098
|
-
|
18099
|
-
/**
|
18100
|
-
*
|
18101
|
-
* Namespace for events that can emitted by a {@link OpenFin.Platform}.
|
18102
|
-
*
|
18103
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18104
|
-
*
|
18105
|
-
* The Platform `EventEmitter` is a superset of the {@link OpenFin.Application} `EventEmitter`,
|
18106
|
-
* meaning it can listen to all {@link OpenFin.ApplicationEvents Application events} in addition to the
|
18107
|
-
* Platform-specific events listed here. For a list of valid string keys for *all* platform events, see
|
18108
|
-
* {@link Platform.on Platform.on}.
|
18109
|
-
*
|
18110
|
-
* @packageDocumentation
|
18111
|
-
*/
|
18112
|
-
Object.defineProperty(platform, "__esModule", { value: true });
|
18113
|
-
|
18114
|
-
var system = {};
|
18115
|
-
|
18116
|
-
/**
|
18117
|
-
* Namespace for runtime-wide OpenFin events emitted by {@link System.System}. Includes events
|
18118
|
-
* re-propagated from {@link OpenFin.Application}, {@link OpenFin.Window}, and {@link OpenFin.View} (prefixed with `application-`, `window-`, and `view-`). All
|
18119
|
-
* event propagations are visible at the System level. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
|
18120
|
-
* transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
|
18121
|
-
* of the application. For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
|
18122
|
-
* will be visible as 'view-shown' at the system level, but *not* as `application-window-view-shown`.
|
18123
|
-
*
|
18124
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18125
|
-
*
|
18126
|
-
* This namespace contains only payload shapes for events that are unique to `System`. Events that propagate to `System` from
|
18127
|
-
* child {@link OpenFin.Application applications}, {@link OpenFin.Window windows}, and {@link OpenFin.View views} are defined in the
|
18128
|
-
* {@link OpenFin.ApplicationEvents}, {@link OpenFin.WindowEvents}, and {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all*
|
18129
|
-
* system events, see {@link System.on System.on}.
|
18130
|
-
*
|
18131
|
-
* @packageDocumentation
|
18132
|
-
*/
|
18133
|
-
Object.defineProperty(system, "__esModule", { value: true });
|
18134
|
-
|
18135
|
-
var view = {};
|
18136
|
-
|
18137
|
-
/**
|
18138
|
-
* Namespace for events that can be emitted by a {@link OpenFin.View}.
|
18139
|
-
*
|
18140
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18141
|
-
*
|
18142
|
-
* This namespace contains only payload shapes for events that are unique to `View`. Events that are shared between all `WebContents`
|
18143
|
-
* (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. For a list
|
18144
|
-
* of valid string keys for *all* View events, see {@link View.on View.on}.
|
18145
|
-
*
|
18146
|
-
* View events propagate to their parent {@link OpenFin.WindowEvents Window}, {@link OpenFin.ApplicationEvents Application},
|
18147
|
-
* and {@link OpenFin.SystemEvents System} with an added `viewIdentity` property and their event types prefixed with `'view-'`.
|
18148
|
-
*
|
18149
|
-
* @packageDocumentation
|
18150
|
-
*/
|
18151
|
-
Object.defineProperty(view, "__esModule", { value: true });
|
18152
|
-
|
18153
|
-
var webcontents = {};
|
18154
|
-
|
18155
|
-
/**
|
18156
|
-
* Namespace for events shared by all OpenFin WebContents elements (i.e. {@link OpenFin.Window},
|
18157
|
-
* {@link OpenFin.View}).
|
18158
|
-
*
|
18159
|
-
* WebContents events will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
|
18160
|
-
* parent window, and propagating events in a window will also be emitted on the window's parent {@link OpenFin.Application}.
|
18161
|
-
*
|
18162
|
-
* @packageDocumentation
|
18163
|
-
*/
|
18164
|
-
Object.defineProperty(webcontents, "__esModule", { value: true });
|
18165
|
-
|
18166
|
-
var window$1 = {};
|
18167
|
-
|
18168
|
-
/**
|
18169
|
-
* Namespace for events that can be emitted by a {@link OpenFin.Window}.
|
18170
|
-
*
|
18171
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18172
|
-
*
|
18173
|
-
* This namespace contains only payload shapes for events that are unique to `Window`. Events that are shared between all `WebContents`
|
18174
|
-
* (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. Events that
|
18175
|
-
* propagate from `View` are defined in {@link OpenFin.ViewEvents}. For a list of valid string keys for *all* Window events, see
|
18176
|
-
* {@link Window.on Window.on}
|
18177
|
-
*
|
18178
|
-
* {@link OpenFin.WindowEvents.WindowSourcedEvent Window-sourced events} (i.e. those that are not propagated from a
|
18179
|
-
* {@link OpenFin.ViewEvents View}) propagate to their parent {@link OpenFin.ApplicationEvents Application} and
|
18180
|
-
* {@link OpenFin.SystemEvents System} with their event types prefixed with `'window-'`).
|
18181
|
-
*
|
18182
|
-
* "Requested" events (e.g. {@link AuthRequestedEvent}) do not propagate to `System. The {@link OpenFin.WindowEvents.WindowCloseRequestedEvent}
|
18183
|
-
* does not propagate at all.
|
18184
|
-
*
|
18185
|
-
* @packageDocumentation
|
18186
|
-
*/
|
18187
|
-
Object.defineProperty(window$1, "__esModule", { value: true });
|
18188
17879
|
|
18189
|
-
|
18190
|
-
|
18191
|
-
|
18192
|
-
|
18193
|
-
|
18194
|
-
|
18195
|
-
|
18196
|
-
|
18197
|
-
|
18198
|
-
|
18199
|
-
|
18200
|
-
|
18201
|
-
|
18202
|
-
|
18203
|
-
|
18204
|
-
|
18205
|
-
|
18206
|
-
|
18207
|
-
|
18208
|
-
|
18209
|
-
* Registering event handlers is an asynchronous operation. It is important to ensure that the returned Promises are awaited to reduce the
|
18210
|
-
* risk of race conditions.
|
18211
|
-
*
|
18212
|
-
* When the `EventEmitter` receives an event from the browser process and emits on the renderer, all of the functions attached to that
|
18213
|
-
* specific event are called synchronously. Any values returned by the called listeners are ignored and will be discarded. If the window document
|
18214
|
-
* is destroyed by page navigation or reload, its registered event listeners will be removed.
|
18215
|
-
*
|
18216
|
-
* We recommend using Arrow Functions for event listeners to ensure the this scope is consistent with the original function context.
|
18217
|
-
*
|
18218
|
-
* Events re-propagate from smaller/more-local scopes to larger/more-global scopes. For example, an event emitted on a specific
|
18219
|
-
* view will propagate to the window in which the view is embedded, and then to the application in which the window is running, and
|
18220
|
-
* finally to the OpenFin runtime itself at the "system" level. For details on propagation semantics, see the namespace for
|
18221
|
-
* the propagating (or propagated-to) entity.
|
18222
|
-
*
|
18223
|
-
* If you need the payload type for a specific type of event (especially propagated events), use the emitting topic's `Payload` generic
|
18224
|
-
* (e.g. {@link WindowEvents.Payload}) with the event's `type` string. For example, the payload of
|
18225
|
-
* a {@link ViewEvents.CreatedEvent} after it has propagated to its parent {@link WindowEvents Window} can be found with
|
18226
|
-
* `WindowEvents.Payload<'view-created'>`.
|
18227
|
-
*
|
18228
|
-
* @packageDocumentation
|
18229
|
-
*/
|
18230
|
-
Object.defineProperty(events, "__esModule", { value: true });
|
18231
|
-
events.WindowEvents = events.WebContentsEvents = events.ViewEvents = events.SystemEvents = events.PlatformEvents = events.GlobalHotkeyEvents = events.FrameEvents = events.ExternalApplicationEvents = events.BaseEvents = events.ApplicationEvents = void 0;
|
18232
|
-
const ApplicationEvents = application;
|
18233
|
-
events.ApplicationEvents = ApplicationEvents;
|
18234
|
-
const BaseEvents = base;
|
18235
|
-
events.BaseEvents = BaseEvents;
|
18236
|
-
const ExternalApplicationEvents = externalApplication;
|
18237
|
-
events.ExternalApplicationEvents = ExternalApplicationEvents;
|
18238
|
-
const FrameEvents = frame;
|
18239
|
-
events.FrameEvents = FrameEvents;
|
18240
|
-
const GlobalHotkeyEvents = globalHotkey;
|
18241
|
-
events.GlobalHotkeyEvents = GlobalHotkeyEvents;
|
18242
|
-
const PlatformEvents = platform;
|
18243
|
-
events.PlatformEvents = PlatformEvents;
|
18244
|
-
const SystemEvents = system;
|
18245
|
-
events.SystemEvents = SystemEvents;
|
18246
|
-
const ViewEvents = view;
|
18247
|
-
events.ViewEvents = ViewEvents;
|
18248
|
-
const WebContentsEvents = webcontents;
|
18249
|
-
events.WebContentsEvents = WebContentsEvents;
|
18250
|
-
const WindowEvents = window$1;
|
18251
|
-
events.WindowEvents = WindowEvents;
|
18252
|
-
|
18253
|
-
(function (exports) {
|
18254
|
-
/**
|
18255
|
-
* Top-level namespace for types referenced by the OpenFin API. Contains:
|
18256
|
-
*
|
18257
|
-
* * The type of the global `fin` entry point ({@link FinApi})
|
18258
|
-
* * Classes that act as static namespaces returned from the `fin` global (e.g. {@link ApplicationModule}, accessible via `fin.Application`)
|
18259
|
-
* * Instance classes that are returned from API calls (e.g. {@link Application}, accessible via `fin.Application.getCurrentSync()`)
|
18260
|
-
* * Parameter shapes for API methods (e.g. {@link ApplicationOptions}, used in `fin.Application.start()`)
|
18261
|
-
* * Event namespaces and payload union types (e.g. {@link ApplicationEvents} and {@link ApplicationEvent})
|
18262
|
-
*
|
18263
|
-
* @packageDocumentation
|
18264
|
-
*/
|
18265
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18266
|
-
if (k2 === undefined) k2 = k;
|
18267
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
18268
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
18269
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
18270
|
-
}
|
18271
|
-
Object.defineProperty(o, k2, desc);
|
18272
|
-
}) : (function(o, m, k, k2) {
|
18273
|
-
if (k2 === undefined) k2 = k;
|
18274
|
-
o[k2] = m[k];
|
18275
|
-
}));
|
18276
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
18277
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
18278
|
-
};
|
18279
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
18280
|
-
// Deprecated shim to preserve v30 namespace names
|
18281
|
-
__exportStar(events, exports);
|
18282
|
-
} (OpenFin$2));
|
18283
|
-
|
18284
|
-
var OpenFin = /*@__PURE__*/getDefaultExportFromCjs(OpenFin$2);
|
18285
|
-
|
18286
|
-
var OpenFin$1 = /*#__PURE__*/_mergeNamespaces({
|
18287
|
-
__proto__: null,
|
18288
|
-
default: OpenFin
|
18289
|
-
}, [OpenFin$2]);
|
17880
|
+
const environment = new NodeEnvironment();
|
17881
|
+
// Connect to an OpenFin Runtime
|
17882
|
+
async function connect(config) {
|
17883
|
+
const normalized = await validateConfig(config);
|
17884
|
+
const wire = new Transport_1(_default, environment, {
|
17885
|
+
...normalized,
|
17886
|
+
name: normalized.name ?? normalized.uuid
|
17887
|
+
});
|
17888
|
+
await wire.connect(normalized);
|
17889
|
+
// Casting instead of expect-error to avoid skipLibCheck errors.
|
17890
|
+
return new Fin_1(wire);
|
17891
|
+
}
|
17892
|
+
async function launch(config) {
|
17893
|
+
const normalized = await normalizeConfig(config);
|
17894
|
+
if (!isPortDiscoveryConfig_1(normalized)) {
|
17895
|
+
throw new Error('Invalid Config');
|
17896
|
+
}
|
17897
|
+
const pd = new PortDiscovery(normalized, environment);
|
17898
|
+
return pd.retrievePort();
|
17899
|
+
}
|
18290
17900
|
|
18291
|
-
exports.connect =
|
18292
|
-
exports.
|
18293
|
-
exports.launch = main$1.launch;
|
17901
|
+
exports.connect = connect;
|
17902
|
+
exports.launch = launch;
|