@openfin/core 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.
@@ -4578,7 +4578,22 @@ declare type DomainSettings = {
4578
4578
  };
4579
4579
 
4580
4580
  /**
4581
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4581
+ * Enables or disables specific preload scripts by URL.
4582
+ *
4583
+ * Uses the script's full URL as the key and an object
4584
+ * with an `enabled` boolean property as the value.
4585
+ * @example
4586
+ * ```js
4587
+ * {
4588
+ "match": ["<all_urls>"],
4589
+ "options": {
4590
+ "preloadScripts": {
4591
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4592
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4593
+ }
4594
+ }
4595
+ }
4596
+ * ```
4582
4597
  */
4583
4598
  declare type DomainSettingsPreloadScripts = Record<string, {
4584
4599
  enabled: boolean;
@@ -6636,6 +6651,7 @@ declare class InteropBroker extends Base {
6636
6651
  private sessionContextGroupMap;
6637
6652
  private channel;
6638
6653
  private logging;
6654
+ private privateChannelProviderMap;
6639
6655
  /* Excluded from this release type: __constructor */
6640
6656
  private getProvider;
6641
6657
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
@@ -4578,7 +4578,22 @@ declare type DomainSettings = {
4578
4578
  };
4579
4579
 
4580
4580
  /**
4581
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4581
+ * Enables or disables specific preload scripts by URL.
4582
+ *
4583
+ * Uses the script's full URL as the key and an object
4584
+ * with an `enabled` boolean property as the value.
4585
+ * @example
4586
+ * ```js
4587
+ * {
4588
+ "match": ["<all_urls>"],
4589
+ "options": {
4590
+ "preloadScripts": {
4591
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4592
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4593
+ }
4594
+ }
4595
+ }
4596
+ * ```
4582
4597
  */
4583
4598
  declare type DomainSettingsPreloadScripts = Record<string, {
4584
4599
  enabled: boolean;
@@ -6636,6 +6651,7 @@ declare class InteropBroker extends Base {
6636
6651
  private sessionContextGroupMap;
6637
6652
  private channel;
6638
6653
  private logging;
6654
+ private privateChannelProviderMap;
6639
6655
  /* Excluded from this release type: __constructor */
6640
6656
  private getProvider;
6641
6657
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
@@ -4578,7 +4578,22 @@ declare type DomainSettings = {
4578
4578
  };
4579
4579
 
4580
4580
  /**
4581
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4581
+ * Enables or disables specific preload scripts by URL.
4582
+ *
4583
+ * Uses the script's full URL as the key and an object
4584
+ * with an `enabled` boolean property as the value.
4585
+ * @example
4586
+ * ```js
4587
+ * {
4588
+ "match": ["<all_urls>"],
4589
+ "options": {
4590
+ "preloadScripts": {
4591
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4592
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4593
+ }
4594
+ }
4595
+ }
4596
+ * ```
4582
4597
  */
4583
4598
  declare type DomainSettingsPreloadScripts = Record<string, {
4584
4599
  enabled: boolean;
@@ -6636,6 +6651,7 @@ declare class InteropBroker extends Base {
6636
6651
  private sessionContextGroupMap;
6637
6652
  private channel;
6638
6653
  private logging;
6654
+ private privateChannelProviderMap;
6639
6655
  /* Excluded from this release type: __constructor */
6640
6656
  private getProvider;
6641
6657
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
package/out/stub.d.ts CHANGED
@@ -4637,7 +4637,22 @@ declare type DomainSettings = {
4637
4637
  };
4638
4638
 
4639
4639
  /**
4640
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4640
+ * Enables or disables specific preload scripts by URL.
4641
+ *
4642
+ * Uses the script's full URL as the key and an object
4643
+ * with an `enabled` boolean property as the value.
4644
+ * @example
4645
+ * ```js
4646
+ * {
4647
+ "match": ["<all_urls>"],
4648
+ "options": {
4649
+ "preloadScripts": {
4650
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4651
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4652
+ }
4653
+ }
4654
+ }
4655
+ * ```
4641
4656
  */
4642
4657
  declare type DomainSettingsPreloadScripts = Record<string, {
4643
4658
  enabled: boolean;
@@ -6742,6 +6757,7 @@ declare class InteropBroker extends Base {
6742
6757
  private sessionContextGroupMap;
6743
6758
  private channel;
6744
6759
  private logging;
6760
+ private privateChannelProviderMap;
6745
6761
  /**
6746
6762
  * @internal
6747
6763
  */
package/out/stub.js CHANGED
@@ -13431,7 +13431,7 @@ Object.defineProperty(PrivateChannelProvider$1, "__esModule", { value: true });
13431
13431
  PrivateChannelProvider$1.PrivateChannelProvider = void 0;
13432
13432
  const utils_1$8 = utils$3;
13433
13433
  class PrivateChannelProvider {
13434
- constructor(provider, id) {
13434
+ constructor(provider, id, removePrivateChannelProvider) {
13435
13435
  this.provider = provider;
13436
13436
  this.id = id;
13437
13437
  this.clients = new Map();
@@ -13439,6 +13439,7 @@ class PrivateChannelProvider {
13439
13439
  this.contextByContextType = new Map();
13440
13440
  this.lastContext = undefined;
13441
13441
  this.provider.onConnection((clientIdentity) => this.registerNewClient(clientIdentity));
13442
+ this.removePrivateChannelProvider = removePrivateChannelProvider;
13442
13443
  this.provider.onDisconnection(async (clientIdentity) => {
13443
13444
  const { endpointId } = clientIdentity;
13444
13445
  if (this.clients.has(endpointId)) {
@@ -13446,6 +13447,7 @@ class PrivateChannelProvider {
13446
13447
  }
13447
13448
  if ((await this.provider.getAllClientInfo()).length === 0) {
13448
13449
  this.provider.destroy();
13450
+ this.removePrivateChannelProvider(this.id);
13449
13451
  }
13450
13452
  });
13451
13453
  }
@@ -13697,8 +13699,8 @@ class PrivateChannelProvider {
13697
13699
  });
13698
13700
  });
13699
13701
  }
13700
- static init(channelProvider, id) {
13701
- return new PrivateChannelProvider(channelProvider, id);
13702
+ static init(channelProvider, id, removePrivateChannelProvider) {
13703
+ return new PrivateChannelProvider(channelProvider, id, removePrivateChannelProvider);
13702
13704
  }
13703
13705
  }
13704
13706
  PrivateChannelProvider$1.PrivateChannelProvider = PrivateChannelProvider;
@@ -13912,6 +13914,7 @@ class InteropBroker extends base_1$6.Base {
13912
13914
  this.intentClientMap = new Map();
13913
13915
  this.lastContextMap = new Map();
13914
13916
  this.sessionContextGroupMap = new Map();
13917
+ this.privateChannelProviderMap = new Map();
13915
13918
  __classPrivateFieldSet$6(this, _InteropBroker_providerPromise, new lazy_1$1.Lazy(createProvider), "f");
13916
13919
  this.setContextGroupMap();
13917
13920
  this.setupChannelProvider();
@@ -14932,7 +14935,15 @@ class InteropBroker extends base_1$6.Base {
14932
14935
  channel.register('createPrivateChannelProvider', async (payload) => {
14933
14936
  const { channelId } = payload;
14934
14937
  const channelProvider = await this.fin.InterApplicationBus.Channel.create(channelId);
14935
- PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId);
14938
+ const removePrivateChannelProvider = (channelId) => {
14939
+ this.privateChannelProviderMap.delete(channelId);
14940
+ };
14941
+ const privateChannelProvider = PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId, removePrivateChannelProvider);
14942
+ this.privateChannelProviderMap.set(channelId, privateChannelProvider);
14943
+ });
14944
+ channel.register('isIdUsedByPrivateChannel', async (payload) => {
14945
+ const { channelId } = payload;
14946
+ return this.privateChannelProviderMap.has(channelId);
14936
14947
  });
14937
14948
  }
14938
14949
  /**
@@ -16146,6 +16157,12 @@ class FDC3ModuleBase {
16146
16157
  this.wire.sendAction('fdc3-get-or-create-channel').catch((e) => {
16147
16158
  // we do not want to expose this error, just continue if this analytics-only call fails
16148
16159
  });
16160
+ const hasChannelIdBeenUsed = await InteropClient_1$2.InteropClient.ferryFdc3Call(this.client, 'isIdUsedByPrivateChannel', {
16161
+ channelId
16162
+ });
16163
+ if (hasChannelIdBeenUsed) {
16164
+ throw new Error(utils_1$4.ChannelError.AccessDenied);
16165
+ }
16149
16166
  const systemChannels = await this._getChannels();
16150
16167
  const userChannel = systemChannels.find((channel) => channel.id === channelId);
16151
16168
  if (userChannel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "43.100.89",
3
+ "version": "43.100.91",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",