@interopio/desktop 6.9.1 → 6.9.2

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/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ 6.9.2
2
+ - feat: io.CB 3.5
3
+ 6.9.1
4
+ - chore: bump
1
5
  6.9.0
2
6
  - feat: Enable executeJavaScript Method Access through External API
3
7
  - feat: Bulk update Notifications from Notification Panel
@@ -1680,12 +1680,16 @@
1680
1680
  child.source.postMessage(event.data, child.origin, [data.port]);
1681
1681
  return;
1682
1682
  }
1683
- handleConnectionRejected() {
1683
+ handleConnectionRejected(event) {
1684
1684
  this.logger.debug("handling a connection rejection. Most likely the reason is that this window was not created by a glue API call");
1685
- if (this.connectionReject) {
1686
- this.connectionReject("The platform connection was rejected. Most likely because this window was not created by a glue API call");
1687
- delete this.connectionReject;
1685
+ if (!this.connectionReject) {
1686
+ return;
1688
1687
  }
1688
+ const errorMsg = typeof event.data.glue42core?.error === "string"
1689
+ ? `Connection was rejected. ${event.data.glue42core?.error}`
1690
+ : "The platform connection was rejected. Most likely because this window was not created by a glue API call";
1691
+ this.connectionReject(errorMsg);
1692
+ delete this.connectionReject;
1689
1693
  }
1690
1694
  handleConnectionRequest(event) {
1691
1695
  if (this.extContentConnecting) {
@@ -1869,7 +1873,7 @@
1869
1873
  await this.requestConnectionPermissionFromExt();
1870
1874
  }
1871
1875
  getPossibleParentsInWindow(currentWindow) {
1872
- return (!currentWindow || currentWindow === currentWindow.top) ? [] : [currentWindow.parent, ...this.getPossibleParentsInWindow(currentWindow.parent)];
1876
+ return (!currentWindow?.parent || currentWindow === currentWindow.parent) ? [] : [currentWindow.parent, ...this.getPossibleParentsInWindow(currentWindow.parent)];
1873
1877
  }
1874
1878
  getPossibleParentsOutsideWindow(opener, current) {
1875
1879
  return (!opener || !current || opener === current) ? [] : [opener, ...this.getPossibleParentsInWindow(opener), ...this.getPossibleParentsOutsideWindow(opener.opener, opener)];
@@ -2940,7 +2944,7 @@
2940
2944
  }
2941
2945
  };
2942
2946
 
2943
- var version$1 = "6.4.3";
2947
+ var version$1 = "6.5.0";
2944
2948
 
2945
2949
  function prepareConfig$1 (configuration, ext, glue42gd) {
2946
2950
  let nodeStartingContext;
@@ -18556,7 +18560,7 @@
18556
18560
  };
18557
18561
  }
18558
18562
 
18559
- var version = "6.9.1";
18563
+ var version = "6.9.2";
18560
18564
 
18561
18565
  var prepareConfig = (options) => {
18562
18566
  function getLibConfig(value, defaultMode, trueMode) {
@@ -20306,9 +20310,14 @@
20306
20310
  if (request.target === "startNew") {
20307
20311
  return handlers.filter((handler) => handler.type === "app").length > 1;
20308
20312
  }
20309
- if (typeof request.target === "object") {
20313
+ if (request.target.instance) {
20310
20314
  return false;
20311
20315
  }
20316
+ if (request.target.app) {
20317
+ const searchedAppName = request.target.app;
20318
+ const instanceHandlersByAppName = handlers.filter((handler) => handler.applicationName === searchedAppName && handler.instanceId);
20319
+ return instanceHandlersByAppName.length > 1;
20320
+ }
20312
20321
  return false;
20313
20322
  }
20314
20323
  async removeSingletons(handlers) {