@interopio/browser 4.5.0-beta.0 → 4.6.0

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.
@@ -2211,9 +2211,9 @@
2211
2211
  const libDomainDecoder = oneOf$1(constant$2("system"), constant$2("windows"), constant$2("appManager"), constant$2("layouts"), constant$2("intents"), constant$2("notifications"), constant$2("channels"), constant$2("extension"), constant$2("themes"), constant$2("prefs"), constant$2("ui"));
2212
2212
  const windowOperationTypesDecoder = oneOf$1(constant$2("openWindow"), constant$2("windowHello"), constant$2("windowAdded"), constant$2("windowRemoved"), constant$2("getBounds"), constant$2("getFrameBounds"), constant$2("getUrl"), constant$2("moveResize"), constant$2("focus"), constant$2("close"), constant$2("getTitle"), constant$2("setTitle"), constant$2("focusChange"), constant$2("getChannel"), constant$2("notifyChannelsChanged"), constant$2("setZoomFactor"), constant$2("zoomFactorChange"), constant$2("refresh"), constant$2("operationCheck"));
2213
2213
  const appManagerOperationTypesDecoder = oneOf$1(constant$2("appHello"), constant$2("appDirectoryStateChange"), constant$2("instanceStarted"), constant$2("instanceStopped"), constant$2("applicationStart"), constant$2("instanceStop"), constant$2("clear"), constant$2("operationCheck"));
2214
- const layoutsOperationTypesDecoder = oneOf$1(constant$2("layoutAdded"), constant$2("layoutChanged"), constant$2("layoutRemoved"), constant$2("layoutRenamed"), constant$2("get"), constant$2("getAll"), constant$2("export"), constant$2("import"), constant$2("remove"), constant$2("rename"), constant$2("clientSaveRequest"), constant$2("getGlobalPermissionState"), constant$2("checkGlobalActivated"), constant$2("requestGlobalPermission"), constant$2("getDefaultGlobal"), constant$2("setDefaultGlobal"), constant$2("clearDefaultGlobal"), constant$2("updateMetadata"), constant$2("operationCheck"), constant$2("getCurrent"), constant$2("defaultLayoutChanged"), constant$2("layoutRestored"));
2214
+ const layoutsOperationTypesDecoder = oneOf$1(constant$2("layoutAdded"), constant$2("layoutChanged"), constant$2("layoutRemoved"), constant$2("layoutRenamed"), constant$2("get"), constant$2("getAll"), constant$2("getLayoutContents"), constant$2("export"), constant$2("import"), constant$2("remove"), constant$2("rename"), constant$2("clientSaveRequest"), constant$2("getGlobalPermissionState"), constant$2("checkGlobalActivated"), constant$2("requestGlobalPermission"), constant$2("getDefaultGlobal"), constant$2("setDefaultGlobal"), constant$2("clearDefaultGlobal"), constant$2("updateMetadata"), constant$2("operationCheck"), constant$2("getCurrent"), constant$2("defaultLayoutChanged"), constant$2("layoutRestored"));
2215
2215
  const notificationsOperationTypesDecoder = oneOf$1(constant$2("raiseNotification"), constant$2("requestPermission"), constant$2("notificationShow"), constant$2("notificationClick"), constant$2("getPermission"), constant$2("list"), constant$2("notificationRaised"), constant$2("notificationClosed"), constant$2("click"), constant$2("clear"), constant$2("clearAll"), constant$2("configure"), constant$2("getConfiguration"), constant$2("configurationChanged"), constant$2("setState"), constant$2("clearOld"), constant$2("activeCountChange"), constant$2("stateChange"), constant$2("operationCheck"), constant$2("getActiveCount"));
2216
- const systemOperationTypesDecoder = oneOf$1(constant$2("getEnvironment"), constant$2("getBase"), constant$2("platformShutdown"), constant$2("isFdc3DataWrappingSupported"), constant$2("clientError"), constant$2("systemHello"), constant$2("operationCheck"));
2216
+ const systemOperationTypesDecoder = oneOf$1(constant$2("getEnvironment"), constant$2("getBase"), constant$2("platformShutdown"), constant$2("isFdc3DataWrappingSupported"), constant$2("isChannelsMetadataSupported"), constant$2("clientError"), constant$2("systemHello"), constant$2("operationCheck"));
2217
2217
  const windowRelativeDirectionDecoder = oneOf$1(constant$2("top"), constant$2("left"), constant$2("right"), constant$2("bottom"));
