@dxos/client-services 0.1.37-next.a2d78db → 0.1.37-next.f87f7ef
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-OPQXHEJH.mjs → chunk-YFW25663.mjs} +165 -49
- package/dist/lib/browser/chunk-YFW25663.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +154 -38
- 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 +154 -38
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/packlets/invitations/invitations-handler.ts +49 -4
- package/src/packlets/services/service-context.ts +1 -0
- package/dist/lib/browser/chunk-OPQXHEJH.mjs.map +0 -7
|
@@ -936,7 +936,7 @@ import { generatePasscode } from "@dxos/credentials";
|
|
|
936
936
|
import { PublicKey as PublicKey4 } from "@dxos/keys";
|
|
937
937
|
import { log as log4 } from "@dxos/log";
|
|
938
938
|
import { createTeleportProtocolFactory, StarTopology } from "@dxos/network-manager";
|
|
939
|
-
import { schema as schema2 } from "@dxos/protocols";
|
|
939
|
+
import { schema as schema2, trace as trace2 } from "@dxos/protocols";
|
|
940
940
|
import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
941
941
|
import { AuthenticationResponse } from "@dxos/protocols/proto/dxos/halo/invitations";
|
|
942
942
|
import { RpcExtension } from "@dxos/teleport";
|
|
@@ -972,7 +972,7 @@ var InvitationsHandler = class {
|
|
|
972
972
|
...protocol.toJSON()
|
|
973
973
|
}, {
|
|
974
974
|
file: "invitations-handler.ts",
|
|
975
|
-
line:
|
|
975
|
+
line: 106,
|
|
976
976
|
scope: this,
|
|
977
977
|
callSite: (f, a) => f(...a)
|
|
978
978
|
});
|
|
@@ -990,7 +990,7 @@ var InvitationsHandler = class {
|
|
|
990
990
|
...protocol.toJSON()
|
|
991
991
|
}, {
|
|
992
992
|
file: "invitations-handler.ts",
|
|
993
|
-
line:
|
|
993
|
+
line: 119,
|
|
994
994
|
scope: this,
|
|
995
995
|
callSite: (f, a) => f(...a)
|
|
996
996
|
});
|
|
@@ -1009,7 +1009,7 @@ var InvitationsHandler = class {
|
|
|
1009
1009
|
authCode: code
|
|
1010
1010
|
}, {
|
|
1011
1011
|
file: "invitations-handler.ts",
|
|
1012
|
-
line:
|
|
1012
|
+
line: 138,
|
|
1013
1013
|
scope: this,
|
|
1014
1014
|
callSite: (f, a) => f(...a)
|
|
1015
1015
|
});
|
|
@@ -1018,7 +1018,7 @@ var InvitationsHandler = class {
|
|
|
1018
1018
|
case Invitation2.AuthMethod.NONE: {
|
|
1019
1019
|
log4("authentication not required", {}, {
|
|
1020
1020
|
file: "invitations-handler.ts",
|
|
1021
|
-
line:
|
|
1021
|
+
line: 143,
|
|
1022
1022
|
scope: this,
|
|
1023
1023
|
callSite: (f, a) => f(...a)
|
|
1024
1024
|
});
|
|
@@ -1043,7 +1043,7 @@ var InvitationsHandler = class {
|
|
|
1043
1043
|
authMethod: invitation.authMethod
|
|
1044
1044
|
}, {
|
|
1045
1045
|
file: "invitations-handler.ts",
|
|
1046
|
-
line:
|
|
1046
|
+
line: 161,
|
|
1047
1047
|
scope: this,
|
|
1048
1048
|
callSite: (f, a) => f(...a)
|
|
1049
1049
|
});
|
|
@@ -1073,12 +1073,22 @@ var InvitationsHandler = class {
|
|
|
1073
1073
|
},
|
|
1074
1074
|
onOpen: () => {
|
|
1075
1075
|
scheduleTask(ctx, async () => {
|
|
1076
|
+
const traceId = PublicKey4.random().toHex();
|
|
1076
1077
|
try {
|
|
1078
|
+
log4.trace("dxos.sdk.invitations-handler.host.onOpen", trace2.begin({
|
|
1079
|
+
id: traceId,
|
|
1080
|
+
parentId: this._traceParent
|
|
1081
|
+
}), {
|
|
1082
|
+
file: "invitations-handler.ts",
|
|
1083
|
+
line: 196,
|
|
1084
|
+
scope: this,
|
|
1085
|
+
callSite: (f, a) => f(...a)
|
|
1086
|
+
});
|
|
1077
1087
|
log4("connected", {
|
|
1078
1088
|
...protocol.toJSON()
|
|
1079
1089
|
}, {
|
|
1080
1090
|
file: "invitations-handler.ts",
|
|
1081
|
-
line:
|
|
1091
|
+
line: 200,
|
|
1082
1092
|
scope: this,
|
|
1083
1093
|
callSite: (f, a) => f(...a)
|
|
1084
1094
|
});
|
|
@@ -1094,7 +1104,7 @@ var InvitationsHandler = class {
|
|
|
1094
1104
|
...protocol.toJSON()
|
|
1095
1105
|
}, {
|
|
1096
1106
|
file: "invitations-handler.ts",
|
|
1097
|
-
line:
|
|
1107
|
+
line: 203,
|
|
1098
1108
|
scope: this,
|
|
1099
1109
|
callSite: (f, a) => f(...a)
|
|
1100
1110
|
});
|
|
@@ -1102,13 +1112,21 @@ var InvitationsHandler = class {
|
|
|
1102
1112
|
...invitation,
|
|
1103
1113
|
state: Invitation2.State.SUCCESS
|
|
1104
1114
|
});
|
|
1115
|
+
log4.trace("dxos.sdk.invitations-handler.host.onOpen", trace2.end({
|
|
1116
|
+
id: traceId
|
|
1117
|
+
}), {
|
|
1118
|
+
file: "invitations-handler.ts",
|
|
1119
|
+
line: 205,
|
|
1120
|
+
scope: this,
|
|
1121
|
+
callSite: (f, a) => f(...a)
|
|
1122
|
+
});
|
|
1105
1123
|
} catch (err) {
|
|
1106
1124
|
if (err instanceof TimeoutError) {
|
|
1107
1125
|
log4("timeout", {
|
|
1108
1126
|
...protocol.toJSON()
|
|
1109
1127
|
}, {
|
|
1110
1128
|
file: "invitations-handler.ts",
|
|
1111
|
-
line:
|
|
1129
|
+
line: 208,
|
|
1112
1130
|
scope: this,
|
|
1113
1131
|
callSite: (f, a) => f(...a)
|
|
1114
1132
|
});
|
|
@@ -1119,12 +1137,21 @@ var InvitationsHandler = class {
|
|
|
1119
1137
|
} else {
|
|
1120
1138
|
log4.error("failed", err, {
|
|
1121
1139
|
file: "invitations-handler.ts",
|
|
1122
|
-
line:
|
|
1140
|
+
line: 211,
|
|
1123
1141
|
scope: this,
|
|
1124
1142
|
callSite: (f, a) => f(...a)
|
|
1125
1143
|
});
|
|
1126
1144
|
stream.error(err);
|
|
1127
1145
|
}
|
|
1146
|
+
log4.trace("dxos.sdk.invitations-handler.host.onOpen", trace2.error({
|
|
1147
|
+
id: traceId,
|
|
1148
|
+
error: err
|
|
1149
|
+
}), {
|
|
1150
|
+
file: "invitations-handler.ts",
|
|
1151
|
+
line: 214,
|
|
1152
|
+
scope: this,
|
|
1153
|
+
callSite: (f, a) => f(...a)
|
|
1154
|
+
});
|
|
1128
1155
|
} finally {
|
|
1129
1156
|
if (type !== Invitation2.Type.MULTIUSE) {
|
|
1130
1157
|
await sleep(ON_CLOSE_DELAY);
|
|
@@ -1134,6 +1161,7 @@ var InvitationsHandler = class {
|
|
|
1134
1161
|
});
|
|
1135
1162
|
}
|
|
1136
1163
|
});
|
|
1164
|
+
extension._traceParent = this._traceParent;
|
|
1137
1165
|
return extension;
|
|
1138
1166
|
};
|
|
1139
1167
|
scheduleTask(ctx, async () => {
|
|
@@ -1177,7 +1205,7 @@ var InvitationsHandler = class {
|
|
|
1177
1205
|
...protocol.toJSON()
|
|
1178
1206
|
}, {
|
|
1179
1207
|
file: "invitations-handler.ts",
|
|
1180
|
-
line:
|
|
1208
|
+
line: 267,
|
|
1181
1209
|
scope: this,
|
|
1182
1210
|
callSite: (f, a) => f(...a)
|
|
1183
1211
|
});
|
|
@@ -1188,7 +1216,7 @@ var InvitationsHandler = class {
|
|
|
1188
1216
|
} else {
|
|
1189
1217
|
log4.warn("auth failed", err, {
|
|
1190
1218
|
file: "invitations-handler.ts",
|
|
1191
|
-
line:
|
|
1219
|
+
line: 270,
|
|
1192
1220
|
scope: this,
|
|
1193
1221
|
callSite: (f, a) => f(...a)
|
|
1194
1222
|
});
|
|
@@ -1202,7 +1230,7 @@ var InvitationsHandler = class {
|
|
|
1202
1230
|
...protocol.toJSON()
|
|
1203
1231
|
}, {
|
|
1204
1232
|
file: "invitations-handler.ts",
|
|
1205
|
-
line:
|
|
1233
|
+
line: 278,
|
|
1206
1234
|
scope: this,
|
|
1207
1235
|
callSite: (f, a) => f(...a)
|
|
1208
1236
|
});
|
|
@@ -1213,7 +1241,17 @@ var InvitationsHandler = class {
|
|
|
1213
1241
|
const extension = new InvitationGuestExtension({
|
|
1214
1242
|
onOpen: () => {
|
|
1215
1243
|
scheduleTask(ctx, async () => {
|
|
1244
|
+
const traceId = PublicKey4.random().toHex();
|
|
1216
1245
|
try {
|
|
1246
|
+
log4.trace("dxos.sdk.invitations-handler.guest.onOpen", trace2.begin({
|
|
1247
|
+
id: traceId,
|
|
1248
|
+
parentId: this._traceParent
|
|
1249
|
+
}), {
|
|
1250
|
+
file: "invitations-handler.ts",
|
|
1251
|
+
line: 290,
|
|
1252
|
+
scope: this,
|
|
1253
|
+
callSite: (f, a) => f(...a)
|
|
1254
|
+
});
|
|
1217
1255
|
if (++connectionCount > 1) {
|
|
1218
1256
|
throw new Error(`multiple connections detected: ${connectionCount}`);
|
|
1219
1257
|
}
|
|
@@ -1222,7 +1260,7 @@ var InvitationsHandler = class {
|
|
|
1222
1260
|
...protocol.toJSON()
|
|
1223
1261
|
}, {
|
|
1224
1262
|
file: "invitations-handler.ts",
|
|
1225
|
-
line:
|
|
1263
|
+
line: 301,
|
|
1226
1264
|
scope: this,
|
|
1227
1265
|
callSite: (f, a) => f(...a)
|
|
1228
1266
|
});
|
|
@@ -1234,7 +1272,7 @@ var InvitationsHandler = class {
|
|
|
1234
1272
|
...protocol.toJSON()
|
|
1235
1273
|
}, {
|
|
1236
1274
|
file: "invitations-handler.ts",
|
|
1237
|
-
line:
|
|
1275
|
+
line: 305,
|
|
1238
1276
|
scope: this,
|
|
1239
1277
|
callSite: (f, a) => f(...a)
|
|
1240
1278
|
});
|
|
@@ -1244,7 +1282,7 @@ var InvitationsHandler = class {
|
|
|
1244
1282
|
response: introductionResponse
|
|
1245
1283
|
}, {
|
|
1246
1284
|
file: "invitations-handler.ts",
|
|
1247
|
-
line:
|
|
1285
|
+
line: 309,
|
|
1248
1286
|
scope: this,
|
|
1249
1287
|
callSite: (f, a) => f(...a)
|
|
1250
1288
|
});
|
|
@@ -1256,7 +1294,7 @@ var InvitationsHandler = class {
|
|
|
1256
1294
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1257
1295
|
log4("guest waiting for authentication code...", {}, {
|
|
1258
1296
|
file: "invitations-handler.ts",
|
|
1259
|
-
line:
|
|
1297
|
+
line: 318,
|
|
1260
1298
|
scope: this,
|
|
1261
1299
|
callSite: (f, a) => f(...a)
|
|
1262
1300
|
});
|
|
@@ -1269,7 +1307,7 @@ var InvitationsHandler = class {
|
|
|
1269
1307
|
});
|
|
1270
1308
|
log4("sending authentication request", {}, {
|
|
1271
1309
|
file: "invitations-handler.ts",
|
|
1272
|
-
line:
|
|
1310
|
+
line: 322,
|
|
1273
1311
|
scope: this,
|
|
1274
1312
|
callSite: (f, a) => f(...a)
|
|
1275
1313
|
});
|
|
@@ -1291,7 +1329,7 @@ var InvitationsHandler = class {
|
|
|
1291
1329
|
attempt
|
|
1292
1330
|
}, {
|
|
1293
1331
|
file: "invitations-handler.ts",
|
|
1294
|
-
line:
|
|
1332
|
+
line: 333,
|
|
1295
1333
|
scope: this,
|
|
1296
1334
|
callSite: (f, a) => f(...a)
|
|
1297
1335
|
});
|
|
@@ -1309,7 +1347,7 @@ var InvitationsHandler = class {
|
|
|
1309
1347
|
...protocol.toJSON()
|
|
1310
1348
|
}, {
|
|
1311
1349
|
file: "invitations-handler.ts",
|
|
1312
|
-
line:
|
|
1350
|
+
line: 344,
|
|
1313
1351
|
scope: this,
|
|
1314
1352
|
callSite: (f, a) => f(...a)
|
|
1315
1353
|
});
|
|
@@ -1320,7 +1358,7 @@ var InvitationsHandler = class {
|
|
|
1320
1358
|
...protocol.toJSON()
|
|
1321
1359
|
}, {
|
|
1322
1360
|
file: "invitations-handler.ts",
|
|
1323
|
-
line:
|
|
1361
|
+
line: 352,
|
|
1324
1362
|
scope: this,
|
|
1325
1363
|
callSite: (f, a) => f(...a)
|
|
1326
1364
|
});
|
|
@@ -1329,13 +1367,21 @@ var InvitationsHandler = class {
|
|
|
1329
1367
|
...result,
|
|
1330
1368
|
state: Invitation2.State.SUCCESS
|
|
1331
1369
|
});
|
|
1370
|
+
log4.trace("dxos.sdk.invitations-handler.guest.onOpen", trace2.end({
|
|
1371
|
+
id: traceId
|
|
1372
|
+
}), {
|
|
1373
|
+
file: "invitations-handler.ts",
|
|
1374
|
+
line: 354,
|
|
1375
|
+
scope: this,
|
|
1376
|
+
callSite: (f, a) => f(...a)
|
|
1377
|
+
});
|
|
1332
1378
|
} catch (err) {
|
|
1333
1379
|
if (err instanceof TimeoutError) {
|
|
1334
1380
|
log4("timeout", {
|
|
1335
1381
|
...protocol.toJSON()
|
|
1336
1382
|
}, {
|
|
1337
1383
|
file: "invitations-handler.ts",
|
|
1338
|
-
line:
|
|
1384
|
+
line: 357,
|
|
1339
1385
|
scope: this,
|
|
1340
1386
|
callSite: (f, a) => f(...a)
|
|
1341
1387
|
});
|
|
@@ -1346,12 +1392,21 @@ var InvitationsHandler = class {
|
|
|
1346
1392
|
} else {
|
|
1347
1393
|
log4("auth failed", err, {
|
|
1348
1394
|
file: "invitations-handler.ts",
|
|
1349
|
-
line:
|
|
1395
|
+
line: 360,
|
|
1350
1396
|
scope: this,
|
|
1351
1397
|
callSite: (f, a) => f(...a)
|
|
1352
1398
|
});
|
|
1353
1399
|
stream.error(err);
|
|
1354
1400
|
}
|
|
1401
|
+
log4.trace("dxos.sdk.invitations-handler.guest.onOpen", trace2.error({
|
|
1402
|
+
id: traceId,
|
|
1403
|
+
error: err
|
|
1404
|
+
}), {
|
|
1405
|
+
file: "invitations-handler.ts",
|
|
1406
|
+
line: 363,
|
|
1407
|
+
scope: this,
|
|
1408
|
+
callSite: (f, a) => f(...a)
|
|
1409
|
+
});
|
|
1355
1410
|
} finally {
|
|
1356
1411
|
await ctx.dispose();
|
|
1357
1412
|
}
|
|
@@ -1410,13 +1465,73 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1410
1465
|
// Perhaps in the future we will have more complex logic here.
|
|
1411
1466
|
InvitationHostService: {
|
|
1412
1467
|
introduce: async (request) => {
|
|
1413
|
-
|
|
1468
|
+
const traceId = PublicKey4.random().toHex();
|
|
1469
|
+
log4.trace("dxos.sdk.invitation-handler.host.introduce", trace2.begin({
|
|
1470
|
+
id: traceId,
|
|
1471
|
+
parentId: this._traceParent
|
|
1472
|
+
}), {
|
|
1473
|
+
file: "invitations-handler.ts",
|
|
1474
|
+
line: 442,
|
|
1475
|
+
scope: this,
|
|
1476
|
+
callSite: (f, a) => f(...a)
|
|
1477
|
+
});
|
|
1478
|
+
const response = await this._callbacks.introduce(request);
|
|
1479
|
+
log4.trace("dxos.sdk.invitation-handler.host.introduce", trace2.end({
|
|
1480
|
+
id: traceId
|
|
1481
|
+
}), {
|
|
1482
|
+
file: "invitations-handler.ts",
|
|
1483
|
+
line: 447,
|
|
1484
|
+
scope: this,
|
|
1485
|
+
callSite: (f, a) => f(...a)
|
|
1486
|
+
});
|
|
1487
|
+
return response;
|
|
1414
1488
|
},
|
|
1415
1489
|
authenticate: async (request) => {
|
|
1416
|
-
|
|
1490
|
+
const traceId = PublicKey4.random().toHex();
|
|
1491
|
+
log4.trace("dxos.sdk.invitation-handler.host.authenticate", trace2.begin({
|
|
1492
|
+
id: traceId,
|
|
1493
|
+
parentId: this._traceParent
|
|
1494
|
+
}), {
|
|
1495
|
+
file: "invitations-handler.ts",
|
|
1496
|
+
line: 453,
|
|
1497
|
+
scope: this,
|
|
1498
|
+
callSite: (f, a) => f(...a)
|
|
1499
|
+
});
|
|
1500
|
+
const response = await this._callbacks.authenticate(request);
|
|
1501
|
+
log4.trace("dxos.sdk.invitation-handler.host.authenticate", trace2.end({
|
|
1502
|
+
id: traceId,
|
|
1503
|
+
data: {
|
|
1504
|
+
...response
|
|
1505
|
+
}
|
|
1506
|
+
}), {
|
|
1507
|
+
file: "invitations-handler.ts",
|
|
1508
|
+
line: 458,
|
|
1509
|
+
scope: this,
|
|
1510
|
+
callSite: (f, a) => f(...a)
|
|
1511
|
+
});
|
|
1512
|
+
return response;
|
|
1417
1513
|
},
|
|
1418
1514
|
admit: async (request) => {
|
|
1419
|
-
|
|
1515
|
+
const traceId = PublicKey4.random().toHex();
|
|
1516
|
+
log4.trace("dxos.sdk.invitation-handler.host.admit", trace2.begin({
|
|
1517
|
+
id: traceId,
|
|
1518
|
+
parentId: this._traceParent
|
|
1519
|
+
}), {
|
|
1520
|
+
file: "invitations-handler.ts",
|
|
1521
|
+
line: 464,
|
|
1522
|
+
scope: this,
|
|
1523
|
+
callSite: (f, a) => f(...a)
|
|
1524
|
+
});
|
|
1525
|
+
const response = await this._callbacks.admit(request);
|
|
1526
|
+
log4.trace("dxos.sdk.invitation-handler.host.admit", trace2.end({
|
|
1527
|
+
id: traceId
|
|
1528
|
+
}), {
|
|
1529
|
+
file: "invitations-handler.ts",
|
|
1530
|
+
line: 469,
|
|
1531
|
+
scope: this,
|
|
1532
|
+
callSite: (f, a) => f(...a)
|
|
1533
|
+
});
|
|
1534
|
+
return response;
|
|
1420
1535
|
}
|
|
1421
1536
|
}
|
|
1422
1537
|
};
|
|
@@ -1923,7 +2038,7 @@ import { Event as Event7 } from "@dxos/async";
|
|
|
1923
2038
|
import { clientServiceBundle, createDefaultModelFactory, PublicKey as PublicKey9 } from "@dxos/client";
|
|
1924
2039
|
import { DataServiceImpl } from "@dxos/echo-pipeline";
|
|
1925
2040
|
import { log as log15 } from "@dxos/log";
|
|
1926
|
-
import { trace as
|
|
2041
|
+
import { trace as trace5 } from "@dxos/protocols";
|
|
1927
2042
|
import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
1928
2043
|
|
|
1929
2044
|
// packages/sdk/client-services/src/packlets/deprecated/tracing.ts
|
|
@@ -2017,7 +2132,7 @@ import { getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credent
|
|
|
2017
2132
|
import { SnapshotManager, spaceGenesis } from "@dxos/echo-pipeline";
|
|
2018
2133
|
import { PublicKey as PublicKey7 } from "@dxos/keys";
|
|
2019
2134
|
import { log as log9 } from "@dxos/log";
|
|
2020
|
-
import { trace as
|
|
2135
|
+
import { trace as trace3 } from "@dxos/protocols";
|
|
2021
2136
|
import { Gossip, Presence } from "@dxos/teleport-extension-gossip";
|
|
2022
2137
|
import { ComplexMap as ComplexMap3, deferFunction as deferFunction2 } from "@dxos/util";
|
|
2023
2138
|
|
|
@@ -2527,7 +2642,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
2527
2642
|
scope: this,
|
|
2528
2643
|
callSite: (f, a) => f(...a)
|
|
2529
2644
|
});
|
|
2530
|
-
log9.trace("dxos.echo.data-space-manager",
|
|
2645
|
+
log9.trace("dxos.echo.data-space-manager", trace3.begin({
|
|
2531
2646
|
id: this._instanceId,
|
|
2532
2647
|
parentId: this._traceParent
|
|
2533
2648
|
}), {
|
|
@@ -2572,7 +2687,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
2572
2687
|
for (const space of this._spaces.values()) {
|
|
2573
2688
|
await space.close();
|
|
2574
2689
|
}
|
|
2575
|
-
log9.trace("dxos.echo.data-space-manager",
|
|
2690
|
+
log9.trace("dxos.echo.data-space-manager", trace3.end({
|
|
2576
2691
|
id: this._instanceId
|
|
2577
2692
|
}), {
|
|
2578
2693
|
file: "data-space-manager.ts",
|
|
@@ -3449,7 +3564,7 @@ import { FeedFactory, FeedStore } from "@dxos/feed-store";
|
|
|
3449
3564
|
import { Keyring } from "@dxos/keyring";
|
|
3450
3565
|
import { PublicKey as PublicKey8 } from "@dxos/keys";
|
|
3451
3566
|
import { log as log14 } from "@dxos/log";
|
|
3452
|
-
import { trace as
|
|
3567
|
+
import { trace as trace4 } from "@dxos/protocols";
|
|
3453
3568
|
var ServiceContext = class {
|
|
3454
3569
|
// prettier-ignore
|
|
3455
3570
|
constructor(storage, networkManager, modelFactory) {
|
|
@@ -3481,23 +3596,24 @@ var ServiceContext = class {
|
|
|
3481
3596
|
this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager);
|
|
3482
3597
|
this.identityManager._traceParent = this._instanceId;
|
|
3483
3598
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
3599
|
+
this.invitations._traceParent = this._instanceId;
|
|
3484
3600
|
this._handlerFactories.set(Invitation5.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => {
|
|
3485
3601
|
var _a;
|
|
3486
3602
|
return (_a = this.identityManager.identity) != null ? _a : failUndefined2();
|
|
3487
3603
|
}, this._acceptIdentity.bind(this)));
|
|
3488
3604
|
}
|
|
3489
3605
|
async open() {
|
|
3490
|
-
log14.trace("dxos.sdk.service-context",
|
|
3606
|
+
log14.trace("dxos.sdk.service-context", trace4.begin({
|
|
3491
3607
|
id: this._instanceId
|
|
3492
3608
|
}), {
|
|
3493
3609
|
file: "service-context.ts",
|
|
3494
|
-
line:
|
|
3610
|
+
line: 115,
|
|
3495
3611
|
scope: this,
|
|
3496
3612
|
callSite: (f, a) => f(...a)
|
|
3497
3613
|
});
|
|
3498
3614
|
log14("opening...", {}, {
|
|
3499
3615
|
file: "service-context.ts",
|
|
3500
|
-
line:
|
|
3616
|
+
line: 117,
|
|
3501
3617
|
scope: this,
|
|
3502
3618
|
callSite: (f, a) => f(...a)
|
|
3503
3619
|
});
|
|
@@ -3509,7 +3625,7 @@ var ServiceContext = class {
|
|
|
3509
3625
|
}
|
|
3510
3626
|
log14("opened", {}, {
|
|
3511
3627
|
file: "service-context.ts",
|
|
3512
|
-
line:
|
|
3628
|
+
line: 124,
|
|
3513
3629
|
scope: this,
|
|
3514
3630
|
callSite: (f, a) => f(...a)
|
|
3515
3631
|
});
|
|
@@ -3518,7 +3634,7 @@ var ServiceContext = class {
|
|
|
3518
3634
|
var _a, _b;
|
|
3519
3635
|
log14("closing...", {}, {
|
|
3520
3636
|
file: "service-context.ts",
|
|
3521
|
-
line:
|
|
3637
|
+
line: 128,
|
|
3522
3638
|
scope: this,
|
|
3523
3639
|
callSite: (f, a) => f(...a)
|
|
3524
3640
|
});
|
|
@@ -3531,15 +3647,15 @@ var ServiceContext = class {
|
|
|
3531
3647
|
this.dataServiceSubscriptions.clear();
|
|
3532
3648
|
log14("closed", {}, {
|
|
3533
3649
|
file: "service-context.ts",
|
|
3534
|
-
line:
|
|
3650
|
+
line: 136,
|
|
3535
3651
|
scope: this,
|
|
3536
3652
|
callSite: (f, a) => f(...a)
|
|
3537
3653
|
});
|
|
3538
|
-
log14.trace("dxos.sdk.service-context",
|
|
3654
|
+
log14.trace("dxos.sdk.service-context", trace4.end({
|
|
3539
3655
|
id: this._instanceId
|
|
3540
3656
|
}), {
|
|
3541
3657
|
file: "service-context.ts",
|
|
3542
|
-
line:
|
|
3658
|
+
line: 138,
|
|
3543
3659
|
scope: this,
|
|
3544
3660
|
callSite: (f, a) => f(...a)
|
|
3545
3661
|
});
|
|
@@ -3547,7 +3663,7 @@ var ServiceContext = class {
|
|
|
3547
3663
|
async reset() {
|
|
3548
3664
|
log14("resetting...", {}, {
|
|
3549
3665
|
file: "service-context.ts",
|
|
3550
|
-
line:
|
|
3666
|
+
line: 142,
|
|
3551
3667
|
scope: this,
|
|
3552
3668
|
callSite: (f, a) => f(...a)
|
|
3553
3669
|
});
|
|
@@ -3555,7 +3671,7 @@ var ServiceContext = class {
|
|
|
3555
3671
|
await this.storage.reset();
|
|
3556
3672
|
log14("reset", {}, {
|
|
3557
3673
|
file: "service-context.ts",
|
|
3558
|
-
line:
|
|
3674
|
+
line: 145,
|
|
3559
3675
|
scope: this,
|
|
3560
3676
|
callSite: (f, a) => f(...a)
|
|
3561
3677
|
});
|
|
@@ -3580,7 +3696,7 @@ var ServiceContext = class {
|
|
|
3580
3696
|
var _a;
|
|
3581
3697
|
log14("initializing spaces...", {}, {
|
|
3582
3698
|
file: "service-context.ts",
|
|
3583
|
-
line:
|
|
3699
|
+
line: 170,
|
|
3584
3700
|
scope: this,
|
|
3585
3701
|
callSite: (f, a) => f(...a)
|
|
3586
3702
|
});
|
|
@@ -3620,7 +3736,7 @@ var ServiceContext = class {
|
|
|
3620
3736
|
details: assertion
|
|
3621
3737
|
}, {
|
|
3622
3738
|
file: "service-context.ts",
|
|
3623
|
-
line:
|
|
3739
|
+
line: 212,
|
|
3624
3740
|
scope: this,
|
|
3625
3741
|
callSite: (f, a) => f(...a)
|
|
3626
3742
|
});
|
|
@@ -3631,7 +3747,7 @@ var ServiceContext = class {
|
|
|
3631
3747
|
details: assertion
|
|
3632
3748
|
}, {
|
|
3633
3749
|
file: "service-context.ts",
|
|
3634
|
-
line:
|
|
3750
|
+
line: 216,
|
|
3635
3751
|
scope: this,
|
|
3636
3752
|
callSite: (f, a) => f(...a)
|
|
3637
3753
|
});
|
|
@@ -3642,7 +3758,7 @@ var ServiceContext = class {
|
|
|
3642
3758
|
details: assertion
|
|
3643
3759
|
}, {
|
|
3644
3760
|
file: "service-context.ts",
|
|
3645
|
-
line:
|
|
3761
|
+
line: 221,
|
|
3646
3762
|
scope: this,
|
|
3647
3763
|
callSite: (f, a) => f(...a)
|
|
3648
3764
|
});
|
|
@@ -3653,7 +3769,7 @@ var ServiceContext = class {
|
|
|
3653
3769
|
} catch (err) {
|
|
3654
3770
|
log14.catch(err, {}, {
|
|
3655
3771
|
file: "service-context.ts",
|
|
3656
|
-
line:
|
|
3772
|
+
line: 227,
|
|
3657
3773
|
scope: this,
|
|
3658
3774
|
callSite: (f, a) => f(...a)
|
|
3659
3775
|
});
|
|
@@ -3775,7 +3891,7 @@ var ClientServicesHost = class {
|
|
|
3775
3891
|
if (this._open) {
|
|
3776
3892
|
return;
|
|
3777
3893
|
}
|
|
3778
|
-
log15.trace("dxos.sdk.client-services-host",
|
|
3894
|
+
log15.trace("dxos.sdk.client-services-host", trace5.begin({
|
|
3779
3895
|
id: this._instanceId
|
|
3780
3896
|
}), {
|
|
3781
3897
|
file: "service-host.ts",
|
|
@@ -3858,7 +3974,7 @@ var ClientServicesHost = class {
|
|
|
3858
3974
|
scope: this,
|
|
3859
3975
|
callSite: (f, a) => f(...a)
|
|
3860
3976
|
});
|
|
3861
|
-
log15.trace("dxos.sdk.client-services-host",
|
|
3977
|
+
log15.trace("dxos.sdk.client-services-host", trace5.end({
|
|
3862
3978
|
id: this._instanceId
|
|
3863
3979
|
}), {
|
|
3864
3980
|
file: "service-host.ts",
|
|
@@ -4083,4 +4199,4 @@ export {
|
|
|
4083
4199
|
LocalClientServices,
|
|
4084
4200
|
fromHost
|
|
4085
4201
|
};
|
|
4086
|
-
//# sourceMappingURL=chunk-
|
|
4202
|
+
//# sourceMappingURL=chunk-YFW25663.mjs.map
|