@dxos/teleport 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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.
@@ -143,10 +143,7 @@ var ControlExtension = class {
143
143
  onError: (err) => {
144
144
  this._extensionContext.close(err);
145
145
  }
146
- }, {
147
- F: __dxlog_file,
148
- L: 31
149
- });
146
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 17 });
150
147
  onExtensionRegistered = new Callback();
151
148
  _extensionContext;
152
149
  _rpc;
@@ -180,12 +177,7 @@ var ControlExtension = class {
180
177
  ts: request.requestTimestamp,
181
178
  localPeerId: this.localPeerId.truncate(),
182
179
  remotePeerId: this.remotePeerId.truncate()
183
- }, {
184
- F: __dxlog_file,
185
- L: 69,
186
- S: this,
187
- C: (f, a) => f(...a)
188
- });
180
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 51, S: this });
189
181
  }
190
182
  return {
191
183
  requestTimestamp: request.requestTimestamp
@@ -212,36 +204,21 @@ var ControlExtension = class {
212
204
  rtt: now - resp.requestTimestamp.getTime(),
213
205
  localPeerId: this.localPeerId.truncate(),
214
206
  remotePeerId: this.remotePeerId.truncate()
215
- }, {
216
- F: __dxlog_file,
217
- L: 107,
218
- S: this,
219
- C: (f, a) => f(...a)
220
- });
207
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 79, S: this });
221
208
  } else {
222
209
  if (DEBUG_PRINT_HEARTBEAT) {
223
210
  log("heartbeat RTT", {
224
211
  rtt: now - resp.requestTimestamp.getTime(),
225
212
  localPeerId: this.localPeerId.truncate(),
226
213
  remotePeerId: this.remotePeerId.truncate()
227
- }, {
228
- F: __dxlog_file,
229
- L: 114,
230
- S: this,
231
- C: (f, a) => f(...a)
232
- });
214
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 86, S: this });
233
215
  }
234
216
  }
235
217
  }
236
218
  } catch (err) {
237
219
  const now = Date.now();
238
220
  if (err instanceof RpcClosedError) {
239
- log("ignoring RpcClosedError in heartbeat", void 0, {
240
- F: __dxlog_file,
241
- L: 126,
242
- S: this,
243
- C: (f, a) => f(...a)
244
- });
221
+ log("ignoring RpcClosedError in heartbeat", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 98, S: this });
245
222
  this._extensionContext.close(err);
246
223
  return;
247
224
  }
@@ -249,23 +226,13 @@ var ControlExtension = class {
249
226
  log("timeout waiting for heartbeat response", {
250
227
  err,
251
228
  delay: now - reqTS.getTime()
252
- }, {
253
- F: __dxlog_file,
254
- L: 131,
255
- S: this,
256
- C: (f, a) => f(...a)
257
- });
229
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 103, S: this });
258
230
  this.opts.onTimeout(err);
259
231
  } else {
260
232
  log.info("other error waiting for heartbeat response", {
261
233
  err,
262
234
  delay: now - reqTS.getTime()
263
- }, {
264
- F: __dxlog_file,
265
- L: 134,
266
- S: this,
267
- C: (f, a) => f(...a)
268
- });
235
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 109, S: this });
269
236
  this.opts.onTimeout(err);
270
237
  }
271
238
  }
@@ -305,15 +272,7 @@ var Framer = class {
305
272
  this._processResponseQueue();
306
273
  },
307
274
  write: (chunk, encoding, callback) => {
308
- invariant(!this._subscribeCb, "Internal Framer bug. Concurrent writes detected.", {
309
- F: __dxlog_file2,
310
- L: 40,
311
- S: this,
312
- A: [
313
- "!this._subscribeCb",
314
- "'Internal Framer bug. Concurrent writes detected.'"
315
- ]
316
- });
275
+ invariant(!this._subscribeCb, "Internal Framer bug. Concurrent writes detected.", { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 29, S: this, A: ["!this._subscribeCb", "'Internal Framer bug. Concurrent writes detected.'"] });
317
276
  this._bytesReceived += chunk.length;
318
277
  if (this._buffer && this._buffer.length > 0) {
319
278
  this._buffer = Buffer.concat([
@@ -349,15 +308,7 @@ var Framer = class {
349
308
  });
350
309
  },
351
310
  subscribe: (callback) => {
352
- invariant(!this._messageCb, "Rpc port already has a message listener.", {
353
- F: __dxlog_file2,
354
- L: 79,
355
- S: this,
356
- A: [
357
- "!this._messageCb",
358
- "'Rpc port already has a message listener.'"
359
- ]
360
- });
311
+ invariant(!this._messageCb, "Rpc port already has a message listener.", { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 67, S: this, A: ["!this._messageCb", "'Rpc port already has a message listener.'"] });
361
312
  this._messageCb = callback;
362
313
  this._subscribeCb?.();
363
314
  return () => {
@@ -405,20 +356,10 @@ var Framer = class {
405
356
  }
406
357
  destroy() {
407
358
  if (this._stream.readableLength > 0) {
408
- log2("framer destroyed while there are still read bytes in the buffer.", void 0, {
409
- F: __dxlog_file2,
410
- L: 140,
411
- S: this,
412
- C: (f, a) => f(...a)
413
- });
359
+ log2("framer destroyed while there are still read bytes in the buffer.", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 118, S: this });
414
360
  }
415
361
  if (this._stream.writableLength > 0) {
416
- log2.warn("framer destroyed while there are still write bytes in the buffer.", void 0, {
417
- F: __dxlog_file2,
418
- L: 143,
419
- S: this,
420
- C: (f, a) => f(...a)
421
- });
362
+ log2.warn("framer destroyed while there are still write bytes in the buffer.", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 121, S: this });
422
363
  }
423
364
  this._stream.destroy();
424
365
  }
@@ -492,21 +433,11 @@ var Balancer = class {
492
433
  }
493
434
  pushData(data, trigger, channelId) {
494
435
  this._enqueueChunk(data, trigger, channelId);
495
- this._sendChunks().catch((err) => log3.catch(err, void 0, {
496
- F: __dxlog_file3,
497
- L: 75,
498
- S: this,
499
- C: (f, a) => f(...a)
500
- }));
436
+ this._sendChunks().catch((err) => log3.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 46, S: this }));
501
437
  }