2218
2218
  const windowBoundsDecoder = object$2({
2219
2219
  top: number$2(),
@@ -2306,6 +2306,9 @@
2306
2306
  const iframePermissionsPolicyConfigDecoder = object$2({
2307
2307
  flags: string$2()
2308
2308
  });
2309
+ const iframeSandboxConfigDecoder = object$2({
2310
+ flags: string$2()
2311
+ });
2309
2312
  const workspacesSandboxDecoder = object$2({
2310
2313
  flags: string$2()
2311
2314
  });
@@ -2324,7 +2327,8 @@
2324
2327
  height: optional$2(nonNegativeNumberDecoder$2),
2325
2328
  workspacesSandbox: optional$2(workspacesSandboxDecoder),
2326
2329
  channelSelector: optional$2(channelSelectorDecoder$1),
2327
- iframePermissionsPolicy: optional$2(iframePermissionsPolicyConfigDecoder)
2330
+ iframePermissionsPolicy: optional$2(iframePermissionsPolicyConfigDecoder),
2331
+ iframeSandbox: optional$2(iframeSandboxConfigDecoder)
2328
2332
  });
2329
2333
  const intentDefinitionDecoder = object$2({
2330
2334
  name: nonEmptyStringDecoder$2,
@@ -2501,6 +2505,17 @@
2501
2505
  closeMe: optional$2(boolean$2()),
2502
2506
  timeout: optional$2(nonNegativeNumberDecoder$2)
2503
2507
  });
2508
+ const getContentsOptionsDecoder = object$2({
2509
+ name: nonEmptyStringDecoder$2,
2510
+ type: layoutTypeDecoder
2511
+ });
2512
+ const layoutContentsResultDecoder = object$2({
2513
+ contents: object$2({
2514
+ appComponents: array$2(oneOf$1(windowLayoutComponentDecoder, workspaceLayoutComponentDecoder, workspaceFrameComponentDecoder)),
2515
+ workspaceComponents: array$2(workspaceLayoutComponentStateDecoder),
2516
+ workspaceWindows: array$2(windowLayoutItemDecoder)
2517
+ })
2518
+ });
2504
2519
  const layoutSummaryDecoder = object$2({
2505
2520
  name: nonEmptyStringDecoder$2,
2506
2521
  type: layoutTypeDecoder,
@@ -2722,10 +2737,10 @@
2722
2737
  name: optional$2(nonEmptyStringDecoder$2),
2723
2738
  fdc3: optional$2(boolean$2())
2724
2739
  })));
2725
- const leaveChannelsConfig = object$2({
2740
+ const leaveChannelsConfigDecoder = oneOf$1(nonEmptyStringDecoder$2, object$2({
2726
2741
  windowId: optionalNonEmptyStringDecoder,
2727
2742
  channel: optionalNonEmptyStringDecoder
2728
- });
2743
+ }));
2729
2744
  const fdc3ContextDecoder = anyJson$2().where((value) => typeof value.type === "string", "Expected a valid FDC3 Context with compulsory 'type' field");
2730
2745
  const interopActionSettingsDecoder = object$2({
2731
2746
  method: nonEmptyStringDecoder$2,
@@ -2879,7 +2894,8 @@
2879
2894
  sourceFilter: object$2({
2880
2895
  allowed: array$2(nonEmptyStringDecoder$2),
2881
2896
  blocked: array$2(nonEmptyStringDecoder$2)
2882
- })
2897
+ }),
2898
+ showNotificationBadge: optional$2(boolean$2())
2883
2899
  })
2884
2900
  });
