@openfin/remote-adapter 45.100.51 → 45.100.55

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/remote-adapter.js +162 -239
  2. package/package.json +2 -2
@@ -2491,9 +2491,7 @@ class ViewModule extends Base {
2491
2491
  * @experimental
2492
2492
  */
2493
2493
  async wrap(identity) {
2494
- this.wire.sendAction('view-wrap').catch((e) => {
2495
- // we do not want to expose this error, just continue if this analytics-only call fails
2496
- });
2494
+ this.wire.recordAnalytic('view-wrap');
2497
2495
  const errorMsg = validateIdentity(identity);
2498
2496
  if (errorMsg) {
2499
2497
  throw new Error(errorMsg);
@@ -2515,9 +2513,7 @@ class ViewModule extends Base {
2515
2513
  * @experimental
2516
2514
  */
2517
2515
  wrapSync(identity) {
2518
- this.wire.sendAction('view-wrap-sync').catch((e) => {
2519
- // we do not want to expose this error, just continue if this analytics-only call fails
2520
- });
2516
+ this.wire.recordAnalytic('view-wrap-sync');
2521
2517
  const errorMsg = validateIdentity(identity);
2522
2518
  if (errorMsg) {
2523
2519
  throw new Error(errorMsg);
@@ -2537,9 +2533,7 @@ class ViewModule extends Base {
2537
2533
  * @experimental
2538
2534
  */
2539
2535
  getCurrent() {
2540
- this.wire.sendAction('view-get-current').catch((e) => {
2541
- // we do not want to expose this error, just continue if this analytics-only call fails
2542
- });
2536
+ this.wire.recordAnalytic('view-get-current');
2543
2537
  if (!this.wire.me.isView) {
2544
2538
  throw new Error('You are not in a View context');
2545
2539
  }
@@ -2558,9 +2552,7 @@ class ViewModule extends Base {
2558
2552
  * @experimental
2559
2553
  */
2560
2554
  getCurrentSync() {
2561
- this.wire.sendAction('view-get-current-sync').catch((e) => {
2562
- // we do not want to expose this error, just continue if this analytics-only call fails
2563
- });
2555
+ this.wire.recordAnalytic('view-get-current-sync');
2564
2556
  if (!this.wire.me.isView) {
2565
2557
  throw new Error('You are not in a View context');
2566
2558
  }
@@ -3562,9 +3554,7 @@ class WebContents extends EmitterBase {
3562
3554
  * {@link OpenFin.WebContentsEvents event namespace}.
3563
3555
  */
3564
3556
  async showPopupWindow(options) {
3565
- this.wire.sendAction(`${this.entityType}-show-popup-window`, this.identity).catch(() => {
3566
- // we do not want to expose this error, just continue if this analytics-only call fails
3567
- });
3557
+ this.wire.recordAnalytic(`${this.entityType}-show-popup-window`);
3568
3558
  if (options?.onPopupReady) {
3569
3559
  const readyListener = async ({ popupName }) => {
3570
3560
  try {
@@ -3752,9 +3742,7 @@ class Application extends EmitterBase {
3752
3742
  */
3753
3743
  close(force = false) {
3754
3744
  console.warn('Deprecation Warning: Application.close is deprecated Please use Application.quit');
3755
- this.wire.sendAction('application-close', this.identity).catch((e) => {
3756
- // we do not want to expose this error, just continue if this analytics-only call fails
3757
- });
3745
+ this.wire.recordAnalytic('application-close');
3758
3746
  return this._close(force);
3759
3747
  }
3760
3748
  /**
@@ -3895,9 +3883,7 @@ class Application extends EmitterBase {
3895
3883
  * ```
3896
3884
  */
3897
3885
  getWindow() {
3898
- this.wire.sendAction('application-get-window', this.identity).catch((e) => {
3899
- // we do not want to expose this error, just continue if this analytics-only call fails
3900
- });
3886
+ this.wire.recordAnalytic('application-get-window');
3901
3887
  return Promise.resolve(this.window);
3902
3888
  }
3903
3889
  /**
@@ -3975,9 +3961,7 @@ class Application extends EmitterBase {
3975
3961
  */
3976
3962
  run() {
3977
3963
  console.warn('Deprecation Warning: Application.run is deprecated Please use fin.Application.start');
3978
- this.wire.sendAction('application-run', this.identity).catch((e) => {
3979
- // we do not want to expose this error, just continue if this analytics-only call fails
3980
- });
3964
+ this.wire.recordAnalytic('application-run');
3981
3965
  return this._run();
3982
3966
  }
3983
3967
  _run(opts = {}) {
@@ -4489,9 +4473,7 @@ class ApplicationModule extends Base {
4489
4473
  *
4490
4474
  */
4491
4475
  async wrap(identity) {
4492
- this.wire.sendAction('wrap-application').catch((e) => {
4493
- // we do not want to expose this error, just continue if this analytics-only call fails
4494
- });
4476
+ this.wire.recordAnalytic('wrap-application');
4495
4477
  const errorMsg = validateIdentity(identity);
4496
4478
  if (errorMsg) {
4497
4479
  throw new Error(errorMsg);
@@ -4514,9 +4496,7 @@ class ApplicationModule extends Base {
4514
4496
  *
4515
4497
  */
4516
4498
  wrapSync(identity) {
4517
- this.wire.sendAction('wrap-application-sync').catch((e) => {
4518
- // we do not want to expose this error, just continue if this analytics-only call fails
4519
- });
4499
+ this.wire.recordAnalytic('wrap-application-sync');
4520
4500
  const errorMsg = validateIdentity(identity);
4521
4501
  if (errorMsg) {
4522
4502
  throw new Error(errorMsg);
@@ -4557,9 +4537,7 @@ class ApplicationModule extends Base {
4557
4537
  */
4558
4538
  create(appOptions) {
4559
4539
  console.warn('Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start');
4560
- this.wire.sendAction('application-create').catch((e) => {
4561
- // we do not want to expose this error, just continue if this analytics-only call fails
4562
- });
4540
+ this.wire.recordAnalytic('application-create');
4563
4541
  return this._create(appOptions);
4564
4542
  }
4565
4543
  /**
@@ -4581,9 +4559,7 @@ class ApplicationModule extends Base {
4581
4559
  *
4582
4560
  */
4583
4561
  async start(appOptions) {
4584
- this.wire.sendAction('start-application').catch((e) => {
4585
- // we do not want to expose this error, just continue if this analytics-only call fails
4586
- });
4562
+ this.wire.recordAnalytic('start-application');
4587
4563
  const app = await this._create(appOptions);
4588
4564
  await this.wire.sendAction('run-application', { uuid: appOptions.uuid });
4589
4565
  return app;
@@ -4646,9 +4622,7 @@ class ApplicationModule extends Base {
4646
4622
  * ```
4647
4623
  */
4648
4624
  getCurrent() {
4649
- this.wire.sendAction('get-current-application').catch((e) => {
4650
- // we do not want to expose this error, just continue if this analytics-only call fails
4651
- });
4625
+ this.wire.recordAnalytic('get-current-application');
4652
4626
  return this.wrap({ uuid: this.wire.me.uuid });
4653
4627
  }
4654
4628
  /**
@@ -4671,9 +4645,7 @@ class ApplicationModule extends Base {
4671
4645
  * ```
4672
4646
  */
4673
4647
  getCurrentSync() {
4674
- this.wire.sendAction('get-current-application-sync').catch((e) => {
4675
- // we do not want to expose this error, just continue if this analytics-only call fails
4676
- });
4648
+ this.wire.recordAnalytic('get-current-application-sync');
4677
4649
  return this.wrapSync({ uuid: this.wire.me.uuid });
4678
4650
  }
4679
4651
  /**
@@ -4691,9 +4663,7 @@ class ApplicationModule extends Base {
4691
4663
  * ```
4692
4664
  */
4693
4665
  async startFromManifest(manifestUrl, opts) {
4694
- this.wire.sendAction('application-start-from-manifest').catch((e) => {
4695
- // we do not want to expose this error, just continue if this analytics-only call fails
4696
- });
4666
+ this.wire.recordAnalytic('application-start-from-manifest');
4697
4667
  const app = await this._createFromManifest(manifestUrl);
4698
4668
  // @ts-expect-error using private method without warning.
4699
4669
  await app._run(opts); // eslint-disable-line no-underscore-dangle
@@ -4715,9 +4685,7 @@ class ApplicationModule extends Base {
4715
4685
  */
4716
4686
  createFromManifest(manifestUrl) {
4717
4687
  console.warn('Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest');
4718
- this.wire.sendAction('application-create-from-manifest').catch((e) => {
4719
- // we do not want to expose this error, just continue if this analytics-only call fails
4720
- });
4688
+ this.wire.recordAnalytic('application-create-from-manifest');
4721
4689
  return this._createFromManifest(manifestUrl);
4722
4690
  }
4723
4691
  _createFromManifest(manifestUrl) {
@@ -4780,9 +4748,7 @@ class _Window extends WebContents {
4780
4748
  super(wire, identity, 'window');
4781
4749
  }
4782
4750
  async createWindow(options) {
4783
- this.wire.sendAction('window-create-window').catch((e) => {
4784
- // we do not want to expose this error, just continue if this analytics-only call fails
4785
- });
4751
+ this.wire.recordAnalytic('window-create-window');
4786
4752
  const CONSTRUCTOR_CB_TOPIC = 'fire-constructor-callback';
4787
4753
  const responseSubscription = await promisifySubscription(this, CONSTRUCTOR_CB_TOPIC);
4788
4754
  // set defaults:
@@ -5256,9 +5222,7 @@ class _Window extends WebContents {
5256
5222
  * @experimental
5257
5223
  */
5258
5224
  async getLayout(layoutIdentity) {
5259
- this.wire.sendAction('window-get-layout').catch((e) => {
5260
- // don't expose
5261
- });
5225
+ this.wire.recordAnalytic('window-get-layout');
5262
5226
  const opts = await this.getOptions();
5263
5227
  if (!opts.layout && !opts.layoutSnapshot) {
5264
5228
  throw new Error('Window does not have a Layout');
@@ -5307,9 +5271,7 @@ class _Window extends WebContents {
5307
5271
  * ```
5308
5272
  */
5309
5273
  getParentApplication() {
5310
- this.wire.sendAction('window-get-parent-application').catch((e) => {
5311
- // we do not want to expose this error, just continue if this analytics-only call fails
5312
- });
5274
+ this.wire.recordAnalytic('window-get-parent-application');
5313
5275
  return Promise.resolve(new Application(this.wire, this.identity));
5314
5276
  }
5315
5277
  /**
@@ -5332,9 +5294,7 @@ class _Window extends WebContents {
5332
5294
  * ```
5333
5295
  */
5334
5296
  getParentWindow() {
5335
- this.wire.sendAction('window-get-parent-window').catch((e) => {
5336
- // we do not want to expose this error, just continue if this analytics-only call fails
5337
- });
5297
+ this.wire.recordAnalytic('window-get-parent-window');
5338
5298
  return Promise.resolve(new Application(this.wire, this.identity)).then((app) => app.getWindow());
5339
5299
  }
5340
5300
  /**
@@ -5438,9 +5398,7 @@ class _Window extends WebContents {
5438
5398
  * ```
5439
5399
  */
5440
5400
  getWebWindow() {
5441
- this.wire.sendAction('window-get-web-window').catch((e) => {
5442
- // we do not want to expose this error, just continue if this analytics-only call fails
5443
- });
5401
+ this.wire.recordAnalytic('window-get-web-window');
5444
5402
  return this.wire.environment.getWebWindow(this.identity);
5445
5403
  }
5446
5404
  /**
@@ -5454,9 +5412,7 @@ class _Window extends WebContents {
5454
5412
  * ```
5455
5413
  */
5456
5414
  isMainWindow() {
5457
- this.wire.sendAction('window-is-main-window').catch((e) => {
5458
- // we do not want to expose this error, just continue if this analytics-only call fails
5459
- });
5415
+ this.wire.recordAnalytic('window-is-main-window');
5460
5416
  return this.me.uuid === this.me.name;
5461
5417
  }
5462
5418
  /**
@@ -5978,9 +5934,7 @@ class _Window extends WebContents {
5978
5934
  * ```
5979
5935
  */
5980
5936
  async dispatchPopupResult(data) {
5981
- this.wire.sendAction('window-dispatch-popup-result').catch((e) => {
5982
- // we do not want to expose this error, just continue if this analytics-only call fails
5983
- });
5937
+ this.wire.recordAnalytic('window-dispatch-popup-result');
5984
5938
  await this.wire.sendAction('dispatch-popup-result', { data, ...this.identity });
5985
5939
  }
5986
5940
  /**
@@ -6129,9 +6083,7 @@ class _WindowModule extends Base {
6129
6083
  * ```
6130
6084
  */
6131
6085
  async wrap(identity) {
6132
- this.wire.sendAction('window-wrap').catch((e) => {
6133
- // we do not want to expose this error, just continue if this analytics-only call fails
6134
- });
6086
+ this.wire.recordAnalytic('window-wrap');
6135
6087
  const errorMsg = validateIdentity(identity);
6136
6088
  if (errorMsg) {
6137
6089
  throw new Error(errorMsg);
@@ -6161,9 +6113,7 @@ class _WindowModule extends Base {
6161
6113
  * ```
6162
6114
  */
6163
6115
  wrapSync(identity) {
6164
- this.wire.sendAction('window-wrap-sync').catch((e) => {
6165
- // we do not want to expose this error, just continue if this analytics-only call fails
6166
- });
6116
+ this.wire.recordAnalytic('window-wrap-sync');
6167
6117
  const errorMsg = validateIdentity(identity);
6168
6118
  if (errorMsg) {
6169
6119
  throw new Error(errorMsg);
@@ -6192,9 +6142,7 @@ class _WindowModule extends Base {
6192
6142
  * ```
6193
6143
  */
6194
6144
  create(options) {
6195
- this.wire.sendAction('create-window').catch((e) => {
6196
- // we do not want to expose this error, just continue if this analytics-only call fails
6197
- });
6145
+ this.wire.recordAnalytic('create-window');
6198
6146
  const win = new _Window(this.wire, { uuid: this.me.uuid, name: options.name });
6199
6147
  return win.createWindow(options);
6200
6148
  }
@@ -6210,9 +6158,7 @@ class _WindowModule extends Base {
6210
6158
  * ```
6211
6159
  */
6212
6160
  getCurrent() {
6213
- this.wire.sendAction('get-current-window').catch((e) => {
6214
- // we do not want to expose this error, just continue if this analytics-only call fails
6215
- });
6161
+ this.wire.recordAnalytic('get-current-window');
6216
6162
  if (!this.wire.me.isWindow) {
6217
6163
  throw new Error('You are not in a Window context');
6218
6164
  }
@@ -6231,9 +6177,7 @@ class _WindowModule extends Base {
6231
6177
  * ```
6232
6178
  */
6233
6179
  getCurrentSync() {
6234
- this.wire.sendAction('get-current-window-sync').catch((e) => {
6235
- // we do not want to expose this error, just continue if this analytics-only call fails
6236
- });
6180
+ this.wire.recordAnalytic('get-current-window-sync');
6237
6181
  if (!this.wire.me.isWindow) {
6238
6182
  throw new Error('You are not in a Window context');
6239
6183
  }
@@ -6571,9 +6515,7 @@ class View extends WebContents {
6571
6515
  * @experimental
6572
6516
  */
6573
6517
  this.getParentLayout = async () => {
6574
- this.wire.sendAction('view-get-parent-layout').catch(() => {
6575
- // don't expose
6576
- });
6518
+ this.wire.recordAnalytic('view-get-parent-layout');
6577
6519
  return this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity);
6578
6520
  };
6579
6521
  /**
@@ -6686,9 +6628,7 @@ class View extends WebContents {
6686
6628
  * ```
6687
6629
  */
6688
6630
  this.getCurrentStack = async () => {
6689
- this.wire.sendAction('view-get-current-stack').catch(() => {
6690
- // don't expose
6691
- });
6631
+ this.wire.recordAnalytic('view-get-current-stack');
6692
6632
  try {
6693
6633
  const layout = await this.getParentLayout();
6694
6634
  return layout.getStackByViewIdentity(this.identity);
@@ -6863,9 +6803,7 @@ class _FrameModule extends Base {
6863
6803
  * ```
6864
6804
  */
6865
6805
  async wrap(identity) {
6866
- this.wire.sendAction('frame-wrap').catch((e) => {
6867
- // we do not want to expose this error, just continue if this analytics-only call fails
6868
- });
6806
+ this.wire.recordAnalytic('frame-wrap');
6869
6807
  const errorMsg = validateIdentity(identity);
6870
6808
  if (errorMsg) {
6871
6809
  throw new Error(errorMsg);
@@ -6887,9 +6825,7 @@ class _FrameModule extends Base {
6887
6825
  * ```
6888
6826
  */
6889
6827
  wrapSync(identity) {
6890
- this.wire.sendAction('frame-wrap-sync').catch((e) => {
6891
- // we do not want to expose this error, just continue if this analytics-only call fails
6892
- });
6828
+ this.wire.recordAnalytic('frame-wrap-sync');
6893
6829
  const errorMsg = validateIdentity(identity);
6894
6830
  if (errorMsg) {
6895
6831
  throw new Error(errorMsg);
@@ -6907,9 +6843,7 @@ class _FrameModule extends Base {
6907
6843
  * ```
6908
6844
  */
6909
6845
  getCurrent() {
6910
- this.wire.sendAction('frame-get-current').catch((e) => {
6911
- // we do not want to expose this error, just continue if this analytics-only call fails
6912
- });
6846
+ this.wire.recordAnalytic('frame-get-current');
6913
6847
  return Promise.resolve(new _Frame(this.wire, this.wire.environment.getCurrentEntityIdentity()));
6914
6848
  }
6915
6849
  /**
@@ -6923,9 +6857,7 @@ class _FrameModule extends Base {
6923
6857
  * ```
6924
6858
  */
6925
6859
  getCurrentSync() {
6926
- this.wire.sendAction('frame-get-current-sync').catch((e) => {
6927
- // we do not want to expose this error, just continue if this analytics-only call fails
6928
- });
6860
+ this.wire.recordAnalytic('frame-get-current-sync');
6929
6861
  return new _Frame(this.wire, this.wire.environment.getCurrentEntityIdentity());
6930
6862
  }
6931
6863
  }
@@ -6984,9 +6916,7 @@ class ExternalApplicationModule extends Base {
6984
6916
  * ```
6985
6917
  */
6986
6918
  wrap(uuid) {
6987
- this.wire.sendAction('external-application-wrap').catch((e) => {
6988
- // we do not want to expose this error, just continue if this analytics-only call fails
6989
- });
6919
+ this.wire.recordAnalytic('external-application-wrap');
6990
6920
  return Promise.resolve(new ExternalApplication(this.wire, { uuid }));
6991
6921
  }
6992
6922
  /**
@@ -7003,9 +6933,7 @@ class ExternalApplicationModule extends Base {
7003
6933
  * ```
7004
6934
  */
7005
6935
  wrapSync(uuid) {
7006
- this.wire.sendAction('external-application-wrap-sync').catch((e) => {
7007
- // we do not want to expose this error, just continue if this analytics-only call fails
7008
- });
6936
+ this.wire.recordAnalytic('external-application-wrap-sync');
7009
6937
  return new ExternalApplication(this.wire, { uuid });
7010
6938
  }
7011
6939
  }
@@ -7161,15 +7089,19 @@ var __classPrivateFieldGet$h = (undefined && undefined.__classPrivateFieldGet) |
7161
7089
  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");
7162
7090
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7163
7091
  };
7164
- var _Transport_wire, _Transport_fin;
7092
+ var _Transport_instances, _Transport_wire, _Transport_analyticsEnabled, _Transport_analyticsBuffer, _Transport_analyticsFlushTimeout, _Transport_fin, _Transport_flushAnalytics;
7165
7093
  class Transport extends events.EventEmitter {
7166
7094
  constructor(factory, environment, config) {
7167
7095
  super();
7096
+ _Transport_instances.add(this);
7168
7097
  this.wireListeners = new Map();
7169
7098
  this.topicRefMap = new Map();
7170
7099
  this.eventAggregator = new EventAggregator();
7171
7100
  this.messageHandlers = [this.eventAggregator.dispatchEvent];
7172
7101
  _Transport_wire.set(this, void 0);
7102
+ _Transport_analyticsEnabled.set(this, true);
7103
+ _Transport_analyticsBuffer.set(this, new Map());
7104
+ _Transport_analyticsFlushTimeout.set(this, void 0);
7173
7105
  // Typing as unknown to avoid circular dependency, should not be used directly.
7174
7106
  _Transport_fin.set(this, void 0);
7175
7107
  this.connectSync = () => {
@@ -7183,6 +7115,7 @@ class Transport extends events.EventEmitter {
7183
7115
  };
7184
7116
  __classPrivateFieldSet$g(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7185
7117
  this.environment = environment;
7118
+ __classPrivateFieldSet$g(this, _Transport_analyticsEnabled, config.apiDiagnostics !== false, "f");
7186
7119
  this.sendRaw = __classPrivateFieldGet$h(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$h(this, _Transport_wire, "f"));
7187
7120
  this.registerMessageHandler(this.handleMessage.bind(this));
7188
7121
  __classPrivateFieldGet$h(this, _Transport_wire, "f").on('disconnected', () => {
@@ -7190,6 +7123,9 @@ class Transport extends events.EventEmitter {
7190
7123
  handleNack({ reason: 'Remote connection has closed' });
7191
7124
  }
7192
7125
  this.wireListeners.clear();
7126
+ clearTimeout(__classPrivateFieldGet$h(this, _Transport_analyticsFlushTimeout, "f"));
7127
+ __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, undefined, "f");
7128
+ __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").clear();
7193
7129
  this.emit('disconnected');
7194
7130
  });
7195
7131
  const { uuid, name } = config;
@@ -7208,6 +7144,18 @@ class Transport extends events.EventEmitter {
7208
7144
  }
7209
7145
  __classPrivateFieldSet$g(this, _Transport_fin, _fin, "f");
7210
7146
  }
7147
+ recordAnalytic(action) {
7148
+ if (!__classPrivateFieldGet$h(this, _Transport_analyticsEnabled, "f"))
7149
+ return;
7150
+ __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").set(action, (__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").get(action) ?? 0) + 1);
7151
+ if (__classPrivateFieldGet$h(this, _Transport_analyticsFlushTimeout, "f") === undefined) {
7152
+ const timeout = setTimeout(() => __classPrivateFieldGet$h(this, _Transport_instances, "m", _Transport_flushAnalytics).call(this), 30000);
7153
+ if (typeof timeout === 'object' && timeout !== null) {
7154
+ timeout.unref?.();
7155
+ }
7156
+ __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, timeout, "f");
7157
+ }
7158
+ }
7211
7159
  shutdown() {
7212
7160
  const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7213
7161
  return wire.shutdown();
@@ -7370,7 +7318,16 @@ class Transport extends events.EventEmitter {
7370
7318
  return true;
7371
7319
  }
7372
7320
  }
7373
- _Transport_wire = new WeakMap(), _Transport_fin = new WeakMap();
7321
+ _Transport_wire = new WeakMap(), _Transport_analyticsEnabled = new WeakMap(), _Transport_analyticsBuffer = new WeakMap(), _Transport_analyticsFlushTimeout = new WeakMap(), _Transport_fin = new WeakMap(), _Transport_instances = new WeakSet(), _Transport_flushAnalytics = function _Transport_flushAnalytics() {
7322
+ __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, undefined, "f");
7323
+ if (__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").size === 0)
7324
+ return;
7325
+ const counts = Object.fromEntries(__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f"));
7326
+ __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").clear();
7327
+ this.sendAction('send-analytics-batch', { counts }).catch(() => {
7328
+ // analytics flush failure is non-fatal, counts are already cleared
7329
+ });
7330
+ };
7374
7331
 
7375
7332
  /* `READY_STATE` is an instance var set by `constructor` to reference the `WebTransportSocket.READY_STATE` enum.
7376
7333
  * This is syntactic sugar that makes the enum accessible through the `wire` property of the various `fin` singletons.
@@ -7429,6 +7386,47 @@ class WebSocketTransport extends events.EventEmitter {
7429
7386
  }
7430
7387
  }
7431
7388
 
7389
+ /**
7390
+ * Chromium content tracing APIs exposed under `fin.System.ContentTracing`.
7391
+ */
7392
+ class SystemContentTracing extends Base {
7393
+ /**
7394
+ * Gets the currently known tracing category groups.
7395
+ */
7396
+ async getCategories() {
7397
+ const { payload } = await this.wire.sendAction('content-tracing-get-categories');
7398
+ return payload.data;
7399
+ }
7400
+ /**
7401
+ * Starts content tracing across runtime processes.
7402
+ *
7403
+ * Only one content tracing session may be active across the runtime at a time.
7404
+ * This method rejects if another identity already owns the active session.
7405
+ */
7406
+ async startRecording(options) {
7407
+ await this.wire.sendAction('content-tracing-start-recording', { options });
7408
+ }
7409
+ /**
7410
+ * Stops the active content tracing session and writes the trace to the runtime-managed cache folder.
7411
+ *
7412
+ * The calling identity must match the identity that started the active tracing session.
7413
+ * This method rejects if tracing is not active or is owned by another identity.
7414
+ */
7415
+ async stopRecording() {
7416
+ const { payload } = await this.wire.sendAction('content-tracing-stop-recording');
7417
+ return payload.data;
7418
+ }
7419
+ /**
7420
+ * Returns the current maximum trace buffer usage across processes.
7421
+ *
7422
+ * This method is not supported on macOS and rejects on that platform.
7423
+ */
7424
+ async getTraceBufferUsage() {
7425
+ const { payload } = await this.wire.sendAction('content-tracing-get-trace-buffer-usage');
7426
+ return payload.data;
7427
+ }
7428
+ }
7429
+
7432
7430
  /**
7433
7431
  * Entry point for the OpenFin `System` API (`fin.System`).
7434
7432
  *
@@ -7448,6 +7446,7 @@ class System extends EmitterBase {
7448
7446
  */
7449
7447
  constructor(wire) {
7450
7448
  super(wire, 'system');
7449
+ this.ContentTracing = new SystemContentTracing(wire);
7451
7450
  }
7452
7451
  sendExternalProcessRequest(action, options) {
7453
7452
  return new Promise((resolve, reject) => {
@@ -8973,9 +8972,7 @@ class System extends EmitterBase {
8973
8972
  * @experimental
8974
8973
  */
8975
8974
  async registerShutdownHandler(handler) {
8976
- this.wire.sendAction('system-register-shutdown-handler').catch((e) => {
8977
- // don't expose, analytics-only call
8978
- });
8975
+ this.wire.recordAnalytic('system-register-shutdown-handler');
8979
8976
  const SystemShutdownEventName = 'system-shutdown';
8980
8977
  const SystemShutdownHandledEventName = 'system-shutdown-handled';
8981
8978
  const { uuid, name } = this.wire.me;
@@ -11655,6 +11652,16 @@ class InterApplicationBus extends Base {
11655
11652
  */
11656
11653
  constructor(wire) {
11657
11654
  super(wire);
11655
+ /**
11656
+ * Event types for the InterApplicationBus.
11657
+ *
11658
+ * @remarks The `subscriber-added` and `subscriber-removed` events are disabled by default.
11659
+ * To re-enable them, launch the runtime with the `--emit-legacy-iab-events` flag.
11660
+ * These events will be removed in a future version. Use {@link Channel} for connection
11661
+ * lifecycle management instead.
11662
+ *
11663
+ * @deprecated Use {@link Channel} `onConnection` / `onDisconnection` instead.
11664
+ */
11658
11665
  this.events = {
11659
11666
  subscriberAdded: 'subscriber-added',
11660
11667
  subscriberRemoved: 'subscriber-removed'
@@ -13974,9 +13981,7 @@ class LayoutModule extends Base {
13974
13981
  * ```
13975
13982
  */
13976
13983
  this.init = async (options = {}) => {
13977
- this.wire.sendAction('layout-init').catch((e) => {
13978
- // don't expose
13979
- });
13984
+ this.wire.recordAnalytic('layout-init');
13980
13985
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
13981
13986
  throw new Error('Layout.init can only be called from a Window context.');
13982
13987
  }
@@ -14054,9 +14059,7 @@ class LayoutModule extends Base {
14054
14059
  * ```
14055
14060
  */
14056
14061
  async wrap(identity) {
14057
- this.wire.sendAction('layout-wrap').catch((e) => {
14058
- // don't expose
14059
- });
14062
+ this.wire.recordAnalytic('layout-wrap');
14060
14063
  return new Layout(identity, this.wire);
14061
14064
  }
14062
14065
  /**
@@ -14079,9 +14082,7 @@ class LayoutModule extends Base {
14079
14082
  * ```
14080
14083
  */
14081
14084
  wrapSync(identity) {
14082
- this.wire.sendAction('layout-wrap-sync').catch((e) => {
14083
- // don't expose
14084
- });
14085
+ this.wire.recordAnalytic('layout-wrap-sync');
14085
14086
  return new Layout(identity, this.wire);
14086
14087
  }
14087
14088
  /**
@@ -14095,9 +14096,7 @@ class LayoutModule extends Base {
14095
14096
  * ```
14096
14097
  */
14097
14098
  async getCurrent() {
14098
- this.wire.sendAction('layout-get-current').catch((e) => {
14099
- // don't expose
14100
- });
14099
+ this.wire.recordAnalytic('layout-get-current');
14101
14100
  if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
14102
14101
  throw new Error('You are not in a Window context. Only Windows can have a Layout.');
14103
14102
  }
@@ -14118,9 +14117,7 @@ class LayoutModule extends Base {
14118
14117
  * ```
14119
14118
  */
14120
14119
  getCurrentSync() {
14121
- this.wire.sendAction('layout-get-current-sync').catch((e) => {
14122
- // don't expose
14123
- });
14120
+ this.wire.recordAnalytic('layout-get-current-sync');
14124
14121
  if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
14125
14122
  throw new Error('You are not in a Window context. Only Windows can have a Layout.');
14126
14123
  }
@@ -14138,9 +14135,7 @@ class LayoutModule extends Base {
14138
14135
  * ```
14139
14136
  */
14140
14137
  async getLayoutByViewIdentity(viewIdentity) {
14141
- this.wire.sendAction('layout-get-by-view-identity').catch(() => {
14142
- // don't expose
14143
- });
14138
+ this.wire.recordAnalytic('layout-get-by-view-identity');
14144
14139
  const winIdentity = await this.wire.environment.getViewWindowIdentity(this.fin, viewIdentity);
14145
14140
  let layoutWindowIdentity = winIdentity;
14146
14141
  // TODO: CORE-1857 - when we tearout active layout or drag a view out of a window, the above identity includes the whole window info.
@@ -14264,9 +14259,7 @@ class PlatformModule extends Base {
14264
14259
  * ```
14265
14260
  */
14266
14261
  async wrap(identity) {
14267
- this.wire.sendAction('platform-wrap').catch((e) => {
14268
- // don't expose
14269
- });
14262
+ this.wire.recordAnalytic('platform-wrap');
14270
14263
  return new Platform(this.wire, { uuid: identity.uuid });
14271
14264
  }
14272
14265
  /**
@@ -14281,9 +14274,7 @@ class PlatformModule extends Base {
14281
14274
  * ```
14282
14275
  */
14283
14276
  wrapSync(identity) {
14284
- this.wire.sendAction('platform-wrap-sync').catch((e) => {
14285
- // don't expose
14286
- });
14277
+ this.wire.recordAnalytic('platform-wrap-sync');
14287
14278
  return new Platform(this.wire, { uuid: identity.uuid });
14288
14279
  }
14289
14280
  /**
@@ -14297,9 +14288,7 @@ class PlatformModule extends Base {
14297
14288
  * ```
14298
14289
  */
14299
14290
  async getCurrent() {
14300
- this.wire.sendAction('platform-get-current').catch((e) => {
14301
- // don't expose
14302
- });
14291
+ this.wire.recordAnalytic('platform-get-current');
14303
14292
  return this.wrap({ uuid: this.wire.me.uuid });
14304
14293
  }
14305
14294
  /**
@@ -14313,9 +14302,7 @@ class PlatformModule extends Base {
14313
14302
  * ```
14314
14303
  */
14315
14304
  getCurrentSync() {
14316
- this.wire.sendAction('platform-get-current-sync').catch((e) => {
14317
- // don't expose
14318
- });
14305
+ this.wire.recordAnalytic('platform-get-current-sync');
14319
14306
  return this.wrapSync({ uuid: this.wire.me.uuid });
14320
14307
  }
14321
14308
  /**
@@ -14343,9 +14330,7 @@ class PlatformModule extends Base {
14343
14330
  * ```
14344
14331
  */
14345
14332
  start(platformOptions) {
14346
- this.wire.sendAction('platform-start').catch((e) => {
14347
- // don't expose
14348
- });
14333
+ this.wire.recordAnalytic('platform-start');
14349
14334
  // eslint-disable-next-line no-async-promise-executor
14350
14335
  return new Promise(async (resolve, reject) => {
14351
14336
  try {
@@ -14387,9 +14372,7 @@ class PlatformModule extends Base {
14387
14372
  * ```
14388
14373
  */
14389
14374
  startFromManifest(manifestUrl, opts) {
14390
- this.wire.sendAction('platform-start-from-manifest').catch((e) => {
14391
- // don't expose
14392
- });
14375
+ this.wire.recordAnalytic('platform-start-from-manifest');
14393
14376
  // eslint-disable-next-line no-async-promise-executor
14394
14377
  return new Promise(async (resolve, reject) => {
14395
14378
  try {
@@ -15648,9 +15631,7 @@ class FDC3ModuleBase {
15648
15631
  * @static
15649
15632
  */
15650
15633
  async broadcast(context) {
15651
- this.wire.sendAction('fdc3-broadcast').catch((e) => {
15652
- // we do not want to expose this error, just continue if this analytics-only call fails
15653
- });
15634
+ this.wire.recordAnalytic('fdc3-broadcast');
15654
15635
  return this.client.setContext(context);
15655
15636
  }
15656
15637
  /**
@@ -15661,9 +15642,7 @@ class FDC3ModuleBase {
15661
15642
  * @tutorial fdc3.open
15662
15643
  */
15663
15644
  async _open(app, context) {
15664
- this.wire.sendAction('fdc3-open').catch((e) => {
15665
- // we do not want to expose this error, just continue if this analytics-only call fails
15666
- });
15645
+ this.wire.recordAnalytic('fdc3-open');
15667
15646
  try {
15668
15647
  return await InteropClient.ferryFdc3Call(this.client, 'fdc3Open', { app, context });
15669
15648
  }
@@ -15687,9 +15666,7 @@ class FDC3ModuleBase {
15687
15666
  * @tutorial fdc3.getOrCreateChannel
15688
15667
  */
15689
15668
  async getOrCreateChannel(channelId, fdc3Factory) {
15690
- this.wire.sendAction('fdc3-get-or-create-channel').catch((e) => {
15691
- // we do not want to expose this error, just continue if this analytics-only call fails
15692
- });
15669
+ this.wire.recordAnalytic('fdc3-get-or-create-channel');
15693
15670
  const hasChannelIdBeenUsed = await InteropClient.ferryFdc3Call(this.client, 'isIdUsedByPrivateChannel', {
15694
15671
  channelId
15695
15672
  });
@@ -15717,9 +15694,7 @@ class FDC3ModuleBase {
15717
15694
  * @static
15718
15695
  */
15719
15696
  async getSystemChannels() {
15720
- this.wire.sendAction('fdc3-get-system-channels').catch((e) => {
15721
- // we do not want to expose this error, just continue if this analytics-only call fails
15722
- });
15697
+ this.wire.recordAnalytic('fdc3-get-system-channels');
15723
15698
  return this._getChannels();
15724
15699
  }
15725
15700
  /**
@@ -15734,9 +15709,7 @@ class FDC3ModuleBase {
15734
15709
  * @static
15735
15710
  */
15736
15711
  async joinChannel(channelId) {
15737
- this.wire.sendAction('fdc3-join-channel').catch((e) => {
15738
- // we do not want to expose this error, just continue if this analytics-only call fails
15739
- });
15712
+ this.wire.recordAnalytic('fdc3-join-channel');
15740
15713
  try {
15741
15714
  return await this.client.joinContextGroup(channelId);
15742
15715
  }
@@ -15759,9 +15732,7 @@ class FDC3ModuleBase {
15759
15732
  * @tutorial fdc3.getCurrentChannel
15760
15733
  */
15761
15734
  async getCurrentChannel() {
15762
- this.wire.sendAction('fdc3-get-current-channel').catch((e) => {
15763
- // we do not want to expose this error, just continue if this analytics-only call fails
15764
- });
15735
+ this.wire.recordAnalytic('fdc3-get-current-channel');
15765
15736
  const currentContextGroupInfo = await this.getCurrentContextGroupInfo();
15766
15737
  if (!currentContextGroupInfo) {
15767
15738
  return null;
@@ -15776,9 +15747,7 @@ class FDC3ModuleBase {
15776
15747
  * @static
15777
15748
  */
15778
15749
  async leaveCurrentChannel() {
15779
- this.wire.sendAction('fdc3-leave-current-channel').catch((e) => {
15780
- // we do not want to expose this error, just continue if this analytics-only call fails
15781
- });
15750
+ this.wire.recordAnalytic('fdc3-leave-current-channel');
15782
15751
  return this.client.removeFromContextGroup();
15783
15752
  }
15784
15753
  // utils
@@ -15898,9 +15867,7 @@ class Fdc3Module extends FDC3ModuleBase {
15898
15867
  */
15899
15868
  // @ts-expect-error TODO [CORE-1524]
15900
15869
  addContextListener(contextType, handler) {
15901
- this.wire.sendAction('fdc3-add-context-listener').catch((e) => {
15902
- // we do not want to expose this error, just continue if this analytics-only call fails
15903
- });
15870
+ this.wire.recordAnalytic('fdc3-add-context-listener');
15904
15871
  let listener;
15905
15872
  if (typeof contextType === 'function') {
15906
15873
  console.warn('addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)');
@@ -15923,9 +15890,7 @@ class Fdc3Module extends FDC3ModuleBase {
15923
15890
  * @static
15924
15891
  */
15925
15892
  addIntentListener(intent, handler) {
15926
- this.wire.sendAction('fdc3-add-intent-listener').catch((e) => {
15927
- // we do not want to expose this error, just continue if this analytics-only call fails
15928
- });
15893
+ this.wire.recordAnalytic('fdc3-add-intent-listener');
15929
15894
  const contextHandler = (raisedIntent) => {
15930
15895
  const { context, metadata: intentMetadata } = raisedIntent;
15931
15896
  const { metadata } = context;
@@ -15953,9 +15918,7 @@ class Fdc3Module extends FDC3ModuleBase {
15953
15918
  * @static
15954
15919
  */
15955
15920
  async raiseIntent(intent, context, app) {
15956
- this.wire.sendAction('fdc3-raise-intent').catch((e) => {
15957
- // we do not want to expose this error, just continue if this analytics-only call fails
15958
- });
15921
+ this.wire.recordAnalytic('fdc3-raise-intent');
15959
15922
  const intentObj = app
15960
15923
  ? { name: intent, context, metadata: { target: app } }
15961
15924
  : { name: intent, context };
@@ -15975,9 +15938,7 @@ class Fdc3Module extends FDC3ModuleBase {
15975
15938
  * @tutorial fdc3.findIntent
15976
15939
  */
15977
15940
  async findIntent(intent, context) {
15978
- this.wire.sendAction('fdc3-find-intent').catch((e) => {
15979
- // we do not want to expose this error, just continue if this analytics-only call fails
15980
- });
15941
+ this.wire.recordAnalytic('fdc3-find-intent');
15981
15942
  try {
15982
15943
  return await this.client.getInfoForIntent({ name: intent, context });
15983
15944
  }
@@ -15993,9 +15954,7 @@ class Fdc3Module extends FDC3ModuleBase {
15993
15954
  * @tutorial fdc3.findIntentsByContext
15994
15955
  */
15995
15956
  async findIntentsByContext(context) {
15996
- this.wire.sendAction('fdc3-find-intents-by-context').catch((e) => {
15997
- // we do not want to expose this error, just continue if this analytics-only call fails
15998
- });
15957
+ this.wire.recordAnalytic('fdc3-find-intents-by-context');
15999
15958
  try {
16000
15959
  return await this.client.getInfoForIntentsByContext(context);
16001
15960
  }
@@ -16012,9 +15971,7 @@ class Fdc3Module extends FDC3ModuleBase {
16012
15971
  * @tutorial fdc3.raiseIntentForContext
16013
15972
  */
16014
15973
  async raiseIntentForContext(context, app) {
16015
- this.wire.sendAction('fdc3-raise-intent-for-context').catch((e) => {
16016
- // we do not want to expose this error, just continue if this analytics-only call fails
16017
- });
15974
+ this.wire.recordAnalytic('fdc3-raise-intent-for-context');
16018
15975
  try {
16019
15976
  return await this.client.fireIntentForContext({ ...context, metadata: { target: app } });
16020
15977
  }
@@ -16038,9 +15995,7 @@ class Fdc3Module extends FDC3ModuleBase {
16038
15995
  * @tutorial fdc3.getInfo
16039
15996
  */
16040
15997
  getInfo() {
16041
- this.wire.sendAction('fdc3-get-info').catch((e) => {
16042
- // we do not want to expose this error, just continue if this analytics-only call fails
16043
- });
15998
+ this.wire.recordAnalytic('fdc3-get-info');
16044
15999
  const version = this.wire.environment.getAdapterVersionSync();
16045
16000
  return {
16046
16001
  providerVersion: version,
@@ -16107,9 +16062,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16107
16062
  * @tutorial fdc3v2.findInstances
16108
16063
  */
16109
16064
  async findInstances(app) {
16110
- this.wire.sendAction('fdc3-find-instances').catch((e) => {
16111
- // we do not want to expose this error, just continue if this analytics-only call fails
16112
- });
16065
+ this.wire.recordAnalytic('fdc3-find-instances');
16113
16066
  try {
16114
16067
  return await InteropClient.ferryFdc3Call(this.client, 'fdc3FindInstances', app);
16115
16068
  }
@@ -16125,9 +16078,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16125
16078
  * @tutorial fdc3v2.getAppMetadata
16126
16079
  */
16127
16080
  async getAppMetadata(app) {
16128
- this.wire.sendAction('fdc3-get-app-metadata').catch((e) => {
16129
- // we do not want to expose this error, just continue if this analytics-only call fails
16130
- });
16081
+ this.wire.recordAnalytic('fdc3-get-app-metadata');
16131
16082
  try {
16132
16083
  return await InteropClient.ferryFdc3Call(this.client, 'fdc3GetAppMetadata', app);
16133
16084
  }
@@ -16145,9 +16096,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16145
16096
  */
16146
16097
  // @ts-expect-error TODO [CORE-1524]
16147
16098
  async addContextListener(contextType, handler) {
16148
- this.wire.sendAction('fdc3-add-context-listener').catch((e) => {
16149
- // we do not want to expose this error, just continue if this analytics-only call fails
16150
- });
16099
+ this.wire.recordAnalytic('fdc3-add-context-listener');
16151
16100
  // The FDC3 ContextHandler only expects the context and optional ContextMetadata, so we wrap the handler
16152
16101
  // here so it only gets passed these parameters
16153
16102
  const getWrappedHandler = (handlerToWrap) => {
@@ -16176,9 +16125,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16176
16125
  * @tutorial fdc3.findIntent
16177
16126
  */
16178
16127
  async findIntent(intent, context, resultType) {
16179
- this.wire.sendAction('fdc3-find-intent').catch((e) => {
16180
- // we do not want to expose this error, just continue if this analytics-only call fails
16181
- });
16128
+ this.wire.recordAnalytic('fdc3-find-intent');
16182
16129
  try {
16183
16130
  return await this.client.getInfoForIntent({ name: intent, context, metadata: { resultType } });
16184
16131
  }
@@ -16195,9 +16142,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16195
16142
  * @tutorial fdc3v2.findIntentsByContext
16196
16143
  */
16197
16144
  async findIntentsByContext(context, resultType) {
16198
- this.wire.sendAction('fdc3-find-intents-by-context').catch((e) => {
16199
- // we do not want to expose this error, just continue if this analytics-only call fails
16200
- });
16145
+ this.wire.recordAnalytic('fdc3-find-intents-by-context');
16201
16146
  const payload = resultType ? { context, metadata: { resultType } } : context;
16202
16147
  try {
16203
16148
  return await InteropClient.ferryFdc3Call(this.client, 'fdc3v2FindIntentsByContext', payload);
@@ -16216,9 +16161,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16216
16161
  * @tutorial fdc3v2.raiseIntent
16217
16162
  */
16218
16163
  async raiseIntent(intent, context, app) {
16219
- this.wire.sendAction('fdc3-raise-intent').catch((e) => {
16220
- // we do not want to expose this error, just continue if this analytics-only call fails
16221
- });
16164
+ this.wire.recordAnalytic('fdc3-raise-intent');
16222
16165
  try {
16223
16166
  if (typeof app === 'string') {
16224
16167
  console.warn('Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).');
@@ -16239,9 +16182,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16239
16182
  */
16240
16183
  async raiseIntentForContext(context, app) {
16241
16184
  // TODO: We have to do the same thing we do for raiseIntent here as well.
16242
- this.wire.sendAction('fdc3-raise-intent-for-context').catch((e) => {
16243
- // we do not want to expose this error, just continue if this analytics-only call fails
16244
- });
16185
+ this.wire.recordAnalytic('fdc3-raise-intent-for-context');
16245
16186
  try {
16246
16187
  if (typeof app === 'string') {
16247
16188
  console.warn('Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).');
@@ -16261,9 +16202,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
16261
16202
  * @tutorial fdc3.addIntentListener
16262
16203
  */
16263
16204
  async addIntentListener(intent, handler) {
16264
- this.wire.sendAction('fdc3-add-intent-listener').catch((e) => {
16265
- // we do not want to expose this error, just continue if this analytics-only call fails
16266
- });
16205
+ this.wire.recordAnalytic('fdc3-add-intent-listener');
16267
16206
  if (typeof intent !== 'string') {
16268
16207
  throw new Error('First argument must be an Intent name');
16269
16208
  }
@@ -16421,9 +16360,7 @@ class InteropModule extends Base {
16421
16360
  * ```
16422
16361
  */
16423
16362
  async init(name, override = defaultOverride) {
16424
- this.wire.sendAction('interop-init').catch(() => {
16425
- // don't expose, analytics-only call
16426
- });
16363
+ this.wire.recordAnalytic('interop-init');
16427
16364
  // Allows for manifest-level configuration, without having to override. (e.g. specifying custom context groups)
16428
16365
  const options = await this.wire.environment.getInteropInfo(this.wire.getFin());
16429
16366
  const objectThatThrows = createUnusableObject(BrokerParamAccessError);
@@ -16472,9 +16409,7 @@ class InteropModule extends Base {
16472
16409
  * ```
16473
16410
  */
16474
16411
  connectSync(name, interopConfig) {
16475
- this.wire.sendAction('interop-connect-sync').catch(() => {
16476
- // don't expose, analytics-only call
16477
- });
16412
+ this.wire.recordAnalytic('interop-connect-sync');
16478
16413
  return new InteropClient(this.wire, this.wire.environment.whenReady().then(() => {
16479
16414
  return this.fin.InterApplicationBus.Channel.connect(`interop-broker-${name}`, {
16480
16415
  payload: interopConfig
@@ -16597,9 +16532,7 @@ class SnapshotSource extends Base {
16597
16532
  * ```
16598
16533
  */
16599
16534
  async ready() {
16600
- this.wire.sendAction('snapshot-source-ready').catch((e) => {
16601
- // don't expose, analytics-only call
16602
- });
16535
+ this.wire.recordAnalytic('snapshot-source-ready');
16603
16536
  // eslint-disable-next-line no-async-promise-executor
16604
16537
  try {
16605
16538
  // If getClient was already called before this, do we have a timing issue where the channel might have been created but we missed the event but this still fails?
@@ -16615,9 +16548,7 @@ class SnapshotSource extends Base {
16615
16548
  *
16616
16549
  */
16617
16550
  async getSnapshot() {
16618
- this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
16619
- // don't expose, analytics-only call
16620
- });
16551
+ this.wire.recordAnalytic('snapshot-source-get-snapshot');
16621
16552
  const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16622
16553
  const response = (await client.dispatch('get-snapshot'));
16623
16554
  return (await response).snapshot;
@@ -16627,9 +16558,7 @@ class SnapshotSource extends Base {
16627
16558
  *
16628
16559
  */
16629
16560
  async applySnapshot(snapshot) {
16630
- this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
16631
- // don't expose, analytics-only call
16632
- });
16561
+ this.wire.recordAnalytic('snapshot-source-apply-snapshot');
16633
16562
  const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16634
16563
  return client.dispatch('apply-snapshot', { snapshot });
16635
16564
  }
@@ -16664,9 +16593,7 @@ class SnapshotSourceModule extends Base {
16664
16593
  *
16665
16594
  */
16666
16595
  async init(provider) {
16667
- this.wire.sendAction('snapshot-source-init').catch((e) => {
16668
- // don't expose, analytics-only call
16669
- });
16596
+ this.wire.recordAnalytic('snapshot-source-init');
16670
16597
  if (typeof provider !== 'object' ||
16671
16598
  typeof provider.getSnapshot !== 'function' ||
16672
16599
  typeof provider.applySnapshot !== 'function') {
@@ -16690,9 +16617,7 @@ class SnapshotSourceModule extends Base {
16690
16617
  * ```
16691
16618
  */
16692
16619
  wrapSync(identity) {
16693
- this.wire.sendAction('snapshot-source-wrap-sync').catch((e) => {
16694
- // don't expose, analytics-only call
16695
- });
16620
+ this.wire.recordAnalytic('snapshot-source-wrap-sync');
16696
16621
  return new SnapshotSource(this.wire, identity);
16697
16622
  }
16698
16623
  /**
@@ -16706,9 +16631,7 @@ class SnapshotSourceModule extends Base {
16706
16631
  * ```
16707
16632
  */
16708
16633
  async wrap(identity) {
16709
- this.wire.sendAction('snapshot-source-wrap').catch((e) => {
16710
- // don't expose, analytics-only call
16711
- });
16634
+ this.wire.recordAnalytic('snapshot-source-wrap');
16712
16635
  return this.wrapSync(identity);
16713
16636
  }
16714
16637
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "45.100.51",
3
+ "version": "45.100.55",
4
4
  "description": "Establish intermachine runtime connections using webRTC.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "lodash": "^4.17.21",
18
18
  "tslib": "2.8.1",
19
- "@openfin/core": "45.100.51"
19
+ "@openfin/core": "45.100.55"
20
20
  },
21
21
  "scripts": {
22
22
  "prebuild": "rimraf ./out",