@interopio/fdc3 2.7.1 → 2.8.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.
package/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ 2.8.0
2
+ feat: io.Connect Browser 4.2
3
+ 2.7.2
4
+ fix: remove usage of app.getConfiguration() when using apps API
1
5
  2.7.1
2
6
  feat: add support for apps api
3
7
  2.7.0
@@ -5001,6 +5001,9 @@ Decoder$1.lazy;
5001
5001
 
5002
5002
  const nonEmptyStringDecoder$1 = string$1().where((s) => s.length > 0, "Expected a non-empty string");
5003
5003
  const nonNegativeNumberDecoder = number$1().where((num) => num >= 0, "Expected a non-negative number");
5004
+ const regexDecoder = anyJson$1().andThen((value) => {
5005
+ return value instanceof RegExp ? anyJson$1() : fail(`expected a regex, got a ${typeof value}`);
5006
+ });
5004
5007
 
5005
5008
  const intentDefinitionDecoder = object$1({
5006
5009
  name: nonEmptyStringDecoder$1,
@@ -5327,7 +5330,8 @@ class FDC3Service {
5327
5330
  const decoders$1 = {
5328
5331
  common: {
5329
5332
  nonEmptyStringDecoder: nonEmptyStringDecoder$1,
5330
- nonNegativeNumberDecoder
5333
+ nonNegativeNumberDecoder,
5334
+ regexDecoder
5331
5335
  },
5332
5336
  fdc3: {
5333
5337
  allDefinitionsDecoder,
@@ -6259,9 +6263,6 @@ const FDC3StartupContextDecoder = object({
6259
6263
  })
6260
6264
  })
6261
6265
  });
6262
- object({
6263
- channelId: optional(nonEmptyStringDecoder)
6264
- });
6265
6266
  const privateChannelEventTypesDecoder = oneOf(constant("addContextListener"), constant("unsubscribe"), constant("disconnect"));
6266
6267
  const optionalPrivateChannelEventTypesDecoder = optional(privateChannelEventTypesDecoder);
6267
6268
  const optionalFdc3EventTypesDecoder = optional(constant("userChannelChanged"));
@@ -6314,12 +6315,12 @@ class GlueController {
6314
6315
  interopInstance() {
6315
6316
  return this.glue.interop.instance;
6316
6317
  }
6317
- async getApplication(name) {
6318
+ async getApplication(options) {
6318
6319
  const isAppsAPIAvailable = this.isAppsAPIAvailable();
6319
6320
  if (!isAppsAPIAvailable) {
6320
- return this.glue.appManager.application(name);
6321
+ return this.glue.appManager.application(options.name);
6321
6322
  }
6322
- const app = await this.glue.apps.registry.get({ name });
6323
+ const app = await this.glue.apps.registry.get(options);
6323
6324
  return app ?? undefined;
6324
6325
  }
6325
6326
  async getApplicationInstances(appName) {
@@ -6338,6 +6339,21 @@ class GlueController {
6338
6339
  const appInstance = await this.glue.apps.instances.get({ id });
6339
6340
  return appInstance ?? undefined;
6340
6341
  }
6342
+ async getIoCDAppConfiguration(app) {
6343
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6344
+ if (!isAppsAPIAvailable) {
6345
+ return app.getConfiguration();
6346
+ }
6347
+ const definition = app.definition;
6348
+ if (definition) {
6349
+ return definition;
6350
+ }
6351
+ const appWithDefinition = await this.glue.apps.registry.get({ name: app.name, includeDefinition: true });
6352
+ if (!appWithDefinition?.definition) {
6353
+ throw new Error(`Application definition for app '${app.name}' could not be found`);
6354
+ }
6355
+ return appWithDefinition.definition;
6356
+ }
6341
6357
  async startApplication({ app, context, waitForInstanceReady }) {
6342
6358
  const isAppsAPIAvailable = this.isAppsAPIAvailable();
6343
6359
  if (!isAppsAPIAvailable) {
@@ -6355,13 +6371,14 @@ class GlueController {
6355
6371
  return this.glue.intents.find(intentFilter);
6356
6372
  }
6357
6373
  async raiseIntent(request) {
6358
- return this.glue.intents.raise(request);
6374
+ const result = await this.glue.intents.raise(request);
6375
+ return result;
6359
6376
  }
6360
6377
  doesFilterHandlersExist() {
6361
6378
  return !!this.glue.intents.filterHandlers;
6362
6379
  }
6363
6380
  async filterHandlers(handlerFilter) {
6364
- if (!this.glue.intents.filterHandlers) {
6381
+ if (!this.doesFilterHandlersExist()) {
6365
6382
  throw new Error("Intents method 'filterHandlers' does not exist");
6366
6383
  }
6367
6384
  return this.glue.intents.filterHandlers(handlerFilter);
@@ -6383,10 +6400,10 @@ class GlueController {
6383
6400
  return myWin.getContext();
6384
6401
  }
6385
6402
  async addIntentListener(intent, handler) {
6386
- if (typeof this.glue.intents.register === "function") {
6387
- return await this.glue.intents.register(intent, handler);
6403
+ if (typeof this.glue.intents.register !== "function") {
6404
+ return this.glue.intents.addIntentListener(intent, handler);
6388
6405
  }
6389
- return this.glue.intents.addIntentListener(intent, handler);
6406
+ return this.glue.intents.register(intent, handler);
6390
6407
  }
6391
6408
  getAllContexts() {
6392
6409
  return this.glue.contexts.all();
@@ -6411,7 +6428,7 @@ class GlueController {
6411
6428
  async getMyChannels() {
6412
6429
  if (!this.glue.channels.getMyChannels) {
6413
6430
  const myChannel = await this.glue.channels.getMy();
6414
- return [myChannel];
6431
+ return myChannel ? [myChannel] : [];
6415
6432
  }
6416
6433
  return this.glue.channels.getMyChannels();
6417
6434
  }
@@ -6460,12 +6477,16 @@ class GlueController {
6460
6477
  return this.glue.channels.get(channelId);
6461
6478
  }
6462
6479
  getMyWindow() {
6463
- const win = this.glue.windows.my();
6464
- const isValidWindow = isValidNonEmptyObject(win);
6480
+ const myWindow = this.glue.windows.my();
6481
+ const isValidWindow = isValidNonEmptyObject(myWindow);
6465
6482
  if (isValidWindow) {
6466
- return win;
6483
+ return myWindow;
6484
+ }
6485
+ const myInstance = this.getMyInteropInstance();
6486
+ if (!myInstance?.instance) {
6487
+ return;
6467
6488
  }
6468
- return this.glue.windows.findById(this.glue.interop.instance.instance);
6489
+ return this.glue.windows.findById(myInstance.instance);
6469
6490
  }
6470
6491
  getMyInteropInstance() {
6471
6492
  return this.glue.interop.instance;
@@ -6559,8 +6580,8 @@ class GlueController {
6559
6580
  async checkIsFdc3DataWrappingSupported() {
6560
6581
  const inBrowserNamespace = this.isRunningInBrowser();
6561
6582
  const methodName = inBrowserNamespace ? BrowserClientControlMethodName : DesktopClientControlMethodName;
6562
- const myServer = this.glue.interop.servers().find((server) => server.instance === this.glue.interop.instance.instance);
6563
- if (!myServer) {
6583
+ const myServer = this.getInteropServers().find((server) => server.instance === this.glue.interop.instance.instance && server.isLocal);
6584
+ if (!myServer || typeof myServer.getMethods !== "function") {
6564
6585
  return false;
6565
6586
  }
6566
6587
  const registersControlMethod = myServer.getMethods().some((method) => method.name === methodName);
@@ -6587,13 +6608,13 @@ class GlueController {
6587
6608
  return this.glue.interop.instance.peerId === updaterId;
6588
6609
  }
6589
6610
  getContextMetadata(updaterId) {
6590
- const instanceServer = this.glue.interop.servers().find((server) => server.peerId === updaterId);
6611
+ const instanceServer = this.getInteropServers().find((server) => server.peerId === updaterId);
6591
6612
  if (!instanceServer) {
6592
6613
  return;
6593
6614
  }
6594
6615
  return {
6595
6616
  source: {
6596
- appId: instanceServer.application ?? instanceServer.applicationName,
6617
+ appId: (instanceServer.application ?? instanceServer.applicationName),
6597
6618
  instanceId: instanceServer.instance
6598
6619
  }
6599
6620
  };
@@ -8434,9 +8455,9 @@ class DesktopAgent {
8434
8455
  async getCurrentChannels() {
8435
8456
  return this.channelsController.getCurrentChannels(generateCommandId());
8436
8457
  }
8437
- async leaveChannel(channelId) {
8438
- nonEmptyStringDecoder.runWithException(channelId);
8439
- return this.channelsController.leave(generateCommandId(), { channelId });
8458
+ async leaveChannel(channel) {
8459
+ nonEmptyStringDecoder.runWithException(channel);
8460
+ return this.channelsController.leave(generateCommandId(), { channel });
8440
8461
  }
8441
8462
  async leaveCurrentChannels() {
8442
8463
  return this.channelsController.leave(generateCommandId());
@@ -8664,7 +8685,7 @@ class IntentsController {
8664
8685
  if (!context && !resultType) {
8665
8686
  return this.convertGlue42IntentToFDC3Intent(searchedGlueIntent);
8666
8687
  }
8667
- const contextType = (context && context.type === fdc3NothingContextType) ? undefined : context?.type;
8688
+ const contextType = context?.type === fdc3NothingContextType ? undefined : context?.type;
8668
8689
  const filteredIntent = this.getGlueIntentWithFilteredHandlers(searchedGlueIntent, { contextType, resultType });
8669
8690
  if (!filteredIntent.handlers.length) {
8670
8691
  throw new Error(ResolveError.NoAppsFound);
@@ -8787,7 +8808,7 @@ class IntentsController {
8787
8808
  this._logger?.warn(`Cannot get prefs due to the following error: ${error}`);
8788
8809
  return;
8789
8810
  }
8790
- const intentPrefs = prefs.data?.intents;
8811
+ const intentPrefs = prefs?.data?.intents;
8791
8812
  if (!intentPrefs) {
8792
8813
  return;
8793
8814
  }
@@ -8816,7 +8837,7 @@ class IntentsController {
8816
8837
  const appName = typeof target === "string" ? target : target.appId;
8817
8838
  const instanceId = typeof target === "string" ? undefined : target.instanceId;
8818
8839
  this.logger?.info(`[${commandId}] - Checking if application with name ${appName} exists`);
8819
- const app = await this.glueController.getApplication(appName);
8840
+ const app = await this.glueController.getApplication({ name: appName, includeDefinition: true, includeInstances: true });
8820
8841
  const serverInstances = this.serverInstanceAsIntentHandler(intent.name);
8821
8842
  if (!app && (typeof target === "string" || !target.instanceId || !serverInstances.length)) {
8822
8843
  throw new Error(ResolveError.TargetAppUnavailable);
@@ -8830,8 +8851,9 @@ class IntentsController {
8830
8851
  this.logger?.log(`[${commandId}] - returning all handlers for intent ${intent.name} and target: ${JSON.stringify(target)}`);
8831
8852
  return { name: intent.name, handlers: validHandlersByApplicationName };
8832
8853
  }
8854
+ const appInstances = app?.instances ?? await (this.glueController.getApplicationInstances(appName));
8833
8855
  const isValidInstanceOfTheApp = app
8834
- ? app.instances.find((inst) => inst.id === instanceId)
8856
+ ? appInstances.find((inst) => inst.id === instanceId)
8835
8857
  : serverInstances.find((inst) => inst.instance === instanceId);
8836
8858
  if (!isValidInstanceOfTheApp) {
8837
8859
  throw new Error(ResolveError.TargetInstanceUnavailable);
@@ -8898,17 +8920,23 @@ class IntentsController {
8898
8920
  }
8899
8921
  async convertGlue42IntentToFDC3Intent(glueIntent) {
8900
8922
  const { name, handlers } = glueIntent;
8923
+ const displayName = handlers.find((handler) => handler.displayName)?.displayName ?? name;
8901
8924
  const apps = await Promise.all(handlers.map(async (handler) => {
8902
8925
  const appName = handler.applicationName;
8903
- const app = await this.glueController.getApplication(appName);
8904
- const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
8905
- const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
8926
+ const app = await this.glueController.getApplication({ name: appName, includeDefinition: true });
8927
+ const icons = [app?.icon, ...(app?.userProperties?.icons ?? []), ...(app?.customProperties?.icons ?? [])]
8928
+ .filter((icon) => !!icon)
8929
+ .map((icon) => ({ src: icon }));
8930
+ const images = [...(app?.userProperties?.images ?? []), ...(app?.customProperties?.images ?? [])]
8931
+ .filter((image) => !!image)
8932
+ .map((image) => ({ src: image }));
8933
+ const tooltip = app?.title || app?.userProperties?.tooltip || `${appName} (${handler.type})`;
8906
8934
  return {
8907
8935
  appId: appName,
8908
8936
  instanceId: handler.instanceId,
8909
8937
  name: appName,
8910
8938
  title: handler.applicationTitle || handler.instanceTitle || appName,
8911
- tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
8939
+ tooltip,
8912
8940
  description: handler.applicationDescription,
8913
8941
  icons,
8914
8942
  images,
@@ -8916,7 +8944,7 @@ class IntentsController {
8916
8944
  };
8917
8945
  }));
8918
8946
  const appIntent = {
8919
- intent: { name, displayName: handlers[0].displayName || "" },
8947
+ intent: { name, displayName },
8920
8948
  apps
8921
8949
  };
8922
8950
  return appIntent;
@@ -9030,7 +9058,7 @@ class ApplicationsController {
9030
9058
  await this.glueController.gluePromise;
9031
9059
  this.logger?.log(`[${commandId}] - open() invoked with target ${JSON.stringify(target)} ${context ? `and contextType ${context.type}` : ""}`);
9032
9060
  const name = typeof target === "object" ? target.appId : target;
9033
- const app = await this.glueController.getApplication(name);
9061
+ const app = await this.glueController.getApplication({ name });
9034
9062
  if (!app) {
9035
9063
  throw new Error(OpenError.AppNotFound);
9036
9064
  }
@@ -9053,12 +9081,12 @@ class ApplicationsController {
9053
9081
  await this.glueController.gluePromise;
9054
9082
  this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
9055
9083
  const { appId } = appIdentifier;
9056
- const app = await this.glueController.getApplication(appId);
9084
+ const app = await this.glueController.getApplication({ name: appId, includeInstances: true, includeDefinition: true });
9057
9085
  if (!app) {
9058
9086
  throw new Error(ResolveError.NoAppsFound);
9059
9087
  }
9060
- const glueInstances = await this.glueController.getApplicationInstances(appId);
9061
- const fdc3Instances = glueInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
9088
+ const appInstances = app.instances ?? await this.glueController.getApplicationInstances(appId);
9089
+ const fdc3Instances = appInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
9062
9090
  this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${JSON.stringify(appIdentifier)}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
9063
9091
  return fdc3Instances;
9064
9092
  }
@@ -9066,7 +9094,7 @@ class ApplicationsController {
9066
9094
  await this.glueController.gluePromise;
9067
9095
  this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
9068
9096
  const { appId, instanceId } = appIdentifier;
9069
- const app = await this.glueController.getApplication(appId);
9097
+ const app = await this.glueController.getApplication({ name: appId, includeDefinition: true, includeInstances: true });
9070
9098
  if (!app) {
9071
9099
  throw new Error(OpenError.AppNotFound);
9072
9100
  }
@@ -9100,7 +9128,7 @@ class ApplicationsController {
9100
9128
  async getCurrentAppMetadata() {
9101
9129
  const myInstance = this.glueController.interopInstance();
9102
9130
  const myInstanceApplicationName = myInstance.application ?? myInstance.applicationName;
9103
- const myApp = await this.glueController.getApplication(myInstanceApplicationName);
9131
+ const myApp = await this.glueController.getApplication({ name: myInstanceApplicationName, includeDefinition: true });
9104
9132
  if (myApp) {
9105
9133
  return { appId: myApp.name, instanceId: myInstance.instance };
9106
9134
  }
@@ -9114,40 +9142,43 @@ class ApplicationsController {
9114
9142
  };
9115
9143
  }
9116
9144
  async parseGlueAppToAppMetadata(app, instance) {
9117
- const appMetadata = await this.getBaseGlueAppToAppMetadata(app);
9145
+ const inBrowserNamespace = this.glueController.isRunningInBrowser();
9146
+ const appMetadata = inBrowserNamespace
9147
+ ? await this.getBaseGlueAppToAppMetadataInBrowser(app)
9148
+ : await this.getBaseGlueAppToAppMetadataInDesktop(app);
9118
9149
  if (!instance) {
9119
9150
  return appMetadata;
9120
9151
  }
9121
- return this.addInstanceMetadataToAppMetadata(appMetadata, instance);
9152
+ const instanceData = {
9153
+ instanceId: instance.id,
9154
+ instanceMetadata: this.isApplicationInstance(instance) ? instance.interopInstance : instance.agm
9155
+ };
9156
+ return { ...appMetadata, ...instanceData };
9122
9157
  }
9123
- async getBaseGlueAppToAppMetadata(app) {
9124
- const inBrowserNamespace = this.glueController.isRunningInBrowser();
9125
- const appConfiguration = inBrowserNamespace
9126
- ? app.userProperties
9127
- : await app.getConfiguration();
9128
- const icon = inBrowserNamespace
9129
- ? app.icon
9130
- : (await app.getConfiguration()).icon;
9131
- const desktopScreenshots = appConfiguration.customProperties?.screenshots ?? appConfiguration.userProperties?.screenshots;
9132
- const screenshots = inBrowserNamespace
9133
- ? appConfiguration.screenshots
9134
- : desktopScreenshots;
9158
+ async getBaseGlueAppToAppMetadataInDesktop(app) {
9159
+ const appConfiguration = await this.glueController.getIoCDAppConfiguration(app);
9160
+ const screenshots = appConfiguration.customProperties?.screenshots ?? appConfiguration.userProperties?.screenshots;
9135
9161
  return {
9136
- appId: app.name,
9137
- name: app.name,
9138
- version: app.version,
9162
+ appId: appConfiguration.name,
9163
+ name: appConfiguration.name,
9164
+ version: appConfiguration.version,
9139
9165
  description: appConfiguration.description,
9140
- title: app.title,
9141
- icons: icon ? [{ src: icon }] : [],
9166
+ title: appConfiguration.title,
9167
+ icons: appConfiguration.icon ? [{ src: appConfiguration.icon }] : [],
9142
9168
  tooltip: appConfiguration.tooltip,
9143
9169
  screenshots
9144
9170
  };
9145
9171
  }
9146
- addInstanceMetadataToAppMetadata(appMetadata, instance) {
9172
+ async getBaseGlueAppToAppMetadataInBrowser(app) {
9147
9173
  return {
9148
- ...appMetadata,
9149
- instanceId: instance.id,
9150
- instanceMetadata: this.isApplicationInstance(instance) ? instance.interopInstance : instance.agm
9174
+ appId: app.name,
9175
+ name: app.name,
9176
+ version: app.version,
9177
+ description: app.userProperties.description,
9178
+ title: app.title,
9179
+ icons: app.icon ? [{ src: app.icon }] : [],
9180
+ tooltip: app.userProperties.tooltip,
9181
+ screenshots: app.userProperties.screenshots
9151
9182
  };
9152
9183
  }
9153
9184
  isApplicationInstance(instance) {
@@ -9156,7 +9187,7 @@ class ApplicationsController {
9156
9187
  async openAppWithContext(app, context) {
9157
9188
  const guid = nanoid();
9158
9189
  const startContext = this.buildStartContext(context, guid);
9159
- const wrappedPromise = this.createContextListenerWrappedPromise(app);
9190
+ const wrappedPromise = this.createContextListenerWrappedPromise(app.name);
9160
9191
  this.appsStateStore.addOpenAppPromise(guid, wrappedPromise);
9161
9192
  try {
9162
9193
  const glueInst = await this.glueController.startApplication({
@@ -9190,15 +9221,16 @@ class ApplicationsController {
9190
9221
  }
9191
9222
  };
9192
9223
  }
9193
- createContextListenerWrappedPromise(app) {
9224
+ createContextListenerWrappedPromise(appName) {
9194
9225
  let resolve = () => { };
9195
9226
  let reject = () => { };
9227
+ const timeoutMessage = `Timeout of ${this.defaultContextListenerInvokedPromiseTimeout}ms hit waiting for application with appId: ${appName} to register context listener`;
9196
9228
  const promise = promisePlus(() => {
9197
9229
  return new Promise((res, rej) => {
9198
9230
  resolve = res;
9199
9231
  reject = rej;
9200
9232
  });
9201
- }, this.defaultContextListenerInvokedPromiseTimeout, `Timeout of ${this.defaultContextListenerInvokedPromiseTimeout}ms hit waiting for application with appId: ${app.name} to register context listener`);
9233
+ }, this.defaultContextListenerInvokedPromiseTimeout, timeoutMessage);
9202
9234
  return { promise, resolve, reject };
9203
9235
  }
9204
9236
  }
@@ -10056,12 +10088,12 @@ class ChannelsBaseController {
10056
10088
  async leave(commandId, options) {
10057
10089
  await this.initDonePromise;
10058
10090
  this.logger?.info(`[${commandId}] - leave() invoked with options: ${JSON.stringify(options)}`);
10059
- if (!options?.channelId) {
10091
+ if (!options?.channel) {
10060
10092
  this.logger?.info(`[${commandId}] - leaving all channels`);
10061
10093
  return this.glueController.leaveChannel();
10062
10094
  }
10063
10095
  const allIoChannels = await this.glueController.listAllChannels();
10064
- const ioChannelToLeave = allIoChannels.find((ch) => ch.meta.fdc3?.id === options.channelId);
10096
+ const ioChannelToLeave = allIoChannels.find((ch) => ch.meta.fdc3?.id === options.channel);
10065
10097
  if (!ioChannelToLeave) {
10066
10098
  throw new Error(ChannelError.NoChannelFound);
10067
10099
  }
@@ -10260,7 +10292,11 @@ class LegacyDataWrappingChannelsController {
10260
10292
  return context.latest_fdc3_type ? this.parser.parseContextsDataToInitialFDC3Data(context) : null;
10261
10293
  }
10262
10294
  const parsedType = this.parser.mapFDC3TypeToChannelsDelimiter(contextType);
10263
- const { data } = await this.glueController.getChannel(ioChannelName);
10295
+ const ioChannel = await this.glueController.getChannel(ioChannelName);
10296
+ if (!ioChannel) {
10297
+ return null;
10298
+ }
10299
+ const { data } = ioChannel;
10264
10300
  return data?.[`fdc3_${parsedType}`]
10265
10301
  ? this.parser.parseContextsDataToInitialFDC3Data({ data, latest_fdc3_type: parsedType })
10266
10302
  : null;
@@ -10309,6 +10345,9 @@ class NewDataWrappingChannelsController {
10309
10345
  throw new Error(ChannelError.AccessDenied);
10310
10346
  }
10311
10347
  const ioChannel = await this.glueController.getChannel(ioChannelName);
10348
+ if (!ioChannel) {
10349
+ return null;
10350
+ }
10312
10351
  if (!contextType) {
10313
10352
  return ioChannel.data.fdc3 || null;
10314
10353
  }
@@ -10535,9 +10574,10 @@ const fdc3Factory = () => {
10535
10574
  return ioc.fdc3;
10536
10575
  };
10537
10576
 
10538
- var version = "2.7.1";
10577
+ var version = "2.8.0";
10539
10578
 
10540
- const globalScope = typeof process !== "undefined" ? process : window;
10579
+ const inNodeEnv = typeof process !== "undefined" && typeof window === "undefined" && typeof document === "undefined";
10580
+ const globalScope = inNodeEnv ? process : window;
10541
10581
  globalScope.fdc3Info = {
10542
10582
  provider: "io.Connect",
10543
10583
  providerVersion: version,