2885
2901
  const platformSaveRequestConfigDecoder = object$2({
@@ -4366,7 +4382,12 @@
4366
4382
  }
4367
4383
  getApplication(name) {
4368
4384
  const verifiedName = runDecoderWithIOError(nonEmptyStringDecoder$2, name);
4369
- return this.applications.find((app) => app.name === verifiedName);
4385
+ const application = this.applications.find((app) => app.name === verifiedName);
4386
+ const iframeSandbox = application?.userProperties?.details?.iframeSandbox;
4387
+ if (iframeSandbox) {
4388
+ application.userProperties.details.workspacesSandbox = iframeSandbox;
4389
+ }
4390
+ return application;
4370
4391
  }
4371
4392
  getInstances() {
4372
4393
  return this.instances.slice();
@@ -4676,6 +4697,7 @@
4676
4697
  layoutRenamed: { name: "layoutRenamed", dataDecoder: renamedLayoutNotificationDecoder },
4677
4698
  get: { name: "get", dataDecoder: simpleLayoutConfigDecoder, resultDecoder: optionalSimpleLayoutResult },
4678
4699
  getAll: { name: "getAll", dataDecoder: getAllLayoutsConfigDecoder, resultDecoder: allLayoutsSummariesResultDecoder },
4700
+ getLayoutContents: { name: "getLayoutContents", dataDecoder: getContentsOptionsDecoder, resultDecoder: layoutContentsResultDecoder },
4679
4701
  export: { name: "export", dataDecoder: getAllLayoutsConfigDecoder, resultDecoder: allLayoutsFullConfigDecoder },
4680
4702
  import: { name: "import", dataDecoder: layoutsImportConfigDecoder },
4681
4703
  remove: { name: "remove", dataDecoder: simpleLayoutConfigDecoder },
@@ -4731,6 +4753,7 @@
4731
4753
  const api = {
4732
4754
  get: this.get.bind(this),
4733
4755
  getAll: this.getAll.bind(this),
4756
+ getLayoutContents: this.getLayoutContents.bind(this),
4734
4757
  getCurrentLayout: this.getCurrentLayout.bind(this),
4735
4758
  export: this.exportLayouts.bind(this),
4736
4759
  import: this.importLayouts.bind(this),
@@ -4781,6 +4804,15 @@
4781
4804
  const result = await this.bridge.send("layouts", operations$8.getAll, { type });
4782
4805
  return result.summaries;
4783
4806
  }
4807
+ async getLayoutContents(options) {
4808
+ runDecoderWithIOError(getContentsOptionsDecoder, options);
4809
+ const { name, type } = options;
4810
+ if (type !== "Workspace" && type !== "Global") {
4811
+ return ioError.raiseError(`getLayoutContents is only supported for Workspace and Global layouts, but got type "${type}"`);
4812
+ }
4813
+ const result = await this.bridge.send("layouts", operations$8.getLayoutContents, { name, type }, undefined, { includeOperationCheck: true });
4814
+ return result.contents;
4815
+ }
4784
4816
  async exportLayouts(type) {
4785
4817
  runDecoderWithIOError(layoutTypeDecoder, type);
4786
4818
  const result = await this.bridge.send("layouts", operations$8.export, { type });
@@ -4960,7 +4992,7 @@
4960
4992
  clear: { name: "clear" },
4961
4993
  clearAll: { name: "clearAll" },
4962
4994
  clearOld: { name: "clearOld" },
4963
- configure: { name: "configure", dataDecoder: notificationsConfigurationProtocolDecoder },
4995
+ configure: { name: "configure", dataDecoder: notificationsConfigurationProtocolDecoder, resultDecoder: strictNotificationsConfigurationProtocolDecoder },
4964
4996
  getConfiguration: { name: "getConfiguration", resultDecoder: strictNotificationsConfigurationProtocolDecoder },
4965
4997
  getActiveCount: { name: "getActiveCount", resultDecoder: activeNotificationsCountChangeDecoder },
4966
4998
  configurationChanged: { name: "configurationChanged", resultDecoder: strictNotificationsConfigurationProtocolDecoder },
@@ -4970,13 +5002,13 @@
4970
5002
  operationCheck: { name: "operationCheck" }
4971
5003
  };
4972
5004
 
4973
- /* @ts-self-types="./index.d.ts" */
4974
5005
  let urlAlphabet$1 =
4975
5006
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
5007
+
4976
5008
  let nanoid$1 = (size = 21) => {
4977
5009
  let id = '';
4978
5010
  let i = size | 0;
4979
- while (i--) {
5011
+ while (i-- > 0) {
4980
5012
  id += urlAlphabet$1[(Math.random() * 64) | 0];
4981
5013
  }
4982
5014
  return id
@@ -5104,7 +5136,8 @@
5104
5136
  }
5105
5137
  async configure(config) {
5106
5138
  const verifiedConfig = runDecoderWithIOError(notificationsConfigurationDecoder, config);
5107
- await this.bridge.send("notifications", operations$7.configure, { configuration: verifiedConfig }, undefined, { includeOperationCheck: true });
5139
+ const response = await this.bridge.send("notifications", operations$7.configure, { configuration: verifiedConfig }, undefined, { includeOperationCheck: true });
5140
+ return response.configuration;
5108
5141
  }
5109
5142
  async getConfiguration() {
5110
5143
  const response = await this.bridge.send("notifications", operations$7.getConfiguration, undefined, undefined, { includeOperationCheck: true });
@@ -5760,12 +5793,14 @@
5760
5793
  return this.changed(callback);
5761
5794
  }
5762
5795
  async leave(config = {}) {
5763
- runDecoderWithIOError(leaveChannelsConfig, config);
5764
- if (config.channel) {
5796
+ const decodedConfig = runDecoderWithIOError(leaveChannelsConfigDecoder, config);
5797
+ const channelName = typeof decodedConfig === "string" ? undefined : decodedConfig.channel;
5798
+ const windowId = typeof decodedConfig === "string" ? decodedConfig : decodedConfig.windowId;
5799
+ if (channelName) {
5765
5800
  const channelNames = this.getAllChannelNames();
5766
- runDecoderWithIOError(channelNameDecoder(channelNames), config.channel);
5801
+ runDecoderWithIOError(channelNameDecoder(channelNames), channelName);
5767
5802
  }
5768
- const leaveData = { channelName: config.channel, windowId: config.windowId ?? this.myWindowId };
5803
+ const leaveData = { channelName, windowId: windowId ?? this.myWindowId };
5769
5804
  await this.bridge.send("channels", operations$5.leaveChannel, leaveData, undefined, { includeOperationCheck: true });
5770
5805
  }
5771
5806
  async handleAppManagerInitialChannelId(channel) {
@@ -6148,12 +6183,13 @@
6148
6183
  windowId: restrictions.windowId ?? this.myWindowId
6149
6184
  }
6150
6185
  };
6151
- return this.bridge.send("channels", operations$5.restrictAll, configData, undefined, { includeOperationCheck: true });
6186
+ await this.bridge.send("channels", operations$5.restrictAll, configData, undefined, { includeOperationCheck: true });
6152
6187
  }
6153
6188
  async handleRestrictAll({ restrictions }) {
6154
6189
  const currentChannel = await this.getMy();
6155
6190
  if (!currentChannel) {
6156
- return this.updateAllRestrictions(restrictions);
6191
+ this.updateAllRestrictions(restrictions);
6192
+ return;
6157
6193
  }
6158
6194
  const prevReadAllowed = this.isAllowedByRestrictions(currentChannel.name, "read");
6159
6195
  this.updateAllRestrictions(restrictions);
@@ -6388,6 +6424,7 @@
6388
6424
  getBase: { name: "getBase", resultDecoder: anyDecoder },
6389
6425
  platformShutdown: { name: "platformShutdown" },
6390
6426
  isFdc3DataWrappingSupported: { name: "isFdc3DataWrappingSupported" },
6427
+ isChannelsMetadataSupported: { name: "isChannelsMetadataSupported" },
6391
6428
  clientError: { name: "clientError", dataDecoder: clientErrorDataDecoder },
6392
6429
  systemHello: { name: "systemHello", resultDecoder: systemHelloSuccessDecoder },
6393
6430
  operationCheck: { name: "operationCheck" }
@@ -6410,7 +6447,7 @@
6410
6447
  const systemHelloSuccess = await this.bridge.send("system", operations$4.systemHello, undefined, undefined, { includeOperationCheck: true });
6411
6448
  isClientErrorOperationSupported = systemHelloSuccess.isClientErrorOperationSupported;
6412
6449
  }
6413
- catch (error) {
6450
+ catch {
6414
6451
  this.logger.warn("The platform of this client is outdated and does not support some system operations.");
6415
6452
  }
6416
6453
  this.errorPort.onmessage = async (event) => {
@@ -6450,12 +6487,16 @@
6450
6487
  addOperationsExecutors() {
6451
6488
  operations$4.platformShutdown.execute = this.processPlatformShutdown.bind(this);
6452
6489
  operations$4.isFdc3DataWrappingSupported.execute = this.handleIsFdc3DataWrappingSupported.bind(this);
6490
+ operations$4.isChannelsMetadataSupported.execute = this.handleIsChannelsMetadataSupported.bind(this);
6453
6491
  operations$4.operationCheck.execute = async (config) => handleOperationCheck(this.supportedOperationsNames, config.operation);
6454
6492
  this.supportedOperationsNames = getSupportedOperationsNames(operations$4);
6455
6493
  }
6456
6494
  async handleIsFdc3DataWrappingSupported() {
6457
6495
  return { isSupported: true };
6458
6496
  }
6497
+ async handleIsChannelsMetadataSupported() {
6498
+ return { isSupported: false };
6499
+ }
6459
6500
  }
6460
6501
 
6461
6502
  class Notification {
@@ -7786,7 +7827,7 @@
7786
7827
  }
7787
7828
  }
7788
7829
 
7789
- var version$1 = "4.5.0-beta.0";
7830
+ var version$1 = "4.6.0";
7790
7831
 
7791
7832
  const setupGlobalSystem = (io, bridge) => {
7792
7833
  return {
@@ -9219,9 +9260,9 @@
9219
9260
  }
9220
9261
  }
9221
9262
 
9222
- /* @ts-self-types="./index.d.ts" */
9223
9263
  let urlAlphabet =
9224
9264
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
9265
+
9225
9266
  let nanoid = (size = 21) => {
9226
9267
  let id = '';
9227
9268
  let i = size | 0;
@@ -9775,6 +9816,10 @@
9775
9816
  return window.name.substring(0, window.name.indexOf("#wsp"));
9776
9817
  }
9777
9818
  if (window !== window.top) {
9819
+ const ifrIndex = window.name.indexOf("#ifr");
9820
+ if (ifrIndex !== -1) {
9821
+ return window.name.substring(0, ifrIndex);
9822
+ }
9778
9823
  return;
9779
9824
  }
9780
9825
  if (window.name?.includes("g42")) {
@@ -9835,6 +9880,83 @@
9835
9880
  }
9836
9881
  }
9837
9882
 
9883
+ function normalizeError(value) {
9884
+ if (value instanceof Error) {
9885
+ return value;
9886
+ }
9887
+ if (typeof value === "string") {
9888
+ return new Error(value);
9889
+ }
9890
+ const anyVal = value;
9891
+ const msgField = typeof anyVal?.message === "string" ? anyVal.message : undefined;
9892
+ const reasonField = typeof anyVal?.reason === "string" ? anyVal.reason : undefined;
9893
+ if (msgField !== undefined && msgField.length > 0) {
9894
+ return new Error(msgField);
9895
+ }
9896
+ if (reasonField !== undefined && reasonField.length > 0) {
9897
+ return new Error(reasonField);
9898
+ }
9899
+ if (msgField === "" || reasonField === "") {
9900
+ return new Error("");
9901
+ }
9902
+ return new Error(safeStringify$1(value));
9903
+ }
9904
+ function safeErrorStack(value) {
9905
+ try {
9906
+ if (value instanceof Error) {
9907
+ if (typeof value.stack === "string") {
9908
+ return value.stack;
9909
+ }
9910
+ if (typeof value.message === "string") {
9911
+ const name = typeof value.name === "string" && value.name.length > 0 ? value.name : "Error";
9912
+ return `${name}: ${value.message}`;
9913
+ }
9914
+ }
9915
+ if (typeof value === "string") {
9916
+ return value;
9917
+ }
9918
+ }
9919
+ catch { }
9920
+ return safeStringify$1(value);
9921
+ }
9922
+ function safeStringify$1(value) {
9923
+ try {
9924
+ const seen = new WeakSet();
9925
+ const json = JSON.stringify(value, (_key, v) => {
9926
+ if (typeof v === "bigint") {
9927
+ return `${v.toString()}n`;
9928
+ }
9929
+ if (typeof v === "function") {
9930
+ return "[Function]";
9931
+ }
9932
+ if (typeof v === "symbol") {
9933
+ return v.toString();
9934
+ }
9935
+ if (typeof v === "object" && v !== null) {
9936
+ if (seen.has(v)) {
9937
+ return "[Circular]";
9938
+ }
9939
+ seen.add(v);
9940
+ }
9941
+ return v;
9942
+ });
9943
+ if (json !== undefined) {
9944
+ return json;
9945
+ }
9946
+ }
9947
+ catch { }
9948
+ if (value !== null && typeof value === "object") {
9949
+ const ctor = value.constructor?.name ?? "Object";
9950
+ let keys = [];
9951
+ try {
9952
+ keys = Object.keys(value);
9953
+ }
9954
+ catch { }
9955
+ return keys.length > 0 ? `[${ctor} keys=${keys.join(",")}]` : `[${ctor}]`;
9956
+ }
9957
+ return String(value);
9958
+ }
9959
+
9838
9960
  function domainSession (domain, connection, logger, successMessages, errorMessages) {
9839
9961
  if (domain == null) {
9840
9962
  domain = "global";
@@ -10070,7 +10192,7 @@
10070
10192
  callback(msg);
10071
10193
  }
10072
10194
  catch (e) {
10073
- logger.error(`Callback failed: ${e} \n ${e.stack} \n msg was: ${JSON.stringify(msg)}`, e);
10195
+ logger.error(`Callback failed: ${safeErrorStack(e)} \n msg was: ${JSON.stringify(msg)}`, e);
10074
10196
  }
10075
10197
  });
