@dxos/client-services 0.1.58-main.e460f33 → 0.1.58-main.e4cedde
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-PNAXUNJ7.mjs → chunk-FIKNAQOZ.mjs} +99 -141
- package/dist/lib/browser/chunk-FIKNAQOZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +141 -183
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +143 -185
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/invitations/invitation-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -34
- package/src/packlets/identity/authenticator.ts +1 -1
- package/src/packlets/invitations/invitation-extension.ts +2 -1
- package/src/packlets/invitations/invitations-handler.ts +2 -1
- package/src/packlets/services/service-context.ts +2 -2
- package/src/packlets/spaces/data-space.ts +2 -8
- package/src/packlets/spaces/spaces-service.ts +8 -29
- package/src/packlets/storage/storage.ts +1 -1
- package/src/packlets/vault/iframe-proxy-runtime.ts +1 -1
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-PNAXUNJ7.mjs.map +0 -7
|
@@ -52,7 +52,7 @@ var createMockCredential = async ({ signer, issuer }) => (0, import_credentials.
|
|
|
52
52
|
|
|
53
53
|
// packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
|
|
54
54
|
var import_async18 = require("@dxos/async");
|
|
55
|
-
var
|
|
55
|
+
var import_invariant15 = require("@dxos/invariant");
|
|
56
56
|
var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
|
|
57
57
|
|
|
58
58
|
// packages/sdk/client-services/src/packlets/services/client-rpc-server.ts
|
|
@@ -71,7 +71,7 @@ var import_protocols = require("@dxos/protocols");
|
|
|
71
71
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
72
72
|
|
|
73
73
|
// packages/sdk/client-services/src/version.ts
|
|
74
|
-
var DXOS_VERSION = "0.1.58-main.
|
|
74
|
+
var DXOS_VERSION = "0.1.58-main.e4cedde";
|
|
75
75
|
|
|
76
76
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
77
77
|
var getPlatform = () => {
|
|
@@ -224,13 +224,13 @@ var import_async11 = require("@dxos/async");
|
|
|
224
224
|
var import_context8 = require("@dxos/context");
|
|
225
225
|
var import_credentials15 = require("@dxos/credentials");
|
|
226
226
|
var import_debug7 = require("@dxos/debug");
|
|
227
|
-
var
|
|
227
|
+
var import_echo_pipeline3 = require("@dxos/echo-pipeline");
|
|
228
228
|
var import_feed_store3 = require("@dxos/feed-store");
|
|
229
|
-
var
|
|
229
|
+
var import_invariant12 = require("@dxos/invariant");
|
|
230
230
|
var import_keyring = require("@dxos/keyring");
|
|
231
231
|
var import_keys8 = require("@dxos/keys");
|
|
232
232
|
var import_log13 = require("@dxos/log");
|
|
233
|
-
var
|
|
233
|
+
var import_protocols9 = require("@dxos/protocols");
|
|
234
234
|
var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
|
|
235
235
|
var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
|
|
236
236
|
var import_tracing4 = require("@dxos/tracing");
|
|
@@ -1059,6 +1059,7 @@ var import_async5 = require("@dxos/async");
|
|
|
1059
1059
|
var import_client_protocol2 = require("@dxos/client-protocol");
|
|
1060
1060
|
var import_context4 = require("@dxos/context");
|
|
1061
1061
|
var import_credentials9 = require("@dxos/credentials");
|
|
1062
|
+
var import_errors2 = require("@dxos/errors");
|
|
1062
1063
|
var import_invariant7 = require("@dxos/invariant");
|
|
1063
1064
|
var import_keys4 = require("@dxos/keys");
|
|
1064
1065
|
var import_log6 = require("@dxos/log");
|
|
@@ -1070,6 +1071,7 @@ var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations")
|
|
|
1070
1071
|
// packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts
|
|
1071
1072
|
var import_async4 = require("@dxos/async");
|
|
1072
1073
|
var import_context3 = require("@dxos/context");
|
|
1074
|
+
var import_errors = require("@dxos/errors");
|
|
1073
1075
|
var import_invariant6 = require("@dxos/invariant");
|
|
1074
1076
|
var import_keys3 = require("@dxos/keys");
|
|
1075
1077
|
var import_log5 = require("@dxos/log");
|
|
@@ -1107,7 +1109,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1107
1109
|
options: async (options) => {
|
|
1108
1110
|
(0, import_invariant6.invariant)(!this._remoteOptions, "Remote options already set.", {
|
|
1109
1111
|
F: __dxlog_file7,
|
|
1110
|
-
L:
|
|
1112
|
+
L: 88,
|
|
1111
1113
|
S: this,
|
|
1112
1114
|
A: [
|
|
1113
1115
|
"!this._remoteOptions",
|
|
@@ -1124,7 +1126,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1124
1126
|
id: traceId
|
|
1125
1127
|
}), {
|
|
1126
1128
|
F: __dxlog_file7,
|
|
1127
|
-
L:
|
|
1129
|
+
L: 97,
|
|
1128
1130
|
S: this,
|
|
1129
1131
|
C: (f, a) => f(...a)
|
|
1130
1132
|
});
|
|
@@ -1134,7 +1136,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1134
1136
|
invitationId
|
|
1135
1137
|
}, {
|
|
1136
1138
|
F: __dxlog_file7,
|
|
1137
|
-
L:
|
|
1139
|
+
L: 101,
|
|
1138
1140
|
S: this,
|
|
1139
1141
|
C: (f, a) => f(...a)
|
|
1140
1142
|
});
|
|
@@ -1148,7 +1150,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1148
1150
|
guestProfile: profile
|
|
1149
1151
|
}, {
|
|
1150
1152
|
F: __dxlog_file7,
|
|
1151
|
-
L:
|
|
1153
|
+
L: 110,
|
|
1152
1154
|
S: this,
|
|
1153
1155
|
C: (f, a) => f(...a)
|
|
1154
1156
|
});
|
|
@@ -1161,7 +1163,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1161
1163
|
id: traceId
|
|
1162
1164
|
}), {
|
|
1163
1165
|
F: __dxlog_file7,
|
|
1164
|
-
L:
|
|
1166
|
+
L: 117,
|
|
1165
1167
|
S: this,
|
|
1166
1168
|
C: (f, a) => f(...a)
|
|
1167
1169
|
});
|
|
@@ -1176,7 +1178,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1176
1178
|
id: traceId
|
|
1177
1179
|
}), {
|
|
1178
1180
|
F: __dxlog_file7,
|
|
1179
|
-
L:
|
|
1181
|
+
L: 126,
|
|
1180
1182
|
S: this,
|
|
1181
1183
|
C: (f, a) => f(...a)
|
|
1182
1184
|
});
|
|
@@ -1184,14 +1186,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1184
1186
|
authCode: code
|
|
1185
1187
|
}, {
|
|
1186
1188
|
F: __dxlog_file7,
|
|
1187
|
-
L:
|
|
1189
|
+
L: 127,
|
|
1188
1190
|
S: this,
|
|
1189
1191
|
C: (f, a) => f(...a)
|
|
1190
1192
|
});
|
|
1191
1193
|
let status = import_invitations.AuthenticationResponse.Status.OK;
|
|
1192
1194
|
(0, import_invariant6.invariant)(this.invitation, "Invitation is not set.", {
|
|
1193
1195
|
F: __dxlog_file7,
|
|
1194
|
-
L:
|
|
1196
|
+
L: 130,
|
|
1195
1197
|
S: this,
|
|
1196
1198
|
A: [
|
|
1197
1199
|
"this.invitation",
|
|
@@ -1202,7 +1204,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1202
1204
|
case import_services3.Invitation.AuthMethod.NONE: {
|
|
1203
1205
|
(0, import_log5.log)("authentication not required", void 0, {
|
|
1204
1206
|
F: __dxlog_file7,
|
|
1205
|
-
L:
|
|
1207
|
+
L: 133,
|
|
1206
1208
|
S: this,
|
|
1207
1209
|
C: (f, a) => f(...a)
|
|
1208
1210
|
});
|
|
@@ -1227,7 +1229,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1227
1229
|
authMethod: this.invitation.authMethod
|
|
1228
1230
|
}, {
|
|
1229
1231
|
F: __dxlog_file7,
|
|
1230
|
-
L:
|
|
1232
|
+
L: 151,
|
|
1231
1233
|
S: this,
|
|
1232
1234
|
C: (f, a) => f(...a)
|
|
1233
1235
|
});
|
|
@@ -1242,7 +1244,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1242
1244
|
}
|
|
1243
1245
|
}), {
|
|
1244
1246
|
F: __dxlog_file7,
|
|
1245
|
-
L:
|
|
1247
|
+
L: 157,
|
|
1246
1248
|
S: this,
|
|
1247
1249
|
C: (f, a) => f(...a)
|
|
1248
1250
|
});
|
|
@@ -1256,14 +1258,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1256
1258
|
id: traceId
|
|
1257
1259
|
}), {
|
|
1258
1260
|
F: __dxlog_file7,
|
|
1259
|
-
L:
|
|
1261
|
+
L: 163,
|
|
1260
1262
|
S: this,
|
|
1261
1263
|
C: (f, a) => f(...a)
|
|
1262
1264
|
});
|
|
1263
1265
|
try {
|
|
1264
1266
|
(0, import_invariant6.invariant)(this.invitation, "Invitation is not set.", {
|
|
1265
1267
|
F: __dxlog_file7,
|
|
1266
|
-
L:
|
|
1268
|
+
L: 166,
|
|
1267
1269
|
S: this,
|
|
1268
1270
|
A: [
|
|
1269
1271
|
"this.invitation",
|
|
@@ -1278,7 +1280,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1278
1280
|
id: traceId
|
|
1279
1281
|
}), {
|
|
1280
1282
|
F: __dxlog_file7,
|
|
1281
|
-
L:
|
|
1283
|
+
L: 174,
|
|
1282
1284
|
S: this,
|
|
1283
1285
|
C: (f, a) => f(...a)
|
|
1284
1286
|
});
|
|
@@ -1301,7 +1303,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1301
1303
|
timeout: OPTIONS_TIMEOUT
|
|
1302
1304
|
}));
|
|
1303
1305
|
if (this._remoteOptions?.role !== import_invitations.Options.Role.GUEST) {
|
|
1304
|
-
throw new
|
|
1306
|
+
throw new import_errors.InvalidInvitationExtensionRoleError(void 0, {
|
|
1305
1307
|
expected: import_invitations.Options.Role.GUEST,
|
|
1306
1308
|
remoteOptions: this._remoteOptions
|
|
1307
1309
|
});
|
|
@@ -1335,7 +1337,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1335
1337
|
options: async (options) => {
|
|
1336
1338
|
(0, import_invariant6.invariant)(!this._remoteOptions, "Remote options already set.", {
|
|
1337
1339
|
F: __dxlog_file7,
|
|
1338
|
-
L:
|
|
1340
|
+
L: 241,
|
|
1339
1341
|
S: this,
|
|
1340
1342
|
A: [
|
|
1341
1343
|
"!this._remoteOptions",
|
|
@@ -1362,7 +1364,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1362
1364
|
try {
|
|
1363
1365
|
(0, import_log5.log)("begin options", void 0, {
|
|
1364
1366
|
F: __dxlog_file7,
|
|
1365
|
-
L:
|
|
1367
|
+
L: 262,
|
|
1366
1368
|
S: this,
|
|
1367
1369
|
C: (f, a) => f(...a)
|
|
1368
1370
|
});
|
|
@@ -1374,12 +1376,12 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1374
1376
|
}));
|
|
1375
1377
|
(0, import_log5.log)("end options", void 0, {
|
|
1376
1378
|
F: __dxlog_file7,
|
|
1377
|
-
L:
|
|
1379
|
+
L: 265,
|
|
1378
1380
|
S: this,
|
|
1379
1381
|
C: (f, a) => f(...a)
|
|
1380
1382
|
});
|
|
1381
1383
|
if (this._remoteOptions?.role !== import_invitations.Options.Role.HOST) {
|
|
1382
|
-
throw new
|
|
1384
|
+
throw new import_errors.InvalidInvitationExtensionRoleError(void 0, {
|
|
1383
1385
|
expected: import_invitations.Options.Role.HOST,
|
|
1384
1386
|
remoteOptions: this._remoteOptions
|
|
1385
1387
|
});
|
|
@@ -1388,7 +1390,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1388
1390
|
} catch (err) {
|
|
1389
1391
|
(0, import_log5.log)("openError", err, {
|
|
1390
1392
|
F: __dxlog_file7,
|
|
1391
|
-
L:
|
|
1393
|
+
L: 275,
|
|
1392
1394
|
S: this,
|
|
1393
1395
|
C: (f, a) => f(...a)
|
|
1394
1396
|
});
|
|
@@ -1398,7 +1400,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1398
1400
|
async onClose() {
|
|
1399
1401
|
(0, import_log5.log)("onClose", void 0, {
|
|
1400
1402
|
F: __dxlog_file7,
|
|
1401
|
-
L:
|
|
1403
|
+
L: 281,
|
|
1402
1404
|
S: this,
|
|
1403
1405
|
C: (f, a) => f(...a)
|
|
1404
1406
|
});
|
|
@@ -1421,7 +1423,7 @@ var InvitationsHandler = class {
|
|
|
1421
1423
|
const authCode = options?.authCode ?? (authMethod === import_services4.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials9.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0);
|
|
1422
1424
|
(0, import_invariant7.invariant)(protocol, void 0, {
|
|
1423
1425
|
F: __dxlog_file8,
|
|
1424
|
-
L:
|
|
1426
|
+
L: 76,
|
|
1425
1427
|
S: this,
|
|
1426
1428
|
A: [
|
|
1427
1429
|
"protocol",
|
|
@@ -1450,7 +1452,7 @@ var InvitationsHandler = class {
|
|
|
1450
1452
|
...protocol.toJSON()
|
|
1451
1453
|
}, {
|
|
1452
1454
|
F: __dxlog_file8,
|
|
1453
|
-
L:
|
|
1455
|
+
L: 98,
|
|
1454
1456
|
S: this,
|
|
1455
1457
|
C: (f, a) => f(...a)
|
|
1456
1458
|
});
|
|
@@ -1475,7 +1477,7 @@ var InvitationsHandler = class {
|
|
|
1475
1477
|
const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
|
|
1476
1478
|
(0, import_invariant7.invariant)(deviceKey, void 0, {
|
|
1477
1479
|
F: __dxlog_file8,
|
|
1478
|
-
L:
|
|
1480
|
+
L: 119,
|
|
1479
1481
|
S: this,
|
|
1480
1482
|
A: [
|
|
1481
1483
|
"deviceKey",
|
|
@@ -1498,7 +1500,7 @@ var InvitationsHandler = class {
|
|
|
1498
1500
|
id: traceId
|
|
1499
1501
|
}), {
|
|
1500
1502
|
F: __dxlog_file8,
|
|
1501
|
-
L:
|
|
1503
|
+
L: 137,
|
|
1502
1504
|
S: this,
|
|
1503
1505
|
C: (f, a) => f(...a)
|
|
1504
1506
|
});
|
|
@@ -1506,7 +1508,7 @@ var InvitationsHandler = class {
|
|
|
1506
1508
|
...protocol.toJSON()
|
|
1507
1509
|
}, {
|
|
1508
1510
|
F: __dxlog_file8,
|
|
1509
|
-
L:
|
|
1511
|
+
L: 138,
|
|
1510
1512
|
S: this,
|
|
1511
1513
|
C: (f, a) => f(...a)
|
|
1512
1514
|
});
|
|
@@ -1522,7 +1524,7 @@ var InvitationsHandler = class {
|
|
|
1522
1524
|
...protocol.toJSON()
|
|
1523
1525
|
}, {
|
|
1524
1526
|
F: __dxlog_file8,
|
|
1525
|
-
L:
|
|
1527
|
+
L: 141,
|
|
1526
1528
|
S: this,
|
|
1527
1529
|
C: (f, a) => f(...a)
|
|
1528
1530
|
});
|
|
@@ -1534,7 +1536,7 @@ var InvitationsHandler = class {
|
|
|
1534
1536
|
id: traceId
|
|
1535
1537
|
}), {
|
|
1536
1538
|
F: __dxlog_file8,
|
|
1537
|
-
L:
|
|
1539
|
+
L: 143,
|
|
1538
1540
|
S: this,
|
|
1539
1541
|
C: (f, a) => f(...a)
|
|
1540
1542
|
});
|
|
@@ -1544,7 +1546,7 @@ var InvitationsHandler = class {
|
|
|
1544
1546
|
...protocol.toJSON()
|
|
1545
1547
|
}, {
|
|
1546
1548
|
F: __dxlog_file8,
|
|
1547
|
-
L:
|
|
1549
|
+
L: 146,
|
|
1548
1550
|
S: this,
|
|
1549
1551
|
C: (f, a) => f(...a)
|
|
1550
1552
|
});
|
|
@@ -1555,7 +1557,7 @@ var InvitationsHandler = class {
|
|
|
1555
1557
|
} else {
|
|
1556
1558
|
import_log6.log.error("failed", err, {
|
|
1557
1559
|
F: __dxlog_file8,
|
|
1558
|
-
L:
|
|
1560
|
+
L: 149,
|
|
1559
1561
|
S: this,
|
|
1560
1562
|
C: (f, a) => f(...a)
|
|
1561
1563
|
});
|
|
@@ -1566,7 +1568,7 @@ var InvitationsHandler = class {
|
|
|
1566
1568
|
error: err
|
|
1567
1569
|
}), {
|
|
1568
1570
|
F: __dxlog_file8,
|
|
1569
|
-
L:
|
|
1571
|
+
L: 152,
|
|
1570
1572
|
S: this,
|
|
1571
1573
|
C: (f, a) => f(...a)
|
|
1572
1574
|
});
|
|
@@ -1579,7 +1581,7 @@ var InvitationsHandler = class {
|
|
|
1579
1581
|
});
|
|
1580
1582
|
},
|
|
1581
1583
|
onError: (err) => {
|
|
1582
|
-
if (err instanceof
|
|
1584
|
+
if (err instanceof import_errors2.InvalidInvitationExtensionRoleError) {
|
|
1583
1585
|
return;
|
|
1584
1586
|
}
|
|
1585
1587
|
if (err instanceof import_async5.TimeoutError) {
|
|
@@ -1587,7 +1589,7 @@ var InvitationsHandler = class {
|
|
|
1587
1589
|
...protocol.toJSON()
|
|
1588
1590
|
}, {
|
|
1589
1591
|
F: __dxlog_file8,
|
|
1590
|
-
L:
|
|
1592
|
+
L: 167,
|
|
1591
1593
|
S: this,
|
|
1592
1594
|
C: (f, a) => f(...a)
|
|
1593
1595
|
});
|
|
@@ -1598,7 +1600,7 @@ var InvitationsHandler = class {
|
|
|
1598
1600
|
} else {
|
|
1599
1601
|
import_log6.log.error("failed", err, {
|
|
1600
1602
|
F: __dxlog_file8,
|
|
1601
|
-
L:
|
|
1603
|
+
L: 170,
|
|
1602
1604
|
S: this,
|
|
1603
1605
|
C: (f, a) => f(...a)
|
|
1604
1606
|
});
|
|
@@ -1643,7 +1645,7 @@ var InvitationsHandler = class {
|
|
|
1643
1645
|
const { timeout = import_client_protocol2.INVITATION_TIMEOUT } = invitation;
|
|
1644
1646
|
(0, import_invariant7.invariant)(protocol, void 0, {
|
|
1645
1647
|
F: __dxlog_file8,
|
|
1646
|
-
L:
|
|
1648
|
+
L: 211,
|
|
1647
1649
|
S: this,
|
|
1648
1650
|
A: [
|
|
1649
1651
|
"protocol",
|
|
@@ -1657,7 +1659,7 @@ var InvitationsHandler = class {
|
|
|
1657
1659
|
const setState = (newData) => {
|
|
1658
1660
|
(0, import_invariant7.invariant)(newData.state !== void 0, void 0, {
|
|
1659
1661
|
F: __dxlog_file8,
|
|
1660
|
-
L:
|
|
1662
|
+
L: 222,
|
|
1661
1663
|
S: this,
|
|
1662
1664
|
A: [
|
|
1663
1665
|
"newData.state !== undefined",
|
|
@@ -1677,7 +1679,7 @@ var InvitationsHandler = class {
|
|
|
1677
1679
|
...protocol.toJSON()
|
|
1678
1680
|
}, {
|
|
1679
1681
|
F: __dxlog_file8,
|
|
1680
|
-
L:
|
|
1682
|
+
L: 230,
|
|
1681
1683
|
S: this,
|
|
1682
1684
|
C: (f, a) => f(...a)
|
|
1683
1685
|
});
|
|
@@ -1687,7 +1689,7 @@ var InvitationsHandler = class {
|
|
|
1687
1689
|
} else {
|
|
1688
1690
|
import_log6.log.warn("auth failed", err, {
|
|
1689
1691
|
F: __dxlog_file8,
|
|
1690
|
-
L:
|
|
1692
|
+
L: 233,
|
|
1691
1693
|
S: this,
|
|
1692
1694
|
C: (f, a) => f(...a)
|
|
1693
1695
|
});
|
|
@@ -1701,7 +1703,7 @@ var InvitationsHandler = class {
|
|
|
1701
1703
|
...protocol.toJSON()
|
|
1702
1704
|
}, {
|
|
1703
1705
|
F: __dxlog_file8,
|
|
1704
|
-
L:
|
|
1706
|
+
L: 241,
|
|
1705
1707
|
S: this,
|
|
1706
1708
|
C: (f, a) => f(...a)
|
|
1707
1709
|
});
|
|
@@ -1716,7 +1718,7 @@ var InvitationsHandler = class {
|
|
|
1716
1718
|
currentState
|
|
1717
1719
|
}, {
|
|
1718
1720
|
F: __dxlog_file8,
|
|
1719
|
-
L:
|
|
1721
|
+
L: 251,
|
|
1720
1722
|
S: this,
|
|
1721
1723
|
C: (f, a) => f(...a)
|
|
1722
1724
|
});
|
|
@@ -1731,7 +1733,7 @@ var InvitationsHandler = class {
|
|
|
1731
1733
|
id: traceId
|
|
1732
1734
|
}), {
|
|
1733
1735
|
F: __dxlog_file8,
|
|
1734
|
-
L:
|
|
1736
|
+
L: 260,
|
|
1735
1737
|
S: this,
|
|
1736
1738
|
C: (f, a) => f(...a)
|
|
1737
1739
|
});
|
|
@@ -1743,7 +1745,7 @@ var InvitationsHandler = class {
|
|
|
1743
1745
|
...protocol.toJSON()
|
|
1744
1746
|
}, {
|
|
1745
1747
|
F: __dxlog_file8,
|
|
1746
|
-
L:
|
|
1748
|
+
L: 268,
|
|
1747
1749
|
S: this,
|
|
1748
1750
|
C: (f, a) => f(...a)
|
|
1749
1751
|
});
|
|
@@ -1754,7 +1756,7 @@ var InvitationsHandler = class {
|
|
|
1754
1756
|
...protocol.toJSON()
|
|
1755
1757
|
}, {
|
|
1756
1758
|
F: __dxlog_file8,
|
|
1757
|
-
L:
|
|
1759
|
+
L: 272,
|
|
1758
1760
|
S: this,
|
|
1759
1761
|
C: (f, a) => f(...a)
|
|
1760
1762
|
});
|
|
@@ -1764,7 +1766,7 @@ var InvitationsHandler = class {
|
|
|
1764
1766
|
response: introductionResponse
|
|
1765
1767
|
}, {
|
|
1766
1768
|
F: __dxlog_file8,
|
|
1767
|
-
L:
|
|
1769
|
+
L: 276,
|
|
1768
1770
|
S: this,
|
|
1769
1771
|
C: (f, a) => f(...a)
|
|
1770
1772
|
});
|
|
@@ -1776,7 +1778,7 @@ var InvitationsHandler = class {
|
|
|
1776
1778
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1777
1779
|
(0, import_log6.log)("guest waiting for authentication code...", void 0, {
|
|
1778
1780
|
F: __dxlog_file8,
|
|
1779
|
-
L:
|
|
1781
|
+
L: 285,
|
|
1780
1782
|
S: this,
|
|
1781
1783
|
C: (f, a) => f(...a)
|
|
1782
1784
|
});
|
|
@@ -1788,7 +1790,7 @@ var InvitationsHandler = class {
|
|
|
1788
1790
|
});
|
|
1789
1791
|
(0, import_log6.log)("sending authentication request", void 0, {
|
|
1790
1792
|
F: __dxlog_file8,
|
|
1791
|
-
L:
|
|
1793
|
+
L: 289,
|
|
1792
1794
|
S: this,
|
|
1793
1795
|
C: (f, a) => f(...a)
|
|
1794
1796
|
});
|
|
@@ -1809,7 +1811,7 @@ var InvitationsHandler = class {
|
|
|
1809
1811
|
attempt
|
|
1810
1812
|
}, {
|
|
1811
1813
|
F: __dxlog_file8,
|
|
1812
|
-
L:
|
|
1814
|
+
L: 300,
|
|
1813
1815
|
S: this,
|
|
1814
1816
|
C: (f, a) => f(...a)
|
|
1815
1817
|
});
|
|
@@ -1826,7 +1828,7 @@ var InvitationsHandler = class {
|
|
|
1826
1828
|
...protocol.toJSON()
|
|
1827
1829
|
}, {
|
|
1828
1830
|
F: __dxlog_file8,
|
|
1829
|
-
L:
|
|
1831
|
+
L: 311,
|
|
1830
1832
|
S: this,
|
|
1831
1833
|
C: (f, a) => f(...a)
|
|
1832
1834
|
});
|
|
@@ -1838,7 +1840,7 @@ var InvitationsHandler = class {
|
|
|
1838
1840
|
...protocol.toJSON()
|
|
1839
1841
|
}, {
|
|
1840
1842
|
F: __dxlog_file8,
|
|
1841
|
-
L:
|
|
1843
|
+
L: 322,
|
|
1842
1844
|
S: this,
|
|
1843
1845
|
C: (f, a) => f(...a)
|
|
1844
1846
|
});
|
|
@@ -1850,7 +1852,7 @@ var InvitationsHandler = class {
|
|
|
1850
1852
|
id: traceId
|
|
1851
1853
|
}), {
|
|
1852
1854
|
F: __dxlog_file8,
|
|
1853
|
-
L:
|
|
1855
|
+
L: 324,
|
|
1854
1856
|
S: this,
|
|
1855
1857
|
C: (f, a) => f(...a)
|
|
1856
1858
|
});
|
|
@@ -1860,7 +1862,7 @@ var InvitationsHandler = class {
|
|
|
1860
1862
|
...protocol.toJSON()
|
|
1861
1863
|
}, {
|
|
1862
1864
|
F: __dxlog_file8,
|
|
1863
|
-
L:
|
|
1865
|
+
L: 327,
|
|
1864
1866
|
S: this,
|
|
1865
1867
|
C: (f, a) => f(...a)
|
|
1866
1868
|
});
|
|
@@ -1870,7 +1872,7 @@ var InvitationsHandler = class {
|
|
|
1870
1872
|
} else {
|
|
1871
1873
|
(0, import_log6.log)("auth failed", err, {
|
|
1872
1874
|
F: __dxlog_file8,
|
|
1873
|
-
L:
|
|
1875
|
+
L: 330,
|
|
1874
1876
|
S: this,
|
|
1875
1877
|
C: (f, a) => f(...a)
|
|
1876
1878
|
});
|
|
@@ -1881,7 +1883,7 @@ var InvitationsHandler = class {
|
|
|
1881
1883
|
error: err
|
|
1882
1884
|
}), {
|
|
1883
1885
|
F: __dxlog_file8,
|
|
1884
|
-
L:
|
|
1886
|
+
L: 333,
|
|
1885
1887
|
S: this,
|
|
1886
1888
|
C: (f, a) => f(...a)
|
|
1887
1889
|
});
|
|
@@ -1891,7 +1893,7 @@ var InvitationsHandler = class {
|
|
|
1891
1893
|
});
|
|
1892
1894
|
},
|
|
1893
1895
|
onError: (err) => {
|
|
1894
|
-
if (err instanceof
|
|
1896
|
+
if (err instanceof import_errors2.InvalidInvitationExtensionRoleError) {
|
|
1895
1897
|
return;
|
|
1896
1898
|
}
|
|
1897
1899
|
if (err instanceof import_async5.TimeoutError) {
|
|
@@ -1899,7 +1901,7 @@ var InvitationsHandler = class {
|
|
|
1899
1901
|
...protocol.toJSON()
|
|
1900
1902
|
}, {
|
|
1901
1903
|
F: __dxlog_file8,
|
|
1902
|
-
L:
|
|
1904
|
+
L: 344,
|
|
1903
1905
|
S: this,
|
|
1904
1906
|
C: (f, a) => f(...a)
|
|
1905
1907
|
});
|
|
@@ -1909,7 +1911,7 @@ var InvitationsHandler = class {
|
|
|
1909
1911
|
} else {
|
|
1910
1912
|
(0, import_log6.log)("auth failed", err, {
|
|
1911
1913
|
F: __dxlog_file8,
|
|
1912
|
-
L:
|
|
1914
|
+
L: 347,
|
|
1913
1915
|
S: this,
|
|
1914
1916
|
C: (f, a) => f(...a)
|
|
1915
1917
|
});
|
|
@@ -1922,7 +1924,7 @@ var InvitationsHandler = class {
|
|
|
1922
1924
|
(0, import_async5.scheduleTask)(ctx, async () => {
|
|
1923
1925
|
(0, import_invariant7.invariant)(invitation.swarmKey, void 0, {
|
|
1924
1926
|
F: __dxlog_file8,
|
|
1925
|
-
L:
|
|
1927
|
+
L: 357,
|
|
1926
1928
|
S: this,
|
|
1927
1929
|
A: [
|
|
1928
1930
|
"invitation.swarmKey",
|
|
@@ -2313,7 +2315,7 @@ var import_credentials14 = require("@dxos/credentials");
|
|
|
2313
2315
|
var import_invariant11 = require("@dxos/invariant");
|
|
2314
2316
|
var import_keys7 = require("@dxos/keys");
|
|
2315
2317
|
var import_log11 = require("@dxos/log");
|
|
2316
|
-
var
|
|
2318
|
+
var import_protocols7 = require("@dxos/protocols");
|
|
2317
2319
|
var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2318
2320
|
var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
|
|
2319
2321
|
var import_util4 = require("@dxos/util");
|
|
@@ -2324,9 +2326,9 @@ var import_client_protocol3 = require("@dxos/client-protocol");
|
|
|
2324
2326
|
var import_context6 = require("@dxos/context");
|
|
2325
2327
|
var import_debug4 = require("@dxos/debug");
|
|
2326
2328
|
var import_echo_pipeline = require("@dxos/echo-pipeline");
|
|
2329
|
+
var import_errors3 = require("@dxos/errors");
|
|
2327
2330
|
var import_keys6 = require("@dxos/keys");
|
|
2328
2331
|
var import_log10 = require("@dxos/log");
|
|
2329
|
-
var import_protocols7 = require("@dxos/protocols");
|
|
2330
2332
|
var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2331
2333
|
var import_credentials11 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
2332
2334
|
var import_timeframe2 = require("@dxos/timeframe");
|
|
@@ -2635,7 +2637,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2635
2637
|
this._signingContext = params.signingContext;
|
|
2636
2638
|
this._callbacks = params.callbacks ?? {};
|
|
2637
2639
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
2638
|
-
trustedKeysProvider: () => new import_util3.ComplexSet(import_keys6.PublicKey.hash, Array.from(this._inner.spaceState.members.
|
|
2640
|
+
trustedKeysProvider: () => new import_util3.ComplexSet(import_keys6.PublicKey.hash, Array.from(this._inner.spaceState.members.keys())),
|
|
2639
2641
|
update: this._inner.stateUpdate,
|
|
2640
2642
|
authTimeout: import_client_protocol3.AUTH_TIMEOUT
|
|
2641
2643
|
});
|
|
@@ -2645,7 +2647,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2645
2647
|
state: import_services7.SpaceState[this._state]
|
|
2646
2648
|
}, {
|
|
2647
2649
|
F: __dxlog_file12,
|
|
2648
|
-
L:
|
|
2650
|
+
L: 112,
|
|
2649
2651
|
S: this,
|
|
2650
2652
|
C: (f, a) => f(...a)
|
|
2651
2653
|
});
|
|
@@ -2688,7 +2690,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2688
2690
|
state: import_services7.SpaceState[this._state]
|
|
2689
2691
|
}, {
|
|
2690
2692
|
F: __dxlog_file12,
|
|
2691
|
-
L:
|
|
2693
|
+
L: 159,
|
|
2692
2694
|
S: this,
|
|
2693
2695
|
C: (f, a) => f(...a)
|
|
2694
2696
|
});
|
|
@@ -2706,7 +2708,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2706
2708
|
state: import_services7.SpaceState[this._state]
|
|
2707
2709
|
}, {
|
|
2708
2710
|
F: __dxlog_file12,
|
|
2709
|
-
L:
|
|
2711
|
+
L: 173,
|
|
2710
2712
|
S: this,
|
|
2711
2713
|
C: (f, a) => f(...a)
|
|
2712
2714
|
});
|
|
@@ -2734,10 +2736,10 @@ var DataSpace = class DataSpace2 {
|
|
|
2734
2736
|
this.metrics.pipelineInitBegin = /* @__PURE__ */ new Date();
|
|
2735
2737
|
await this.initializeDataPipeline();
|
|
2736
2738
|
} catch (err) {
|
|
2737
|
-
if (err instanceof
|
|
2739
|
+
if (err instanceof import_errors3.CancelledError) {
|
|
2738
2740
|
(0, import_log10.log)("data pipeline initialization cancelled", err, {
|
|
2739
2741
|
F: __dxlog_file12,
|
|
2740
|
-
L:
|
|
2742
|
+
L: 205,
|
|
2741
2743
|
S: this,
|
|
2742
2744
|
C: (f, a) => f(...a)
|
|
2743
2745
|
});
|
|
@@ -2745,7 +2747,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2745
2747
|
}
|
|
2746
2748
|
import_log10.log.error("Error initializing data pipeline", err, {
|
|
2747
2749
|
F: __dxlog_file12,
|
|
2748
|
-
L:
|
|
2750
|
+
L: 209,
|
|
2749
2751
|
S: this,
|
|
2750
2752
|
C: (f, a) => f(...a)
|
|
2751
2753
|
});
|
|
@@ -2754,7 +2756,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2754
2756
|
state: import_services7.SpaceState[this._state]
|
|
2755
2757
|
}, {
|
|
2756
2758
|
F: __dxlog_file12,
|
|
2757
|
-
L:
|
|
2759
|
+
L: 211,
|
|
2758
2760
|
S: this,
|
|
2759
2761
|
C: (f, a) => f(...a)
|
|
2760
2762
|
});
|
|
@@ -2767,14 +2769,14 @@ var DataSpace = class DataSpace2 {
|
|
|
2767
2769
|
}
|
|
2768
2770
|
async initializeDataPipeline() {
|
|
2769
2771
|
if (this._state !== import_services7.SpaceState.CONTROL_ONLY) {
|
|
2770
|
-
throw new
|
|
2772
|
+
throw new import_errors3.SystemError("Invalid operation");
|
|
2771
2773
|
}
|
|
2772
2774
|
this._state = import_services7.SpaceState.INITIALIZING;
|
|
2773
2775
|
(0, import_log10.log)("new state", {
|
|
2774
2776
|
state: import_services7.SpaceState[this._state]
|
|
2775
2777
|
}, {
|
|
2776
2778
|
F: __dxlog_file12,
|
|
2777
|
-
L:
|
|
2779
|
+
L: 227,
|
|
2778
2780
|
S: this,
|
|
2779
2781
|
C: (f, a) => f(...a)
|
|
2780
2782
|
});
|
|
@@ -2785,7 +2787,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2785
2787
|
await (0, import_context6.cancelWithContext)(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
|
|
2786
2788
|
(0, import_log10.log)("waiting for data pipeline to reach target timeframe", void 0, {
|
|
2787
2789
|
F: __dxlog_file12,
|
|
2788
|
-
L:
|
|
2790
|
+
L: 241,
|
|
2789
2791
|
S: this,
|
|
2790
2792
|
C: (f, a) => f(...a)
|
|
2791
2793
|
});
|
|
@@ -2796,7 +2798,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2796
2798
|
this.metrics.dataPipelineReady = /* @__PURE__ */ new Date();
|
|
2797
2799
|
(0, import_log10.log)("data pipeline ready", void 0, {
|
|
2798
2800
|
F: __dxlog_file12,
|
|
2799
|
-
L:
|
|
2801
|
+
L: 250,
|
|
2800
2802
|
S: this,
|
|
2801
2803
|
C: (f, a) => f(...a)
|
|
2802
2804
|
});
|
|
@@ -2806,7 +2808,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2806
2808
|
state: import_services7.SpaceState[this._state]
|
|
2807
2809
|
}, {
|
|
2808
2810
|
F: __dxlog_file12,
|
|
2809
|
-
L:
|
|
2811
|
+
L: 254,
|
|
2810
2812
|
S: this,
|
|
2811
2813
|
C: (f, a) => f(...a)
|
|
2812
2814
|
});
|
|
@@ -2822,7 +2824,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2822
2824
|
await this._createWritableFeeds();
|
|
2823
2825
|
(0, import_log10.log)("writable feeds created", void 0, {
|
|
2824
2826
|
F: __dxlog_file12,
|
|
2825
|
-
L:
|
|
2827
|
+
L: 270,
|
|
2826
2828
|
S: this,
|
|
2827
2829
|
C: (f, a) => f(...a)
|
|
2828
2830
|
});
|
|
@@ -2927,7 +2929,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2927
2929
|
state: import_services7.SpaceState[this._state]
|
|
2928
2930
|
}, {
|
|
2929
2931
|
F: __dxlog_file12,
|
|
2930
|
-
L:
|
|
2932
|
+
L: 386,
|
|
2931
2933
|
S: this,
|
|
2932
2934
|
C: (f, a) => f(...a)
|
|
2933
2935
|
});
|
|
@@ -3069,7 +3071,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3069
3071
|
S: this,
|
|
3070
3072
|
C: (f, a) => f(...a)
|
|
3071
3073
|
});
|
|
3072
|
-
import_log11.log.trace("dxos.echo.data-space-manager.open",
|
|
3074
|
+
import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols7.trace.begin({
|
|
3073
3075
|
id: this._instanceId
|
|
3074
3076
|
}), {
|
|
3075
3077
|
F: __dxlog_file13,
|
|
@@ -3115,7 +3117,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3115
3117
|
space.initializeDataPipelineAsync();
|
|
3116
3118
|
}
|
|
3117
3119
|
}
|
|
3118
|
-
import_log11.log.trace("dxos.echo.data-space-manager.open",
|
|
3120
|
+
import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols7.trace.end({
|
|
3119
3121
|
id: this._instanceId
|
|
3120
3122
|
}), {
|
|
3121
3123
|
F: __dxlog_file13,
|
|
@@ -3369,9 +3371,10 @@ DataSpaceManager = _ts_decorate4([
|
|
|
3369
3371
|
var import_async10 = require("@dxos/async");
|
|
3370
3372
|
var import_codec_protobuf5 = require("@dxos/codec-protobuf");
|
|
3371
3373
|
var import_debug6 = require("@dxos/debug");
|
|
3372
|
-
var
|
|
3374
|
+
var import_echo_pipeline2 = require("@dxos/echo-pipeline");
|
|
3375
|
+
var import_errors4 = require("@dxos/errors");
|
|
3373
3376
|
var import_log12 = require("@dxos/log");
|
|
3374
|
-
var
|
|
3377
|
+
var import_protocols8 = require("@dxos/protocols");
|
|
3375
3378
|
var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3376
3379
|
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3377
3380
|
var SpacesServiceImpl = class {
|
|
@@ -3391,7 +3394,7 @@ var SpacesServiceImpl = class {
|
|
|
3391
3394
|
}
|
|
3392
3395
|
async updateSpace({ spaceKey, state }) {
|
|
3393
3396
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3394
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3397
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3395
3398
|
if (state) {
|
|
3396
3399
|
switch (state) {
|
|
3397
3400
|
case import_services9.SpaceState.ACTIVE:
|
|
@@ -3401,7 +3404,7 @@ var SpacesServiceImpl = class {
|
|
|
3401
3404
|
await space.deactivate();
|
|
3402
3405
|
break;
|
|
3403
3406
|
default:
|
|
3404
|
-
throw new
|
|
3407
|
+
throw new import_errors4.ApiError("Invalid space state");
|
|
3405
3408
|
}
|
|
3406
3409
|
}
|
|
3407
3410
|
}
|
|
@@ -3456,14 +3459,14 @@ var SpacesServiceImpl = class {
|
|
|
3456
3459
|
}
|
|
3457
3460
|
async postMessage({ spaceKey, channel, message }) {
|
|
3458
3461
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3459
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3462
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3460
3463
|
await space.postMessage(getChannelId(channel), message);
|
|
3461
3464
|
}
|
|
3462
3465
|
subscribeMessages({ spaceKey, channel }) {
|
|
3463
3466
|
return new import_codec_protobuf5.Stream(({ ctx, next }) => {
|
|
3464
3467
|
(0, import_async10.scheduleTask)(ctx, async () => {
|
|
3465
3468
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3466
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3469
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3467
3470
|
const handle = space.listen(getChannelId(channel), (message) => {
|
|
3468
3471
|
next(message);
|
|
3469
3472
|
});
|
|
@@ -3471,83 +3474,38 @@ var SpacesServiceImpl = class {
|
|
|
3471
3474
|
});
|
|
3472
3475
|
});
|
|
3473
3476
|
}
|
|
3474
|
-
queryCredentials({ spaceKey
|
|
3475
|
-
return new import_codec_protobuf5.Stream(({ ctx, next
|
|
3476
|
-
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3477
|
+
queryCredentials({ spaceKey }) {
|
|
3478
|
+
return new import_codec_protobuf5.Stream(({ ctx, next }) => {
|
|
3479
|
+
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3477
3480
|
const processor = {
|
|
3478
3481
|
processCredential: async (credential) => {
|
|
3479
3482
|
next(credential);
|
|
3480
3483
|
}
|
|
3481
3484
|
};
|
|
3482
3485
|
ctx.onDispose(() => space.spaceState.removeCredentialProcessor(processor));
|
|
3483
|
-
(0, import_async10.scheduleTask)(ctx,
|
|
3484
|
-
await space.spaceState.addCredentialProcessor(processor);
|
|
3485
|
-
if (noTail) {
|
|
3486
|
-
close();
|
|
3487
|
-
}
|
|
3488
|
-
});
|
|
3486
|
+
(0, import_async10.scheduleTask)(ctx, () => space.spaceState.addCredentialProcessor(processor));
|
|
3489
3487
|
});
|
|
3490
3488
|
}
|
|
3491
3489
|
async writeCredentials({ spaceKey, credentials }) {
|
|
3492
|
-
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3490
|
+
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3493
3491
|
for (const credential of credentials ?? []) {
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
credential
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
});
|
|
3500
|
-
} else {
|
|
3501
|
-
(0, import_invariant12.invariant)(!credential.id, "Id on unsigned credentials is not allowed", {
|
|
3502
|
-
F: __dxlog_file14,
|
|
3503
|
-
L: 168,
|
|
3504
|
-
S: this,
|
|
3505
|
-
A: [
|
|
3506
|
-
"!credential.id",
|
|
3507
|
-
"'Id on unsigned credentials is not allowed'"
|
|
3508
|
-
]
|
|
3509
|
-
});
|
|
3510
|
-
(0, import_invariant12.invariant)(this._identityManager.identity, "Identity is not available", {
|
|
3511
|
-
F: __dxlog_file14,
|
|
3512
|
-
L: 169,
|
|
3513
|
-
S: this,
|
|
3514
|
-
A: [
|
|
3515
|
-
"this._identityManager.identity",
|
|
3516
|
-
"'Identity is not available'"
|
|
3517
|
-
]
|
|
3518
|
-
});
|
|
3519
|
-
const signer = this._identityManager.identity.getIdentityCredentialSigner();
|
|
3520
|
-
(0, import_invariant12.invariant)(credential.issuer.equals(signer.getIssuer()), void 0, {
|
|
3521
|
-
F: __dxlog_file14,
|
|
3522
|
-
L: 171,
|
|
3523
|
-
S: this,
|
|
3524
|
-
A: [
|
|
3525
|
-
"credential.issuer.equals(signer.getIssuer())",
|
|
3526
|
-
""
|
|
3527
|
-
]
|
|
3528
|
-
});
|
|
3529
|
-
const signedCredential = await signer.createCredential({
|
|
3530
|
-
subject: credential.subject.id,
|
|
3531
|
-
assertion: credential.subject.assertion
|
|
3532
|
-
});
|
|
3533
|
-
await space.controlPipeline.writer.write({
|
|
3534
|
-
credential: {
|
|
3535
|
-
credential: signedCredential
|
|
3536
|
-
}
|
|
3537
|
-
});
|
|
3538
|
-
}
|
|
3492
|
+
await space.controlPipeline.writer.write({
|
|
3493
|
+
credential: {
|
|
3494
|
+
credential
|
|
3495
|
+
}
|
|
3496
|
+
});
|
|
3539
3497
|
}
|
|
3540
3498
|
}
|
|
3541
3499
|
async createEpoch({ spaceKey }) {
|
|
3542
3500
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3543
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3501
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3544
3502
|
await space.createEpoch();
|
|
3545
3503
|
}
|
|
3546
3504
|
_serializeSpace(space) {
|
|
3547
3505
|
return {
|
|
3548
3506
|
spaceKey: space.key,
|
|
3549
3507
|
state: space.state,
|
|
3550
|
-
error: space.error ? (0,
|
|
3508
|
+
error: space.error ? (0, import_protocols8.encodeError)(space.error) : void 0,
|
|
3551
3509
|
pipeline: {
|
|
3552
3510
|
currentEpoch: space.dataPipeline.currentEpoch,
|
|
3553
3511
|
appliedEpoch: space.dataPipeline.appliedEpoch,
|
|
@@ -3574,7 +3532,7 @@ var SpacesServiceImpl = class {
|
|
|
3574
3532
|
displayName: member.assertion.profile?.displayName
|
|
3575
3533
|
}
|
|
3576
3534
|
},
|
|
3577
|
-
presence:
|
|
3535
|
+
presence: isMe || peers.length > 0 ? import_services9.SpaceMember.PresenceState.ONLINE : import_services9.SpaceMember.PresenceState.OFFLINE,
|
|
3578
3536
|
peerStates: peers
|
|
3579
3537
|
};
|
|
3580
3538
|
}),
|
|
@@ -3606,11 +3564,11 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3606
3564
|
this.signalManager = signalManager;
|
|
3607
3565
|
this.modelFactory = modelFactory;
|
|
3608
3566
|
this.initialized = new import_async11.Trigger();
|
|
3609
|
-
this.dataServiceSubscriptions = new
|
|
3567
|
+
this.dataServiceSubscriptions = new import_echo_pipeline3.DataServiceSubscriptions();
|
|
3610
3568
|
this._handlerFactories = /* @__PURE__ */ new Map();
|
|
3611
3569
|
this._instanceId = import_keys8.PublicKey.random().toHex();
|
|
3612
|
-
this.metadataStore = new
|
|
3613
|
-
this.snapshotStore = new
|
|
3570
|
+
this.metadataStore = new import_echo_pipeline3.MetadataStore(storage.createDirectory("metadata"));
|
|
3571
|
+
this.snapshotStore = new import_echo_pipeline3.SnapshotStore(storage.createDirectory("snapshots"));
|
|
3614
3572
|
this.blobStore = new import_teleport_extension_object_sync.BlobStore(storage.createDirectory("blobs"));
|
|
3615
3573
|
this.keyring = new import_keyring.Keyring(storage.createDirectory("keyring"));
|
|
3616
3574
|
this.feedStore = new import_feed_store3.FeedStore({
|
|
@@ -3618,12 +3576,12 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3618
3576
|
root: storage.createDirectory("feeds"),
|
|
3619
3577
|
signer: this.keyring,
|
|
3620
3578
|
hypercore: {
|
|
3621
|
-
valueEncoding:
|
|
3579
|
+
valueEncoding: import_echo_pipeline3.valueEncoding,
|
|
3622
3580
|
stats: true
|
|
3623
3581
|
}
|
|
3624
3582
|
})
|
|
3625
3583
|
});
|
|
3626
|
-
this.spaceManager = new
|
|
3584
|
+
this.spaceManager = new import_echo_pipeline3.SpaceManager({
|
|
3627
3585
|
feedStore: this.feedStore,
|
|
3628
3586
|
networkManager: this.networkManager,
|
|
3629
3587
|
blobStore: this.blobStore,
|
|
@@ -3643,7 +3601,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3643
3601
|
S: this,
|
|
3644
3602
|
C: (f, a) => f(...a)
|
|
3645
3603
|
});
|
|
3646
|
-
import_log13.log.trace("dxos.sdk.service-context.open",
|
|
3604
|
+
import_log13.log.trace("dxos.sdk.service-context.open", import_protocols9.trace.begin({
|
|
3647
3605
|
id: this._instanceId
|
|
3648
3606
|
}), {
|
|
3649
3607
|
F: __dxlog_file15,
|
|
@@ -3659,7 +3617,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3659
3617
|
if (this.identityManager.identity) {
|
|
3660
3618
|
await this._initialize(ctx);
|
|
3661
3619
|
}
|
|
3662
|
-
import_log13.log.trace("dxos.sdk.service-context.open",
|
|
3620
|
+
import_log13.log.trace("dxos.sdk.service-context.open", import_protocols9.trace.end({
|
|
3663
3621
|
id: this._instanceId
|
|
3664
3622
|
}), {
|
|
3665
3623
|
F: __dxlog_file15,
|
|
@@ -3706,7 +3664,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3706
3664
|
}
|
|
3707
3665
|
getInvitationHandler(invitation) {
|
|
3708
3666
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
3709
|
-
(0,
|
|
3667
|
+
(0, import_invariant12.invariant)(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
3710
3668
|
F: __dxlog_file15,
|
|
3711
3669
|
L: 174,
|
|
3712
3670
|
S: this,
|
|
@@ -3724,8 +3682,8 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3724
3682
|
}
|
|
3725
3683
|
async _checkStorageVersion() {
|
|
3726
3684
|
await this.metadataStore.load();
|
|
3727
|
-
if (this.metadataStore.version !==
|
|
3728
|
-
throw new
|
|
3685
|
+
if (this.metadataStore.version !== import_protocols9.STORAGE_VERSION) {
|
|
3686
|
+
throw new Error(`Invalid storage version: current=${this.metadataStore.version}, expected=${import_protocols9.STORAGE_VERSION}`);
|
|
3729
3687
|
}
|
|
3730
3688
|
}
|
|
3731
3689
|
// Called when identity is created.
|
|
@@ -3753,7 +3711,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3753
3711
|
this.dataSpaceManager = new DataSpaceManager(this.spaceManager, this.metadataStore, this.dataServiceSubscriptions, this.keyring, signingContext, this.feedStore);
|
|
3754
3712
|
await this.dataSpaceManager.open();
|
|
3755
3713
|
this._handlerFactories.set(import_services10.Invitation.Kind.SPACE, (invitation) => {
|
|
3756
|
-
(0,
|
|
3714
|
+
(0, import_invariant12.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
3757
3715
|
F: __dxlog_file15,
|
|
3758
3716
|
L: 218,
|
|
3759
3717
|
S: this,
|
|
@@ -3838,14 +3796,14 @@ var import_async17 = require("@dxos/async");
|
|
|
3838
3796
|
var import_client_protocol5 = require("@dxos/client-protocol");
|
|
3839
3797
|
var import_context10 = require("@dxos/context");
|
|
3840
3798
|
var import_document_model2 = require("@dxos/document-model");
|
|
3841
|
-
var
|
|
3842
|
-
var
|
|
3799
|
+
var import_echo_pipeline4 = require("@dxos/echo-pipeline");
|
|
3800
|
+
var import_invariant14 = require("@dxos/invariant");
|
|
3843
3801
|
var import_keys12 = require("@dxos/keys");
|
|
3844
3802
|
var import_log16 = require("@dxos/log");
|
|
3845
3803
|
var import_messaging = require("@dxos/messaging");
|
|
3846
3804
|
var import_model_factory = require("@dxos/model-factory");
|
|
3847
3805
|
var import_network_manager2 = require("@dxos/network-manager");
|
|
3848
|
-
var
|
|
3806
|
+
var import_protocols10 = require("@dxos/protocols");
|
|
3849
3807
|
var import_services14 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3850
3808
|
var import_text_model = require("@dxos/text-model");
|
|
3851
3809
|
var import_tracing5 = require("@dxos/tracing");
|
|
@@ -4203,7 +4161,7 @@ var DevtoolsServiceImpl = class {
|
|
|
4203
4161
|
};
|
|
4204
4162
|
|
|
4205
4163
|
// packages/sdk/client-services/src/packlets/locks/node.ts
|
|
4206
|
-
var
|
|
4164
|
+
var import_invariant13 = require("@dxos/invariant");
|
|
4207
4165
|
var import_lock_file = require("@dxos/lock-file");
|
|
4208
4166
|
var import_log14 = require("@dxos/log");
|
|
4209
4167
|
function _ts_decorate6(decorators, target, key, desc) {
|
|
@@ -4244,7 +4202,7 @@ var Lock = class {
|
|
|
4244
4202
|
}
|
|
4245
4203
|
async release() {
|
|
4246
4204
|
await this._onRelease?.();
|
|
4247
|
-
(0,
|
|
4205
|
+
(0, import_invariant13.invariant)(this._fileHandle, "Lock is not acquired", {
|
|
4248
4206
|
F: __dxlog_file16,
|
|
4249
4207
|
L: 42,
|
|
4250
4208
|
S: this,
|
|
@@ -4411,7 +4369,7 @@ var NetworkServiceImpl = class {
|
|
|
4411
4369
|
|
|
4412
4370
|
// packages/sdk/client-services/src/packlets/storage/storage.ts
|
|
4413
4371
|
var import_client_protocol4 = require("@dxos/client-protocol");
|
|
4414
|
-
var
|
|
4372
|
+
var import_errors5 = require("@dxos/errors");
|
|
4415
4373
|
var import_config = require("@dxos/protocols/proto/dxos/config");
|
|
4416
4374
|
var import_random_access_storage = require("@dxos/random-access-storage");
|
|
4417
4375
|
var import_util8 = require("@dxos/util");
|
|
@@ -4419,16 +4377,16 @@ var StorageDriver = import_config.Runtime.Client.Storage.StorageDriver;
|
|
|
4419
4377
|
var createStorageObjects = (config) => {
|
|
4420
4378
|
const { path = (0, import_util8.isNode)() ? import_client_protocol4.DX_DATA : "dxos/storage", storageType, keyStorage, persistent = false } = config ?? {};
|
|
4421
4379
|
if (persistent && storageType === StorageDriver.RAM) {
|
|
4422
|
-
throw new
|
|
4380
|
+
throw new import_errors5.InvalidConfigError("RAM storage cannot be used in persistent mode.");
|
|
4423
4381
|
}
|
|
4424
4382
|
if (!persistent && storageType !== void 0 && storageType !== StorageDriver.RAM) {
|
|
4425
|
-
throw new
|
|
4383
|
+
throw new import_errors5.InvalidConfigError("Cannot use a persistent storage in not persistent mode.");
|
|
4426
4384
|
}
|
|
4427
4385
|
if (persistent && keyStorage === StorageDriver.RAM) {
|
|
4428
|
-
throw new
|
|
4386
|
+
throw new import_errors5.InvalidConfigError("RAM key storage cannot be used in persistent mode.");
|
|
4429
4387
|
}
|
|
4430
4388
|
if (!persistent && keyStorage !== StorageDriver.RAM && keyStorage !== void 0) {
|
|
4431
|
-
throw new
|
|
4389
|
+
throw new import_errors5.InvalidConfigError("Cannot use a persistent key storage in not persistent mode.");
|
|
4432
4390
|
}
|
|
4433
4391
|
return {
|
|
4434
4392
|
storage: (0, import_random_access_storage.createStorage)({
|
|
@@ -4635,7 +4593,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4635
4593
|
* Can only be called once.
|
|
4636
4594
|
*/
|
|
4637
4595
|
initialize({ config, ...options }) {
|
|
4638
|
-
(0,
|
|
4596
|
+
(0, import_invariant14.invariant)(!this._open, "service host is open", {
|
|
4639
4597
|
F: __dxlog_file17,
|
|
4640
4598
|
L: 184,
|
|
4641
4599
|
S: this,
|
|
@@ -4651,7 +4609,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4651
4609
|
C: (f, a) => f(...a)
|
|
4652
4610
|
});
|
|
4653
4611
|
if (config) {
|
|
4654
|
-
(0,
|
|
4612
|
+
(0, import_invariant14.invariant)(!this._config, "config already set", {
|
|
4655
4613
|
F: __dxlog_file17,
|
|
4656
4614
|
L: 188,
|
|
4657
4615
|
S: this,
|
|
@@ -4669,7 +4627,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4669
4627
|
iceServers: this._config?.get("runtime.services.ice")
|
|
4670
4628
|
}), signalManager = new import_messaging.WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
|
|
4671
4629
|
this._signalManager = signalManager;
|
|
4672
|
-
(0,
|
|
4630
|
+
(0, import_invariant14.invariant)(!this._networkManager, "network manager already set", {
|
|
4673
4631
|
F: __dxlog_file17,
|
|
4674
4632
|
L: 204,
|
|
4675
4633
|
S: this,
|
|
@@ -4695,7 +4653,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4695
4653
|
return;
|
|
4696
4654
|
}
|
|
4697
4655
|
const traceId = import_keys12.PublicKey.random().toHex();
|
|
4698
|
-
import_log16.log.trace("dxos.client-services.host.open",
|
|
4656
|
+
import_log16.log.trace("dxos.client-services.host.open", import_protocols10.trace.begin({
|
|
4699
4657
|
id: traceId
|
|
4700
4658
|
}), {
|
|
4701
4659
|
F: __dxlog_file17,
|
|
@@ -4703,7 +4661,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4703
4661
|
S: this,
|
|
4704
4662
|
C: (f, a) => f(...a)
|
|
4705
4663
|
});
|
|
4706
|
-
(0,
|
|
4664
|
+
(0, import_invariant14.invariant)(this._config, "config not set", {
|
|
4707
4665
|
F: __dxlog_file17,
|
|
4708
4666
|
L: 224,
|
|
4709
4667
|
S: this,
|
|
@@ -4712,7 +4670,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4712
4670
|
"'config not set'"
|
|
4713
4671
|
]
|
|
4714
4672
|
});
|
|
4715
|
-
(0,
|
|
4673
|
+
(0, import_invariant14.invariant)(this._storage, "storage not set", {
|
|
4716
4674
|
F: __dxlog_file17,
|
|
4717
4675
|
L: 225,
|
|
4718
4676
|
S: this,
|
|
@@ -4721,7 +4679,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4721
4679
|
"'storage not set'"
|
|
4722
4680
|
]
|
|
4723
4681
|
});
|
|
4724
|
-
(0,
|
|
4682
|
+
(0, import_invariant14.invariant)(this._signalManager, "signal manager not set", {
|
|
4725
4683
|
F: __dxlog_file17,
|
|
4726
4684
|
L: 226,
|
|
4727
4685
|
S: this,
|
|
@@ -4730,7 +4688,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4730
4688
|
"'signal manager not set'"
|
|
4731
4689
|
]
|
|
4732
4690
|
});
|
|
4733
|
-
(0,
|
|
4691
|
+
(0, import_invariant14.invariant)(this._networkManager, "network manager not set", {
|
|
4734
4692
|
F: __dxlog_file17,
|
|
4735
4693
|
L: 227,
|
|
4736
4694
|
S: this,
|
|
@@ -4760,7 +4718,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4760
4718
|
await this._serviceContext.initialized.wait();
|
|
4761
4719
|
return this._serviceContext.dataSpaceManager;
|
|
4762
4720
|
}),
|
|
4763
|
-
DataService: new
|
|
4721
|
+
DataService: new import_echo_pipeline4.DataServiceImpl(this._serviceContext.dataServiceSubscriptions),
|
|
4764
4722
|
NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager),
|
|
4765
4723
|
LoggingService: this._loggingService,
|
|
4766
4724
|
TracingService: this._tracingService,
|
|
@@ -4794,7 +4752,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4794
4752
|
S: this,
|
|
4795
4753
|
C: (f, a) => f(...a)
|
|
4796
4754
|
});
|
|
4797
|
-
import_log16.log.trace("dxos.client-services.host.open",
|
|
4755
|
+
import_log16.log.trace("dxos.client-services.host.open", import_protocols10.trace.end({
|
|
4798
4756
|
id: traceId
|
|
4799
4757
|
}), {
|
|
4800
4758
|
F: __dxlog_file17,
|
|
@@ -4835,7 +4793,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4835
4793
|
}
|
|
4836
4794
|
async reset() {
|
|
4837
4795
|
const traceId = import_keys12.PublicKey.random().toHex();
|
|
4838
|
-
import_log16.log.trace("dxos.sdk.client-services-host.reset",
|
|
4796
|
+
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols10.trace.begin({
|
|
4839
4797
|
id: traceId
|
|
4840
4798
|
}), {
|
|
4841
4799
|
F: __dxlog_file17,
|
|
@@ -4857,7 +4815,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4857
4815
|
S: this,
|
|
4858
4816
|
C: (f, a) => f(...a)
|
|
4859
4817
|
});
|
|
4860
|
-
import_log16.log.trace("dxos.sdk.client-services-host.reset",
|
|
4818
|
+
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols10.trace.end({
|
|
4861
4819
|
id: traceId
|
|
4862
4820
|
}), {
|
|
4863
4821
|
F: __dxlog_file17,
|
|
@@ -4917,7 +4875,7 @@ var performInvitation = ({ host, guest, options, hooks }) => {
|
|
|
4917
4875
|
if (hooks?.guest?.onConnecting?.(guestObservable)) {
|
|
4918
4876
|
break;
|
|
4919
4877
|
}
|
|
4920
|
-
(0,
|
|
4878
|
+
(0, import_invariant15.invariant)(hostInvitation.swarmKey.equals(guestInvitation.swarmKey), void 0, {
|
|
4921
4879
|
F: __dxlog_file18,
|
|
4922
4880
|
L: 84,
|
|
4923
4881
|
S: void 0,
|
|
@@ -5067,7 +5025,7 @@ var acceptInvitation = (guest, invitation) => {
|
|
|
5067
5025
|
var import_context11 = require("@dxos/context");
|
|
5068
5026
|
var import_credentials16 = require("@dxos/credentials");
|
|
5069
5027
|
var import_debug8 = require("@dxos/debug");
|
|
5070
|
-
var
|
|
5028
|
+
var import_echo_pipeline5 = require("@dxos/echo-pipeline");
|
|
5071
5029
|
var import_testing = require("@dxos/echo-pipeline/testing");
|
|
5072
5030
|
var import_feed_store5 = require("@dxos/feed-store");
|
|
5073
5031
|
var import_keyring2 = require("@dxos/keyring");
|
|
@@ -5150,19 +5108,19 @@ var TestPeer = class {
|
|
|
5150
5108
|
root: this.storage.createDirectory("feeds"),
|
|
5151
5109
|
signer: this.keyring,
|
|
5152
5110
|
hypercore: {
|
|
5153
|
-
valueEncoding:
|
|
5111
|
+
valueEncoding: import_echo_pipeline5.valueEncoding
|
|
5154
5112
|
}
|
|
5155
5113
|
})
|
|
5156
5114
|
});
|
|
5157
5115
|
}
|
|
5158
5116
|
get metadataStore() {
|
|
5159
|
-
return this._props.metadataStore ??= new
|
|
5117
|
+
return this._props.metadataStore ??= new import_echo_pipeline5.MetadataStore(this.storage.createDirectory("metadata"));
|
|
5160
5118
|
}
|
|
5161
5119
|
get blobStore() {
|
|
5162
5120
|
return this._props.blobStore ??= new import_teleport_extension_object_sync2.BlobStore(this.storage.createDirectory("blobs"));
|
|
5163
5121
|
}
|
|
5164
5122
|
get snapshotStore() {
|
|
5165
|
-
return this._props.snapshotStore ??= new
|
|
5123
|
+
return this._props.snapshotStore ??= new import_echo_pipeline5.SnapshotStore(this.storage.createDirectory("snapshots"));
|
|
5166
5124
|
}
|
|
5167
5125
|
get networkManager() {
|
|
5168
5126
|
return this._props.networkManager ??= new import_network_manager3.NetworkManager({
|
|
@@ -5171,7 +5129,7 @@ var TestPeer = class {
|
|
|
5171
5129
|
});
|
|
5172
5130
|
}
|
|
5173
5131
|
get spaceManager() {
|
|
5174
|
-
return this._props.spaceManager ??= new
|
|
5132
|
+
return this._props.spaceManager ??= new import_echo_pipeline5.SpaceManager({
|
|
5175
5133
|
feedStore: this.feedStore,
|
|
5176
5134
|
networkManager: this.networkManager,
|
|
5177
5135
|
metadataStore: this.metadataStore,
|
|
@@ -5184,7 +5142,7 @@ var TestPeer = class {
|
|
|
5184
5142
|
return this._props.signingContext ?? (0, import_debug8.failUndefined)();
|
|
5185
5143
|
}
|
|
5186
5144
|
get dataSpaceManager() {
|
|
5187
|
-
return this._props.dataSpaceManager ??= new DataSpaceManager(this.spaceManager, this.metadataStore, new
|
|
5145
|
+
return this._props.dataSpaceManager ??= new DataSpaceManager(this.spaceManager, this.metadataStore, new import_echo_pipeline5.DataServiceSubscriptions(), this.keyring, this.identity, this.feedStore);
|
|
5188
5146
|
}
|
|
5189
5147
|
async createIdentity() {
|
|
5190
5148
|
this._props.signingContext ??= await createSigningContext(this.keyring);
|