502
438
  destroy() {
503
439
  if (this._sendBuffers.size !== 0) {
504
- log3.info("destroying balancer with pending calls", void 0, {
505
- F: __dxlog_file3,
506
- L: 80,
507
- S: this,
508
- C: (f, a) => f(...a)
509
- });
440
+ log3.info("destroying balancer with pending calls", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 50, S: this });
510
441
  }
511
442
  this._sendBuffers.clear();
512
443
  this._framer.destroy();
@@ -597,19 +528,9 @@ var Balancer = class {
597
528
  chunk = this._getNextChunk();
598
529
  while (chunk) {
599
530
  if (!this._framer.writable) {
600
- log3("PAUSE for drain", void 0, {
601
- F: __dxlog_file3,
602
- L: 179,
603
- S: this,
604
- C: (f, a) => f(...a)
605
- });
531
+ log3("PAUSE for drain", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 142, S: this });
606
532
  await this._framer.drain.waitForCount(1);
607
- log3("RESUME for drain", void 0, {
608
- F: __dxlog_file3,
609
- L: 181,
610
- S: this,
611
- C: (f, a) => f(...a)
612
- });
533
+ log3("RESUME for drain", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 144, S: this });
613
534
  }
614
535
  try {
615
536
  await this._framer.port.send(chunk.msg);
@@ -617,25 +538,12 @@ var Balancer = class {
617
538
  } catch (err) {
618
539
  log3("Error sending chunk", {
619
540
  err
620
- }, {
621
- F: __dxlog_file3,
622
- L: 187,
623
- S: this,
624
- C: (f, a) => f(...a)
625
- });
541
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 150, S: this });
626
542
  chunk.trigger?.throw(err);
627
543
  }
628
544
  chunk = this._getNextChunk();
629
545
  }
630
- invariant2(this._sendBuffers.size === 0, "sendBuffers not empty", {
631
- F: __dxlog_file3,
632
- L: 192,
633
- S: this,
634
- A: [
635
- "this._sendBuffers.size === 0",
636
- "'sendBuffers not empty'"
637
- ]
638
- });
546
+ invariant2(this._sendBuffers.size === 0, "sendBuffers not empty", { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 157, S: this, A: ["this._sendBuffers.size === 0", "'sendBuffers not empty'"] });
639
547
  this._sending = false;
640
548
  }
641
549
  };
@@ -667,13 +575,13 @@ var decodeChunk = (data, withLength) => {
667
575
  };
668
576
 
669
577
  // src/muxing/muxer.ts
578
+ var __dxlog_file4 = "/__w/dxos/dxos/packages/core/mesh/teleport/src/muxing/muxer.ts";
670
579
  function _ts_decorate(decorators, target, key, desc) {
671
580
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
672
581
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
673
582
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
674
583
  return c > 3 && r && Object.defineProperty(target, key, r), r;
675
584
  }
676
- var __dxlog_file4 = "/__w/dxos/dxos/packages/core/mesh/teleport/src/muxing/muxer.ts";
677
585
  var Command = schema2.getCodecForType("dxos.mesh.muxer.Command");
678
586
  var DEFAULT_SEND_COMMAND_TIMEOUT = 6e4;
679
587
  var DESTROY_COMMAND_SEND_TIMEOUT = 5e3;
@@ -685,10 +593,7 @@ var Muxer = class {
685
593
  _balancer = new Balancer(SYSTEM_CHANNEL_ID);
686
594
  _channelsByLocalId = /* @__PURE__ */ new Map();
687
595
  _channelsByTag = /* @__PURE__ */ new Map();
688
- _ctx = new Context2(void 0, {
689
- F: __dxlog_file4,
690
- L: 108
691
- });
596
+ _ctx = new Context2(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 39 });
692
597
  _sessionId;
693
598
  _nextId = 1;
694
599
  _closing = false;
@@ -721,15 +626,7 @@ var Muxer = class {
721
626
  tag,
722
627
  contentType: opts.contentType
723
628
  });