10076
10198
  },
@@ -10086,65 +10208,6 @@
10086
10208
  };
10087
10209
  }
10088
10210
 
10089
- function normalizeError(value) {
10090
- if (value instanceof Error) {
10091
- return value;
10092
- }
10093
- if (typeof value === "string") {
10094
- return new Error(value);
10095
- }
10096
- const anyVal = value;
10097
- const msgField = typeof anyVal?.message === "string" ? anyVal.message : undefined;
10098
- const reasonField = typeof anyVal?.reason === "string" ? anyVal.reason : undefined;
10099
- if (msgField !== undefined && msgField.length > 0) {
10100
- return new Error(msgField);
10101
- }
10102
- if (reasonField !== undefined && reasonField.length > 0) {
10103
- return new Error(reasonField);
10104
- }
10105
- if (msgField === "" || reasonField === "") {
10106
- return new Error("");
10107
- }
10108
- return new Error(safeStringify$1(value));
10109
- }
10110
- function safeStringify$1(value) {
10111
- try {
10112
- const seen = new WeakSet();
10113
- const json = JSON.stringify(value, (_key, v) => {
10114
- if (typeof v === "bigint") {
10115
- return `${v.toString()}n`;
10116
- }
10117
- if (typeof v === "function") {
10118
- return "[Function]";
10119
- }
10120
- if (typeof v === "symbol") {
10121
- return v.toString();
10122
- }
10123
- if (typeof v === "object" && v !== null) {
10124
- if (seen.has(v)) {
10125
- return "[Circular]";
10126
- }
10127
- seen.add(v);
10128
- }
10129
- return v;
10130
- });
10131
- if (json !== undefined) {
10132
- return json;
10133
- }
10134
- }
10135
- catch { }
10136
- if (value !== null && typeof value === "object") {
10137
- const ctor = value.constructor?.name ?? "Object";
10138
- let keys = [];
10139
- try {
10140
- keys = Object.keys(value);
10141
- }
10142
- catch { }
10143
- return keys.length > 0 ? `[${ctor} keys=${keys.join(",")}]` : `[${ctor}]`;
10144
- }
10145
- return String(value);
10146
- }
10147
-
10148
10211
  class Connection {
10149
10212
  settings;
10150
10213
  logger;
@@ -10403,7 +10466,7 @@
10403
10466
  }
