@dxos/echo-pipeline 0.1.45 → 0.1.46-next.01810f0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{chunk-2NGLSBL4.mjs → chunk-YFIFTFHQ.mjs} +85 -50
- package/dist/lib/browser/chunk-YFIFTFHQ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -3
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +85 -51
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +122 -86
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/types/src/dbhost/snapshot-manager.d.ts.map +1 -1
- package/dist/types/src/metadata/metadata-store.d.ts +0 -6
- package/dist/types/src/metadata/metadata-store.d.ts.map +1 -1
- package/dist/types/src/space/data-pipeline.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/dbhost/snapshot-manager.ts +8 -2
- package/src/metadata/metadata-store.ts +2 -8
- package/src/space/data-pipeline.ts +3 -0
- package/src/space/space-manager.browser.test.ts +3 -2
- package/src/space/space-protocol.browser.test.ts +2 -1
- package/dist/lib/browser/chunk-2NGLSBL4.mjs.map +0 -7
package/dist/lib/node/index.cjs
CHANGED
|
@@ -46,7 +46,6 @@ __export(src_exports, {
|
|
|
46
46
|
MOCK_AUTH_VERIFIER: () => MOCK_AUTH_VERIFIER,
|
|
47
47
|
MetadataStore: () => MetadataStore,
|
|
48
48
|
Pipeline: () => Pipeline,
|
|
49
|
-
STORAGE_VERSION: () => STORAGE_VERSION,
|
|
50
49
|
SnapshotManager: () => SnapshotManager,
|
|
51
50
|
SnapshotStore: () => SnapshotStore,
|
|
52
51
|
Space: () => Space,
|
|
@@ -131,9 +130,8 @@ var __decorate = function(decorators, target, key, desc) {
|
|
|
131
130
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
132
131
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
133
132
|
};
|
|
134
|
-
var STORAGE_VERSION = 1;
|
|
135
133
|
var emptyEchoMetadata = () => ({
|
|
136
|
-
version: STORAGE_VERSION,
|
|
134
|
+
version: import_protocols.STORAGE_VERSION,
|
|
137
135
|
spaces: [],
|
|
138
136
|
created: new Date(),
|
|
139
137
|
updated: new Date()
|
|
@@ -173,7 +171,7 @@ var MetadataStore = class {
|
|
|
173
171
|
checksum
|
|
174
172
|
}, {
|
|
175
173
|
file: "metadata-store.ts",
|
|
176
|
-
line:
|
|
174
|
+
line: 63,
|
|
177
175
|
scope: this,
|
|
178
176
|
callSite: (f, a) => f(...a)
|
|
179
177
|
});
|
|
@@ -191,7 +189,7 @@ var MetadataStore = class {
|
|
|
191
189
|
err
|
|
192
190
|
}, {
|
|
193
191
|
file: "metadata-store.ts",
|
|
194
|
-
line:
|
|
192
|
+
line: 78,
|
|
195
193
|
scope: this,
|
|
196
194
|
callSite: (f, a) => f(...a)
|
|
197
195
|
});
|
|
@@ -204,7 +202,7 @@ var MetadataStore = class {
|
|
|
204
202
|
var _a;
|
|
205
203
|
const data = {
|
|
206
204
|
...this._metadata,
|
|
207
|
-
version: STORAGE_VERSION,
|
|
205
|
+
version: import_protocols.STORAGE_VERSION,
|
|
208
206
|
created: (_a = this._metadata.created) != null ? _a : new Date(),
|
|
209
207
|
updated: new Date()
|
|
210
208
|
};
|
|
@@ -222,7 +220,7 @@ var MetadataStore = class {
|
|
|
222
220
|
checksum
|
|
223
221
|
}, {
|
|
224
222
|
file: "metadata-store.ts",
|
|
225
|
-
line:
|
|
223
|
+
line: 109,
|
|
226
224
|
scope: this,
|
|
227
225
|
callSite: (f, a) => f(...a)
|
|
228
226
|
});
|
|
@@ -241,11 +239,12 @@ var MetadataStore = class {
|
|
|
241
239
|
async clear() {
|
|
242
240
|
(0, import_log.log)("clearing all metadata", {}, {
|
|
243
241
|
file: "metadata-store.ts",
|
|
244
|
-
line:
|
|
242
|
+
line: 125,
|
|
245
243
|
scope: this,
|
|
246
244
|
callSite: (f, a) => f(...a)
|
|
247
245
|
});
|
|
248
246
|
await this._directory.delete();
|
|
247
|
+
this._metadata = emptyEchoMetadata();
|
|
249
248
|
}
|
|
250
249
|
getIdentityRecord() {
|
|
251
250
|
return this._metadata.identity;
|
|
@@ -792,7 +791,7 @@ var AuthExtension = class extends import_teleport.RpcExtension {
|
|
|
792
791
|
// packages/core/echo/echo-pipeline/src/space/space.ts
|
|
793
792
|
var import_node_assert9 = __toESM(require("node:assert"));
|
|
794
793
|
var import_async7 = require("@dxos/async");
|
|
795
|
-
var
|
|
794
|
+
var import_log10 = require("@dxos/log");
|
|
796
795
|
var import_credentials4 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
797
796
|
var import_util5 = require("@dxos/util");
|
|
798
797
|
|
|
@@ -917,7 +916,7 @@ var import_async6 = require("@dxos/async");
|
|
|
917
916
|
var import_context3 = require("@dxos/context");
|
|
918
917
|
var import_credentials3 = require("@dxos/credentials");
|
|
919
918
|
var import_echo_db3 = require("@dxos/echo-db");
|
|
920
|
-
var
|
|
919
|
+
var import_log9 = require("@dxos/log");
|
|
921
920
|
var import_timeframe3 = require("@dxos/timeframe");
|
|
922
921
|
|
|
923
922
|
// packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts
|
|
@@ -1060,6 +1059,8 @@ var DatabaseHost = class {
|
|
|
1060
1059
|
|
|
1061
1060
|
// packages/core/echo/echo-pipeline/src/dbhost/snapshot-manager.ts
|
|
1062
1061
|
var import_async5 = require("@dxos/async");
|
|
1062
|
+
var import_debug4 = require("@dxos/debug");
|
|
1063
|
+
var import_log7 = require("@dxos/log");
|
|
1063
1064
|
var import_protocols4 = require("@dxos/protocols");
|
|
1064
1065
|
var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
|
|
1065
1066
|
var __decorate4 = function(decorators, target, key, desc) {
|
|
@@ -1079,6 +1080,15 @@ var SnapshotManager = class SnapshotManager2 {
|
|
|
1079
1080
|
this._objectSync = new import_teleport_extension_object_sync.ObjectSync({
|
|
1080
1081
|
getObject: async (id) => {
|
|
1081
1082
|
const snapshot = await this._snapshotStore.loadSnapshot(id);
|
|
1083
|
+
(0, import_log7.log)("getObject", {
|
|
1084
|
+
id,
|
|
1085
|
+
snapshot
|
|
1086
|
+
}, {
|
|
1087
|
+
file: "snapshot-manager.ts",
|
|
1088
|
+
line: 30,
|
|
1089
|
+
scope: this,
|
|
1090
|
+
callSite: (f, a) => f(...a)
|
|
1091
|
+
});
|
|
1082
1092
|
if (!snapshot) {
|
|
1083
1093
|
return void 0;
|
|
1084
1094
|
}
|
|
@@ -1088,7 +1098,15 @@ var SnapshotManager = class SnapshotManager2 {
|
|
|
1088
1098
|
};
|
|
1089
1099
|
},
|
|
1090
1100
|
setObject: async (data) => {
|
|
1091
|
-
|
|
1101
|
+
(0, import_log7.log)("setObject", {
|
|
1102
|
+
data
|
|
1103
|
+
}, {
|
|
1104
|
+
file: "snapshot-manager.ts",
|
|
1105
|
+
line: 40,
|
|
1106
|
+
scope: this,
|
|
1107
|
+
callSite: (f, a) => f(...a)
|
|
1108
|
+
});
|
|
1109
|
+
const snapshot = import_protocols4.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot").decode(data.payload.value);
|
|
1092
1110
|
await this._snapshotStore.saveSnapshot(snapshot);
|
|
1093
1111
|
}
|
|
1094
1112
|
});
|
|
@@ -1108,13 +1126,16 @@ var SnapshotManager = class SnapshotManager2 {
|
|
|
1108
1126
|
return local;
|
|
1109
1127
|
}
|
|
1110
1128
|
const remote = await this._objectSync.download(id);
|
|
1111
|
-
return import_protocols4.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot").decode(remote.payload);
|
|
1129
|
+
return import_protocols4.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot").decode(remote.payload.value);
|
|
1112
1130
|
}
|
|
1113
1131
|
async store(snapshot) {
|
|
1114
1132
|
const id = await this._snapshotStore.saveSnapshot(snapshot);
|
|
1115
1133
|
return id;
|
|
1116
1134
|
}
|
|
1117
1135
|
};
|
|
1136
|
+
__decorate4([
|
|
1137
|
+
(0, import_debug4.timed)(1e4)
|
|
1138
|
+
], SnapshotManager.prototype, "load", null);
|
|
1118
1139
|
SnapshotManager = __decorate4([
|
|
1119
1140
|
(0, import_async5.trackLeaks)("open", "close")
|
|
1120
1141
|
], SnapshotManager);
|
|
@@ -1166,9 +1187,9 @@ var SnapshotStore = class {
|
|
|
1166
1187
|
|
|
1167
1188
|
// packages/core/echo/echo-pipeline/src/dbhost/data-service.ts
|
|
1168
1189
|
var import_node_assert7 = __toESM(require("node:assert"));
|
|
1169
|
-
var
|
|
1190
|
+
var import_debug5 = require("@dxos/debug");
|
|
1170
1191
|
var import_keys3 = require("@dxos/keys");
|
|
1171
|
-
var
|
|
1192
|
+
var import_log8 = require("@dxos/log");
|
|
1172
1193
|
var import_util4 = require("@dxos/util");
|
|
1173
1194
|
var DataServiceSubscriptions = class {
|
|
1174
1195
|
constructor() {
|
|
@@ -1178,7 +1199,7 @@ var DataServiceSubscriptions = class {
|
|
|
1178
1199
|
this._spaces.clear();
|
|
1179
1200
|
}
|
|
1180
1201
|
registerSpace(spaceKey, host) {
|
|
1181
|
-
(0,
|
|
1202
|
+
(0, import_log8.log)("Registering space", {
|
|
1182
1203
|
spaceKey
|
|
1183
1204
|
}, {
|
|
1184
1205
|
file: "data-service.ts",
|
|
@@ -1189,7 +1210,7 @@ var DataServiceSubscriptions = class {
|
|
|
1189
1210
|
this._spaces.set(spaceKey, host);
|
|
1190
1211
|
}
|
|
1191
1212
|
unregisterSpace(spaceKey) {
|
|
1192
|
-
(0,
|
|
1213
|
+
(0, import_log8.log)("Unregistering space", {
|
|
1193
1214
|
spaceKey
|
|
1194
1215
|
}, {
|
|
1195
1216
|
file: "data-service.ts",
|
|
@@ -1210,14 +1231,14 @@ var DataServiceImpl = class {
|
|
|
1210
1231
|
subscribe(request) {
|
|
1211
1232
|
var _a;
|
|
1212
1233
|
(0, import_node_assert7.default)(request.spaceKey);
|
|
1213
|
-
const host = (_a = this._subscriptions.getDataService(request.spaceKey)) != null ? _a : (0,
|
|
1234
|
+
const host = (_a = this._subscriptions.getDataService(request.spaceKey)) != null ? _a : (0, import_debug5.raise)(new Error(`space not found: ${request.spaceKey}`));
|
|
1214
1235
|
return host.subscribe();
|
|
1215
1236
|
}
|
|
1216
1237
|
write(request) {
|
|
1217
1238
|
var _a;
|
|
1218
1239
|
(0, import_node_assert7.default)(request.spaceKey);
|
|
1219
1240
|
(0, import_node_assert7.default)(request.batch);
|
|
1220
|
-
const host = (_a = this._subscriptions.getDataService(request.spaceKey)) != null ? _a : (0,
|
|
1241
|
+
const host = (_a = this._subscriptions.getDataService(request.spaceKey)) != null ? _a : (0, import_debug5.raise)(new Error(`space not found: ${request.spaceKey}`));
|
|
1221
1242
|
return host.write(request);
|
|
1222
1243
|
}
|
|
1223
1244
|
};
|
|
@@ -1268,7 +1289,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1268
1289
|
if (assertion["@type"] !== "dxos.halo.credentials.Epoch") {
|
|
1269
1290
|
return;
|
|
1270
1291
|
}
|
|
1271
|
-
(0,
|
|
1292
|
+
(0, import_log9.log)("new epoch", {
|
|
1272
1293
|
credential
|
|
1273
1294
|
}, {
|
|
1274
1295
|
file: "data-pipeline.ts",
|
|
@@ -1315,7 +1336,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1315
1336
|
if (!this._isOpen) {
|
|
1316
1337
|
return;
|
|
1317
1338
|
}
|
|
1318
|
-
(0,
|
|
1339
|
+
(0, import_log9.log)("close", {}, {
|
|
1319
1340
|
file: "data-pipeline.ts",
|
|
1320
1341
|
line: 162,
|
|
1321
1342
|
scope: this,
|
|
@@ -1330,7 +1351,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1330
1351
|
await this._saveTargetTimeframe(this._pipeline.state.timeframe);
|
|
1331
1352
|
}
|
|
1332
1353
|
} catch (err) {
|
|
1333
|
-
|
|
1354
|
+
import_log9.log.catch(err, {}, {
|
|
1334
1355
|
file: "data-pipeline.ts",
|
|
1335
1356
|
line: 175,
|
|
1336
1357
|
scope: this,
|
|
@@ -1345,7 +1366,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1345
1366
|
(0, import_node_assert8.default)(this._pipeline, "Pipeline is not initialized.");
|
|
1346
1367
|
for await (const msg of this._pipeline.consume()) {
|
|
1347
1368
|
const { feedKey, seq, data } = msg;
|
|
1348
|
-
(0,
|
|
1369
|
+
(0, import_log9.log)("processing message", {
|
|
1349
1370
|
feedKey,
|
|
1350
1371
|
seq
|
|
1351
1372
|
}, {
|
|
@@ -1358,7 +1379,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1358
1379
|
if (data.payload.data) {
|
|
1359
1380
|
const feedInfo = this._params.feedInfoProvider(feedKey);
|
|
1360
1381
|
if (!feedInfo) {
|
|
1361
|
-
|
|
1382
|
+
import_log9.log.error("Could not find feed.", {
|
|
1362
1383
|
feedKey
|
|
1363
1384
|
}, {
|
|
1364
1385
|
file: "data-pipeline.ts",
|
|
@@ -1380,7 +1401,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1380
1401
|
await this._noteTargetStateIfNeeded(this._pipeline.state.pendingTimeframe);
|
|
1381
1402
|
}
|
|
1382
1403
|
} catch (err) {
|
|
1383
|
-
|
|
1404
|
+
import_log9.log.catch(err, {}, {
|
|
1384
1405
|
file: "data-pipeline.ts",
|
|
1385
1406
|
line: 211,
|
|
1386
1407
|
scope: this,
|
|
@@ -1415,7 +1436,7 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1415
1436
|
cache.properties = (_a = (0, import_echo_db3.getStateMachineFromItem)(propertiesItem)) == null ? void 0 : _a.snapshot();
|
|
1416
1437
|
}
|
|
1417
1438
|
} catch (err) {
|
|
1418
|
-
|
|
1439
|
+
import_log9.log.warn("Failed to cache properties", err, {
|
|
1419
1440
|
file: "data-pipeline.ts",
|
|
1420
1441
|
line: 245,
|
|
1421
1442
|
scope: this,
|
|
@@ -1436,10 +1457,24 @@ var DataPipeline = class DataPipeline2 {
|
|
|
1436
1457
|
async _processEpoch(epoch) {
|
|
1437
1458
|
(0, import_node_assert8.default)(this._isOpen);
|
|
1438
1459
|
(0, import_node_assert8.default)(this._pipeline);
|
|
1460
|
+
(0, import_log9.log)("Processing epoch", {
|
|
1461
|
+
epoch
|
|
1462
|
+
}, {
|
|
1463
|
+
file: "data-pipeline.ts",
|
|
1464
|
+
line: 274,
|
|
1465
|
+
scope: this,
|
|
1466
|
+
callSite: (f, a) => f(...a)
|
|
1467
|
+
});
|
|
1439
1468
|
if (epoch.snapshotCid) {
|
|
1440
1469
|
const snapshot = await this._params.snapshotManager.load(epoch.snapshotCid);
|
|
1441
1470
|
this.databaseHost._itemDemuxer.restoreFromSnapshot(snapshot.database);
|
|
1442
1471
|
}
|
|
1472
|
+
(0, import_log9.log)("restarting pipeline for epoch", {}, {
|
|
1473
|
+
file: "data-pipeline.ts",
|
|
1474
|
+
line: 282,
|
|
1475
|
+
scope: this,
|
|
1476
|
+
callSite: (f, a) => f(...a)
|
|
1477
|
+
});
|
|
1443
1478
|
await this._pipeline.pause();
|
|
1444
1479
|
await this._pipeline.setCursor(epoch.timeframe);
|
|
1445
1480
|
await this._pipeline.unpause();
|
|
@@ -1528,7 +1563,7 @@ var Space = class Space2 {
|
|
|
1528
1563
|
});
|
|
1529
1564
|
this._controlPipeline.onCredentialProcessed.set(async (credential) => {
|
|
1530
1565
|
await this.onCredentialProcessed.callIfSet(credential);
|
|
1531
|
-
(0,
|
|
1566
|
+
(0, import_log10.log)("onCredentialProcessed", {
|
|
1532
1567
|
credential
|
|
1533
1568
|
}, {
|
|
1534
1569
|
file: "space.ts",
|
|
@@ -1620,7 +1655,7 @@ var Space = class Space2 {
|
|
|
1620
1655
|
// return this._dataPipeline?.getFeeds();
|
|
1621
1656
|
// }
|
|
1622
1657
|
async open() {
|
|
1623
|
-
(0,
|
|
1658
|
+
(0, import_log10.log)("opening...", {}, {
|
|
1624
1659
|
file: "space.ts",
|
|
1625
1660
|
line: 208,
|
|
1626
1661
|
scope: this,
|
|
@@ -1633,7 +1668,7 @@ var Space = class Space2 {
|
|
|
1633
1668
|
await this.protocol.start();
|
|
1634
1669
|
this._dataPipelineCredentialConsumer = this._controlPipeline.spaceState.registerProcessor(this._dataPipeline.createCredentialProcessor());
|
|
1635
1670
|
this._isOpen = true;
|
|
1636
|
-
(0,
|
|
1671
|
+
(0, import_log10.log)("opened", {}, {
|
|
1637
1672
|
file: "space.ts",
|
|
1638
1673
|
line: 222,
|
|
1639
1674
|
scope: this,
|
|
@@ -1642,7 +1677,7 @@ var Space = class Space2 {
|
|
|
1642
1677
|
}
|
|
1643
1678
|
async close() {
|
|
1644
1679
|
var _a;
|
|
1645
|
-
(0,
|
|
1680
|
+
(0, import_log10.log)("closing...", {
|
|
1646
1681
|
key: this._key
|
|
1647
1682
|
}, {
|
|
1648
1683
|
file: "space.ts",
|
|
@@ -1659,7 +1694,7 @@ var Space = class Space2 {
|
|
|
1659
1694
|
await this.protocol.stop();
|
|
1660
1695
|
await this._controlPipeline.stop();
|
|
1661
1696
|
this._isOpen = false;
|
|
1662
|
-
(0,
|
|
1697
|
+
(0, import_log10.log)("closed", {}, {
|
|
1663
1698
|
file: "space.ts",
|
|
1664
1699
|
line: 241,
|
|
1665
1700
|
scope: this,
|
|
@@ -1667,7 +1702,7 @@ var Space = class Space2 {
|
|
|
1667
1702
|
});
|
|
1668
1703
|
}
|
|
1669
1704
|
async initializeDataPipeline() {
|
|
1670
|
-
|
|
1705
|
+
import_log10.log.info("initializeDataPipeline", {}, {
|
|
1671
1706
|
file: "space.ts",
|
|
1672
1707
|
line: 245,
|
|
1673
1708
|
scope: this,
|
|
@@ -1679,7 +1714,7 @@ var Space = class Space2 {
|
|
|
1679
1714
|
}
|
|
1680
1715
|
};
|
|
1681
1716
|
__decorate6([
|
|
1682
|
-
|
|
1717
|
+
import_log10.logInfo
|
|
1683
1718
|
], Space.prototype, "key", null);
|
|
1684
1719
|
__decorate6([
|
|
1685
1720
|
import_async7.synchronized
|
|
@@ -1693,16 +1728,16 @@ Space = __decorate6([
|
|
|
1693
1728
|
|
|
1694
1729
|
// packages/core/echo/echo-pipeline/src/space/space-manager.ts
|
|
1695
1730
|
var import_async8 = require("@dxos/async");
|
|
1696
|
-
var
|
|
1731
|
+
var import_debug6 = require("@dxos/debug");
|
|
1697
1732
|
var import_keys5 = require("@dxos/keys");
|
|
1698
|
-
var
|
|
1733
|
+
var import_log12 = require("@dxos/log");
|
|
1699
1734
|
var import_protocols6 = require("@dxos/protocols");
|
|
1700
1735
|
var import_util7 = require("@dxos/util");
|
|
1701
1736
|
|
|
1702
1737
|
// packages/core/echo/echo-pipeline/src/space/space-protocol.ts
|
|
1703
1738
|
var import_crypto3 = require("@dxos/crypto");
|
|
1704
1739
|
var import_keys4 = require("@dxos/keys");
|
|
1705
|
-
var
|
|
1740
|
+
var import_log11 = require("@dxos/log");
|
|
1706
1741
|
var import_network_manager = require("@dxos/network-manager");
|
|
1707
1742
|
var import_teleport2 = require("@dxos/teleport");
|
|
1708
1743
|
var import_teleport_extension_replicator = require("@dxos/teleport-extension-replicator");
|
|
@@ -1739,7 +1774,7 @@ var SpaceProtocol = class {
|
|
|
1739
1774
|
}
|
|
1740
1775
|
// TODO(burdon): Create abstraction for Space (e.g., add keys and have provider).
|
|
1741
1776
|
addFeed(feed) {
|
|
1742
|
-
(0,
|
|
1777
|
+
(0, import_log11.log)("addFeed", {
|
|
1743
1778
|
key: feed.key
|
|
1744
1779
|
}, {
|
|
1745
1780
|
file: "space-protocol.ts",
|
|
@@ -1762,7 +1797,7 @@ var SpaceProtocol = class {
|
|
|
1762
1797
|
maxPeers: 10,
|
|
1763
1798
|
sampleSize: 20
|
|
1764
1799
|
};
|
|
1765
|
-
(0,
|
|
1800
|
+
(0, import_log11.log)("starting...", {}, {
|
|
1766
1801
|
file: "space-protocol.ts",
|
|
1767
1802
|
line: 107,
|
|
1768
1803
|
scope: this,
|
|
@@ -1775,7 +1810,7 @@ var SpaceProtocol = class {
|
|
|
1775
1810
|
topology: new import_network_manager.MMSTTopology(topologyConfig),
|
|
1776
1811
|
label: `Protocol swarm: ${this._topic}`
|
|
1777
1812
|
});
|
|
1778
|
-
(0,
|
|
1813
|
+
(0, import_log11.log)("started", {}, {
|
|
1779
1814
|
file: "space-protocol.ts",
|
|
1780
1815
|
line: 116,
|
|
1781
1816
|
scope: this,
|
|
@@ -1784,14 +1819,14 @@ var SpaceProtocol = class {
|
|
|
1784
1819
|
}
|
|
1785
1820
|
async stop() {
|
|
1786
1821
|
if (this._connection) {
|
|
1787
|
-
(0,
|
|
1822
|
+
(0, import_log11.log)("stopping...", {}, {
|
|
1788
1823
|
file: "space-protocol.ts",
|
|
1789
1824
|
line: 121,
|
|
1790
1825
|
scope: this,
|
|
1791
1826
|
callSite: (f, a) => f(...a)
|
|
1792
1827
|
});
|
|
1793
1828
|
await this._connection.close();
|
|
1794
|
-
(0,
|
|
1829
|
+
(0, import_log11.log)("stopped", {}, {
|
|
1795
1830
|
file: "space-protocol.ts",
|
|
1796
1831
|
line: 123,
|
|
1797
1832
|
scope: this,
|
|
@@ -1815,10 +1850,10 @@ var SpaceProtocol = class {
|
|
|
1815
1850
|
}
|
|
1816
1851
|
};
|
|
1817
1852
|
__decorate7([
|
|
1818
|
-
|
|
1853
|
+
import_log11.logInfo
|
|
1819
1854
|
], SpaceProtocol.prototype, "_topic", void 0);
|
|
1820
1855
|
__decorate7([
|
|
1821
|
-
|
|
1856
|
+
import_log11.logInfo
|
|
1822
1857
|
], SpaceProtocol.prototype, "_ownPeerKey", null);
|
|
1823
1858
|
var AuthStatus;
|
|
1824
1859
|
(function(AuthStatus2) {
|
|
@@ -1853,7 +1888,7 @@ var SpaceProtocolSession = class {
|
|
|
1853
1888
|
onAuthSuccess: () => {
|
|
1854
1889
|
var _a;
|
|
1855
1890
|
this._authStatus = AuthStatus.SUCCESS;
|
|
1856
|
-
(0,
|
|
1891
|
+
(0, import_log11.log)("Peer authenticated", {}, {
|
|
1857
1892
|
file: "space-protocol.ts",
|
|
1858
1893
|
line: 206,
|
|
1859
1894
|
scope: this,
|
|
@@ -1862,7 +1897,7 @@ var SpaceProtocolSession = class {
|
|
|
1862
1897
|
(_a = this._onSessionAuth) == null ? void 0 : _a.call(this, this._teleport);
|
|
1863
1898
|
},
|
|
1864
1899
|
onAuthFailure: () => {
|
|
1865
|
-
|
|
1900
|
+
import_log11.log.warn("Auth failed", {}, {
|
|
1866
1901
|
file: "space-protocol.ts",
|
|
1867
1902
|
line: 211,
|
|
1868
1903
|
scope: this,
|
|
@@ -1878,10 +1913,10 @@ var SpaceProtocolSession = class {
|
|
|
1878
1913
|
}
|
|
1879
1914
|
};
|
|
1880
1915
|
__decorate7([
|
|
1881
|
-
|
|
1916
|
+
import_log11.logInfo
|
|
1882
1917
|
], SpaceProtocolSession.prototype, "_wireParams", void 0);
|
|
1883
1918
|
__decorate7([
|
|
1884
|
-
|
|
1919
|
+
import_log11.logInfo
|
|
1885
1920
|
], SpaceProtocolSession.prototype, "authStatus", null);
|
|
1886
1921
|
|
|
1887
1922
|
// packages/core/echo/echo-pipeline/src/space/space-manager.ts
|
|
@@ -1918,7 +1953,7 @@ var SpaceManager = class SpaceManager2 {
|
|
|
1918
1953
|
}
|
|
1919
1954
|
async constructSpace({ metadata, swarmIdentity, onNetworkConnection, memberKey }) {
|
|
1920
1955
|
var _a;
|
|
1921
|
-
|
|
1956
|
+
import_log12.log.trace("dxos.echo.space-manager.construct-space", import_protocols6.trace.begin({
|
|
1922
1957
|
id: this._instanceId
|
|
1923
1958
|
}), {
|
|
1924
1959
|
file: "space-manager.ts",
|
|
@@ -1926,7 +1961,7 @@ var SpaceManager = class SpaceManager2 {
|
|
|
1926
1961
|
scope: this,
|
|
1927
1962
|
callSite: (f, a) => f(...a)
|
|
1928
1963
|
});
|
|
1929
|
-
(0,
|
|
1964
|
+
(0, import_log12.log)("constructing space...", {
|
|
1930
1965
|
spaceKey: metadata.genesisFeedKey
|
|
1931
1966
|
}, {
|
|
1932
1967
|
file: "space-manager.ts",
|
|
@@ -1934,7 +1969,7 @@ var SpaceManager = class SpaceManager2 {
|
|
|
1934
1969
|
scope: this,
|
|
1935
1970
|
callSite: (f, a) => f(...a)
|
|
1936
1971
|
});
|
|
1937
|
-
const genesisFeed = await this._feedStore.openFeed((_a = metadata.genesisFeedKey) != null ? _a : (0,
|
|
1972
|
+
const genesisFeed = await this._feedStore.openFeed((_a = metadata.genesisFeedKey) != null ? _a : (0, import_debug6.failUndefined)());
|
|
1938
1973
|
const spaceKey = metadata.key;
|
|
1939
1974
|
const protocol = new SpaceProtocol({
|
|
1940
1975
|
topic: spaceKey,
|
|
@@ -1954,7 +1989,7 @@ var SpaceManager = class SpaceManager2 {
|
|
|
1954
1989
|
memberKey
|
|
1955
1990
|
});
|
|
1956
1991
|
this._spaces.set(space.key, space);
|
|
1957
|
-
|
|
1992
|
+
import_log12.log.trace("dxos.echo.space-manager.construct-space", import_protocols6.trace.end({
|
|
1958
1993
|
id: this._instanceId
|
|
1959
1994
|
}), {
|
|
1960
1995
|
file: "space-manager.ts",
|
|
@@ -1992,7 +2027,6 @@ SpaceManager = __decorate8([
|
|
|
1992
2027
|
MOCK_AUTH_VERIFIER,
|
|
1993
2028
|
MetadataStore,
|
|
1994
2029
|
Pipeline,
|
|
1995
|
-
STORAGE_VERSION,
|
|
1996
2030
|
SnapshotManager,
|
|
1997
2031
|
SnapshotStore,
|
|
1998
2032
|
Space,
|