724
- invariant3(!channel.push, `Channel already open: ${tag}`, {
725
- F: __dxlog_file4,
726
- L: 152,
727
- S: this,
728
- A: [
729
- "!channel.push",
730
- "`Channel already open: ${tag}`"
731
- ]
732
- });
629
+ invariant3(!channel.push, `Channel already open: ${tag}`, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 72, S: this, A: ["!channel.push", "`Channel already open: ${tag}`"] });
733
630
  const stream = new Duplex2({
734
631
  write: (data, encoding, callback) => {
735
632
  this._sendData(channel, data).then(() => callback()).catch(callback);
@@ -777,15 +674,7 @@ var Muxer = class {
777
674
  tag,
778
675
  contentType: opts.contentType
779
676
  });
780
- invariant3(!channel.push, `Channel already open: ${tag}`, {
781
- F: __dxlog_file4,
782
- L: 212,
783
- S: this,
784
- A: [
785
- "!channel.push",
786
- "`Channel already open: ${tag}`"
787
- ]
788
- });
677
+ invariant3(!channel.push, `Channel already open: ${tag}`, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 121, S: this, A: ["!channel.push", "`Channel already open: ${tag}`"] });
789
678
  let inboundBuffer = [];
790
679
  let callback;
791
680
  channel.push = (data) => {
@@ -801,15 +690,7 @@ var Muxer = class {
801
690
  await this._sendData(channel, data, timeout);
802
691
  },
803
692
  subscribe: (cb) => {
804
- invariant3(!callback, "Only one subscriber is allowed", {
805
- F: __dxlog_file4,
806
- L: 234,
807
- S: this,
808
- A: [
809
- "!callback",
810
- "'Only one subscriber is allowed'"
811
- ]
812
- });
693
+ invariant3(!callback, "Only one subscriber is allowed", { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 140, S: this, A: ["!callback", "'Only one subscriber is allowed'"] });
813
694
  callback = cb;
814
695
  for (const data of inboundBuffer) {
815
696
  cb(data);
@@ -834,21 +715,11 @@ var Muxer = class {
834
715
  // initiate graceful close
835
716
  async close(err) {
836
717
  if (this._destroying) {
837
- log4("already destroying, ignoring graceful close request", void 0, {
838
- F: __dxlog_file4,
839
- L: 267,
840
- S: this,
841
- C: (f, a) => f(...a)
842
- });
718
+ log4("already destroying, ignoring graceful close request", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 166, S: this });
843
719
  return;
844
720
  }
845
721
  if (this._closing) {
846
- log4("already closing, ignoring graceful close request", void 0, {
847
- F: __dxlog_file4,
848
- L: 271,
849
- S: this,
850
- C: (f, a) => f(...a)
851
- });
722
+ log4("already closing, ignoring graceful close request", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 170, S: this });
852
723
  return;
853
724
  }
854
725
  this._closing = true;
@@ -859,12 +730,7 @@ var Muxer = class {
859
730
  }, SYSTEM_CHANNEL_ID, DESTROY_COMMAND_SEND_TIMEOUT).catch(async (err2) => {
860
731
  log4("error sending close command", {
861
732
  err: err2
862
- }, {
863
- F: __dxlog_file4,
864
- L: 286,
865
- S: this,
866
- C: (f, a) => f(...a)
867
- });
733
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 179, S: this });
868
734
  await this._dispose(err2);
869
735
  });
870
736
  await asyncTimeout2(this._dispose(err), GRACEFUL_CLOSE_TIMEOUT, new TimeoutError({
@@ -874,23 +740,13 @@ var Muxer = class {
874
740
  // force close without confirmation
875
741
  async destroy(err) {
876
742
  if (this._destroying) {
877
- log4("already destroying, ignoring destroy request", void 0, {
878
- F: __dxlog_file4,
879
- L: 303,
880
- S: this,
881
- C: (f, a) => f(...a)
882
- });
743
+ log4("already destroying, ignoring destroy request", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 192, S: this });
883
744
  return;
884
745
  }
885
746
  this._destroying = true;
886
747
  void this._ctx.dispose();
887
748
  if (this._closing) {
888
- log4("destroy cancelling graceful close", void 0, {
889
- F: __dxlog_file4,
890
- L: 309,
891
- S: this,
892
- C: (f, a) => f(...a)
893
- });
749
+ log4("destroy cancelling graceful close", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 198, S: this });
894
750
  this._closing = false;
895
751
  } else {
896
752
  await this._sendCommand({
@@ -900,34 +756,19 @@ var Muxer = class {
900
756
  }, SYSTEM_CHANNEL_ID).catch(async (err2) => {
901
757
  log4("error sending courtesy close command", {
902
758
  err: err2
903
- }, {
904
- F: __dxlog_file4,
905
- L: 322,
906
- S: this,
907
- C: (f, a) => f(...a)
908
- });
759
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 207, S: this });
909
760
  });
910
761
  }
911
762
  this._dispose(err).catch((err2) => {
912
763
  log4("error disposing after destroy", {
913
764
  err: err2
914
- }, {
915
- F: __dxlog_file4,
916
- L: 327,
917
- S: this,
918
- C: (f, a) => f(...a)
919
- });
765
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 213, S: this });
920
766
  });
921
767
  }
922
768
  // complete the termination, graceful or otherwise
923
769
  async _dispose(err) {
924
770
  if (this._disposed) {
925
- log4("already destroyed, ignoring dispose request", void 0, {
926
- F: __dxlog_file4,
927
- L: 335,
928
- S: this,
929
- C: (f, a) => f(...a)
930
- });
771
+ log4("already destroyed, ignoring dispose request", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 221, S: this });
931
772
  return;
932
773
  }
933
774
  void this._ctx.dispose();
@@ -945,30 +786,15 @@ var Muxer = class {
945
786
  if (this._disposed) {
946
787
  log4.warn("Received command after disposed", {
947
788
  cmd
948
- }, {
949
- F: __dxlog_file4,
950
- L: 358,
951
- S: this,
952
- C: (f, a) => f(...a)
953
- });
789
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 238, S: this });
954
790
  return;
955
791
  }
956
792
  if (cmd.close) {
957
793
  if (!this._closing) {
958
- log4("received peer close, initiating my own graceful close", void 0, {
959
- F: __dxlog_file4,
960
- L: 364,
961
- S: this,
962
- C: (f, a) => f(...a)
963
- });
794
+ log4("received peer close, initiating my own graceful close", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 245, S: this });
964
795
  await this.close(new Error("received peer close"));
965
796
  } else {
966
- log4("received close from peer, already closing", void 0, {
967
- F: __dxlog_file4,
968
- L: 367,
969
- S: this,
970
- C: (f, a) => f(...a)
971
- });
797
+ log4("received close from peer, already closing", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 248, S: this });
972
798
  }
973
799
  return;
974
800
  }
@@ -992,12 +818,7 @@ var Muxer = class {
992
818
  if (!stream.push) {
993
819
  log4.warn("Received data for channel before it was opened", {
994
820
  tag: stream.tag
995
- }, {
996
- F: __dxlog_file4,
997
- L: 396,
998
- S: this,
999
- C: (f, a) => f(...a)
1000
- });
821
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 271, S: this });
1001
822
  return;
1002
823
  }
1003
824
  stream.push(cmd.data.data);