10404
10467
  catch (error) {
10405
10468
  try {
10406
- this.logger.error(`Message handler failed with ${error.stack}`, error);
10469
+ this.logger.error(`Message handler failed with ${safeErrorStack(error)}`, error);
10407
10470
  }
10408
10471
  catch (loggerError) {
10409
10472
  console.log("Message handler failed", error);
@@ -10881,7 +10944,7 @@
10881
10944
  }
10882
10945
  interop.invoke(Logger.InteropMethodName, args)
10883
10946
  .catch((e) => {
10884
- this.logFn.error(`Unable to send log message to the platform: ${e.message}`, e);
10947
+ this.logFn.error(`Unable to send log message to the platform: ${normalizeError(e).message}`, e);
10885
10948
  });
10886
10949
  }
10887
10950
  }
@@ -10965,7 +11028,7 @@
10965
11028
  }
10966
11029
  };
10967
11030
 
10968
- var version = "6.10.4";
11031
+ var version = "6.11.0";
10969
11032
 
10970
11033
  /*!
10971
11034
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
@@ -11629,6 +11692,7 @@
11629
11692
  (function (exports$1) {
11630
11693
  Object.defineProperty(exports$1, "__esModule", { value: true });
11631
11694
  exports$1.extractFilteringContextFromArgs = exports$1.deep_value = exports$1.getOTELData = exports$1.flattenOtelAtributes = void 0;
11695
+ exports$1.withTimeout = withTimeout;
11632
11696
  const container_1 = requireContainer();
11633
11697
  /* eslint-disable @typescript-eslint/no-explicit-any */
