@openfin/core 41.102.7 → 41.102.8

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.
@@ -6616,6 +6616,7 @@ declare class InteropBroker extends Base {
6616
6616
  private sessionContextGroupMap;
6617
6617
  private channel;
6618
6618
  private logging;
6619
+ private privateChannelProviderMap;
6619
6620
  /* Excluded from this release type: __constructor */
6620
6621
  private getProvider;
6621
6622
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
@@ -6616,6 +6616,7 @@ declare class InteropBroker extends Base {
6616
6616
  private sessionContextGroupMap;
6617
6617
  private channel;
6618
6618
  private logging;
6619
+ private privateChannelProviderMap;
6619
6620
  /* Excluded from this release type: __constructor */
6620
6621
  private getProvider;
6621
6622
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
@@ -6616,6 +6616,7 @@ declare class InteropBroker extends Base {
6616
6616
  private sessionContextGroupMap;
6617
6617
  private channel;
6618
6618
  private logging;
6619
+ private privateChannelProviderMap;
6619
6620
  /* Excluded from this release type: __constructor */
6620
6621
  private getProvider;
6621
6622
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
package/out/stub.d.ts CHANGED
@@ -6722,6 +6722,7 @@ declare class InteropBroker extends Base {
6722
6722
  private sessionContextGroupMap;
6723
6723
  private channel;
6724
6724
  private logging;
6725
+ private privateChannelProviderMap;
6725
6726
  /**
6726
6727
  * @internal
6727
6728
  */
package/out/stub.js CHANGED
@@ -13454,7 +13454,7 @@ Object.defineProperty(PrivateChannelProvider$1, "__esModule", { value: true });
13454
13454
  PrivateChannelProvider$1.PrivateChannelProvider = void 0;
13455
13455
  const utils_1$8 = utils$3;
13456
13456
  class PrivateChannelProvider {
13457
- constructor(provider, id) {
13457
+ constructor(provider, id, removePrivateChannelProvider) {
13458
13458
  this.provider = provider;
13459
13459
  this.id = id;
13460
13460
  this.clients = new Map();
@@ -13462,6 +13462,7 @@ class PrivateChannelProvider {
13462
13462
  this.contextByContextType = new Map();
13463
13463
  this.lastContext = undefined;
13464
13464
  this.provider.onConnection((clientIdentity) => this.registerNewClient(clientIdentity));
13465
+ this.removePrivateChannelProvider = removePrivateChannelProvider;
13465
13466
  this.provider.onDisconnection(async (clientIdentity) => {
13466
13467
  const { endpointId } = clientIdentity;
13467
13468
  if (this.clients.has(endpointId)) {
@@ -13469,6 +13470,7 @@ class PrivateChannelProvider {
13469
13470
  }
13470
13471
  if ((await this.provider.getAllClientInfo()).length === 0) {
13471
13472
  this.provider.destroy();
13473
+ this.removePrivateChannelProvider(this.id);
13472
13474
  }
13473
13475
  });
13474
13476
  }
@@ -13720,8 +13722,8 @@ class PrivateChannelProvider {
13720
13722
  });
13721
13723
  });
13722
13724
  }
13723
- static init(channelProvider, id) {
13724
- return new PrivateChannelProvider(channelProvider, id);
13725
+ static init(channelProvider, id, removePrivateChannelProvider) {
13726
+ return new PrivateChannelProvider(channelProvider, id, removePrivateChannelProvider);
13725
13727
  }
13726
13728
  }
13727
13729
  PrivateChannelProvider$1.PrivateChannelProvider = PrivateChannelProvider;
@@ -13935,6 +13937,7 @@ class InteropBroker extends base_1$5.Base {
13935
13937
  this.intentClientMap = new Map();
13936
13938
  this.lastContextMap = new Map();
13937
13939
  this.sessionContextGroupMap = new Map();
13940
+ this.privateChannelProviderMap = new Map();
13938
13941
  __classPrivateFieldSet$5(this, _InteropBroker_providerPromise, new lazy_1.Lazy(createProvider), "f");
13939
13942
  this.setContextGroupMap();
13940
13943
  this.setupChannelProvider();
@@ -14955,7 +14958,15 @@ class InteropBroker extends base_1$5.Base {
14955
14958
  channel.register('createPrivateChannelProvider', async (payload) => {
14956
14959
  const { channelId } = payload;
14957
14960
  const channelProvider = await this.fin.InterApplicationBus.Channel.create(channelId);
14958
- PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId);
14961
+ const removePrivateChannelProvider = (channelId) => {
14962
+ this.privateChannelProviderMap.delete(channelId);
14963
+ };
14964
+ const privateChannelProvider = PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId, removePrivateChannelProvider);
14965
+ this.privateChannelProviderMap.set(channelId, privateChannelProvider);
14966
+ });
14967
+ channel.register('isIdUsedByPrivateChannel', async (payload) => {
14968
+ const { channelId } = payload;
14969
+ return this.privateChannelProviderMap.has(channelId);
14959
14970
  });
14960
14971
  }
14961
14972
  /**
@@ -16169,6 +16180,12 @@ class FDC3ModuleBase {
16169
16180
  this.wire.sendAction('fdc3-get-or-create-channel').catch((e) => {
16170
16181
  // we do not want to expose this error, just continue if this analytics-only call fails
16171
16182
  });
16183
+ const hasChannelIdBeenUsed = await InteropClient_1$2.InteropClient.ferryFdc3Call(this.client, 'isIdUsedByPrivateChannel', {
16184
+ channelId
16185
+ });
16186
+ if (hasChannelIdBeenUsed) {
16187
+ throw new Error(utils_1$4.ChannelError.AccessDenied);
16188
+ }
16172
16189
  const systemChannels = await this._getChannels();
16173
16190
  const userChannel = systemChannels.find((channel) => channel.id === channelId);
16174
16191
  if (userChannel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "41.102.7",
3
+ "version": "41.102.8",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",