@openfin/node-adapter 43.100.90 → 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/node-adapter.js +22 -5
- package/package.json +2 -2
package/out/node-adapter.js
CHANGED
@@ -13143,7 +13143,7 @@ Object.defineProperty(PrivateChannelProvider$1, "__esModule", { value: true });
|
|
13143
13143
|
PrivateChannelProvider$1.PrivateChannelProvider = void 0;
|
13144
13144
|
const utils_1$8 = utils$3;
|
13145
13145
|
class PrivateChannelProvider {
|
13146
|
-
constructor(provider, id) {
|
13146
|
+
constructor(provider, id, removePrivateChannelProvider) {
|
13147
13147
|
this.provider = provider;
|
13148
13148
|
this.id = id;
|
13149
13149
|
this.clients = new Map();
|
@@ -13151,6 +13151,7 @@ class PrivateChannelProvider {
|
|
13151
13151
|
this.contextByContextType = new Map();
|
13152
13152
|
this.lastContext = undefined;
|
13153
13153
|
this.provider.onConnection((clientIdentity) => this.registerNewClient(clientIdentity));
|
13154
|
+
this.removePrivateChannelProvider = removePrivateChannelProvider;
|
13154
13155
|
this.provider.onDisconnection(async (clientIdentity) => {
|
13155
13156
|
const { endpointId } = clientIdentity;
|
13156
13157
|
if (this.clients.has(endpointId)) {
|
@@ -13158,6 +13159,7 @@ class PrivateChannelProvider {
|
|
13158
13159
|
}
|
13159
13160
|
if ((await this.provider.getAllClientInfo()).length === 0) {
|
13160
13161
|
this.provider.destroy();
|
13162
|
+
this.removePrivateChannelProvider(this.id);
|
13161
13163
|
}
|
13162
13164
|
});
|
13163
13165
|
}
|
@@ -13409,8 +13411,8 @@ class PrivateChannelProvider {
|
|
13409
13411
|
});
|
13410
13412
|
});
|
13411
13413
|
}
|
13412
|
-
static init(channelProvider, id) {
|
13413
|
-
return new PrivateChannelProvider(channelProvider, id);
|
13414
|
+
static init(channelProvider, id, removePrivateChannelProvider) {
|
13415
|
+
return new PrivateChannelProvider(channelProvider, id, removePrivateChannelProvider);
|
13414
13416
|
}
|
13415
13417
|
}
|
13416
13418
|
PrivateChannelProvider$1.PrivateChannelProvider = PrivateChannelProvider;
|
@@ -13624,6 +13626,7 @@ class InteropBroker extends base_1$6.Base {
|
|
13624
13626
|
this.intentClientMap = new Map();
|
13625
13627
|
this.lastContextMap = new Map();
|
13626
13628
|
this.sessionContextGroupMap = new Map();
|
13629
|
+
this.privateChannelProviderMap = new Map();
|
13627
13630
|
__classPrivateFieldSet$6(this, _InteropBroker_providerPromise, new lazy_1$1.Lazy(createProvider), "f");
|
13628
13631
|
this.setContextGroupMap();
|
13629
13632
|
this.setupChannelProvider();
|
@@ -14644,7 +14647,15 @@ class InteropBroker extends base_1$6.Base {
|
|
14644
14647
|
channel.register('createPrivateChannelProvider', async (payload) => {
|
14645
14648
|
const { channelId } = payload;
|
14646
14649
|
const channelProvider = await this.fin.InterApplicationBus.Channel.create(channelId);
|
14647
|
-
|
14650
|
+
const removePrivateChannelProvider = (channelId) => {
|
14651
|
+
this.privateChannelProviderMap.delete(channelId);
|
14652
|
+
};
|
14653
|
+
const privateChannelProvider = PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId, removePrivateChannelProvider);
|
14654
|
+
this.privateChannelProviderMap.set(channelId, privateChannelProvider);
|
14655
|
+
});
|
14656
|
+
channel.register('isIdUsedByPrivateChannel', async (payload) => {
|
14657
|
+
const { channelId } = payload;
|
14658
|
+
return this.privateChannelProviderMap.has(channelId);
|
14648
14659
|
});
|
14649
14660
|
}
|
14650
14661
|
/**
|
@@ -15858,6 +15869,12 @@ class FDC3ModuleBase {
|
|
15858
15869
|
this.wire.sendAction('fdc3-get-or-create-channel').catch((e) => {
|
15859
15870
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
15860
15871
|
});
|
15872
|
+
const hasChannelIdBeenUsed = await InteropClient_1$2.InteropClient.ferryFdc3Call(this.client, 'isIdUsedByPrivateChannel', {
|
15873
|
+
channelId
|
15874
|
+
});
|
15875
|
+
if (hasChannelIdBeenUsed) {
|
15876
|
+
throw new Error(utils_1$4.ChannelError.AccessDenied);
|
15877
|
+
}
|
15861
15878
|
const systemChannels = await this._getChannels();
|
15862
15879
|
const userChannel = systemChannels.find((channel) => channel.id === channelId);
|
15863
15880
|
if (userChannel) {
|
@@ -17999,7 +18016,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
|
|
17999
18016
|
};
|
18000
18017
|
}
|
18001
18018
|
getAdapterVersionSync() {
|
18002
|
-
return "43.100.
|
18019
|
+
return "43.100.91";
|
18003
18020
|
}
|
18004
18021
|
observeBounds(element, onChange) {
|
18005
18022
|
throw new Error('Method not implemented.');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@openfin/node-adapter",
|
3
|
-
"version": "43.100.
|
3
|
+
"version": "43.100.91",
|
4
4
|
"description": "See README.md",
|
5
5
|
"main": "out/node-adapter.js",
|
6
6
|
"types": "out/node-adapter.d.ts",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"author": "OpenFin",
|
25
25
|
"dependencies": {
|
26
26
|
"@types/node": "^20.14.2",
|
27
|
-
"@openfin/core": "43.100.
|
27
|
+
"@openfin/core": "43.100.91",
|
28
28
|
"lodash": "^4.17.21",
|
29
29
|
"ws": "^7.3.0"
|
30
30
|
}
|