@dxos/echo-pipeline 0.6.1-main.fac53f5 → 0.6.1-main.ff751ec

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.
@@ -25,13 +25,13 @@ import {
25
25
  mapTimeframeToFeedIndexes,
26
26
  startAfter,
27
27
  valueEncoding
28
- } from "./chunk-HS77A4I4.mjs";
28
+ } from "./chunk-O3MAK5PY.mjs";
29
29
 
30
30
  // packages/core/echo/echo-pipeline/src/automerge/automerge-host.ts
31
31
  import { Event, asyncTimeout } from "@dxos/async";
32
32
  import { next as automerge, getBackend, getHeads, isAutomerge, save } from "@dxos/automerge/automerge";
33
33
  import { Repo } from "@dxos/automerge/automerge-repo";
34
- import { Context, cancelWithContext } from "@dxos/context";
34
+ import { Resource as Resource2, cancelWithContext } from "@dxos/context";
35
35
  import { PublicKey } from "@dxos/keys";
36
36
  import { objectPointerCodec } from "@dxos/protocols";
37
37
  import { trace } from "@dxos/tracing";
@@ -87,19 +87,13 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
87
87
  disconnect() {
88
88
  }
89
89
  async open() {
90
- invariant(this._lifecycleState === LifecycleState.CLOSED, void 0, {
91
- F: __dxlog_file,
92
- L: 60,
93
- S: this,
94
- A: [
95
- "this._lifecycleState === LifecycleState.CLOSED",
96
- ""
97
- ]
98
- });
90
+ if (this._lifecycleState === LifecycleState.OPEN) {
91
+ return;
92
+ }
99
93
  this._lifecycleState = LifecycleState.OPEN;
100
94
  log("emit ready", void 0, {
101
95
  F: __dxlog_file,
102
- L: 63,
96
+ L: 65,
103
97
  S: this,
104
98
  C: (f, a) => f(...a)
105
99
  });
@@ -108,15 +102,9 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
108
102
  });
109
103
  }