@@ -1047,12 +868,7 @@ var Muxer = class {
1047
868
  log4.warn("frame size exceeds maximum safe value", {
1048
869
  size: data.length,
1049
870
  threshold: MAX_SAFE_FRAME_SIZE
1050
- }, {
1051
- F: __dxlog_file4,
1052
- L: 446,
1053
- S: this,
1054
- C: (f, a) => f(...a)
1055
- });
871
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 321, S: this });
1056
872
  }
1057
873
  channel.stats.bytesSent += data.length;
1058
874
  if (channel.remoteId === null) {
@@ -1070,12 +886,7 @@ var Muxer = class {
1070
886
  if (err) {
1071
887
  log4.warn("destroying channel with error", {
1072
888
  err
1073
- }, {
1074
- F: __dxlog_file4,
1075
- L: 469,
1076
- S: this,
1077
- C: (f, a) => f(...a)
1078
- });
889
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 341, S: this });
1079
890
  }
1080
891
  if (channel.destroy) {
1081
892
  channel.destroy(err);
@@ -1139,13 +950,13 @@ _ts_decorate([
1139
950
  ], Muxer.prototype, "sessionIdString", null);
1140
951
 
1141
952
  // src/teleport.ts
953
+ var __dxlog_file5 = "/__w/dxos/dxos/packages/core/mesh/teleport/src/teleport.ts";
1142
954
  function _ts_decorate2(decorators, target, key, desc) {
1143
955
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1144
956
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1145
957
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1146
958
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1147
959
  }
1148
- var __dxlog_file5 = "/__w/dxos/dxos/packages/core/mesh/teleport/src/teleport.ts";
1149
960
  var CONTROL_HEARTBEAT_INTERVAL = 1e4;
1150
961
  var CONTROL_HEARTBEAT_TIMEOUT = 6e4;
1151
962
  var Teleport = class {
@@ -1157,25 +968,12 @@ var Teleport = class {
1157
968
  onError: (err) => {
1158
969
  log5.info("error in teleport context", {
1159
970
  err
1160
- }, {
1161
- F: __dxlog_file5,
1162
- L: 40,
1163
- S: this,
1164
- C: (f, a) => f(...a)
1165
- });
971
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 30, S: this });
1166
972
  void this.destroy(err).catch(() => {
1167
- log5.error("Error during destroy", err, {
1168
- F: __dxlog_file5,
1169
- L: 42,
1170
- S: this,
1171
- C: (f, a) => f(...a)
1172
- });
973
+ log5.error("Error during destroy", err, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 34, S: this });
1173
974
  });
1174
975
  }
1175
- }, {
1176
- F: __dxlog_file5,
1177
- L: 38
1178
- });
976
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 28 });
1179
977
  _muxer = new Muxer();
1180
978
  _control;
1181
979
  _extensions = /* @__PURE__ */ new Map();
@@ -1187,33 +985,9 @@ var Teleport = class {
1187
985
  return this._open;
1188
986
  }
1189
987
  constructor({ initiator, localPeerId, remotePeerId, ...rest }) {
1190
- invariant4(typeof initiator === "boolean", void 0, {
1191
- F: __dxlog_file5,
1192
- L: 63,
1193
- S: this,
1194
- A: [
1195
- "typeof initiator === 'boolean'",
1196
- ""
1197
- ]
1198
- });
1199
- invariant4(PublicKey.isPublicKey(localPeerId), void 0, {
1200
- F: __dxlog_file5,
1201
- L: 64,
1202
- S: this,
1203
- A: [
1204
- "PublicKey.isPublicKey(localPeerId)",
1205
- ""
1206
- ]
1207
- });
1208
- invariant4(PublicKey.isPublicKey(remotePeerId), void 0, {
1209
- F: __dxlog_file5,
1210
- L: 65,
1211
- S: this,
1212
- A: [
1213
- "PublicKey.isPublicKey(remotePeerId)",
1214
- ""
1215
- ]
1216
- });
988
+ invariant4(typeof initiator === "boolean", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 49, S: this, A: ["typeof initiator === 'boolean'", ""] });
989
+ invariant4(PublicKey.isPublicKey(localPeerId), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 50, S: this, A: ["PublicKey.isPublicKey(localPeerId)", ""] });
990
+ invariant4(PublicKey.isPublicKey(remotePeerId), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 51, S: this, A: ["PublicKey.isPublicKey(remotePeerId)", ""] });
1217
991
  this.initiator = initiator;
1218
992
  this.localPeerId = localPeerId;
1219
993
  this.remotePeerId = remotePeerId;
@@ -1224,40 +998,17 @@ var Teleport = class {
1224
998
  if (this._destroying || this._aborting) {
1225
999
  return;
1226
1000
  }
1227
- log5.info("abort teleport due to onTimeout in ControlExtension", void 0, {
1228
- F: __dxlog_file5,
1229
- L: 78,
1230
- S: this,
1231
- C: (f, a) => f(...a)
1232
- });
1001
+ log5.info("abort teleport due to onTimeout in ControlExtension", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 62, S: this });
1233
1002
  this.abort(new TimeoutError2({
1234
1003
  message: "control extension"
1235
- })).catch((err) => log5.catch(err, void 0, {
1236
- F: __dxlog_file5,
1237
- L: 79,
1238
- S: this,
1239
- C: (f, a) => f(...a)
1240
- }));
1004
+ })).catch((err) => log5.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 65, S: this }));
1241
1005
  }
1242
1006
  }, this.localPeerId, this.remotePeerId);
1243
1007
  this._control.onExtensionRegistered.set(async (name) => {
1244
1008
  log5("remote extension", {
1245
1009
  name
1246
- }, {
1247
- F: __dxlog_file5,
1248
- L: 87,
1249
- S: this,
1250
- C: (f, a) => f(...a)
1251
- });
1252
- invariant4(!this._remoteExtensions.has(name), "Remote extension already exists", {
1253
- F: __dxlog_file5,
1254
- L: 88,
1255
- S: this,
1256
- A: [
1257
- "!this._remoteExtensions.has(name)",
1258
- "'Remote extension already exists'"
1259
- ]
1260
- });
1010
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 69, S: this });
1011
+ invariant4(!this._remoteExtensions.has(name), "Remote extension already exists", { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 72, S: this, A: ["!this._remoteExtensions.has(name)", "'Remote extension already exists'"] });
1261
1012
  this._remoteExtensions.add(name);