11634
11698
  const flattenOtelAtributes = (data, maxDepth) => {
@@ -11746,6 +11810,19 @@
11746
11810
  return filteringContext;
11747
11811
  };
11748
11812
  exports$1.extractFilteringContextFromArgs = extractFilteringContextFromArgs;
11813
+ function withTimeout(promise, timeout) {
11814
+ if (!promise) {
11815
+ return Promise.resolve();
11816
+ }
11817
+ if (!timeout) {
11818
+ return promise;
11819
+ }
11820
+ let timeoutId;
11821
+ return new Promise((rs, rj) => {
11822
+ timeoutId = setTimeout(rs, timeout);
11823
+ promise.then(() => rs(), rj);
11824
+ }).then(() => clearTimeout(timeoutId));
11825
+ }
11749
11826
 
11750
11827
  } (otelUtils));
11751
11828
  return otelUtils;
@@ -12406,21 +12483,11 @@
12406
12483
  Builder.maybeAddResourceAttributesToAttributes(this.settings.logs);
12407
12484
  Builder.maybeAddResourceAttributesToAttributes(this.settings.metrics);
12408
12485
  Builder.maybeAddResourceAttributesToAttributes(this.settings.traces);
12409
- Builder.propagateAttributeDown("useSSOAuth", this.settings, this.settings.logs);
12410
- Builder.propagateAttributeDown("useSSOAuth", this.settings, this.settings.metrics);
12411
- Builder.propagateAttributeDown("useSSOAuth", this.settings, this.settings.traces);
12412
- Builder.propagateAttributeDown("useSSOAuthRawToken", this.settings, this.settings.logs);
12413
- Builder.propagateAttributeDown("useSSOAuthRawToken", this.settings, this.settings.metrics);
12414
- Builder.propagateAttributeDown("useSSOAuthRawToken", this.settings, this.settings.traces);
12415
- Builder.propagateAttributesDown("headers", this.settings, this.settings.logs);
12416
- Builder.propagateAttributesDown("headers", this.settings, this.settings.metrics);
12417
- Builder.propagateAttributesDown("headers", this.settings, this.settings.traces);
12418
- Builder.propagateAttributesDown("additionalAttributes", this.settings, this.settings.logs);
12419
- Builder.propagateAttributesDown("additionalResourceAttributes", this.settings, this.settings.logs);
12420
- Builder.propagateAttributesDown("additionalAttributes", this.settings, this.settings.metrics);
12421
- Builder.propagateAttributesDown("additionalResourceAttributes", this.settings, this.settings.metrics);
12422
- Builder.propagateAttributesDown("additionalAttributes", this.settings, this.settings.traces);
12423
- Builder.propagateAttributesDown("additionalResourceAttributes", this.settings, this.settings.traces);
12486
+ // Builder.propagateAttributeDownEx("useSSOAuth", this.settings);
12487
+ // Builder.propagateAttributeDownEx("useSSOAuthRawToken", this.settings);
12488
+ Builder.propagateAttributesDownEx("headers", this.settings);
12489
+ Builder.propagateAttributesDownEx("additionalAttributes", this.settings);
12490
+ Builder.propagateAttributesDownEx("additionalResourceAttributes", this.settings);
12424
12491
  const metricsBuilder = (_g = this.metricsBuilder) !== null && _g !== void 0 ? _g : this.withMetrics();
