@openfin/remote-adapter 40.82.17 → 40.82.19
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/remote-adapter.js +75 -58
- package/package.json +2 -2
package/out/remote-adapter.js
CHANGED
|
@@ -49,7 +49,7 @@ async function promiseMapSerial(arr, func) {
|
|
|
49
49
|
}
|
|
50
50
|
promises.promiseMapSerial = promiseMapSerial;
|
|
51
51
|
|
|
52
|
-
var __classPrivateFieldSet$
|
|
52
|
+
var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
53
53
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
54
54
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
55
55
|
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");
|
|
@@ -178,7 +178,7 @@ class EmitterBase extends Base {
|
|
|
178
178
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
|
179
179
|
return Promise.resolve();
|
|
180
180
|
};
|
|
181
|
-
__classPrivateFieldSet$
|
|
181
|
+
__classPrivateFieldSet$d(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
|
182
182
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
@@ -432,7 +432,7 @@ var utils$3 = {};
|
|
|
432
432
|
exports.wrapIntentHandler = wrapIntentHandler;
|
|
433
433
|
} (utils$3));
|
|
434
434
|
|
|
435
|
-
var __classPrivateFieldSet$
|
|
435
|
+
var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
436
436
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
437
437
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
438
438
|
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");
|
|
@@ -452,7 +452,7 @@ class SessionContextGroupClient extends base_1$j.Base {
|
|
|
452
452
|
super(wire);
|
|
453
453
|
_SessionContextGroupClient_clientPromise.set(this, void 0);
|
|
454
454
|
this.id = id;
|
|
455
|
-
__classPrivateFieldSet$
|
|
455
|
+
__classPrivateFieldSet$c(this, _SessionContextGroupClient_clientPromise, client, "f");
|
|
456
456
|
}
|
|
457
457
|
/**
|
|
458
458
|
* Sets a context for the session context group.
|
|
@@ -5116,7 +5116,7 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
|
|
|
5116
5116
|
};
|
|
5117
5117
|
channelApiRelay.createRelayedDispatch = createRelayedDispatch;
|
|
5118
5118
|
|
|
5119
|
-
var __classPrivateFieldSet$
|
|
5119
|
+
var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
5120
5120
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
5121
5121
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5122
5122
|
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");
|
|
@@ -5310,7 +5310,7 @@ class LayoutNode {
|
|
|
5310
5310
|
entityId: stack.entityId
|
|
5311
5311
|
}, __classPrivateFieldGet$c(this, _LayoutNode_client, "f")));
|
|
5312
5312
|
};
|
|
5313
|
-
__classPrivateFieldSet$
|
|
5313
|
+
__classPrivateFieldSet$b(this, _LayoutNode_client, client, "f");
|
|
5314
5314
|
this.entityId = entityId;
|
|
5315
5315
|
}
|
|
5316
5316
|
}
|
|
@@ -5469,7 +5469,7 @@ class TabStack extends LayoutNode {
|
|
|
5469
5469
|
this.setActiveView = async (view) => {
|
|
5470
5470
|
await __classPrivateFieldGet$c(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
|
|
5471
5471
|
};
|
|
5472
|
-
__classPrivateFieldSet$
|
|
5472
|
+
__classPrivateFieldSet$b(this, _TabStack_client, client, "f");
|
|
5473
5473
|
}
|
|
5474
5474
|
}
|
|
5475
5475
|
layoutEntities.TabStack = TabStack;
|
|
@@ -5511,7 +5511,7 @@ class ColumnOrRow extends LayoutNode {
|
|
|
5511
5511
|
const contentItemEntities = await __classPrivateFieldGet$c(this, _ColumnOrRow_client, "f").getContent(this.entityId);
|
|
5512
5512
|
return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$c(this, _ColumnOrRow_client, "f")));
|
|
5513
5513
|
};
|
|
5514
|
-
__classPrivateFieldSet$
|
|
5514
|
+
__classPrivateFieldSet$b(this, _ColumnOrRow_client, client, "f");
|
|
5515
5515
|
this.type = type;
|
|
5516
5516
|
}
|
|
5517
5517
|
}
|
|
@@ -9713,7 +9713,7 @@ function requireInstance () {
|
|
|
9713
9713
|
});
|
|
9714
9714
|
try {
|
|
9715
9715
|
const layout = await this.getParentLayout();
|
|
9716
|
-
return layout.
|
|
9716
|
+
return layout.getStackByViewIdentity(this.identity);
|
|
9717
9717
|
}
|
|
9718
9718
|
catch (error) {
|
|
9719
9719
|
throw new transport_errors_1.RuntimeError({ reason: 'This view does not belong to a stack.', error });
|
|
@@ -10323,7 +10323,7 @@ function errorToPOJO(error) {
|
|
|
10323
10323
|
}
|
|
10324
10324
|
errors.errorToPOJO = errorToPOJO;
|
|
10325
10325
|
|
|
10326
|
-
var __classPrivateFieldSet$
|
|
10326
|
+
var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10327
10327
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10328
10328
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10329
10329
|
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");
|
|
@@ -10365,7 +10365,7 @@ class Transport extends events_1$5.EventEmitter {
|
|
|
10365
10365
|
const wire = __classPrivateFieldGet$b(this, _Transport_wire, "f");
|
|
10366
10366
|
return wire.getPort();
|
|
10367
10367
|
};
|
|
10368
|
-
__classPrivateFieldSet$
|
|
10368
|
+
__classPrivateFieldSet$a(this, _Transport_wire, new WireType(this.onmessage.bind(this)), "f");
|
|
10369
10369
|
this.environment = environment;
|
|
10370
10370
|
this.sendRaw = __classPrivateFieldGet$b(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$b(this, _Transport_wire, "f"));
|
|
10371
10371
|
this.registerMessageHandler(this.handleMessage.bind(this));
|
|
@@ -10390,7 +10390,7 @@ class Transport extends events_1$5.EventEmitter {
|
|
|
10390
10390
|
if (__classPrivateFieldGet$b(this, _Transport_fin, "f")) {
|
|
10391
10391
|
throw new Error('Fin object has already been registered for this transport');
|
|
10392
10392
|
}
|
|
10393
|
-
__classPrivateFieldSet$
|
|
10393
|
+
__classPrivateFieldSet$a(this, _Transport_fin, _fin, "f");
|
|
10394
10394
|
}
|
|
10395
10395
|
shutdown() {
|
|
10396
10396
|
const wire = __classPrivateFieldGet$b(this, _Transport_wire, "f");
|
|
@@ -12918,7 +12918,7 @@ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
12918
12918
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12919
12919
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12920
12920
|
};
|
|
12921
|
-
var __classPrivateFieldSet$
|
|
12921
|
+
var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12922
12922
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
12923
12923
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
12924
12924
|
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");
|
|
@@ -12990,10 +12990,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
12990
12990
|
channelClientsByEndpointId.delete(this.endpointId);
|
|
12991
12991
|
__classPrivateFieldGet$a(this, _ChannelClient_strategy, "f").close();
|
|
12992
12992
|
});
|
|
12993
|
-
__classPrivateFieldSet$
|
|
12993
|
+
__classPrivateFieldSet$9(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
|
|
12994
12994
|
this.disconnectListener = () => undefined;
|
|
12995
12995
|
this.endpointId = routingInfo.endpointId;
|
|
12996
|
-
__classPrivateFieldSet$
|
|
12996
|
+
__classPrivateFieldSet$9(this, _ChannelClient_strategy, strategy, "f");
|
|
12997
12997
|
channelClientsByEndpointId.set(this.endpointId, this);
|
|
12998
12998
|
strategy.receive(this.processAction);
|
|
12999
12999
|
}
|
|
@@ -13120,7 +13120,7 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
|
|
|
13120
13120
|
|
|
13121
13121
|
var strategy$3 = {};
|
|
13122
13122
|
|
|
13123
|
-
var __classPrivateFieldSet$
|
|
13123
|
+
var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13124
13124
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
13125
13125
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13126
13126
|
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");
|
|
@@ -13186,9 +13186,9 @@ class ClassicStrategy {
|
|
|
13186
13186
|
this.close = async () => {
|
|
13187
13187
|
this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
|
|
13188
13188
|
[...__classPrivateFieldGet$9(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
|
|
13189
|
-
__classPrivateFieldSet$
|
|
13189
|
+
__classPrivateFieldSet$8(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
|
|
13190
13190
|
};
|
|
13191
|
-
__classPrivateFieldSet$
|
|
13191
|
+
__classPrivateFieldSet$8(this, _ClassicStrategy_wire, wire, "f");
|
|
13192
13192
|
}
|
|
13193
13193
|
onEndpointDisconnect(endpointId, listener) {
|
|
13194
13194
|
// Never fires for 'classic'.
|
|
@@ -13231,7 +13231,7 @@ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
13231
13231
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13232
13232
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
13233
13233
|
};
|
|
13234
|
-
var __classPrivateFieldSet$
|
|
13234
|
+
var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13235
13235
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
13236
13236
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13237
13237
|
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");
|
|
@@ -13359,7 +13359,7 @@ class RTCEndpoint {
|
|
|
13359
13359
|
}
|
|
13360
13360
|
onDisconnect(listener) {
|
|
13361
13361
|
if (!__classPrivateFieldGet$8(this, _RTCEndpoint_disconnectListener, "f")) {
|
|
13362
|
-
__classPrivateFieldSet$
|
|
13362
|
+
__classPrivateFieldSet$7(this, _RTCEndpoint_disconnectListener, listener, "f");
|
|
13363
13363
|
}
|
|
13364
13364
|
else {
|
|
13365
13365
|
throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
|
|
@@ -13369,7 +13369,7 @@ class RTCEndpoint {
|
|
|
13369
13369
|
if (__classPrivateFieldGet$8(this, _RTCEndpoint_processAction, "f")) {
|
|
13370
13370
|
throw new Error('You have already set a listener for this RTC Endpoint.');
|
|
13371
13371
|
}
|
|
13372
|
-
__classPrivateFieldSet$
|
|
13372
|
+
__classPrivateFieldSet$7(this, _RTCEndpoint_processAction, listener, "f");
|
|
13373
13373
|
}
|
|
13374
13374
|
get connected() {
|
|
13375
13375
|
return this.rtc.rtcClient.connectionState === 'connected';
|
|
@@ -13385,7 +13385,7 @@ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
13385
13385
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13386
13386
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
13387
13387
|
};
|
|
13388
|
-
var __classPrivateFieldSet$
|
|
13388
|
+
var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13389
13389
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
13390
13390
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13391
13391
|
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");
|
|
@@ -13408,9 +13408,9 @@ class EndpointStrategy {
|
|
|
13408
13408
|
this.close = async () => {
|
|
13409
13409
|
if (__classPrivateFieldGet$7(this, _EndpointStrategy_connected, "f")) {
|
|
13410
13410
|
__classPrivateFieldGet$7(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
|
|
13411
|
-
__classPrivateFieldSet$
|
|
13411
|
+
__classPrivateFieldSet$6(this, _EndpointStrategy_endpointMap, new Map(), "f");
|
|
13412
13412
|
}
|
|
13413
|
-
__classPrivateFieldSet$
|
|
13413
|
+
__classPrivateFieldSet$6(this, _EndpointStrategy_connected, false, "f");
|
|
13414
13414
|
};
|
|
13415
13415
|
this.isValidEndpointPayload = validateEndpoint;
|
|
13416
13416
|
}
|
|
@@ -13421,7 +13421,7 @@ class EndpointStrategy {
|
|
|
13421
13421
|
if (__classPrivateFieldGet$7(this, _EndpointStrategy_processAction, "f")) {
|
|
13422
13422
|
throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
|
|
13423
13423
|
}
|
|
13424
|
-
__classPrivateFieldSet$
|
|
13424
|
+
__classPrivateFieldSet$6(this, _EndpointStrategy_processAction, listener, "f");
|
|
13425
13425
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
13426
13426
|
__classPrivateFieldGet$7(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$7(this, _EndpointStrategy_processAction, "f")));
|
|
13427
13427
|
}
|
|
@@ -13637,7 +13637,7 @@ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
13637
13637
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13638
13638
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
13639
13639
|
};
|
|
13640
|
-
var __classPrivateFieldSet$
|
|
13640
|
+
var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13641
13641
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
13642
13642
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13643
13643
|
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");
|
|
@@ -13710,7 +13710,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
13710
13710
|
_ChannelProvider_removeEndpoint.set(this, (identity) => {
|
|
13711
13711
|
const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
|
|
13712
13712
|
__classPrivateFieldGet$6(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
|
|
13713
|
-
__classPrivateFieldSet$
|
|
13713
|
+
__classPrivateFieldSet$5(this, _ChannelProvider_connections, remainingConnections, "f");
|
|
13714
13714
|
});
|
|
13715
13715
|
// Must be bound.
|
|
13716
13716
|
this.processAction = async (action, payload, senderIdentity) => {
|
|
@@ -13730,11 +13730,11 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
13730
13730
|
remove();
|
|
13731
13731
|
}
|
|
13732
13732
|
});
|
|
13733
|
-
__classPrivateFieldSet$
|
|
13733
|
+
__classPrivateFieldSet$5(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
|
|
13734
13734
|
this.connectListener = () => undefined;
|
|
13735
13735
|
this.disconnectListener = () => undefined;
|
|
13736
|
-
__classPrivateFieldSet$
|
|
13737
|
-
__classPrivateFieldSet$
|
|
13736
|
+
__classPrivateFieldSet$5(this, _ChannelProvider_connections, [], "f");
|
|
13737
|
+
__classPrivateFieldSet$5(this, _ChannelProvider_strategy, strategy, "f");
|
|
13738
13738
|
strategy.receive(this.processAction);
|
|
13739
13739
|
}
|
|
13740
13740
|
/**
|
|
@@ -13873,7 +13873,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
13873
13873
|
async destroy() {
|
|
13874
13874
|
const protectedObj = __classPrivateFieldGet$6(this, _ChannelProvider_protectedObj, "f");
|
|
13875
13875
|
protectedObj.providerIdentity;
|
|
13876
|
-
__classPrivateFieldSet$
|
|
13876
|
+
__classPrivateFieldSet$5(this, _ChannelProvider_connections, [], "f");
|
|
13877
13877
|
await protectedObj.close();
|
|
13878
13878
|
__classPrivateFieldGet$6(this, _ChannelProvider_close, "f").call(this);
|
|
13879
13879
|
}
|
|
@@ -14157,7 +14157,7 @@ class CombinedStrategy {
|
|
|
14157
14157
|
}
|
|
14158
14158
|
strategy.default = CombinedStrategy;
|
|
14159
14159
|
|
|
14160
|
-
var __classPrivateFieldSet$
|
|
14160
|
+
var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
14161
14161
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14162
14162
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
14163
14163
|
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");
|
|
@@ -14212,8 +14212,8 @@ class ConnectionManager extends base_1$a.Base {
|
|
|
14212
14212
|
};
|
|
14213
14213
|
this.providerMap = new Map();
|
|
14214
14214
|
this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
|
|
14215
|
-
__classPrivateFieldSet$
|
|
14216
|
-
__classPrivateFieldSet$
|
|
14215
|
+
__classPrivateFieldSet$4(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
|
|
14216
|
+
__classPrivateFieldSet$4(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
|
|
14217
14217
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
|
14218
14218
|
}
|
|
14219
14219
|
createProvider(options, providerIdentity) {
|
|
@@ -14414,7 +14414,7 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
|
|
|
14414
14414
|
*
|
|
14415
14415
|
* @packageDocumentation
|
|
14416
14416
|
*/
|
|
14417
|
-
var __classPrivateFieldSet$
|
|
14417
|
+
var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
14418
14418
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14419
14419
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
14420
14420
|
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");
|
|
@@ -14481,7 +14481,7 @@ class Channel extends base_1$9.EmitterBase {
|
|
|
14481
14481
|
})
|
|
14482
14482
|
]).catch(() => new Error('error setting up channel connection listeners'));
|
|
14483
14483
|
}));
|
|
14484
|
-
__classPrivateFieldSet$
|
|
14484
|
+
__classPrivateFieldSet$3(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
|
|
14485
14485
|
}
|
|
14486
14486
|
/**
|
|
14487
14487
|
*
|
|
@@ -15299,19 +15299,23 @@ var Factory$2 = {};
|
|
|
15299
15299
|
|
|
15300
15300
|
var Instance$2 = {};
|
|
15301
15301
|
|
|
15302
|
+
var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
15303
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
15304
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
15305
|
+
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");
|
|
15306
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15307
|
+
};
|
|
15302
15308
|
var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15303
15309
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
15304
15310
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15305
15311
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15306
15312
|
};
|
|
15307
|
-
var _Platform_connectToProvider;
|
|
15313
|
+
var _Platform_channelName, _Platform_connectToProvider;
|
|
15308
15314
|
Object.defineProperty(Instance$2, "__esModule", { value: true });
|
|
15309
15315
|
Instance$2.Platform = void 0;
|
|
15310
15316
|
/* eslint-disable import/prefer-default-export, no-undef */
|
|
15311
15317
|
const base_1$5 = base;
|
|
15312
15318
|
const validate_1$1 = validate;
|
|
15313
|
-
// Reuse clients to avoid overwriting already-registered client in provider
|
|
15314
|
-
const clientMap = new Map();
|
|
15315
15319
|
/** Manages the life cycle of windows and views in the application.
|
|
15316
15320
|
*
|
|
15317
15321
|
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
|
@@ -15322,34 +15326,40 @@ class Platform extends base_1$5.EmitterBase {
|
|
|
15322
15326
|
* @internal
|
|
15323
15327
|
*/
|
|
15324
15328
|
// eslint-disable-next-line no-shadow
|
|
15325
|
-
constructor(identity,
|
|
15329
|
+
constructor(wire, identity, channelName = `custom-frame-${identity.uuid}`) {
|
|
15326
15330
|
// we piggyback off of application event emitter because from the core's perspective platform is just an app.
|
|
15327
|
-
super(
|
|
15328
|
-
|
|
15331
|
+
super(wire, 'application', identity.uuid);
|
|
15332
|
+
/**
|
|
15333
|
+
* @internal
|
|
15334
|
+
*/
|
|
15335
|
+
_Platform_channelName.set(this, void 0);
|
|
15336
|
+
this.getClient = (identity = this.identity) => {
|
|
15337
|
+
if (identity.uuid !== this.identity.uuid) {
|
|
15338
|
+
// I have no idea why we allow passing in a different identity, but we do.
|
|
15339
|
+
// Doing this above the analytics call so we only register one call.
|
|
15340
|
+
return new Platform(this.wire, identity).getClient();
|
|
15341
|
+
}
|
|
15329
15342
|
this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
|
|
15330
15343
|
// don't expose
|
|
15331
15344
|
});
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
const clientPromise = __classPrivateFieldGet$3(this, _Platform_connectToProvider, "f").call(this, uuid);
|
|
15336
|
-
clientMap.set(uuid, clientPromise);
|
|
15345
|
+
if (!Platform.clientMap.has(__classPrivateFieldGet$3(this, _Platform_channelName, "f"))) {
|
|
15346
|
+
const clientPromise = __classPrivateFieldGet$3(this, _Platform_connectToProvider, "f").call(this);
|
|
15347
|
+
Platform.clientMap.set(__classPrivateFieldGet$3(this, _Platform_channelName, "f"), clientPromise);
|
|
15337
15348
|
}
|
|
15338
15349
|
// we set it above
|
|
15339
15350
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
15340
|
-
return clientMap.get(
|
|
15351
|
+
return Platform.clientMap.get(__classPrivateFieldGet$3(this, _Platform_channelName, "f"));
|
|
15341
15352
|
};
|
|
15342
|
-
_Platform_connectToProvider.set(this, async (
|
|
15353
|
+
_Platform_connectToProvider.set(this, async () => {
|
|
15343
15354
|
try {
|
|
15344
|
-
const
|
|
15345
|
-
const client = await this._channel.connect(channelName, { wait: false });
|
|
15355
|
+
const client = await this._channel.connect(__classPrivateFieldGet$3(this, _Platform_channelName, "f"), { wait: false });
|
|
15346
15356
|
client.onDisconnection(() => {
|
|
15347
|
-
clientMap.delete(
|
|
15357
|
+
Platform.clientMap.delete(__classPrivateFieldGet$3(this, _Platform_channelName, "f"));
|
|
15348
15358
|
});
|
|
15349
15359
|
return client;
|
|
15350
15360
|
}
|
|
15351
15361
|
catch (e) {
|
|
15352
|
-
clientMap.delete(
|
|
15362
|
+
Platform.clientMap.delete(__classPrivateFieldGet$3(this, _Platform_channelName, "f"));
|
|
15353
15363
|
throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
|
|
15354
15364
|
}
|
|
15355
15365
|
});
|
|
@@ -15362,7 +15372,8 @@ class Platform extends base_1$5.EmitterBase {
|
|
|
15362
15372
|
if (errorMsg) {
|
|
15363
15373
|
throw new Error(errorMsg);
|
|
15364
15374
|
}
|
|
15365
|
-
this
|
|
15375
|
+
__classPrivateFieldSet$2(this, _Platform_channelName, channelName, "f");
|
|
15376
|
+
this._channel = this.fin.InterApplicationBus.Channel;
|
|
15366
15377
|
this.identity = { uuid: identity.uuid };
|
|
15367
15378
|
this.Layout = this.fin.Platform.Layout;
|
|
15368
15379
|
this.Application = this.fin.Application.wrapSync(this.identity);
|
|
@@ -16127,7 +16138,13 @@ class Platform extends base_1$5.EmitterBase {
|
|
|
16127
16138
|
}
|
|
16128
16139
|
}
|
|
16129
16140
|
Instance$2.Platform = Platform;
|
|
16130
|
-
_Platform_connectToProvider = new WeakMap();
|
|
16141
|
+
_Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
|
|
16142
|
+
/**
|
|
16143
|
+
* @internal
|
|
16144
|
+
* Reuse clients to avoid overwriting already-registered client in provider
|
|
16145
|
+
* This ensures that only channel client is created per channel name per `fin` instance
|
|
16146
|
+
*/
|
|
16147
|
+
Platform.clientMap = new Map();
|
|
16131
16148
|
|
|
16132
16149
|
var layout = {};
|
|
16133
16150
|
|
|
@@ -16506,7 +16523,7 @@ class Layout extends base_1$4.Base {
|
|
|
16506
16523
|
const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
|
|
16507
16524
|
return layout_entities_1.LayoutNode.getEntity(root, client);
|
|
16508
16525
|
}
|
|
16509
|
-
async
|
|
16526
|
+
async getStackByViewIdentity(identity) {
|
|
16510
16527
|
this.wire.sendAction('layout-get-stack-by-view').catch(() => {
|
|
16511
16528
|
// don't expose
|
|
16512
16529
|
});
|
|
@@ -16875,7 +16892,7 @@ class PlatformModule extends base_1$2.Base {
|
|
|
16875
16892
|
this.wire.sendAction('platform-wrap').catch((e) => {
|
|
16876
16893
|
// don't expose
|
|
16877
16894
|
});
|
|
16878
|
-
return new Instance_1$1.Platform({ uuid: identity.uuid }
|
|
16895
|
+
return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
|
|
16879
16896
|
}
|
|
16880
16897
|
/**
|
|
16881
16898
|
* Synchronously returns a Platform object that represents an existing platform.
|
|
@@ -16892,7 +16909,7 @@ class PlatformModule extends base_1$2.Base {
|
|
|
16892
16909
|
this.wire.sendAction('platform-wrap-sync').catch((e) => {
|
|
16893
16910
|
// don't expose
|
|
16894
16911
|
});
|
|
16895
|
-
return new Instance_1$1.Platform({ uuid: identity.uuid }
|
|
16912
|
+
return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
|
|
16896
16913
|
}
|
|
16897
16914
|
/**
|
|
16898
16915
|
* Asynchronously returns a Platform object that represents the current platform.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/remote-adapter",
|
|
3
|
-
"version": "40.82.
|
|
3
|
+
"version": "40.82.19",
|
|
4
4
|
"description": "Establish intermachine runtime connections using webRTC.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"private": false,
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"author": "OpenFin",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"lodash": "^4.17.21",
|
|
22
|
-
"@openfin/core": "40.82.
|
|
22
|
+
"@openfin/core": "40.82.19"
|
|
23
23
|
}
|
|
24
24
|
}
|