1262
1013
  if (this._extensions.has(name)) {
1263
1014
  try {
@@ -1270,12 +1021,7 @@ var Teleport = class {
1270
1021
  {
1271
1022
  this._muxer.stream.on("close", async () => {
1272
1023
  if (this._destroying || this._aborting) {
1273
- log5("destroy teleport due to muxer stream close, skipping due to already destroying/aborting", void 0, {
1274
- F: __dxlog_file5,
1275
- L: 104,
1276
- S: this,
1277
- C: (f, a) => f(...a)
1278
- });
1024
+ log5("destroy teleport due to muxer stream close, skipping due to already destroying/aborting", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 86, S: this });
1279
1025
  return;
1280
1026
  }
1281
1027
  await this.destroy();
@@ -1293,12 +1039,7 @@ var Teleport = class {
1293
1039
  bytesReceived: stats.bytesReceived,
1294
1040
  bytesReceivedRate: stats.bytesReceivedRate,
1295
1041
  channels: stats.channels
1296
- }, {
1297
- F: __dxlog_file5,
1298
- L: 117,
1299
- S: this,
1300
- C: (f, a) => f(...a)
1301
- });
1042
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 97, S: this });
1302
1043
  });
1303
1044
  }
1304
1045
  get sessionIdString() {
@@ -1315,12 +1056,7 @@ var Teleport = class {
1315
1056
  */
1316
1057
  async open(sessionId = PublicKey.random()) {
1317
1058
  this._sessionId = sessionId;
1318
- log5("open", void 0, {
1319
- F: __dxlog_file5,
1320
- L: 151,
1321
- S: this,
1322
- C: (f, a) => f(...a)
1323
- });
1059
+ log5("open", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 123, S: this });
1324
1060
  this._setExtension("dxos.mesh.teleport.control", this._control);
1325
1061
  await this._openExtension("dxos.mesh.teleport.control");
1326
1062
  this._open = true;
@@ -1343,12 +1079,7 @@ var Teleport = class {
1343
1079
  try {
1344
1080
  await extension.onAbort(err);
1345
1081
  } catch (err2) {
1346
- log5.catch(err2, void 0, {
1347
- F: __dxlog_file5,
1348
- L: 181,
1349
- S: this,
1350
- C: (f, a) => f(...a)
1351
- });
1082
+ log5.catch(err2, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 147, S: this });
1352
1083
  }
1353
1084
  }
1354
1085
  await this._muxer.destroy(err);
@@ -1359,12 +1090,7 @@ var Teleport = class {
1359
1090
  }
1360
1091
  log5("destroying teleport...", {
1361
1092
  extensionsCount: this._extensions.size
1362
- }, {
1363
- F: __dxlog_file5,
1364
- L: 194,
1365
- S: this,
1366
- C: (f, a) => f(...a)
1367
- });
1093
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 156, S: this });
1368
1094
  this._destroying = true;
1369
1095
  this._open = false;
1370
1096
  if (this._ctx.disposed) {
@@ -1375,37 +1101,17 @@ var Teleport = class {
1375
1101
  try {
1376
1102
  log5("destroying extension", {
1377
1103
  name: extension.constructor.name
1378
- }, {
1379
- F: __dxlog_file5,
1380
- L: 206,
1381
- S: this,
1382
- C: (f, a) => f(...a)
1383
- });
1104
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 167, S: this });
1384
1105
  await extension.onClose(err);
1385
1106
  log5("destroyed extension", {
1386
1107
  name: extension.constructor.name
1387
- }, {
1388
- F: __dxlog_file5,
1389
- L: 208,
1390
- S: this,
1391
- C: (f, a) => f(...a)
1392
- });
1108
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 171, S: this });
1393
1109
  } catch (err2) {
1394
- log5.catch(err2, void 0, {
1395
- F: __dxlog_file5,
1396
- L: 210,
1397
- S: this,
1398
- C: (f, a) => f(...a)
1399
- });
1110
+ log5.catch(err2, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 175, S: this });
1400
1111
  }
1401
1112
  }
1402
1113
  await this._muxer.close();
1403
- log5("teleport destroyed", void 0, {
1404
- F: __dxlog_file5,
1405
- L: 215,
1406
- S: this,
1407
- C: (f, a) => f(...a)
1408
- });
1114
+ log5("teleport destroyed", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 179, S: this });
1409
1115
  }
1410
1116
  addExtension(name, extension) {
1411
1117
  if (!this._open) {
@@ -1413,12 +1119,7 @@ var Teleport = class {
1413
1119
  }
1414
1120
  log5("addExtension", {
1415
1121
  name
1416
- }, {
1417
- F: __dxlog_file5,
1418
- L: 223,
1419
- S: this,
1420
- C: (f, a) => f(...a)
1421
- });
1122
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 185, S: this });
1422
1123
  this._setExtension(name, extension);