110
104
  async close() {
111
- invariant(this._lifecycleState === LifecycleState.OPEN, void 0, {
112
- F: __dxlog_file,
113
- L: 71,
114
- S: this,
115
- A: [
116
- "this._lifecycleState === LifecycleState.OPEN",
117
- ""
118
- ]
119
- });
105
+ if (this._lifecycleState === LifecycleState.CLOSED) {
106
+ return;
107
+ }
120
108
  for (const replicator of this._replicators) {
121
109
  await replicator.disconnect();
122
110
  }
@@ -131,7 +119,7 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
131
119
  async addReplicator(replicator) {
132
120
  invariant(this._lifecycleState === LifecycleState.OPEN, void 0, {
133
121
  F: __dxlog_file,
134
- L: 87,
122
+ L: 91,
135
123
  S: this,
136
124
  A: [
137
125
  "this._lifecycleState === LifecycleState.OPEN",
@@ -140,7 +128,7 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
140
128
  });
141
129
  invariant(this.peerId, void 0, {
142
130
  F: __dxlog_file,
143
- L: 88,
131
+ L: 92,
144
132
  S: this,
145
133
  A: [
146
134
  "this.peerId",
@@ -149,7 +137,7 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
149
137
  });
150
138
  invariant(!this._replicators.has(replicator), void 0, {
151
139
  F: __dxlog_file,
152
- L: 89,
140
+ L: 93,
153
141
  S: this,
154
142
  A: [
155
143
  "!this._replicators.has(replicator)",
@@ -168,7 +156,7 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
168
156
  async removeReplicator(replicator) {
169
157
  invariant(this._lifecycleState === LifecycleState.OPEN, void 0, {
170
158
  F: __dxlog_file,
171
- L: 103,
159
+ L: 107,
172
160
  S: this,
173
161
  A: [
174
162
  "this._lifecycleState === LifecycleState.OPEN",
@@ -177,7 +165,7 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
177
165
  });
178
166
  invariant(this._replicators.has(replicator), void 0, {
179
167
  F: __dxlog_file,
180
- L: 104,
168
+ L: 108,
181
169
  S: this,
182
170
  A: [
183
171
  "this._replicators.has(replicator)",
@@ -199,13 +187,13 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
199
187
  peerId: connection.peerId
200
188
  }, {
201
189
  F: __dxlog_file,
202
- L: 119,
190
+ L: 123,
203
191
  S: this,
204
192
  C: (f, a) => f(...a)
205
193
  });
206
194
  invariant(!this._connections.has(connection.peerId), void 0, {
207
195
  F: __dxlog_file,
208
- L: 120,
196
+ L: 124,
209
197
  S: this,
210
198
  A: [
211
199
  "!this._connections.has(connection.peerId as PeerId)",
@@ -234,7 +222,7 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
234
222
  if (connectionEntry.isOpen) {
235
223
  log.catch(err, void 0, {
236
224
  F: __dxlog_file,
237
- L: 139,
225
+ L: 143,
238
226
  S: this,
239
227
  C: (f, a) => f(...a)
240
228
  });
@@ -245,7 +233,7 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
245
233
  peerId: connection.peerId
246
234
  }, {
247
235
  F: __dxlog_file,
248
- L: 144,
236
+ L: 148,
249
237
  S: this,
250
238
  C: (f, a) => f(...a)
251
239
  });
@@ -260,14 +248,14 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
260
248
  peerId: connection.peerId
261
249
  }, {
262
250
  F: __dxlog_file,
263
- L: 153,
251
+ L: 157,
264
252
  S: this,
265
253
  C: (f, a) => f(...a)
266
254
  });
267
255
  const entry = this._connections.get(connection.peerId);
268
256
  invariant(entry, void 0, {
269
257
  F: __dxlog_file,
270
- L: 155,
258
+ L: 159,
271
259
  S: this,
272
260
  A: [
273
261
  "entry",
@@ -284,14 +272,14 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
284
272
  peerId: connection.peerId
285
273
  }, {
286
274
  F: __dxlog_file,
287
- L: 161,
275
+ L: 165,
288
276
  S: this,
289
277
  C: (f, a) => f(...a)
290
278
  });
291
279
  const entry = this._connections.get(connection.peerId);
292
280
  invariant(entry, void 0, {
293
281
  F: __dxlog_file,
294
- L: 163,
282
+ L: 167,
295
283
  S: this,
296
284
  A: [
297
285
  "entry",
@@ -304,13 +292,13 @@ var EchoNetworkAdapter = class extends NetworkAdapter {
304
292
  });
305
293
  void entry.reader.cancel().catch((err) => log.catch(err, void 0, {
306
294
  F: __dxlog_file,
307
- L: 168,
295
+ L: 172,
308
296
  S: this,
309
297
  C: (f, a) => f(...a)
310
298
  }));
311
299
  void entry.writer.abort().catch((err) => log.catch(err, void 0, {
312
300
  F: __dxlog_file,
313
- L: 169,
301
+ L: 173,
314
302
  S: this,
315
303
  C: (f, a) => f(...a)
316
304
  }));
@@ -341,6 +329,34 @@ var createEchoPeerMetadata = () => ({
341
329
  });
342
330
  var isEchoPeerMetadata = (metadata) => metadata?.dxos_peerSource === "EchoNetworkAdapter";
343
331
 
332
+ // packages/core/echo/echo-pipeline/src/automerge/heads-store.ts
333
+ import { headsEncoding } from "@dxos/indexing";
334
+ var HeadsStore = class {
335
+ constructor({ db }) {
336
+ this._db = db;
337
+ }
338
+ setHeads(documentId, heads, batch) {
339
+ batch.put(documentId, heads, {
340
+ sublevel: this._db,
341
+ keyEncoding: "utf8",
342
+ valueEncoding: headsEncoding
343
+ });
344
+ }
345
+ async getHeads(documentId) {
346
+ try {
347
+ return await this._db.get(documentId, {
348
+ keyEncoding: "utf8",
349
+ valueEncoding: headsEncoding
350
+ });
351
+ } catch (err) {
352
+ if (err.notFound) {
353
+ return void 0;
354
+ }
355
+ throw err;
356
+ }
357
+ }
358
+ };
359
+
344
360
  // packages/core/echo/echo-pipeline/src/automerge/leveldb-storage-adapter.ts
345
361
  import { LifecycleState as LifecycleState2, Resource } from "@dxos/context";
346
362
  var LevelDBStorageAdapter = class extends Resource {
@@ -586,26 +602,25 @@ function _ts_decorate2(decorators, target, key, desc) {
586
602
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
587
603
  return c > 3 && r && Object.defineProperty(target, key, r), r;
588
604
  }
589
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/automerge/automerge-host.ts";
590
- var AutomergeHost = class {
605
+ var AutomergeHost = class extends Resource2 {
591
606
  constructor({ db, indexMetadataStore }) {
592
- this._ctx = new Context(void 0, {
593
- F: __dxlog_file3,
594
- L: 71
595
- });
607
+ super();
596
608
  this._echoNetworkAdapter = new EchoNetworkAdapter({
597
609
  getContainingSpaceForDocument: this._getContainingSpaceForDocument.bind(this)
598
610
  });
599
611
  this._storage = new LevelDBStorageAdapter({
600
- db,
612
+ db: db.sublevel("automerge"),
601
613
  callbacks: {
602
614
  beforeSave: async (params) => this._beforeSave(params),
603
615
  afterSave: async () => this._afterSave()
604
616
  }
605
617
  });
618
+ this._headsStore = new HeadsStore({
619
+ db: db.sublevel("heads")
620
+ });
606
621
  this._indexMetadataStore = indexMetadataStore;
607
622
  }
608
- async open() {
623
+ async _open() {
609
624
  this._peerId = `host-${PublicKey.random().toHex()}`;
610
625
  await this._storage.open?.();
611
626
  this._clientNetwork = new LocalHostNetworkAdapter();
@@ -625,7 +640,7 @@ var AutomergeHost = class {
625
640
  await this._clientNetwork.whenConnected();
626
641
  await this._echoNetworkAdapter.whenConnected();
627
642
  }
628
- async close() {
643
+ async _close() {
629
644
  await this._storage.close?.();
630
645
  await this._clientNetwork.close();
631
646
  await this._echoNetworkAdapter.close();
@@ -705,7 +720,8 @@ var AutomergeHost = class {
705
720
  return;
706
721
  }
707
722
  const spaceKey = getSpaceKeyFromDoc(doc) ?? void 0;
708
- const lastAvailableHash = getHeads(doc);
723
+ const heads = getHeads(doc);
724
+ this._headsStore.setHeads(handle.documentId, heads, batch);
709
725
  const objectIds = Object.keys(doc.objects ?? {});
710
726
  const encodedIds = objectIds.map((objectId) => objectPointerCodec.encode({
711
727
  documentId: handle.documentId,
@@ -714,7 +730,7 @@ var AutomergeHost = class {
714
730
  }));
715
731
  const idToLastHash = new Map(encodedIds.map((id) => [
716
732
  id,
717
- lastAvailableHash
733
+ heads
718
734
  ]));
719
735
  this._indexMetadataStore.markDirty(idToLastHash, batch);
720
736
  }
@@ -763,18 +779,30 @@ var AutomergeHost = class {
763
779
  /**
764
780
  * Flush documents to disk.
765
781
  */
766
- async flush({ states }) {
782
+ async flush({ states } = {}) {
767
783
  if (states) {
768
784
  await Promise.all(states.map(async ({ heads, documentId }) => {
769
785
  if (!heads) {
770
786
  return;
771
787
  }
772
- const handle = this.repo.handles[documentId] ?? this._repo.find(documentId);
788
+ const handle = this._repo.handles[documentId] ?? this._repo.find(documentId);
773
789
  await waitForHeads(handle, heads);
774
790
  }) ?? []);
775
791
  }
776
792
  await this._repo.flush(states?.map(({ documentId }) => documentId));
777
793
  }
794
+ async getHeads(documentId) {
795
+ const handle = this._repo.handles[documentId];
796
+ if (handle) {
797
+ const doc = handle.docSync();
798
+ if (!doc) {
799
+ return void 0;
800
+ }
801
+ return getHeads(doc);
802
+ } else {
803
+ return this._headsStore.getHeads(documentId);
804
+ }
805
+ }
778
806
  /**
779
807
  * Host <-> Client sync.
780
808
  */
@@ -860,7 +888,7 @@ function _ts_decorate3(decorators, target, key, desc) {
860
888
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
861
889
  return c > 3 && r && Object.defineProperty(target, key, r), r;
862
890
  }
863
- var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/automerge/automerge-doc-loader.ts";
891
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/automerge/automerge-doc-loader.ts";
864
892
  var AutomergeDocumentLoaderImpl = class {
865
893
  constructor(_spaceId, _repo, _spaceKey) {
866
894
  this._spaceId = _spaceId;
@@ -887,7 +915,7 @@ var AutomergeDocumentLoaderImpl = class {
887
915
  const existingDocHandle = await this._initDocHandle(ctx, spaceState.rootUrl);
888
916
  const doc = existingDocHandle.docSync();
889
917
  invariant3(doc, void 0, {
890
- F: __dxlog_file4,
918
+ F: __dxlog_file3,
891
919
  L: 84,
892
920
  S: this,
893
921
  A: [
@@ -896,7 +924,7 @@ var AutomergeDocumentLoaderImpl = class {
896
924
  ]
897
925
  });
898
926
  invariant3(doc.version === SpaceDocVersion.CURRENT, void 0, {
899
- F: __dxlog_file4,
927
+ F: __dxlog_file3,
900
928
  L: 85,
901
929
  S: this,
902
930
  A: [
@@ -917,7 +945,7 @@ var AutomergeDocumentLoaderImpl = class {
917
945
  const urlsToLoad = {};
918
946
  for (const objectId of objectIds) {
919
947
  invariant3(this._spaceRootDocHandle, void 0, {
920
- F: __dxlog_file4,
948
+ F: __dxlog_file3,
921
949
  L: 97,
922
950
  S: this,
923
951
  A: [
@@ -930,7 +958,7 @@ var AutomergeDocumentLoaderImpl = class {
930
958
  }
931
959
  const spaceRootDoc = this._spaceRootDocHandle.docSync();
932
960
  invariant3(spaceRootDoc, void 0, {
933
- F: __dxlog_file4,
961
+ F: __dxlog_file3,
934
962
  L: 102,
935
963
  S: this,
936
964
  A: [
@@ -944,7 +972,7 @@ var AutomergeDocumentLoaderImpl = class {
944
972
  log2.info("loading delayed until object links are initialized", {
945
973
  objectId
946
974
  }, {
947
- F: __dxlog_file4,
975
+ F: __dxlog_file3,
948
976
  L: 106,
949
977
  S: this,
950
978
  C: (f, a) => f(...a)
@@ -960,7 +988,7 @@ var AutomergeDocumentLoaderImpl = class {
960
988
  }
961
989
  getObjectDocumentId(objectId) {
962
990
  invariant3(this._spaceRootDocHandle, void 0, {
963
- F: __dxlog_file4,
991
+ F: __dxlog_file3,
964
992
  L: 118,
965
993
  S: this,
966
994
  A: [
@@ -970,7 +998,7 @@ var AutomergeDocumentLoaderImpl = class {
970
998
  });
971
999
  const spaceRootDoc = this._spaceRootDocHandle.docSync();
972
1000
  invariant3(spaceRootDoc, void 0, {
973
- F: __dxlog_file4,
1001
+ F: __dxlog_file3,
974
1002
  L: 120,
975
1003
  S: this,
976
1004
  A: [
@@ -994,7 +1022,7 @@ var AutomergeDocumentLoaderImpl = class {
994
1022
  }
995
1023
  getSpaceRootDocHandle() {
996
1024
  invariant3(this._spaceRootDocHandle, void 0, {
997
- F: __dxlog_file4,
1025
+ F: __dxlog_file3,
998
1026
  L: 140,
999
1027
  S: this,
1000
1028
  A: [
@@ -1006,7 +1034,7 @@ var AutomergeDocumentLoaderImpl = class {
1006
1034
  }
1007
1035
  createDocumentForObject(objectId) {
1008
1036
  invariant3(this._spaceRootDocHandle, void 0, {
1009
- F: __dxlog_file4,
1037
+ F: __dxlog_file3,
1010
1038
  L: 145,
1011
1039
  S: this,
1012
1040
  A: [
@@ -1051,7 +1079,7 @@ var AutomergeDocumentLoaderImpl = class {
1051
1079
  ...logMeta,
1052
1080
  actualDocumentUrl: objectDocumentHandle.url
1053
1081
  }, {
1054
- F: __dxlog_file4,
1082
+ F: __dxlog_file3,
1055
1083
  L: 177,
1056
1084
  S: this,
1057
1085
  C: (f, a) => f(...a)
@@ -1060,7 +1088,7 @@ var AutomergeDocumentLoaderImpl = class {
1060
1088
  }
1061
1089
  if (objectDocumentHandle?.url === automergeUrl) {
1062
1090
  log2.warn("object document was already loaded", logMeta, {
1063
- F: __dxlog_file4,
1091
+ F: __dxlog_file3,
1064
1092
  L: 184,
1065
1093
  S: this,
1066
1094
  C: (f, a) => f(...a)
@@ -1069,7 +1097,7 @@ var AutomergeDocumentLoaderImpl = class {
1069
1097
  }
1070
1098
  const handle = this._repo.find(automergeUrl);
1071
1099
  log2.debug("document loading triggered", logMeta, {
1072
- F: __dxlog_file4,
1100
+ F: __dxlog_file3,
1073
1101
  L: 188,
1074
1102
  S: this,
1075
1103
  C: (f, a) => f(...a)
@@ -1092,7 +1120,7 @@ var AutomergeDocumentLoaderImpl = class {
1092
1120
  id: docHandle.documentId,
1093
1121
  state: docHandle.state
1094
1122
  }, {
1095
- F: __dxlog_file4,
1123
+ F: __dxlog_file3,
1096
1124
  L: 204,
1097
1125
  S: this,
1098
1126
  C: (f, a) => f(...a)
@@ -1117,16 +1145,14 @@ var AutomergeDocumentLoaderImpl = class {
1117
1145
  }
1118
1146
  async _createObjectOnDocumentLoad(handle, objectId) {
1119
1147
  try {
1120
- await handle.doc([
1121
- "ready"
1122
- ]);
1148
+ await handle.whenReady();
1123
1149
  const logMeta = {
1124
1150
  objectId,
1125
1151
  docUrl: handle.url
1126
1152
  };
1127
1153
  if (this.onObjectDocumentLoaded.listenerCount() === 0) {
1128
1154
  log2.info("document loaded after all listeners were removed", logMeta, {
1129
- F: __dxlog_file4,
1155
+ F: __dxlog_file3,
1130
1156
  L: 231,
1131
1157
  S: this,
1132
1158
  C: (f, a) => f(...a)
@@ -1136,7 +1162,7 @@ var AutomergeDocumentLoaderImpl = class {
1136
1162
  const objectDocHandle = this._objectDocumentHandles.get(objectId);
1137
1163
  if (objectDocHandle?.url !== handle.url) {
1138
1164
  log2.warn("object was rebound while a document was loading, discarding handle", logMeta, {
1139
- F: __dxlog_file4,
1165
+ F: __dxlog_file3,
1140
1166
  L: 236,
1141
1167
  S: this,
1142
1168
  C: (f, a) => f(...a)
@@ -1155,7 +1181,7 @@ var AutomergeDocumentLoaderImpl = class {
1155
1181
  retryLoading: shouldRetryLoading,
1156
1182
  err
1157
1183
  }, {
1158
- F: __dxlog_file4,
1184
+ F: __dxlog_file3,
1159
1185
  L: 242,
1160
1186
  S: this,
1161
1187
  C: (f, a) => f(...a)
@@ -1177,13 +1203,13 @@ AutomergeDocumentLoaderImpl = _ts_decorate3([
1177
1203
 
1178
1204
  // packages/core/echo/echo-pipeline/src/automerge/mesh-echo-replicator.ts
1179
1205
  import { cbor as cbor2 } from "@dxos/automerge/automerge-repo";
1180
- import { Resource as Resource2 } from "@dxos/context";
1206
+ import { Resource as Resource3 } from "@dxos/context";
1181
1207
  import { invariant as invariant4 } from "@dxos/invariant";
1182
1208
  import { PublicKey as PublicKey2 } from "@dxos/keys";
1183
1209
  import { log as log3 } from "@dxos/log";
1184
1210
  import { AutomergeReplicator } from "@dxos/teleport-extension-automerge-replicator";
1185
1211
  import { ComplexMap, ComplexSet, defaultMap } from "@dxos/util";
1186
- var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/automerge/mesh-echo-replicator.ts";
1212
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/automerge/mesh-echo-replicator.ts";
1187
1213
  var MeshEchoReplicator = class {
1188
1214
  constructor() {
1189
1215
  this._connections = /* @__PURE__ */ new Set();
@@ -1210,7 +1236,7 @@ var MeshEchoReplicator = class {
1210
1236
  }
1211
1237
  createExtension() {
1212
1238
  invariant4(this._context, void 0, {
1213
- F: __dxlog_file5,
1239
+ F: __dxlog_file4,
1214
1240
  L: 54,
1215
1241
  S: this,
1216
1242
  A: [
@@ -1224,13 +1250,13 @@ var MeshEchoReplicator = class {
1224
1250
  log3("onRemoteConnected", {
1225
1251
  peerId: connection.peerId
1226
1252
  }, {
1227
- F: __dxlog_file5,
1253
+ F: __dxlog_file4,
1228
1254
  L: 59,
1229
1255
  S: this,
1230
1256
  C: (f, a) => f(...a)
1231
1257
  });
1232
1258
  invariant4(this._context, void 0, {
1233
- F: __dxlog_file5,
1259
+ F: __dxlog_file4,
1234
1260
  L: 60,
1235
1261
  S: this,
1236
1262
  A: [
@@ -1250,7 +1276,7 @@ var MeshEchoReplicator = class {
1250
1276
  log3("onRemoteDisconnected", {
1251
1277
  peerId: connection.peerId
1252
1278
  }, {
1253
- F: __dxlog_file5,
1279
+ F: __dxlog_file4,
1254
1280
  L: 71,
1255
1281
  S: this,
1256
1282
  C: (f, a) => f(...a)
@@ -1265,13 +1291,13 @@ var MeshEchoReplicator = class {
1265
1291
  peerId: connection.peerId,
1266
1292
  documentId: params.documentId
1267
1293
  }, {
1268
- F: __dxlog_file5,
1294
+ F: __dxlog_file4,
1269
1295
  L: 78,
1270
1296
  S: this,
1271
1297
  C: (f, a) => f(...a)
1272
1298
  });
1273
1299
  invariant4(this._context, void 0, {
1274
- F: __dxlog_file5,
1300
+ F: __dxlog_file4,
1275
1301
  L: 79,
1276
1302
  S: this,
1277
1303
  A: [
@@ -1286,7 +1312,7 @@ var MeshEchoReplicator = class {
1286
1312
  peerId: connection.peerId,
1287
1313
  documentId: params.documentId
1288
1314
  }, {
1289
- F: __dxlog_file5,
1315
+ F: __dxlog_file4,
1290
1316
  L: 83,
1291
1317
  S: this,
1292
1318
  C: (f, a) => f(...a)
@@ -1299,7 +1325,7 @@ var MeshEchoReplicator = class {
1299
1325
  peerId: connection.peerId,
1300
1326
  documentId: params.documentId
1301
1327
  }, {
1302
- F: __dxlog_file5,
1328
+ F: __dxlog_file4,
1303
1329
  L: 93,
1304
1330
  S: this,
1305
1331
  C: (f, a) => f(...a)
@@ -1315,7 +1341,7 @@ var MeshEchoReplicator = class {
1315
1341
  spaceKey,
1316
1342
  isAuthorized
1317
1343
  }, {
1318
- F: __dxlog_file5,
1344
+ F: __dxlog_file4,
1319
1345
  L: 101,
1320
1346
  S: this,
1321
1347
  C: (f, a) => f(...a)
@@ -1323,7 +1349,7 @@ var MeshEchoReplicator = class {
1323
1349
  return isAuthorized;
1324
1350
  } catch (err) {
1325
1351
  log3.catch(err, void 0, {
1326
- F: __dxlog_file5,
1352
+ F: __dxlog_file4,
1327
1353
  L: 111,
1328
1354
  S: this,
1329
1355
  C: (f, a) => f(...a)
@@ -1340,7 +1366,7 @@ var MeshEchoReplicator = class {
1340
1366
  spaceKey,
1341
1367
  deviceKey
1342
1368
  }, {
1343
- F: __dxlog_file5,
1369
+ F: __dxlog_file4,
1344
1370
  L: 122,
1345
1371
  S: this,
1346
1372
  C: (f, a) => f(...a)
@@ -1353,7 +1379,7 @@ var MeshEchoReplicator = class {
1353
1379
  }
1354
1380
  }
1355
1381
  };
1356
- var MeshReplicatorConnection = class extends Resource2 {
1382
+ var MeshReplicatorConnection = class extends Resource3 {
1357
1383
  constructor(_params) {
1358
1384
  super();
1359
1385
  this._params = _params;
@@ -1387,7 +1413,7 @@ var MeshReplicatorConnection = class extends Resource2 {
1387
1413
  thisPeerId: this.peerId,
1388
1414
  remotePeerId: remotePeerId.toHex()
1389
1415
  }, {
1390
- F: __dxlog_file5,
1416
+ F: __dxlog_file4,
1391
1417
  L: 192,
1392
1418
  S: this,
1393
1419
  C: (f, a) => f(...a)
@@ -1411,7 +1437,7 @@ var MeshReplicatorConnection = class extends Resource2 {
1411
1437
  }
1412
1438
  get peerId() {
1413
1439
  invariant4(this._remotePeerId != null, "Remote peer has not connected yet.", {
1414
- F: __dxlog_file5,
1440
+ F: __dxlog_file4,
1415
1441
  L: 215,
1416
1442
  S: this,
1417
1443
  A: [
@@ -1430,7 +1456,7 @@ var MeshReplicatorConnection = class extends Resource2 {
1430
1456
  */
1431
1457
  async enable() {
1432
1458
  invariant4(this._remotePeerId != null, "Remote peer has not connected yet.", {
1433
- F: __dxlog_file5,
1459
+ F: __dxlog_file4,
1434
1460
  L: 228,
1435
1461
  S: this,
1436
1462
  A: [