@interopio/browser 3.4.2 → 3.4.4

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.
@@ -1705,7 +1705,7 @@
1705
1705
  appChannels: optional(array(v2AppChannelDecoder))
1706
1706
  });
1707
1707
  const glue42ApplicationDetailsDecoder = object({
1708
- url: nonEmptyStringDecoder$1,
1708
+ url: optional(nonEmptyStringDecoder$1),
1709
1709
  top: optional(number()),
1710
1710
  left: optional(number()),
1711
1711
  width: optional(nonNegativeNumberDecoder$1),
@@ -1723,10 +1723,6 @@
1723
1723
  intents: optional(array(intentDefinitionDecoder$1)),
1724
1724
  hidden: optional(boolean())
1725
1725
  });
1726
- const hostManifestsBrowserDecoder = oneOf(object({
1727
- "ioConnect": optional(oneOf(glue42HostManifestsBrowserDecoder, anyJson())),
1728
- "Glue42": optional(oneOf(glue42HostManifestsBrowserDecoder, anyJson()))
1729
- }), anyJson());
1730
1726
  const v1DefinitionDecoder = object({
1731
1727
  name: nonEmptyStringDecoder$1,
1732
1728
  appId: nonEmptyStringDecoder$1,
@@ -1761,7 +1757,7 @@
1761
1757
  moreInfo: optional(nonEmptyStringDecoder$1),
1762
1758
  publisher: optional(nonEmptyStringDecoder$1),
1763
1759
  customConfig: optional(array(anyJson())),
1764
- hostManifests: optional(hostManifestsBrowserDecoder),
1760
+ hostManifests: optional(anyJson()),
1765
1761
  interop: optional(v2InteropDecoder)
1766
1762
  });
1767
1763
  const v2DefinitionDecoder = object({
@@ -1782,7 +1778,7 @@
1782
1778
  moreInfo: optional(nonEmptyStringDecoder$1),
1783
1779
  publisher: optional(nonEmptyStringDecoder$1),
1784
1780
  customConfig: optional(array(anyJson())),
1785
- hostManifests: optional(hostManifestsBrowserDecoder),
1781
+ hostManifests: optional(anyJson()),
1786
1782
  interop: optional(v2InteropDecoder),
1787
1783
  localizedVersions: optional(dict(v2LocalizedDefinitionDecoder))
1788
1784
  });
@@ -2041,7 +2037,7 @@
2041
2037
  const appManagerOperationTypesDecoder = oneOf$1(constant$1("appHello"), constant$1("appDirectoryStateChange"), constant$1("instanceStarted"), constant$1("instanceStopped"), constant$1("applicationStart"), constant$1("instanceStop"), constant$1("clear"));
2042
2038
  const layoutsOperationTypesDecoder = oneOf$1(constant$1("layoutAdded"), constant$1("layoutChanged"), constant$1("layoutRemoved"), constant$1("layoutRenamed"), constant$1("get"), constant$1("getAll"), constant$1("export"), constant$1("import"), constant$1("remove"), constant$1("rename"), constant$1("clientSaveRequest"), constant$1("getGlobalPermissionState"), constant$1("checkGlobalActivated"), constant$1("requestGlobalPermission"), constant$1("getDefaultGlobal"), constant$1("setDefaultGlobal"), constant$1("clearDefaultGlobal"), constant$1("updateMetadata"));
2043
2039
  const notificationsOperationTypesDecoder = oneOf$1(constant$1("raiseNotification"), constant$1("requestPermission"), constant$1("notificationShow"), constant$1("notificationClick"), constant$1("getPermission"), constant$1("list"), constant$1("notificationRaised"), constant$1("notificationClosed"), constant$1("click"), constant$1("clear"), constant$1("clearAll"), constant$1("configure"), constant$1("getConfiguration"), constant$1("configurationChanged"), constant$1("setState"), constant$1("clearOld"), constant$1("activeCountChange"), constant$1("stateChange"));
2044
- const systemOperationTypesDecoder = oneOf$1(constant$1("getEnvironment"), constant$1("getBase"), constant$1("platformShutdown"), constant$1("isFdc3DataWrappingSupported"), constant$1("clientError"));
2040
+ const systemOperationTypesDecoder = oneOf$1(constant$1("getEnvironment"), constant$1("getBase"), constant$1("platformShutdown"), constant$1("isFdc3DataWrappingSupported"), constant$1("clientError"), constant$1("systemHello"));
2045
2041
  const windowRelativeDirectionDecoder = oneOf$1(constant$1("top"), constant$1("left"), constant$1("right"), constant$1("bottom"));
2046
2042
  const windowBoundsDecoder = object$1({
2047
2043
  top: number$1(),
@@ -2772,6 +2768,9 @@
2772
2768
  const clientErrorDataDecoder = object$1({
2773
2769
  message: nonEmptyStringDecoder
2774
2770
  });
2771
+ const systemHelloSuccessDecoder = object$1({
2772
+ isClientErrorOperationSupported: boolean$1()
2773
+ });
2775
2774
 
2776
2775
  const operations$9 = {
2777
2776
  openWindow: { name: "openWindow", dataDecoder: openWindowConfigDecoder, resultDecoder: coreWindowDataDecoder },
@@ -5213,17 +5212,32 @@
5213
5212
  platformShutdown: { name: "platformShutdown" },
5214
5213
  isFdc3DataWrappingSupported: { name: "isFdc3DataWrappingSupported" },
5215
5214
  clientError: { name: "clientError", dataDecoder: clientErrorDataDecoder },
5215
+ systemHello: { name: "systemHello", resultDecoder: systemHelloSuccessDecoder },
5216
5216
  };
5217
5217
 
5218
5218
  class SystemController {
5219
5219
  bridge;
5220
5220
  ioc;
5221
+ logger;
5221
5222
  errorPort = errorChannel.port2;
5222
5223
  async start(coreGlue, ioc) {
5224
+ this.logger = coreGlue.logger.subLogger("system.controller.web");
5225
+ this.logger.trace("starting the web system controller");
5223
5226
  this.bridge = ioc.bridge;
5224
5227
  this.ioc = ioc;
5225
5228
  this.addOperationsExecutors();
5229
+ let isClientErrorOperationSupported = false;
5230
+ try {
5231
+ const systemHelloSuccess = await this.bridge.send("system", operations$3.systemHello, undefined, undefined, { includeOperationCheck: true });
5232
+ isClientErrorOperationSupported = systemHelloSuccess.isClientErrorOperationSupported;
5233
+ }
5234
+ catch (error) {
5235
+ this.logger.warn("The platform of this client is outdated and does not support some system operations.");
5236
+ }
5226
5237
  this.errorPort.onmessage = async (event) => {
5238
+ if (!isClientErrorOperationSupported) {
5239
+ return;
5240
+ }
5227
5241
  await this.bridge.send("system", operations$3.clientError, { message: event.data }, undefined, { includeOperationCheck: true });
5228
5242
  };
5229
5243
  await this.setEnvironment();
@@ -6285,7 +6299,7 @@
6285
6299
  }
6286
6300
  }
6287
6301
 
6288
- var version$1 = "3.4.2";
6302
+ var version$1 = "3.4.4";
6289
6303
 
6290
6304
  const createFactoryFunction = (coreFactoryFunction) => {
6291
6305
  return async (userConfig) => {