1423
1124
  scheduleTask(this._ctx, async () => {
1424
1125
  try {
@@ -1437,62 +1138,25 @@ var Teleport = class {
1437
1138
  }
1438
1139
  }
1439
1140
  _setExtension(extensionName, extension) {
1440
- invariant4(!extensionName.includes("/"), "Invalid extension name", {
1441
- F: __dxlog_file5,
1442
- L: 247,
1443
- S: this,
1444
- A: [
1445
- "!extensionName.includes('/')",
1446
- "'Invalid extension name'"
1447
- ]
1448
- });
1449
- invariant4(!this._extensions.has(extensionName), "Extension already exists", {
1450
- F: __dxlog_file5,
1451
- L: 248,
1452
- S: this,
1453
- A: [
1454
- "!this._extensions.has(extensionName)",
1455
- "'Extension already exists'"
1456
- ]
1457
- });
1141
+ invariant4(!extensionName.includes("/"), "Invalid extension name", { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 208, S: this, A: ["!extensionName.includes('/')", "'Invalid extension name'"] });
1142
+ invariant4(!this._extensions.has(extensionName), "Extension already exists", { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 209, S: this, A: ["!this._extensions.has(extensionName)", "'Extension already exists'"] });
1458
1143
  this._extensions.set(extensionName, extension);
1459
1144
  }
1460
1145
  async _openExtension(extensionName) {
1461
1146
  log5("open extension", {
1462
1147
  extensionName
1463
- }, {
1464
- F: __dxlog_file5,
1465
- L: 253,
1466
- S: this,
1467
- C: (f, a) => f(...a)
1468
- });
1148
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 213, S: this });
1469
1149
  const extension = this._extensions.get(extensionName) ?? failUndefined2();
1470
1150
  const context = {
1471
1151
  initiator: this.initiator,
1472
1152
  localPeerId: this.localPeerId,
1473
1153
  remotePeerId: this.remotePeerId,
1474
1154
  createPort: async (channelName, opts) => {
1475
- invariant4(!channelName.includes("/"), "Invalid channel name", {
1476
- F: __dxlog_file5,
1477
- L: 261,
1478
- S: this,
1479
- A: [
1480
- "!channelName.includes('/')",
1481
- "'Invalid channel name'"
1482
- ]
1483
- });
1155
+ invariant4(!channelName.includes("/"), "Invalid channel name", { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 222, S: this, A: ["!channelName.includes('/')", "'Invalid channel name'"] });
1484
1156
  return this._muxer.createPort(`${extensionName}/${channelName}`, opts);
1485
1157
  },
1486
1158
  createStream: async (channelName, opts) => {
1487
- invariant4(!channelName.includes("/"), "Invalid channel name", {
1488
- F: __dxlog_file5,
1489
- L: 265,
1490
- S: this,
1491
- A: [
1492
- "!channelName.includes('/')",
1493
- "'Invalid channel name'"
1494
- ]
1495
- });
1159
+ invariant4(!channelName.includes("/"), "Invalid channel name", { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 226, S: this, A: ["!channelName.includes('/')", "'Invalid channel name'"] });
1496
1160
  return this._muxer.createStream(`${extensionName}/${channelName}`, opts);
1497
1161
  },
1498
1162
  close: (err) => {
@@ -1504,12 +1168,7 @@ var Teleport = class {
1504
1168
  await extension.onOpen(context);
1505
1169
  log5("extension opened", {
1506
1170
  extensionName
1507
- }, {
1508
- F: __dxlog_file5,
1509
- L: 276,
1510
- S: this,
1511
- C: (f, a) => f(...a)
1512
- });
1171
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 236, S: this });
1513
1172
  }
1514
1173
  };
1515
1174
  _ts_decorate2([
@@ -1540,33 +1199,9 @@ var TestBuilder = class {
1540
1199
  await Promise.all(Array.from(this._peers).map((agent) => agent.destroy()));
1541
1200
  }
1542
1201
  async connect(peer1, peer2) {
1543
- invariant5(peer1 !== peer2, void 0, {
1544
- F: __dxlog_file6,
1545
- L: 38,
1546
- S: this,
1547
- A: [
1548
- "peer1 !== peer2",
1549
- ""
1550
- ]
1551
- });
1552
- invariant5(this._peers.has(peer1), void 0, {
1553
- F: __dxlog_file6,
1554
- L: 39,
1555
- S: this,
1556
- A: [
1557
- "this._peers.has(peer1)",
1558
- ""
1559
- ]
1560
- });
1561
- invariant5(this._peers.has(peer1), void 0, {
1562
- F: __dxlog_file6,
1563
- L: 40,
1564
- S: this,
1565
- A: [
1566
- "this._peers.has(peer1)",
1567
- ""
1568
- ]
1569
- });
1202
+ invariant5(peer1 !== peer2, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 26, S: this, A: ["peer1 !== peer2", ""] });
1203
+ invariant5(this._peers.has(peer1), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 27, S: this, A: ["this._peers.has(peer1)", ""] });
1204
+ invariant5(this._peers.has(peer1), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 28, S: this, A: ["this._peers.has(peer1)", ""] });
1570
1205
  const connection1 = peer1.createConnection({
1571
1206
  initiator: true,
1572
1207
  remotePeerId: peer2.peerId
@@ -1586,53 +1221,13 @@ var TestBuilder = class {
1586
1221
  ];
1587
1222
  }
1588
1223
  async disconnect(peer1, peer2) {
1589
- invariant5(peer1 !== peer2, void 0, {
1590
- F: __dxlog_file6,
1591
- L: 52,
1592
- S: this,
1593
- A: [
1594
- "peer1 !== peer2",
1595
- ""
1596
- ]
1597
- });
1598
- invariant5(this._peers.has(peer1), void 0, {
1599
- F: __dxlog_file6,
1600
- L: 53,
1601
- S: this,
1602
- A: [
1603
- "this._peers.has(peer1)",
1604
- ""
1605
- ]
1606
- });
1607
- invariant5(this._peers.has(peer1), void 0, {
1608
- F: __dxlog_file6,
1609
- L: 54,
1610
- S: this,
1611
- A: [
1612
- "this._peers.has(peer1)",
1613
- ""
1614
- ]
1615
- });
1224
+ invariant5(peer1 !== peer2, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 48, S: this, A: ["peer1 !== peer2", ""] });
1225
+ invariant5(this._peers.has(peer1), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 49, S: this, A: ["this._peers.has(peer1)", ""] });
1226
+ invariant5(this._peers.has(peer1), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 50, S: this, A: ["this._peers.has(peer1)", ""] });
1616
1227
  const connection1 = Array.from(peer1.connections).find((connection) => connection.remotePeerId.equals(peer2.peerId));
