@openfin/remote-adapter 43.100.89 → 43.100.91
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 +21 -4
- package/package.json +2 -2
package/out/remote-adapter.js
CHANGED
|
@@ -523,7 +523,7 @@ Object.defineProperty(PrivateChannelProvider$1, "__esModule", { value: true });
|
|
|
523
523
|
PrivateChannelProvider$1.PrivateChannelProvider = void 0;
|
|
524
524
|
const utils_1$8 = utils$3;
|
|
525
525
|
class PrivateChannelProvider {
|
|
526
|
-
constructor(provider, id) {
|
|
526
|
+
constructor(provider, id, removePrivateChannelProvider) {
|
|
527
527
|
this.provider = provider;
|
|
528
528
|
this.id = id;
|
|
529
529
|
this.clients = new Map();
|
|
@@ -531,6 +531,7 @@ class PrivateChannelProvider {
|
|
|
531
531
|
this.contextByContextType = new Map();
|
|
532
532
|
this.lastContext = undefined;
|
|
533
533
|
this.provider.onConnection((clientIdentity) => this.registerNewClient(clientIdentity));
|
|
534
|
+
this.removePrivateChannelProvider = removePrivateChannelProvider;
|
|
534
535
|
this.provider.onDisconnection(async (clientIdentity) => {
|
|
535
536
|
const { endpointId } = clientIdentity;
|
|
536
537
|
if (this.clients.has(endpointId)) {
|
|
@@ -538,6 +539,7 @@ class PrivateChannelProvider {
|
|
|
538
539
|
}
|
|
539
540
|
if ((await this.provider.getAllClientInfo()).length === 0) {
|
|
540
541
|
this.provider.destroy();
|
|
542
|
+
this.removePrivateChannelProvider(this.id);
|
|
541
543
|
}
|
|
542
544
|
});
|
|
543
545
|
}
|
|
@@ -789,8 +791,8 @@ class PrivateChannelProvider {
|
|
|
789
791
|
});
|
|
790
792
|
});
|
|
791
793
|
}
|
|
792
|
-
static init(channelProvider, id) {
|
|
793
|
-
return new PrivateChannelProvider(channelProvider, id);
|
|
794
|
+
static init(channelProvider, id, removePrivateChannelProvider) {
|
|
795
|
+
return new PrivateChannelProvider(channelProvider, id, removePrivateChannelProvider);
|
|
794
796
|
}
|
|
795
797
|
}
|
|
796
798
|
PrivateChannelProvider$1.PrivateChannelProvider = PrivateChannelProvider;
|
|
@@ -1060,6 +1062,7 @@ class InteropBroker extends base_1$n.Base {
|
|
|
1060
1062
|
this.intentClientMap = new Map();
|
|
1061
1063
|
this.lastContextMap = new Map();
|
|
1062
1064
|
this.sessionContextGroupMap = new Map();
|
|
1065
|
+
this.privateChannelProviderMap = new Map();
|
|
1063
1066
|
__classPrivateFieldSet$g(this, _InteropBroker_providerPromise, new lazy_1$3.Lazy(createProvider), "f");
|
|
1064
1067
|
this.setContextGroupMap();
|
|
1065
1068
|
this.setupChannelProvider();
|
|
@@ -2080,7 +2083,15 @@ class InteropBroker extends base_1$n.Base {
|
|
|
2080
2083
|
channel.register('createPrivateChannelProvider', async (payload) => {
|
|
2081
2084
|
const { channelId } = payload;
|
|
2082
2085
|
const channelProvider = await this.fin.InterApplicationBus.Channel.create(channelId);
|
|
2083
|
-
|
|
2086
|
+
const removePrivateChannelProvider = (channelId) => {
|
|
2087
|
+
this.privateChannelProviderMap.delete(channelId);
|
|
2088
|
+
};
|
|
2089
|
+
const privateChannelProvider = PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId, removePrivateChannelProvider);
|
|
2090
|
+
this.privateChannelProviderMap.set(channelId, privateChannelProvider);
|
|
2091
|
+
});
|
|
2092
|
+
channel.register('isIdUsedByPrivateChannel', async (payload) => {
|
|
2093
|
+
const { channelId } = payload;
|
|
2094
|
+
return this.privateChannelProviderMap.has(channelId);
|
|
2084
2095
|
});
|
|
2085
2096
|
}
|
|
2086
2097
|
/**
|
|
@@ -16358,6 +16369,12 @@ class FDC3ModuleBase {
|
|
|
16358
16369
|
this.wire.sendAction('fdc3-get-or-create-channel').catch((e) => {
|
|
16359
16370
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
16360
16371
|
});
|
|
16372
|
+
const hasChannelIdBeenUsed = await InteropClient_1$2.InteropClient.ferryFdc3Call(this.client, 'isIdUsedByPrivateChannel', {
|
|
16373
|
+
channelId
|
|
16374
|
+
});
|
|
16375
|
+
if (hasChannelIdBeenUsed) {
|
|
16376
|
+
throw new Error(utils_1$4.ChannelError.AccessDenied);
|
|
16377
|
+
}
|
|
16361
16378
|
const systemChannels = await this._getChannels();
|
|
16362
16379
|
const userChannel = systemChannels.find((channel) => channel.id === channelId);
|
|
16363
16380
|
if (userChannel) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/remote-adapter",
|
|
3
|
-
"version": "43.100.
|
|
3
|
+
"version": "43.100.91",
|
|
4
4
|
"description": "Establish intermachine runtime connections using webRTC.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"private": false,
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"author": "OpenFin",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.21",
|
|
23
|
-
"@openfin/core": "43.100.
|
|
23
|
+
"@openfin/core": "43.100.91"
|
|
24
24
|
}
|
|
25
25
|
}
|