12425
12492
  const metrics = metricsBuilder
12426
12493
  .withLogger(this.logger)
@@ -12448,6 +12515,11 @@
12448
12515
  }
12449
12516
  settings[k] = (_a = settings[k]) !== null && _a !== void 0 ? _a : otelSettings[k];
12450
12517
  }
12518
+ static propagateAttributeDownEx(k, otelSettings) {
12519
+ Builder.propagateAttributeDown(k, otelSettings, otelSettings.logs);
12520
+ Builder.propagateAttributeDown(k, otelSettings, otelSettings.metrics);
12521
+ Builder.propagateAttributeDown(k, otelSettings, otelSettings.traces);
12522
+ }
12451
12523
  static propagateAttributesDown(k, otelSettings, settings) {
12452
12524
  var _a, _b;
12453
12525
  if (!settings) {
@@ -12455,7 +12527,15 @@
12455
12527
  }
12456
12528
  const providedOtel = (_a = otelSettings[k]) !== null && _a !== void 0 ? _a : {};
12457
12529
  const provided = (_b = settings[k]) !== null && _b !== void 0 ? _b : {};
12458
- settings[k] = () => (Object.assign(Object.assign({}, container_1.Container.errorless(providedOtel)), container_1.Container.errorless(provided)));
12530
+ settings[k] = () => {
12531
+ var _a, _b, _c;
12532
+ return ((0, _1.flattenOtelAtributes)(Object.assign(Object.assign({}, container_1.Container.errorless(providedOtel)), container_1.Container.errorless(provided)), (_c = (_a = settings.maxAttributeDepth) !== null && _a !== void 0 ? _a : (_b = settings.defaults) === null || _b === void 0 ? void 0 : _b.maxAttributeDepth) !== null && _c !== void 0 ? _c : 5));
12533
+ };
12534
+ }
12535
+ static propagateAttributesDownEx(k, otelSettings) {
12536
+ Builder.propagateAttributesDown(k, otelSettings, otelSettings.logs);
12537
+ Builder.propagateAttributesDown(k, otelSettings, otelSettings.metrics);
12538
+ Builder.propagateAttributesDown(k, otelSettings, otelSettings.traces);
12459
12539
  }