1617
1228
  const connection2 = Array.from(peer2.connections).find((connection) => connection.remotePeerId.equals(peer1.peerId));
1618
- invariant5(connection1, void 0, {
1619
- F: __dxlog_file6,
1620
- L: 63,
1621
- S: this,
1622
- A: [
1623
- "connection1",
1624
- ""
1625
- ]
1626
- });
1627
- invariant5(connection2, void 0, {
1628
- F: __dxlog_file6,
1629
- L: 64,
1630
- S: this,
1631
- A: [
1632
- "connection2",
1633
- ""
1634
- ]
1635
- });
1229
+ invariant5(connection1, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 53, S: this, A: ["connection1", ""] });
1230
+ invariant5(connection2, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 54, S: this, A: ["connection2", ""] });
1636
1231
  await Promise.all([
1637
1232
  peer1.closeConnection(connection1),
1638
1233
  peer2.closeConnection(connection2)
@@ -1655,28 +1250,12 @@ var TestPeer = class {
1655
1250
  return connection;
1656
1251
  }
1657
1252
  async openConnection(connection) {
1658
- invariant5(this.connections.has(connection), void 0, {
1659
- F: __dxlog_file6,
1660
- L: 85,
1661
- S: this,
1662
- A: [
1663
- "this.connections.has(connection)",
1664
- ""
1665
- ]
1666
- });
1253
+ invariant5(this.connections.has(connection), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 75, S: this, A: ["this.connections.has(connection)", ""] });
1667
1254
  await connection.teleport.open(PublicKey2.random());
1668
1255
  await this.onOpen(connection);
1669
1256
  }
1670
1257
  async closeConnection(connection) {
1671
- invariant5(this.connections.has(connection), void 0, {
1672
- F: __dxlog_file6,
1673
- L: 91,
1674
- S: this,
1675
- A: [
1676
- "this.connections.has(connection)",
1677
- ""
1678
- ]
1679
- });
1258
+ invariant5(this.connections.has(connection), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 80, S: this, A: ["this.connections.has(connection)", ""] });
1680
1259
  await this.onClose(connection);
1681
1260
  await connection.teleport.close();
1682
1261
  this.connections.delete(connection);
@@ -1690,22 +1269,12 @@ var TestPeer = class {
1690
1269
  var pipeStreams = (stream1, stream2) => {
1691
1270
  pipeline(stream1, stream2, (err) => {
1692
1271
  if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
1693
- log6.catch(err, void 0, {
1694
- F: __dxlog_file6,
1695
- L: 107,
1696
- S: void 0,
1697
- C: (f, a) => f(...a)
1698
- });
1272
+ log6.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 94, S: void 0 });
1699
1273
  }
1700
1274
  });
1701
1275
  pipeline(stream2, stream1, (err) => {
1702
1276
  if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
1703
- log6.catch(err, void 0, {
1704
- F: __dxlog_file6,
1705
- L: 112,
1706
- S: void 0,
1707
- C: (f, a) => f(...a)
1708
- });
1277
+ log6.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file6, L: 99, S: void 0 });
1709
1278
  }
1710
1279
  });
1711
1280
  };
@@ -1755,12 +1324,7 @@ var TestExtension = class {
1755
1324
  log7("onOpen", {
1756
1325
  localPeerId: context.localPeerId,
1757
1326
  remotePeerId: context.remotePeerId
1758
- }, {
1759
- F: __dxlog_file7,
1760
- L: 34,
1761
- S: this,
1762
- C: (f, a) => f(...a)
1763
- });
1327
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file7, L: 23, S: this });
1764
1328
  this.extensionContext = context;
