@openfin/node-adapter 41.100.111 → 41.100.112

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.
Files changed (2) hide show
  1. package/out/node-adapter.js +140 -107
  2. package/package.json +2 -2
@@ -73,13 +73,13 @@ async function promiseMapSerial(arr, func) {
73
73
  }
74
74
  promises.promiseMapSerial = promiseMapSerial;
75
75
 
76
- var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
76
+ var __classPrivateFieldSet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
77
77
  if (kind === "m") throw new TypeError("Private method is not writable");
78
78
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
79
79
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
80
80
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
81
81
  };
82
- var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
82
+ var __classPrivateFieldGet$i = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
83
83
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
84
84
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
85
85
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -164,7 +164,7 @@ class EmitterBase extends Base {
164
164
  this.emit = (eventType, payload, ...args) => {
165
165
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
166
166
  };
167
- this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
167
+ this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
168
168
  /**
169
169
  * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
170
170
  * `once` subscription.
@@ -174,14 +174,14 @@ class EmitterBase extends Base {
174
174
  * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
175
175
  */
176
176
  this.cleanUpRemovedListener = (eventType, listener) => {
177
- const deregister = __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
177
+ const deregister = __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
178
178
  if (deregister) {
179
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
179
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
180
180
  emitter.removeListener(eventType, deregister);
181
181
  }
182
182
  };
183
183
  this.getOrCreateEmitter = () => {
184
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
184
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
185
185
  if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
186
186
  emitter.on('removeListener', this.cleanUpRemovedListener);
187
187
  }
@@ -223,8 +223,8 @@ class EmitterBase extends Base {
223
223
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
224
224
  return Promise.resolve();
225
225
  };
226
- __classPrivateFieldSet$g(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
227
- __classPrivateFieldSet$g(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
226
+ __classPrivateFieldSet$h(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
227
+ __classPrivateFieldSet$h(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
228
228
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
229
229
  }
230
230
  /**
@@ -253,7 +253,7 @@ class EmitterBase extends Base {
253
253
  */
254
254
  async once(eventType, listener, options) {
255
255
  const deregister = () => this.deregisterEventListener(eventType);
256
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
256
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
257
257
  await this.registerEventListener(eventType, options, (emitter) => {
258
258
  emitter.once(eventType, deregister);
259
259
  emitter.once(eventType, listener);
@@ -284,7 +284,7 @@ class EmitterBase extends Base {
284
284
  */
285
285
  async prependOnceListener(eventType, listener, options) {
286
286
  const deregister = () => this.deregisterEventListener(eventType);
287
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
287
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
288
288
  await this.registerEventListener(eventType, options, (emitter) => {
289
289
  emitter.prependOnceListener(eventType, listener);
290
290
  emitter.once(eventType, deregister);
@@ -344,7 +344,7 @@ class EmitterBase extends Base {
344
344
  }
345
345
  deleteEmitterIfNothingRegistered(emitter) {
346
346
  if (emitter.eventNames().every((type) => type === 'removeListener')) {
347
- this.wire.eventAggregator.delete(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
347
+ this.wire.eventAggregator.delete(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
348
348
  }
349
349
  }
350
350
  }
@@ -7431,12 +7431,12 @@ class ChannelError extends Error {
7431
7431
  }
7432
7432
  channelError.ChannelError = ChannelError;
7433
7433
 
7434
- var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7434
+ var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7435
7435
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7436
7436
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7437
7437
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7438
7438
  };
7439
- var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7439
+ var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7440
7440
  if (kind === "m") throw new TypeError("Private method is not writable");
7441
7441
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7442
7442
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -7480,7 +7480,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7480
7480
  static closeChannelByEndpointId(id) {
7481
7481
  const channel = channelClientsByEndpointId.get(id);
7482
7482
  if (channel) {
7483
- __classPrivateFieldGet$g(channel, _ChannelClient_close, "f").call(channel);
7483
+ __classPrivateFieldGet$h(channel, _ChannelClient_close, "f").call(channel);
7484
7484
  }
7485
7485
  }
7486
7486
  /**
@@ -7491,7 +7491,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7491
7491
  for (const channelClient of channelClientsByEndpointId.values()) {
7492
7492
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
7493
7493
  channelClient.disconnectListener(eventPayload);
7494
- __classPrivateFieldGet$g(channelClient, _ChannelClient_close, "f").call(channelClient);
7494
+ __classPrivateFieldGet$h(channelClient, _ChannelClient_close, "f").call(channelClient);
7495
7495
  }
7496
7496
  }
7497
7497
  }
@@ -7506,12 +7506,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
7506
7506
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
7507
7507
  _ChannelClient_close.set(this, () => {
7508
7508
  channelClientsByEndpointId.delete(this.endpointId);
7509
- __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").close();
7509
+ __classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").close();
7510
7510
  });
7511
- __classPrivateFieldSet$f(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
7511
+ __classPrivateFieldSet$g(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
7512
7512
  this.disconnectListener = () => undefined;
7513
7513
  this.endpointId = routingInfo.endpointId;
7514
- __classPrivateFieldSet$f(this, _ChannelClient_strategy, strategy, "f");
7514
+ __classPrivateFieldSet$g(this, _ChannelClient_strategy, strategy, "f");
7515
7515
  channelClientsByEndpointId.set(this.endpointId, this);
7516
7516
  strategy.receive(this.processAction);
7517
7517
  }
@@ -7519,7 +7519,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7519
7519
  * a read-only provider identity
7520
7520
  */
7521
7521
  get providerIdentity() {
7522
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
7522
+ const protectedObj = __classPrivateFieldGet$h(this, _ChannelClient_protectedObj, "f");
7523
7523
  return protectedObj.providerIdentity;
7524
7524
  }
7525
7525
  /**
@@ -7548,9 +7548,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
7548
7548
  * ```
7549
7549
  */
7550
7550
  async dispatch(action, payload) {
7551
- if (__classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
7551
+ if (__classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
7552
7552
  const callSites = transport_errors_1$3.RuntimeError.getCallSite();
7553
- return __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
7553
+ return __classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
7554
7554
  throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
7555
7555
  });
7556
7556
  }
@@ -7602,10 +7602,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
7602
7602
  */
7603
7603
  async disconnect() {
7604
7604
  await this.sendDisconnectAction();
7605
- __classPrivateFieldGet$g(this, _ChannelClient_close, "f").call(this);
7605
+ __classPrivateFieldGet$h(this, _ChannelClient_close, "f").call(this);
7606
7606
  }
7607
7607
  async sendDisconnectAction() {
7608
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
7608
+ const protectedObj = __classPrivateFieldGet$h(this, _ChannelClient_protectedObj, "f");
7609
7609
  await protectedObj.close();
7610
7610
  }
7611
7611
  /**
@@ -7638,13 +7638,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
7638
7638
 
7639
7639
  var strategy$3 = {};
7640
7640
 
7641
- var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7641
+ var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7642
7642
  if (kind === "m") throw new TypeError("Private method is not writable");
7643
7643
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7644
7644
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
7645
7645
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7646
7646
  };
7647
- var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7647
+ var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7648
7648
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7649
7649
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7650
7650
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7669,7 +7669,7 @@ class ClassicStrategy {
7669
7669
  // connection problems occur
7670
7670
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
7671
7671
  this.send = async (endpointId, action, payload) => {
7672
- const to = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7672
+ const to = __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7673
7673
  if (!to) {
7674
7674
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
7675
7675
  }
@@ -7681,13 +7681,13 @@ class ClassicStrategy {
7681
7681
  }
7682
7682
  delete cleanId.isLocalEndpointId;
7683
7683
  // grab the promise before awaiting it to save in our pending messages map
7684
- const p = __classPrivateFieldGet$f(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
7684
+ const p = __classPrivateFieldGet$g(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
7685
7685
  ...cleanId,
7686
7686
  providerIdentity: this.providerIdentity,
7687
7687
  action,
7688
7688
  payload
7689
7689
  });
7690
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
7690
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
7691
7691
  const raw = await p
7692
7692
  .catch((error) => {
7693
7693
  if ('cause' in error) {
@@ -7697,16 +7697,16 @@ class ClassicStrategy {
7697
7697
  })
7698
7698
  .finally(() => {
7699
7699
  // clean up the pending promise
7700
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
7700
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
7701
7701
  });
7702
7702
  return raw.payload.data.result;
7703
7703
  };
7704
7704
  this.close = async () => {
7705
7705
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
7706
- [...__classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
7707
- __classPrivateFieldSet$e(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
7706
+ [...__classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
7707
+ __classPrivateFieldSet$f(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
7708
7708
  };
7709
- __classPrivateFieldSet$e(this, _ClassicStrategy_wire, wire, "f");
7709
+ __classPrivateFieldSet$f(this, _ClassicStrategy_wire, wire, "f");
7710
7710
  }
7711
7711
  onEndpointDisconnect(endpointId, listener) {
7712
7712
  // Never fires for 'classic'.
@@ -7715,20 +7715,20 @@ class ClassicStrategy {
7715
7715
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
7716
7716
  }
7717
7717
  async closeEndpoint(endpointId) {
7718
- const id = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7719
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
7720
- const pendingSet = __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
7718
+ const id = __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7719
+ __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
7720
+ const pendingSet = __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
7721
7721
  pendingSet?.forEach((p) => {
7722
7722
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
7723
7723
  p.cancel(new Error(errorMsg));
7724
7724
  });
7725
7725
  }
7726
7726
  isEndpointConnected(endpointId) {
7727
- return __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
7727
+ return __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
7728
7728
  }
7729
7729
  addEndpoint(endpointId, payload) {
7730
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
7731
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
7730
+ __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
7731
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
7732
7732
  }
7733
7733
  isValidEndpointPayload(payload) {
7734
7734
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -7763,12 +7763,12 @@ function errorToPOJO(error) {
7763
7763
  }
7764
7764
  errors.errorToPOJO = errorToPOJO;
7765
7765
 
7766
- var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7766
+ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7767
7767
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7768
7768
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7769
7769
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7770
7770
  };
7771
- var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7771
+ var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7772
7772
  if (kind === "m") throw new TypeError("Private method is not writable");
7773
7773
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7774
7774
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -7803,8 +7803,8 @@ class RTCEndpoint {
7803
7803
  if (this.rtc.rtcClient.connectionState !== 'connected') {
7804
7804
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
7805
7805
  this.close();
7806
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
7807
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
7806
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
7807
+ __classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f").call(this);
7808
7808
  }
7809
7809
  }
7810
7810
  };
@@ -7852,9 +7852,9 @@ class RTCEndpoint {
7852
7852
  data = new TextDecoder().decode(e.data);
7853
7853
  }
7854
7854
  const { messageId, action, payload } = JSON.parse(data);
7855
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
7855
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f")) {
7856
7856
  try {
7857
- const res = await __classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
7857
+ const res = await __classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
7858
7858
  this.rtc.channels.response.send(JSON.stringify({
7859
7859
  messageId,
7860
7860
  payload: res,
@@ -7888,25 +7888,25 @@ class RTCEndpoint {
7888
7888
  datachannel.onclose = (e) => {
7889
7889
  [...this.responseMap.values()].forEach((promise) => promise.reject(new Error('RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.')));
7890
7890
  this.close();
7891
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
7892
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
7891
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
7892
+ __classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f").call(this);
7893
7893
  }
7894
7894
  };
7895
7895
  });
7896
7896
  }
7897
7897
  onDisconnect(listener) {
7898
- if (!__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
7899
- __classPrivateFieldSet$d(this, _RTCEndpoint_disconnectListener, listener, "f");
7898
+ if (!__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
7899
+ __classPrivateFieldSet$e(this, _RTCEndpoint_disconnectListener, listener, "f");
7900
7900
  }
7901
7901
  else {
7902
7902
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
7903
7903
  }
7904
7904
  }
7905
7905
  receive(listener) {
7906
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
7906
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f")) {
7907
7907
  throw new Error('You have already set a listener for this RTC Endpoint.');
7908
7908
  }
7909
- __classPrivateFieldSet$d(this, _RTCEndpoint_processAction, listener, "f");
7909
+ __classPrivateFieldSet$e(this, _RTCEndpoint_processAction, listener, "f");
7910
7910
  }
7911
7911
  get connected() {
7912
7912
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -7917,12 +7917,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
7917
7917
 
7918
7918
  var strategy$1 = {};
7919
7919
 
7920
- var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7920
+ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7921
7921
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7922
7922
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7923
7923
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7924
7924
  };
7925
- var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7925
+ var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7926
7926
  if (kind === "m") throw new TypeError("Private method is not writable");
7927
7927
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7928
7928
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -7943,11 +7943,11 @@ class EndpointStrategy {
7943
7943
  return this.getEndpointById(endpointId).send(action, payload);
7944
7944
  };
7945
7945
  this.close = async () => {
7946
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
7947
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
7948
- __classPrivateFieldSet$c(this, _EndpointStrategy_endpointMap, new Map(), "f");
7946
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f")) {
7947
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
7948
+ __classPrivateFieldSet$d(this, _EndpointStrategy_endpointMap, new Map(), "f");
7949
7949
  }
7950
- __classPrivateFieldSet$c(this, _EndpointStrategy_connected, false, "f");
7950
+ __classPrivateFieldSet$d(this, _EndpointStrategy_connected, false, "f");
7951
7951
  };
7952
7952
  this.isValidEndpointPayload = validateEndpoint;
7953
7953
  }
@@ -7955,39 +7955,39 @@ class EndpointStrategy {
7955
7955
  this.getEndpointById(endpointId).onDisconnect(listener);
7956
7956
  }
7957
7957
  receive(listener) {
7958
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
7958
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")) {
7959
7959
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
7960
7960
  }
7961
- __classPrivateFieldSet$c(this, _EndpointStrategy_processAction, listener, "f");
7961
+ __classPrivateFieldSet$d(this, _EndpointStrategy_processAction, listener, "f");
7962
7962
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7963
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")));
7963
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")));
7964
7964
  }
7965
7965
  getEndpointById(endpointId) {
7966
- const endpoint = __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
7966
+ const endpoint = __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
7967
7967
  if (!endpoint) {
7968
7968
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
7969
7969
  }
7970
7970
  return endpoint;
7971
7971
  }
7972
7972
  get connected() {
7973
- return __classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f");
7973
+ return __classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f");
7974
7974
  }
7975
7975
  isEndpointConnected(endpointId) {
7976
- return __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
7976
+ return __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
7977
7977
  }
7978
7978
  addEndpoint(endpointId, payload) {
7979
- if (!__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
7979
+ if (!__classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f")) {
7980
7980
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
7981
7981
  return;
7982
7982
  }
7983
7983
  const clientStrat = new this.EndpointType(payload);
7984
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
7985
- clientStrat.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f"));
7984
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")) {
7985
+ clientStrat.receive(__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f"));
7986
7986
  }
7987
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
7987
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
7988
7988
  }
7989
7989
  async closeEndpoint(endpointId) {
7990
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
7990
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
7991
7991
  }
7992
7992
  }
7993
7993
  strategy$1.EndpointStrategy = EndpointStrategy;
@@ -8169,12 +8169,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
8169
8169
  }
8170
8170
  runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
8171
8171
 
8172
- var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8172
+ var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8173
8173
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8174
8174
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
8175
8175
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
8176
8176
  };
8177
- var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8177
+ var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8178
8178
  if (kind === "m") throw new TypeError("Private method is not writable");
8179
8179
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8180
8180
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -8218,19 +8218,19 @@ class ChannelProvider extends channel_1.ChannelBase {
8218
8218
  * a read-only array containing all the identities of connecting clients.
8219
8219
  */
8220
8220
  get connections() {
8221
- return [...__classPrivateFieldGet$c(this, _ChannelProvider_connections, "f")];
8221
+ return [...__classPrivateFieldGet$d(this, _ChannelProvider_connections, "f")];
8222
8222
  }
8223
8223
  static handleClientDisconnection(channel, payload) {
8224
8224
  if (payload?.endpointId) {
8225
8225
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
8226
- __classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
8226
+ __classPrivateFieldGet$d(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
8227
8227
  }
8228
8228
  else {
8229
8229
  // this is here to support older runtimes that did not have endpointId
8230
8230
  const multipleRemoves = channel.connections.filter((identity) => {
8231
8231
  return identity.uuid === payload.uuid && identity.name === payload.name;
8232
8232
  });
8233
- multipleRemoves.forEach(__classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f"));
8233
+ multipleRemoves.forEach(__classPrivateFieldGet$d(channel, _ChannelProvider_removeEndpoint, "f"));
8234
8234
  }
8235
8235
  channel.disconnectListener(payload);
8236
8236
  }
@@ -8247,8 +8247,8 @@ class ChannelProvider extends channel_1.ChannelBase {
8247
8247
  _ChannelProvider_strategy.set(this, void 0);
8248
8248
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
8249
8249
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
8250
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
8251
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, remainingConnections, "f");
8250
+ __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
8251
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, remainingConnections, "f");
8252
8252
  });
8253
8253
  // Must be bound.
8254
8254
  this.processAction = async (action, payload, senderIdentity) => {
@@ -8262,17 +8262,17 @@ class ChannelProvider extends channel_1.ChannelBase {
8262
8262
  return super.processAction(action, payload, senderIdentity);
8263
8263
  };
8264
8264
  _ChannelProvider_close.set(this, () => {
8265
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").close();
8265
+ __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").close();
8266
8266
  const remove = ChannelProvider.removalMap.get(this);
8267
8267
  if (remove) {
8268
8268
  remove();
8269
8269
  }
8270
8270
  });
8271
- __classPrivateFieldSet$b(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
8271
+ __classPrivateFieldSet$c(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
8272
8272
  this.connectListener = () => undefined;
8273
8273
  this.disconnectListener = () => undefined;
8274
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
8275
- __classPrivateFieldSet$b(this, _ChannelProvider_strategy, strategy, "f");
8274
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, [], "f");
8275
+ __classPrivateFieldSet$c(this, _ChannelProvider_strategy, strategy, "f");
8276
8276
  strategy.receive(this.processAction);
8277
8277
  }
8278
8278
  /**
@@ -8303,16 +8303,16 @@ class ChannelProvider extends channel_1.ChannelBase {
8303
8303
  */
8304
8304
  dispatch(to, action, payload) {
8305
8305
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
8306
- if (endpointId && __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
8306
+ if (endpointId && __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
8307
8307
  const callSites = transport_errors_1$2.RuntimeError.getCallSite();
8308
- return __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
8308
+ return __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
8309
8309
  throw new channel_error_1.ChannelError(e, action, payload, callSites);
8310
8310
  });
8311
8311
  }
8312
8312
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
8313
8313
  }
8314
8314
  async processConnection(senderId, payload) {
8315
- __classPrivateFieldGet$c(this, _ChannelProvider_connections, "f").push(senderId);
8315
+ __classPrivateFieldGet$d(this, _ChannelProvider_connections, "f").push(senderId);
8316
8316
  return this.connectListener(senderId, payload);
8317
8317
  }
8318
8318
  /**
@@ -8335,7 +8335,7 @@ class ChannelProvider extends channel_1.ChannelBase {
8335
8335
  * ```
8336
8336
  */
8337
8337
  publish(action, payload) {
8338
- return this.connections.map((to) => __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
8338
+ return this.connections.map((to) => __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
8339
8339
  }
8340
8340
  /**
8341
8341
  * Register a listener that is called on every new client connection.
@@ -8409,11 +8409,11 @@ class ChannelProvider extends channel_1.ChannelBase {
8409
8409
  * ```
8410
8410
  */
8411
8411
  async destroy() {
8412
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
8412
+ const protectedObj = __classPrivateFieldGet$d(this, _ChannelProvider_protectedObj, "f");
8413
8413
  protectedObj.providerIdentity;
8414
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
8414
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, [], "f");
8415
8415
  await protectedObj.close();
8416
- __classPrivateFieldGet$c(this, _ChannelProvider_close, "f").call(this);
8416
+ __classPrivateFieldGet$d(this, _ChannelProvider_close, "f").call(this);
8417
8417
  }
8418
8418
  /**
8419
8419
  * Returns an array with info on every Client connected to the Provider
@@ -8483,7 +8483,7 @@ class ChannelProvider extends channel_1.ChannelBase {
8483
8483
  getEndpointIdForOpenFinId(clientIdentity, action) {
8484
8484
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
8485
8485
  if (matchingConnections.length >= 2) {
8486
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
8486
+ const protectedObj = __classPrivateFieldGet$d(this, _ChannelProvider_protectedObj, "f");
8487
8487
  const { uuid, name } = clientIdentity;
8488
8488
  const providerUuid = protectedObj?.providerIdentity.uuid;
8489
8489
  const providerName = protectedObj?.providerIdentity.name;
@@ -8695,13 +8695,13 @@ class CombinedStrategy {
8695
8695
  }
8696
8696
  strategy.default = CombinedStrategy;
8697
8697
 
8698
- var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8698
+ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8699
8699
  if (kind === "m") throw new TypeError("Private method is not writable");
8700
8700
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8701
8701
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
8702
8702
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
8703
8703
  };
8704
- var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8704
+ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8705
8705
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8706
8706
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
8707
8707
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -8750,8 +8750,8 @@ class ConnectionManager extends base_1$i.Base {
8750
8750
  };
8751
8751
  this.providerMap = new Map();
8752
8752
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
8753
- __classPrivateFieldSet$a(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
8754
- __classPrivateFieldSet$a(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
8753
+ __classPrivateFieldSet$b(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
8754
+ __classPrivateFieldSet$b(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
8755
8755
  wire.registerMessageHandler(this.onmessage.bind(this));
8756
8756
  }
8757
8757
  createProvider(options, providerIdentity) {
@@ -8762,7 +8762,7 @@ class ConnectionManager extends base_1$i.Base {
8762
8762
  case 'rtc':
8763
8763
  return new strategy_2.RTCStrategy();
8764
8764
  case 'classic':
8765
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"),
8765
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f"),
8766
8766
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
8767
8767
  providerIdentity.channelId, providerIdentity);
8768
8768
  default:
@@ -8798,7 +8798,7 @@ class ConnectionManager extends base_1$i.Base {
8798
8798
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
8799
8799
  switch (type) {
8800
8800
  case 'rtc': {
8801
- const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
8801
+ const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
8802
8802
  rtcPacket = { rtcClient, channels, channelsOpened };
8803
8803
  return {
8804
8804
  type: 'rtc',
@@ -8825,18 +8825,18 @@ class ConnectionManager extends base_1$i.Base {
8825
8825
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
8826
8826
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
8827
8827
  // clients that are in the same context as the newly-connected client.
8828
- __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
8828
+ __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
8829
8829
  }
8830
8830
  const answer = routingInfo.answer ?? {
8831
8831
  supportedProtocols: [{ type: 'classic', version: 1 }]
8832
8832
  };
8833
8833
  const createStrategyFromAnswer = async (protocol) => {
8834
8834
  if (protocol.type === 'rtc' && rtcPacket) {
8835
- await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
8835
+ await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
8836
8836
  return new strategy_2.RTCStrategy();
8837
8837
  }
8838
8838
  if (protocol.type === 'classic') {
8839
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
8839
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
8840
8840
  }
8841
8841
  return null;
8842
8842
  };
@@ -8904,7 +8904,7 @@ class ConnectionManager extends base_1$i.Base {
8904
8904
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
8905
8905
  const answer = await accumP;
8906
8906
  if (protocolToUse.type === 'rtc') {
8907
- const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
8907
+ const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
8908
8908
  answer.supportedProtocols.push({
8909
8909
  type: 'rtc',
8910
8910
  version: strategy_2.RTCInfo.version,
@@ -8952,13 +8952,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
8952
8952
  *
8953
8953
  * @packageDocumentation
8954
8954
  */
8955
- var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8955
+ var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8956
8956
  if (kind === "m") throw new TypeError("Private method is not writable");
8957
8957
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8958
8958
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
8959
8959
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
8960
8960
  };
8961
- var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8961
+ var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8962
8962
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8963
8963
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
8964
8964
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -9015,11 +9015,11 @@ class Channel extends base_1$h.EmitterBase {
9015
9015
  client_1.ChannelClient.handleProviderDisconnect(eventPayload);
9016
9016
  }),
9017
9017
  this.on('connected', (...args) => {
9018
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").emit('connected', ...args);
9018
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").emit('connected', ...args);
9019
9019
  })
9020
9020
  ]).catch(() => new Error('error setting up channel connection listeners'));
9021
9021
  }));
9022
- __classPrivateFieldSet$9(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
9022
+ __classPrivateFieldSet$a(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
9023
9023
  }
9024
9024
  /**
9025
9025
  *
@@ -9094,7 +9094,7 @@ class Channel extends base_1$h.EmitterBase {
9094
9094
  resolve(true);
9095
9095
  }
9096
9096
  };
9097
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
9097
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
9098
9098
  });
9099
9099
  try {
9100
9100
  if (retryInfo.count > 0) {
@@ -9126,7 +9126,7 @@ class Channel extends base_1$h.EmitterBase {
9126
9126
  finally {
9127
9127
  retryInfo.count += 1;
9128
9128
  // in case of other errors, remove our listener
9129
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
9129
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
9130
9130
  }
9131
9131
  } while (shouldWait); // If we're waiting we retry the above loop
9132
9132
  // Should wait was false, no channel was found.
@@ -9185,12 +9185,12 @@ class Channel extends base_1$h.EmitterBase {
9185
9185
  async connect(channelName, options = {}) {
9186
9186
  // Make sure we don't connect before listeners are set up
9187
9187
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
9188
- await __classPrivateFieldGet$a(this, _Channel_readyToConnect, "f").getValue();
9188
+ await __classPrivateFieldGet$b(this, _Channel_readyToConnect, "f").getValue();
9189
9189
  if (!channelName || typeof channelName !== 'string') {
9190
9190
  throw new Error('Please provide a channelName string to connect to a channel.');
9191
9191
  }
9192
9192
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
9193
- const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientOffer(opts);
9193
+ const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createClientOffer(opts);
9194
9194
  let connectionUrl;
9195
9195
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
9196
9196
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -9202,7 +9202,7 @@ class Channel extends base_1$h.EmitterBase {
9202
9202
  connectionUrl
9203
9203
  };
9204
9204
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
9205
- const strategy = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
9205
+ const strategy = await __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
9206
9206
  const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
9207
9207
  // It is the client's responsibility to handle endpoint disconnection to the provider.
9208
9208
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -9271,7 +9271,7 @@ class Channel extends base_1$h.EmitterBase {
9271
9271
  throw new Error('Please provide a channelName to create a channel');
9272
9272
  }
9273
9273
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
9274
- const channel = __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
9274
+ const channel = __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
9275
9275
  // TODO: fix typing (internal)
9276
9276
  // @ts-expect-error
9277
9277
  this.on('client-disconnected', (eventPayload) => {
@@ -9507,14 +9507,32 @@ var clipboard = {};
9507
9507
  *
9508
9508
  * @packageDocumentation
9509
9509
  */
9510
+ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9511
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9512
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
9513
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
9514
+ };
9515
+ var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9516
+ if (kind === "m") throw new TypeError("Private method is not writable");
9517
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9518
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
9519
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9520
+ };
9521
+ var _Clipboard_instances, _Clipboard_securedApiWarningCount, _Clipboard_warnSecuredApi;
9510
9522
  Object.defineProperty(clipboard, "__esModule", { value: true });
9511
9523
  clipboard.Clipboard = void 0;
9512
9524
  const base_1$f = base;
9525
+ const maxSecuredApiWarnings = 10;
9513
9526
  /**
9514
9527
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
9515
9528
  *
9516
9529
  */
9517
9530
  class Clipboard extends base_1$f.Base {
9531
+ constructor() {
9532
+ super(...arguments);
9533
+ _Clipboard_instances.add(this);
9534
+ _Clipboard_securedApiWarningCount.set(this, 0);
9535
+ }
9518
9536
  /**
9519
9537
  * Writes data into the clipboard as plain text
9520
9538
  * @param writeObj The object for writing data into the clipboard
@@ -9527,6 +9545,7 @@ class Clipboard extends base_1$f.Base {
9527
9545
  * ```
9528
9546
  */
9529
9547
  async writeText(writeObj) {
9548
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.writeText');
9530
9549
  await this.wire.sendAction('clipboard-write-text', writeObj);
9531
9550
  }
9532
9551
  /**
@@ -9539,6 +9558,7 @@ class Clipboard extends base_1$f.Base {
9539
9558
  * ```
9540
9559
  */
9541
9560
  async readText(type) {
9561
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.readText');
9542
9562
  // NOTE: When we start supporting linux, we could detect the OS and choose 'selection' automatically for the user
9543
9563
  const { payload } = await this.wire.sendAction('clipboard-read-text', { type });
9544
9564
  return payload.data;
@@ -9556,6 +9576,7 @@ class Clipboard extends base_1$f.Base {
9556
9576
  * ```
9557
9577
  */
9558
9578
  async writeImage(writeRequest) {
9579
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.writeImage');
9559
9580
  await this.wire.sendAction('clipboard-write-image', writeRequest);
9560
9581
  }
9561
9582
  /**
@@ -9591,6 +9612,7 @@ class Clipboard extends base_1$f.Base {
9591
9612
  * ```
9592
9613
  */
9593
9614
  async readImage(readRequest = { format: 'dataURL' }) {
9615
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.readImage');
9594
9616
  const { payload } = await this.wire.sendAction('clipboard-read-image', readRequest);
9595
9617
  return payload.data;
9596
9618
  }
@@ -9606,6 +9628,7 @@ class Clipboard extends base_1$f.Base {
9606
9628
  * ```
9607
9629
  */
9608
9630
  async writeHtml(writeObj) {
9631
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.writeHtml');
9609
9632
  await this.wire.sendAction('clipboard-write-html', writeObj);
9610
9633
  }
9611
9634
  /**
@@ -9618,6 +9641,7 @@ class Clipboard extends base_1$f.Base {
9618
9641
  * ```
9619
9642
  */
9620
9643
  async readHtml(type) {
9644
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.readHtml');
9621
9645
  const { payload } = await this.wire.sendAction('clipboard-read-html', { type });
9622
9646
  return payload.data;
9623
9647
  }
@@ -9633,6 +9657,7 @@ class Clipboard extends base_1$f.Base {
9633
9657
  * ```
9634
9658
  */
9635
9659
  async writeRtf(writeObj) {
9660
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.writeRtf');
9636
9661
  await this.wire.sendAction('clipboard-write-rtf', writeObj);
9637
9662
  }
9638
9663
  /**
@@ -9653,6 +9678,7 @@ class Clipboard extends base_1$f.Base {
9653
9678
  * ```
9654
9679
  */
9655
9680
  async readRtf(type) {
9681
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.readRtf');
9656
9682
  const { payload } = await this.wire.sendAction('clipboard-read-rtf', { type });
9657
9683
  return payload.data;
9658
9684
  }
@@ -9676,6 +9702,7 @@ class Clipboard extends base_1$f.Base {
9676
9702
  * ```
9677
9703
  */
9678
9704
  async write(writeObj) {
9705
+ __classPrivateFieldGet$a(this, _Clipboard_instances, "m", _Clipboard_warnSecuredApi).call(this, 'Clipboard.write');
9679
9706
  await this.wire.sendAction('clipboard-write', writeObj);
9680
9707
  }
9681
9708
  /**
@@ -9693,6 +9720,12 @@ class Clipboard extends base_1$f.Base {
9693
9720
  }
9694
9721
  }
9695
9722
  clipboard.Clipboard = Clipboard;
9723
+ _Clipboard_securedApiWarningCount = new WeakMap(), _Clipboard_instances = new WeakSet(), _Clipboard_warnSecuredApi = async function _Clipboard_warnSecuredApi(apiName) {
9724
+ if (__classPrivateFieldGet$a(this, _Clipboard_securedApiWarningCount, "f") <= maxSecuredApiWarnings) {
9725
+ console.warn(`Clipboard APIs will be secure-by-default starting in v42. To continue using this API without interruption, make sure to grant explicit API permissions for ${apiName} in the Desktop Owner Settings, and in the Application, Window, View, or Domain Settings. For more information, see https://resources.here.io/docs/core/develop/security/api-security/`);
9726
+ __classPrivateFieldSet$9(this, _Clipboard_securedApiWarningCount, __classPrivateFieldGet$a(this, _Clipboard_securedApiWarningCount, "f") + 1, "f");
9727
+ }
9728
+ };
9696
9729
 
9697
9730
  var externalApplication = {};
9698
9731
 
@@ -17757,7 +17790,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
17757
17790
  };
17758
17791
  }
17759
17792
  getAdapterVersionSync() {
17760
- return "41.100.111";
17793
+ return "41.100.112";
17761
17794
  }
17762
17795
  observeBounds(element, onChange) {
17763
17796
  throw new Error('Method not implemented.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "41.100.111",
3
+ "version": "41.100.112",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -24,7 +24,7 @@
24
24
  "author": "OpenFin",
25
25
  "dependencies": {
26
26
  "@types/node": "^20.14.2",
27
- "@openfin/core": "41.100.111",
27
+ "@openfin/core": "41.100.112",
28
28
  "lodash": "^4.17.21",
29
29
  "ws": "^7.3.0"
30
30
  }