12460
12540
  static maybeAddResourceAttributesToAttributes(settings) {
12461
12541
  if (settings === null || settings === void 0 ? void 0 : settings.addResourceAttributesToAttributes) {
@@ -12883,7 +12963,7 @@
12883
12963
  return (mod && mod.__esModule) ? mod : { "default": mod };
12884
12964
  };
12885
12965
  Object.defineProperty(exports$1, "__esModule", { value: true });
12886
- exports$1.SpanStatusCode = exports$1.deep_value = exports$1.extractFilteringContextFromArgs = exports$1.getOTELData = exports$1.flattenOtelAtributes = exports$1.safeStringify = exports$1.isNode = exports$1.loadInsightsPlugin = exports$1.registerInsightsPlugin = exports$1.Logs = exports$1.NullTracingState = exports$1.OTEL_PI_KEY = exports$1.withSpan = exports$1.Traces = exports$1.MetricsDependencyBuilder = exports$1.NullMetric = exports$1.Container = exports$1.Log4jsWrapper = exports$1.Builder = void 0;
12966
+ exports$1.SpanStatusCode = exports$1.withTimeout = exports$1.deep_value = exports$1.extractFilteringContextFromArgs = exports$1.getOTELData = exports$1.flattenOtelAtributes = exports$1.safeStringify = exports$1.isNode = exports$1.loadInsightsPlugin = exports$1.registerInsightsPlugin = exports$1.Logs = exports$1.NullTracingState = exports$1.OTEL_PI_KEY = exports$1.withSpan = exports$1.Traces = exports$1.MetricsDependencyBuilder = exports$1.NullMetric = exports$1.Container = exports$1.Log4jsWrapper = exports$1.Builder = void 0;
12887
12967
  var builder_1 = requireBuilder();
12888
12968
  Object.defineProperty(exports$1, "Builder", { enumerable: true, get: function () { return builder_1.Builder; } });
12889
12969
  var log4jsWrapper_1 = requireLog4jsWrapper();
@@ -12914,6 +12994,7 @@
12914
12994
  Object.defineProperty(exports$1, "flattenOtelAtributes", { enumerable: true, get: function () { return otelUtils_1.flattenOtelAtributes; } });
12915
12995
  Object.defineProperty(exports$1, "extractFilteringContextFromArgs", { enumerable: true, get: function () { return otelUtils_1.extractFilteringContextFromArgs; } });
12916
12996
  Object.defineProperty(exports$1, "deep_value", { enumerable: true, get: function () { return otelUtils_1.deep_value; } });
12997
+ Object.defineProperty(exports$1, "withTimeout", { enumerable: true, get: function () { return otelUtils_1.withTimeout; } });
12917
12998
  if (typeof Promise !== "undefined") {
12918
12999
  Promise.allSettled = Promise.allSettled || ((promises) => Promise.all(promises.map((p) => p
12919
13000
  .then((value) => ({
@@ -15522,7 +15603,7 @@
15522
15603
  distExports.Traces.currentTracingState = ts;
15523
15604
  }
15524
15605
  const contextData = this._contextNameToData[name];
15525
- ts.addData("DIAGNOSTIC", { data: contextData });
15606
+ ts.addData("DIAGNOSTIC", { data });
15526
15607
  ts.injectPropagationInfo(data);
15527
15608
  if (!contextData || !contextData.isAnnounced) {
15528
15609
  return this.createContext(name, data);
@@ -15924,6 +16005,10 @@
15924
16005
  }
15925
16006
  }
15926
16007
  }
16008
+ const pi = distExports.Traces.extractPropagationInfo(delta, true) ||
16009
+ distExports.Traces.extractPropagationInfo(delta?.added, true) ||
16010
+ distExports.Traces.extractPropagationInfo(delta?.updated, true) ||
16011
+ distExports.Traces.extractPropagationInfo(delta?.reset, true);
15927
16012
  for (const updateCallbackIndex in contextData.updateCallbacks) {
15928
16013
  if (contextData.updateCallbacks.hasOwnProperty(updateCallbackIndex)) {
15929
16014
  try {
@@ -15933,7 +16018,7 @@
15933
16018
  ...delta.updated,
15934
16019
  ...delta.reset
15935
16020
  });
15936
- updateCallback(deepClone(contextData.context), deltaArg, delta.removed, parseInt(updateCallbackIndex, 10), extraData, distExports.Traces.extractPropagationInfo(delta));
16021
+ updateCallback(deepClone(contextData.context), deltaArg, delta.removed, parseInt(updateCallbackIndex, 10), extraData, pi);
15937
16022
  }
15938
16023
  catch (err) {
15939
16024
  this._logger.debug("callback error: " + JSON.stringify(err));