1765
1329
  this._rpc = createProtoRpcPeer2({
1766
1330
  port: await context.createPort("rpc", {
@@ -1792,12 +1356,7 @@ var TestExtension = class {
1792
1356
  async onClose(err) {
1793
1357
  log7("onClose", {
1794
1358
  err
1795
- }, {
1796
- F: __dxlog_file7,
1797
- L: 68,
1798
- S: this,
1799
- C: (f, a) => f(...a)
1800
- });
1359
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file7, L: 57, S: this });
1801
1360
  await this.callbacks.onClose?.();
1802
1361
  this.closed.wake();
1803
1362
  await this._rpc?.close();
@@ -1805,12 +1364,7 @@ var TestExtension = class {
1805
1364
  async onAbort(err) {
1806
1365
  log7("onAbort", {
1807
1366
  err
1808
- }, {
1809
- F: __dxlog_file7,
1810
- L: 75,
1811
- S: this,
1812
- C: (f, a) => f(...a)
1813
- });
1367
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file7, L: 65, S: this });
1814
1368
  await this.callbacks.onAbort?.();
1815
1369
  this.aborted.wake();
1816
1370
  await this._rpc?.abort();
@@ -1822,15 +1376,7 @@ var TestExtension = class {
1822
1376
  const res = await asyncTimeout3(this._rpc.rpc.TestService.testCall({
1823
1377
  data: message
1824
1378
  }), 1500);
1825
- invariant6(res.data === message, void 0, {
1826
- F: __dxlog_file7,
1827
- L: 84,
1828
- S: this,
1829
- A: [
1830
- "res.data === message",
1831
- ""
1832
- ]
1833
- });
1379
+ invariant6(res.data === message, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file7, L: 79, S: this, A: ["res.data === message", ""] });
1834
1380
  }
1835
1381
  /**
1836
1382
  * Force-close the connection.
@@ -1863,15 +1409,7 @@ var TestExtensionWithStreams = class {
1863
1409
  return this.extensionContext?.remotePeerId;
1864
1410
  }
1865
1411
  async _openStream(streamTag, interval = 5, chunkSize = 2048) {
1866
- invariant7(!this._streams.has(streamTag), `Stream already exists: ${streamTag}`, {
1867
- F: __dxlog_file8,
1868
- L: 39,
1869
- S: this,
1870
- A: [
1871
- "!this._streams.has(streamTag)",
1872
- "`Stream already exists: ${streamTag}`"
1873
- ]
1874
- });
1412
+ invariant7(!this._streams.has(streamTag), `Stream already exists: ${streamTag}`, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 25, S: this, A: ["!this._streams.has(streamTag)", "`Stream already exists: ${streamTag}`"] });
1875
1413
  const networkStream = await this.extensionContext.createStream(streamTag, {
1876
1414
  contentType: "application/x-test-stream"
1877
1415
  });
@@ -1920,24 +1458,11 @@ var TestExtensionWithStreams = class {
1920
1458
  receiveErrors,
1921
1459
  from: this.extensionContext?.localPeerId,
1922
1460
  to: this.extensionContext?.remotePeerId
1923
- }, {
1924
- F: __dxlog_file8,
1925
- L: 93,
1926
- S: this,
1927
- C: (f, a) => f(...a)
1928
- });
1461
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 67, S: this });
1929
1462
  }, 100);
1930
1463
  }
1931
1464
  _closeStream(streamTag) {
1932
- invariant7(this._streams.has(streamTag), `Stream does not exist: ${streamTag}`, {
1933
- F: __dxlog_file8,
1934
- L: 106,
1935
- S: this,
1936
- A: [
1937
- "this._streams.has(streamTag)",
1938
- "`Stream does not exist: ${streamTag}`"
1939
- ]
1940
- });
1465
+ invariant7(this._streams.has(streamTag), `Stream does not exist: ${streamTag}`, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 79, S: this, A: ["this._streams.has(streamTag)", "`Stream does not exist: ${streamTag}`"] });
1941
1466
  const stream = this._streams.get(streamTag);
1942
1467
  clearTimeout(stream.timer);
1943
1468
  clearTimeout(stream.reportingTimer);
@@ -1956,12 +1481,7 @@ var TestExtensionWithStreams = class {
1956
1481
  log8("onOpen", {
1957
1482
  localPeerId: context.localPeerId,
1958
1483
  remotePeerId: context.remotePeerId
1959
- }, {
1960
- F: __dxlog_file8,
1961
- L: 128,
1962
- S: this,
1963
- C: (f, a) => f(...a)
1964
- });
1484
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 95, S: this });
1965
1485
  this.extensionContext = context;
1966
1486
  this._rpc = createProtoRpcPeer3({
1967
1487
  port: await context.createPort("rpc", {
@@ -2005,23 +1525,13 @@ var TestExtensionWithStreams = class {
2005
1525
  async onClose(err) {
2006
1526
  log8("onClose", {
2007
1527
  err
2008
- }, {
2009
- F: __dxlog_file8,
2010
- L: 179,
2011
- S: this,
2012
- C: (f, a) => f(...a)
2013
- });
1528
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 140, S: this });
2014
1529
  await this.callbacks.onClose?.();
2015
1530
  this.closed.wake();
2016
1531
  for (const [streamTag, stream] of Object.entries(this._streams)) {
2017
1532
  log8("closing stream", {
2018
1533
  streamTag
2019
- }, {
2020
- F: __dxlog_file8,
2021
- L: 183,
2022
- S: this,
2023
- C: (f, a) => f(...a)
2024
- });
1534
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 146, S: this });
2025
1535
  clearTimeout(stream.interval);
2026
1536
  stream.networkStream.destroy();
2027
1537
  }
@@ -2030,12 +1540,7 @@ var TestExtensionWithStreams = class {
2030
1540
  async onAbort(err) {
2031
1541
  log8("onAbort", {
2032
1542
  err
2033
- }, {
2034
- F: __dxlog_file8,
2035
- L: 191,
2036
- S: this,
2037
- C: (f, a) => f(...a)
2038
- });
1543
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 155, S: this });
2039
1544
  await this.callbacks.onAbort?.();
2040
1545
  this.aborted.wake();
2041
1546
  await this._rpc?.abort();
@@ -2052,15 +1557,7 @@ var TestExtensionWithStreams = class {
2052
1557
  streamLoadInterval,
2053
1558
  streamLoadChunkSize
2054
1559
  });
2055
- invariant7(data === streamTag, void 0, {
2056
- F: __dxlog_file8,
2057
- L: 207,
2058
- S: this,
2059
- A: [
2060
- "data === streamTag",
2061
- ""
2062
- ]
2063
- });
1560
+ invariant7(data === streamTag, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 174, S: this, A: ["data === streamTag", ""] });
2064
1561
  await this._openStream(streamTag, streamLoadInterval, streamLoadChunkSize);
2065
1562
  return streamTag;
2066
1563
  }
@@ -2071,15 +1568,7 @@ var TestExtensionWithStreams = class {
2071
1568
  const { data, bytesSent, bytesReceived, sendErrors, receiveErrors, runningTime } = await this._rpc.rpc.TestServiceWithStreams.closeTestStream({
2072
1569
  data: streamTag
2073
1570
  });
2074
- invariant7(data === streamTag, void 0, {
2075
- F: __dxlog_file8,
2076
- L: 220,
2077
- S: this,
2078
- A: [
2079
- "data === streamTag",
2080
- ""
2081
- ]
2082
- });
1571
+ invariant7(data === streamTag, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file8, L: 185, S: this, A: ["data === streamTag", ""] });
2083
1572
  const local = this._closeStream(streamTag);
2084
1573
  return {
2085
1574
  streamTag,
@@ -2115,4 +1604,4 @@ export {
2115
1604
  TestExtension,
2116
1605
  TestExtensionWithStreams
2117
1606
  };
2118
- //# sourceMappingURL=chunk-ITQR2ADK.mjs.map
1607
+ //# sourceMappingURL=chunk-LECANKBC.mjs.map