@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
package/dist/lib/node/index.cjs
CHANGED
|
@@ -1220,6 +1220,7 @@ var import_async8 = require("@dxos/async");
|
|
|
1220
1220
|
var import_client_protocol2 = require("@dxos/client-protocol");
|
|
1221
1221
|
var import_context5 = require("@dxos/context");
|
|
1222
1222
|
var import_credentials7 = require("@dxos/credentials");
|
|
1223
|
+
var import_errors2 = require("@dxos/errors");
|
|
1223
1224
|
var import_invariant6 = require("@dxos/invariant");
|
|
1224
1225
|
var import_keys6 = require("@dxos/keys");
|
|
1225
1226
|
var import_log5 = require("@dxos/log");
|
|
@@ -1231,6 +1232,7 @@ var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations")
|
|
|
1231
1232
|
// packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts
|
|
1232
1233
|
var import_async7 = require("@dxos/async");
|
|
1233
1234
|
var import_context4 = require("@dxos/context");
|
|
1235
|
+
var import_errors = require("@dxos/errors");
|
|
1234
1236
|
var import_invariant5 = require("@dxos/invariant");
|
|
1235
1237
|
var import_keys5 = require("@dxos/keys");
|
|
1236
1238
|
var import_log4 = require("@dxos/log");
|
|
@@ -1268,7 +1270,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1268
1270
|
options: async (options) => {
|
|
1269
1271
|
(0, import_invariant5.invariant)(!this._remoteOptions, "Remote options already set.", {
|
|
1270
1272
|
F: __dxlog_file6,
|
|
1271
|
-
L:
|
|
1273
|
+
L: 88,
|
|
1272
1274
|
S: this,
|
|
1273
1275
|
A: [
|
|
1274
1276
|
"!this._remoteOptions",
|
|
@@ -1285,7 +1287,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1285
1287
|
id: traceId
|
|
1286
1288
|
}), {
|
|
1287
1289
|
F: __dxlog_file6,
|
|
1288
|
-
L:
|
|
1290
|
+
L: 97,
|
|
1289
1291
|
S: this,
|
|
1290
1292
|
C: (f, a) => f(...a)
|
|
1291
1293
|
});
|
|
@@ -1295,7 +1297,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1295
1297
|
invitationId
|
|
1296
1298
|
}, {
|
|
1297
1299
|
F: __dxlog_file6,
|
|
1298
|
-
L:
|
|
1300
|
+
L: 101,
|
|
1299
1301
|
S: this,
|
|
1300
1302
|
C: (f, a) => f(...a)
|
|
1301
1303
|
});
|
|
@@ -1309,7 +1311,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1309
1311
|
guestProfile: profile
|
|
1310
1312
|
}, {
|
|
1311
1313
|
F: __dxlog_file6,
|
|
1312
|
-
L:
|
|
1314
|
+
L: 110,
|
|
1313
1315
|
S: this,
|
|
1314
1316
|
C: (f, a) => f(...a)
|
|
1315
1317
|
});
|
|
@@ -1322,7 +1324,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1322
1324
|
id: traceId
|
|
1323
1325
|
}), {
|
|
1324
1326
|
F: __dxlog_file6,
|
|
1325
|
-
L:
|
|
1327
|
+
L: 117,
|
|
1326
1328
|
S: this,
|
|
1327
1329
|
C: (f, a) => f(...a)
|
|
1328
1330
|
});
|
|
@@ -1337,7 +1339,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1337
1339
|
id: traceId
|
|
1338
1340
|
}), {
|
|
1339
1341
|
F: __dxlog_file6,
|
|
1340
|
-
L:
|
|
1342
|
+
L: 126,
|
|
1341
1343
|
S: this,
|
|
1342
1344
|
C: (f, a) => f(...a)
|
|
1343
1345
|
});
|
|
@@ -1345,14 +1347,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1345
1347
|
authCode: code
|
|
1346
1348
|
}, {
|
|
1347
1349
|
F: __dxlog_file6,
|
|
1348
|
-
L:
|
|
1350
|
+
L: 127,
|
|
1349
1351
|
S: this,
|
|
1350
1352
|
C: (f, a) => f(...a)
|
|
1351
1353
|
});
|
|
1352
1354
|
let status = import_invitations.AuthenticationResponse.Status.OK;
|
|
1353
1355
|
(0, import_invariant5.invariant)(this.invitation, "Invitation is not set.", {
|
|
1354
1356
|
F: __dxlog_file6,
|
|
1355
|
-
L:
|
|
1357
|
+
L: 130,
|
|
1356
1358
|
S: this,
|
|
1357
1359
|
A: [
|
|
1358
1360
|
"this.invitation",
|
|
@@ -1363,7 +1365,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1363
1365
|
case import_services2.Invitation.AuthMethod.NONE: {
|
|
1364
1366
|
(0, import_log4.log)("authentication not required", void 0, {
|
|
1365
1367
|
F: __dxlog_file6,
|
|
1366
|
-
L:
|
|
1368
|
+
L: 133,
|
|
1367
1369
|
S: this,
|
|
1368
1370
|
C: (f, a) => f(...a)
|
|
1369
1371
|
});
|
|
@@ -1388,7 +1390,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1388
1390
|
authMethod: this.invitation.authMethod
|
|
1389
1391
|
}, {
|
|
1390
1392
|
F: __dxlog_file6,
|
|
1391
|
-
L:
|
|
1393
|
+
L: 151,
|
|
1392
1394
|
S: this,
|
|
1393
1395
|
C: (f, a) => f(...a)
|
|
1394
1396
|
});
|
|
@@ -1403,7 +1405,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1403
1405
|
}
|
|
1404
1406
|
}), {
|
|
1405
1407
|
F: __dxlog_file6,
|
|
1406
|
-
L:
|
|
1408
|
+
L: 157,
|
|
1407
1409
|
S: this,
|
|
1408
1410
|
C: (f, a) => f(...a)
|
|
1409
1411
|
});
|
|
@@ -1417,14 +1419,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1417
1419
|
id: traceId
|
|
1418
1420
|
}), {
|
|
1419
1421
|
F: __dxlog_file6,
|
|
1420
|
-
L:
|
|
1422
|
+
L: 163,
|
|
1421
1423
|
S: this,
|
|
1422
1424
|
C: (f, a) => f(...a)
|
|
1423
1425
|
});
|
|
1424
1426
|
try {
|
|
1425
1427
|
(0, import_invariant5.invariant)(this.invitation, "Invitation is not set.", {
|
|
1426
1428
|
F: __dxlog_file6,
|
|
1427
|
-
L:
|
|
1429
|
+
L: 166,
|
|
1428
1430
|
S: this,
|
|
1429
1431
|
A: [
|
|
1430
1432
|
"this.invitation",
|
|
@@ -1439,7 +1441,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1439
1441
|
id: traceId
|
|
1440
1442
|
}), {
|
|
1441
1443
|
F: __dxlog_file6,
|
|
1442
|
-
L:
|
|
1444
|
+
L: 174,
|
|
1443
1445
|
S: this,
|
|
1444
1446
|
C: (f, a) => f(...a)
|
|
1445
1447
|
});
|
|
@@ -1462,7 +1464,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
|
1462
1464
|
timeout: OPTIONS_TIMEOUT
|
|
1463
1465
|
}));
|
|
1464
1466
|
if (this._remoteOptions?.role !== import_invitations.Options.Role.GUEST) {
|
|
1465
|
-
throw new
|
|
1467
|
+
throw new import_errors.InvalidInvitationExtensionRoleError(void 0, {
|
|
1466
1468
|
expected: import_invitations.Options.Role.GUEST,
|
|
1467
1469
|
remoteOptions: this._remoteOptions
|
|
1468
1470
|
});
|
|
@@ -1496,7 +1498,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1496
1498
|
options: async (options) => {
|
|
1497
1499
|
(0, import_invariant5.invariant)(!this._remoteOptions, "Remote options already set.", {
|
|
1498
1500
|
F: __dxlog_file6,
|
|
1499
|
-
L:
|
|
1501
|
+
L: 241,
|
|
1500
1502
|
S: this,
|
|
1501
1503
|
A: [
|
|
1502
1504
|
"!this._remoteOptions",
|
|
@@ -1523,7 +1525,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1523
1525
|
try {
|
|
1524
1526
|
(0, import_log4.log)("begin options", void 0, {
|
|
1525
1527
|
F: __dxlog_file6,
|
|
1526
|
-
L:
|
|
1528
|
+
L: 262,
|
|
1527
1529
|
S: this,
|
|
1528
1530
|
C: (f, a) => f(...a)
|
|
1529
1531
|
});
|
|
@@ -1535,12 +1537,12 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1535
1537
|
}));
|
|
1536
1538
|
(0, import_log4.log)("end options", void 0, {
|
|
1537
1539
|
F: __dxlog_file6,
|
|
1538
|
-
L:
|
|
1540
|
+
L: 265,
|
|
1539
1541
|
S: this,
|
|
1540
1542
|
C: (f, a) => f(...a)
|
|
1541
1543
|
});
|
|
1542
1544
|
if (this._remoteOptions?.role !== import_invitations.Options.Role.HOST) {
|
|
1543
|
-
throw new
|
|
1545
|
+
throw new import_errors.InvalidInvitationExtensionRoleError(void 0, {
|
|
1544
1546
|
expected: import_invitations.Options.Role.HOST,
|
|
1545
1547
|
remoteOptions: this._remoteOptions
|
|
1546
1548
|
});
|
|
@@ -1549,7 +1551,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1549
1551
|
} catch (err) {
|
|
1550
1552
|
(0, import_log4.log)("openError", err, {
|
|
1551
1553
|
F: __dxlog_file6,
|
|
1552
|
-
L:
|
|
1554
|
+
L: 275,
|
|
1553
1555
|
S: this,
|
|
1554
1556
|
C: (f, a) => f(...a)
|
|
1555
1557
|
});
|
|
@@ -1559,7 +1561,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1559
1561
|
async onClose() {
|
|
1560
1562
|
(0, import_log4.log)("onClose", void 0, {
|
|
1561
1563
|
F: __dxlog_file6,
|
|
1562
|
-
L:
|
|
1564
|
+
L: 281,
|
|
1563
1565
|
S: this,
|
|
1564
1566
|
C: (f, a) => f(...a)
|
|
1565
1567
|
});
|
|
@@ -1582,7 +1584,7 @@ var InvitationsHandler = class {
|
|
|
1582
1584
|
const authCode = options?.authCode ?? (authMethod === import_services3.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials7.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0);
|
|
1583
1585
|
(0, import_invariant6.invariant)(protocol, void 0, {
|
|
1584
1586
|
F: __dxlog_file7,
|
|
1585
|
-
L:
|
|
1587
|
+
L: 76,
|
|
1586
1588
|
S: this,
|
|
1587
1589
|
A: [
|
|
1588
1590
|
"protocol",
|
|
@@ -1611,7 +1613,7 @@ var InvitationsHandler = class {
|
|
|
1611
1613
|
...protocol.toJSON()
|
|
1612
1614
|
}, {
|
|
1613
1615
|
F: __dxlog_file7,
|
|
1614
|
-
L:
|
|
1616
|
+
L: 98,
|
|
1615
1617
|
S: this,
|
|
1616
1618
|
C: (f, a) => f(...a)
|
|
1617
1619
|
});
|
|
@@ -1636,7 +1638,7 @@ var InvitationsHandler = class {
|
|
|
1636
1638
|
const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
|
|
1637
1639
|
(0, import_invariant6.invariant)(deviceKey, void 0, {
|
|
1638
1640
|
F: __dxlog_file7,
|
|
1639
|
-
L:
|
|
1641
|
+
L: 119,
|
|
1640
1642
|
S: this,
|
|
1641
1643
|
A: [
|
|
1642
1644
|
"deviceKey",
|
|
@@ -1659,7 +1661,7 @@ var InvitationsHandler = class {
|
|
|
1659
1661
|
id: traceId
|
|
1660
1662
|
}), {
|
|
1661
1663
|
F: __dxlog_file7,
|
|
1662
|
-
L:
|
|
1664
|
+
L: 137,
|
|
1663
1665
|
S: this,
|
|
1664
1666
|
C: (f, a) => f(...a)
|
|
1665
1667
|
});
|
|
@@ -1667,7 +1669,7 @@ var InvitationsHandler = class {
|
|
|
1667
1669
|
...protocol.toJSON()
|
|
1668
1670
|
}, {
|
|
1669
1671
|
F: __dxlog_file7,
|
|
1670
|
-
L:
|
|
1672
|
+
L: 138,
|
|
1671
1673
|
S: this,
|
|
1672
1674
|
C: (f, a) => f(...a)
|
|
1673
1675
|
});
|
|
@@ -1683,7 +1685,7 @@ var InvitationsHandler = class {
|
|
|
1683
1685
|
...protocol.toJSON()
|
|
1684
1686
|
}, {
|
|
1685
1687
|
F: __dxlog_file7,
|
|
1686
|
-
L:
|
|
1688
|
+
L: 141,
|
|
1687
1689
|
S: this,
|
|
1688
1690
|
C: (f, a) => f(...a)
|
|
1689
1691
|
});
|
|
@@ -1695,7 +1697,7 @@ var InvitationsHandler = class {
|
|
|
1695
1697
|
id: traceId
|
|
1696
1698
|
}), {
|
|
1697
1699
|
F: __dxlog_file7,
|
|
1698
|
-
L:
|
|
1700
|
+
L: 143,
|
|
1699
1701
|
S: this,
|
|
1700
1702
|
C: (f, a) => f(...a)
|
|
1701
1703
|
});
|
|
@@ -1705,7 +1707,7 @@ var InvitationsHandler = class {
|
|
|
1705
1707
|
...protocol.toJSON()
|
|
1706
1708
|
}, {
|
|
1707
1709
|
F: __dxlog_file7,
|
|
1708
|
-
L:
|
|
1710
|
+
L: 146,
|
|
1709
1711
|
S: this,
|
|
1710
1712
|
C: (f, a) => f(...a)
|
|
1711
1713
|
});
|
|
@@ -1716,7 +1718,7 @@ var InvitationsHandler = class {
|
|
|
1716
1718
|
} else {
|
|
1717
1719
|
import_log5.log.error("failed", err, {
|
|
1718
1720
|
F: __dxlog_file7,
|
|
1719
|
-
L:
|
|
1721
|
+
L: 149,
|
|
1720
1722
|
S: this,
|
|
1721
1723
|
C: (f, a) => f(...a)
|
|
1722
1724
|
});
|
|
@@ -1727,7 +1729,7 @@ var InvitationsHandler = class {
|
|
|
1727
1729
|
error: err
|
|
1728
1730
|
}), {
|
|
1729
1731
|
F: __dxlog_file7,
|
|
1730
|
-
L:
|
|
1732
|
+
L: 152,
|
|
1731
1733
|
S: this,
|
|
1732
1734
|
C: (f, a) => f(...a)
|
|
1733
1735
|
});
|
|
@@ -1740,7 +1742,7 @@ var InvitationsHandler = class {
|
|
|
1740
1742
|
});
|
|
1741
1743
|
},
|
|
1742
1744
|
onError: (err) => {
|
|
1743
|
-
if (err instanceof
|
|
1745
|
+
if (err instanceof import_errors2.InvalidInvitationExtensionRoleError) {
|
|
1744
1746
|
return;
|
|
1745
1747
|
}
|
|
1746
1748
|
if (err instanceof import_async8.TimeoutError) {
|
|
@@ -1748,7 +1750,7 @@ var InvitationsHandler = class {
|
|
|
1748
1750
|
...protocol.toJSON()
|
|
1749
1751
|
}, {
|
|
1750
1752
|
F: __dxlog_file7,
|
|
1751
|
-
L:
|
|
1753
|
+
L: 167,
|
|
1752
1754
|
S: this,
|
|
1753
1755
|
C: (f, a) => f(...a)
|
|
1754
1756
|
});
|
|
@@ -1759,7 +1761,7 @@ var InvitationsHandler = class {
|
|
|
1759
1761
|
} else {
|
|
1760
1762
|
import_log5.log.error("failed", err, {
|
|
1761
1763
|
F: __dxlog_file7,
|
|
1762
|
-
L:
|
|
1764
|
+
L: 170,
|
|
1763
1765
|
S: this,
|
|
1764
1766
|
C: (f, a) => f(...a)
|
|
1765
1767
|
});
|
|
@@ -1804,7 +1806,7 @@ var InvitationsHandler = class {
|
|
|
1804
1806
|
const { timeout = import_client_protocol2.INVITATION_TIMEOUT } = invitation;
|
|
1805
1807
|
(0, import_invariant6.invariant)(protocol, void 0, {
|
|
1806
1808
|
F: __dxlog_file7,
|
|
1807
|
-
L:
|
|
1809
|
+
L: 211,
|
|
1808
1810
|
S: this,
|
|
1809
1811
|
A: [
|
|
1810
1812
|
"protocol",
|
|
@@ -1818,7 +1820,7 @@ var InvitationsHandler = class {
|
|
|
1818
1820
|
const setState = (newData) => {
|
|
1819
1821
|
(0, import_invariant6.invariant)(newData.state !== void 0, void 0, {
|
|
1820
1822
|
F: __dxlog_file7,
|
|
1821
|
-
L:
|
|
1823
|
+
L: 222,
|
|
1822
1824
|
S: this,
|
|
1823
1825
|
A: [
|
|
1824
1826
|
"newData.state !== undefined",
|
|
@@ -1838,7 +1840,7 @@ var InvitationsHandler = class {
|
|
|
1838
1840
|
...protocol.toJSON()
|
|
1839
1841
|
}, {
|
|
1840
1842
|
F: __dxlog_file7,
|
|
1841
|
-
L:
|
|
1843
|
+
L: 230,
|
|
1842
1844
|
S: this,
|
|
1843
1845
|
C: (f, a) => f(...a)
|
|
1844
1846
|
});
|
|
@@ -1848,7 +1850,7 @@ var InvitationsHandler = class {
|
|
|
1848
1850
|
} else {
|
|
1849
1851
|
import_log5.log.warn("auth failed", err, {
|
|
1850
1852
|
F: __dxlog_file7,
|
|
1851
|
-
L:
|
|
1853
|
+
L: 233,
|
|
1852
1854
|
S: this,
|
|
1853
1855
|
C: (f, a) => f(...a)
|
|
1854
1856
|
});
|
|
@@ -1862,7 +1864,7 @@ var InvitationsHandler = class {
|
|
|
1862
1864
|
...protocol.toJSON()
|
|
1863
1865
|
}, {
|
|
1864
1866
|
F: __dxlog_file7,
|
|
1865
|
-
L:
|
|
1867
|
+
L: 241,
|
|
1866
1868
|
S: this,
|
|
1867
1869
|
C: (f, a) => f(...a)
|
|
1868
1870
|
});
|
|
@@ -1877,7 +1879,7 @@ var InvitationsHandler = class {
|
|
|
1877
1879
|
currentState
|
|
1878
1880
|
}, {
|
|
1879
1881
|
F: __dxlog_file7,
|
|
1880
|
-
L:
|
|
1882
|
+
L: 251,
|
|
1881
1883
|
S: this,
|
|
1882
1884
|
C: (f, a) => f(...a)
|
|
1883
1885
|
});
|
|
@@ -1892,7 +1894,7 @@ var InvitationsHandler = class {
|
|
|
1892
1894
|
id: traceId
|
|
1893
1895
|
}), {
|
|
1894
1896
|
F: __dxlog_file7,
|
|
1895
|
-
L:
|
|
1897
|
+
L: 260,
|
|
1896
1898
|
S: this,
|
|
1897
1899
|
C: (f, a) => f(...a)
|
|
1898
1900
|
});
|
|
@@ -1904,7 +1906,7 @@ var InvitationsHandler = class {
|
|
|
1904
1906
|
...protocol.toJSON()
|
|
1905
1907
|
}, {
|
|
1906
1908
|
F: __dxlog_file7,
|
|
1907
|
-
L:
|
|
1909
|
+
L: 268,
|
|
1908
1910
|
S: this,
|
|
1909
1911
|
C: (f, a) => f(...a)
|
|
1910
1912
|
});
|
|
@@ -1915,7 +1917,7 @@ var InvitationsHandler = class {
|
|
|
1915
1917
|
...protocol.toJSON()
|
|
1916
1918
|
}, {
|
|
1917
1919
|
F: __dxlog_file7,
|
|
1918
|
-
L:
|
|
1920
|
+
L: 272,
|
|
1919
1921
|
S: this,
|
|
1920
1922
|
C: (f, a) => f(...a)
|
|
1921
1923
|
});
|
|
@@ -1925,7 +1927,7 @@ var InvitationsHandler = class {
|
|
|
1925
1927
|
response: introductionResponse
|
|
1926
1928
|
}, {
|
|
1927
1929
|
F: __dxlog_file7,
|
|
1928
|
-
L:
|
|
1930
|
+
L: 276,
|
|
1929
1931
|
S: this,
|
|
1930
1932
|
C: (f, a) => f(...a)
|
|
1931
1933
|
});
|
|
@@ -1937,7 +1939,7 @@ var InvitationsHandler = class {
|
|
|
1937
1939
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1938
1940
|
(0, import_log5.log)("guest waiting for authentication code...", void 0, {
|
|
1939
1941
|
F: __dxlog_file7,
|
|
1940
|
-
L:
|
|
1942
|
+
L: 285,
|
|
1941
1943
|
S: this,
|
|
1942
1944
|
C: (f, a) => f(...a)
|
|
1943
1945
|
});
|
|
@@ -1949,7 +1951,7 @@ var InvitationsHandler = class {
|
|
|
1949
1951
|
});
|
|
1950
1952
|
(0, import_log5.log)("sending authentication request", void 0, {
|
|
1951
1953
|
F: __dxlog_file7,
|
|
1952
|
-
L:
|
|
1954
|
+
L: 289,
|
|
1953
1955
|
S: this,
|
|
1954
1956
|
C: (f, a) => f(...a)
|
|
1955
1957
|
});
|
|
@@ -1970,7 +1972,7 @@ var InvitationsHandler = class {
|
|
|
1970
1972
|
attempt
|
|
1971
1973
|
}, {
|
|
1972
1974
|
F: __dxlog_file7,
|
|
1973
|
-
L:
|
|
1975
|
+
L: 300,
|
|
1974
1976
|
S: this,
|
|
1975
1977
|
C: (f, a) => f(...a)
|
|
1976
1978
|
});
|
|
@@ -1987,7 +1989,7 @@ var InvitationsHandler = class {
|
|
|
1987
1989
|
...protocol.toJSON()
|
|
1988
1990
|
}, {
|
|
1989
1991
|
F: __dxlog_file7,
|
|
1990
|
-
L:
|
|
1992
|
+
L: 311,
|
|
1991
1993
|
S: this,
|
|
1992
1994
|
C: (f, a) => f(...a)
|
|
1993
1995
|
});
|
|
@@ -1999,7 +2001,7 @@ var InvitationsHandler = class {
|
|
|
1999
2001
|
...protocol.toJSON()
|
|
2000
2002
|
}, {
|
|
2001
2003
|
F: __dxlog_file7,
|
|
2002
|
-
L:
|
|
2004
|
+
L: 322,
|
|
2003
2005
|
S: this,
|
|
2004
2006
|
C: (f, a) => f(...a)
|
|
2005
2007
|
});
|
|
@@ -2011,7 +2013,7 @@ var InvitationsHandler = class {
|
|
|
2011
2013
|
id: traceId
|
|
2012
2014
|
}), {
|
|
2013
2015
|
F: __dxlog_file7,
|
|
2014
|
-
L:
|
|
2016
|
+
L: 324,
|
|
2015
2017
|
S: this,
|
|
2016
2018
|
C: (f, a) => f(...a)
|
|
2017
2019
|
});
|
|
@@ -2021,7 +2023,7 @@ var InvitationsHandler = class {
|
|
|
2021
2023
|
...protocol.toJSON()
|
|
2022
2024
|
}, {
|
|
2023
2025
|
F: __dxlog_file7,
|
|
2024
|
-
L:
|
|
2026
|
+
L: 327,
|
|
2025
2027
|
S: this,
|
|
2026
2028
|
C: (f, a) => f(...a)
|
|
2027
2029
|
});
|
|
@@ -2031,7 +2033,7 @@ var InvitationsHandler = class {
|
|
|
2031
2033
|
} else {
|
|
2032
2034
|
(0, import_log5.log)("auth failed", err, {
|
|
2033
2035
|
F: __dxlog_file7,
|
|
2034
|
-
L:
|
|
2036
|
+
L: 330,
|
|
2035
2037
|
S: this,
|
|
2036
2038
|
C: (f, a) => f(...a)
|
|
2037
2039
|
});
|
|
@@ -2042,7 +2044,7 @@ var InvitationsHandler = class {
|
|
|
2042
2044
|
error: err
|
|
2043
2045
|
}), {
|
|
2044
2046
|
F: __dxlog_file7,
|
|
2045
|
-
L:
|
|
2047
|
+
L: 333,
|
|
2046
2048
|
S: this,
|
|
2047
2049
|
C: (f, a) => f(...a)
|
|
2048
2050
|
});
|
|
@@ -2052,7 +2054,7 @@ var InvitationsHandler = class {
|
|
|
2052
2054
|
});
|
|
2053
2055
|
},
|
|
2054
2056
|
onError: (err) => {
|
|
2055
|
-
if (err instanceof
|
|
2057
|
+
if (err instanceof import_errors2.InvalidInvitationExtensionRoleError) {
|
|
2056
2058
|
return;
|
|
2057
2059
|
}
|
|
2058
2060
|
if (err instanceof import_async8.TimeoutError) {
|
|
@@ -2060,7 +2062,7 @@ var InvitationsHandler = class {
|
|
|
2060
2062
|
...protocol.toJSON()
|
|
2061
2063
|
}, {
|
|
2062
2064
|
F: __dxlog_file7,
|
|
2063
|
-
L:
|
|
2065
|
+
L: 344,
|
|
2064
2066
|
S: this,
|
|
2065
2067
|
C: (f, a) => f(...a)
|
|
2066
2068
|
});
|
|
@@ -2070,7 +2072,7 @@ var InvitationsHandler = class {
|
|
|
2070
2072
|
} else {
|
|
2071
2073
|
(0, import_log5.log)("auth failed", err, {
|
|
2072
2074
|
F: __dxlog_file7,
|
|
2073
|
-
L:
|
|
2075
|
+
L: 347,
|
|
2074
2076
|
S: this,
|
|
2075
2077
|
C: (f, a) => f(...a)
|
|
2076
2078
|
});
|
|
@@ -2083,7 +2085,7 @@ var InvitationsHandler = class {
|
|
|
2083
2085
|
(0, import_async8.scheduleTask)(ctx, async () => {
|
|
2084
2086
|
(0, import_invariant6.invariant)(invitation.swarmKey, void 0, {
|
|
2085
2087
|
F: __dxlog_file7,
|
|
2086
|
-
L:
|
|
2088
|
+
L: 357,
|
|
2087
2089
|
S: this,
|
|
2088
2090
|
A: [
|
|
2089
2091
|
"invitation.swarmKey",
|
|
@@ -2530,7 +2532,7 @@ var import_protocols5 = require("@dxos/protocols");
|
|
|
2530
2532
|
var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2531
2533
|
|
|
2532
2534
|
// packages/sdk/client-services/src/version.ts
|
|
2533
|
-
var DXOS_VERSION = "0.1.58-main.
|
|
2535
|
+
var DXOS_VERSION = "0.1.58-main.e4cedde";
|
|
2534
2536
|
|
|
2535
2537
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
2536
2538
|
var getPlatform = () => {
|
|
@@ -2683,13 +2685,13 @@ var import_async14 = require("@dxos/async");
|
|
|
2683
2685
|
var import_context9 = require("@dxos/context");
|
|
2684
2686
|
var import_credentials14 = require("@dxos/credentials");
|
|
2685
2687
|
var import_debug7 = require("@dxos/debug");
|
|
2686
|
-
var
|
|
2688
|
+
var import_echo_pipeline3 = require("@dxos/echo-pipeline");
|
|
2687
2689
|
var import_feed_store4 = require("@dxos/feed-store");
|
|
2688
|
-
var
|
|
2690
|
+
var import_invariant12 = require("@dxos/invariant");
|
|
2689
2691
|
var import_keyring = require("@dxos/keyring");
|
|
2690
2692
|
var import_keys10 = require("@dxos/keys");
|
|
2691
2693
|
var import_log13 = require("@dxos/log");
|
|
2692
|
-
var
|
|
2694
|
+
var import_protocols9 = require("@dxos/protocols");
|
|
2693
2695
|
var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2694
2696
|
var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
|
|
2695
2697
|
var import_tracing4 = require("@dxos/tracing");
|
|
@@ -2702,7 +2704,7 @@ var import_credentials13 = require("@dxos/credentials");
|
|
|
2702
2704
|
var import_invariant11 = require("@dxos/invariant");
|
|
2703
2705
|
var import_keys9 = require("@dxos/keys");
|
|
2704
2706
|
var import_log11 = require("@dxos/log");
|
|
2705
|
-
var
|
|
2707
|
+
var import_protocols7 = require("@dxos/protocols");
|
|
2706
2708
|
var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2707
2709
|
var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
|
|
2708
2710
|
var import_util5 = require("@dxos/util");
|
|
@@ -2713,9 +2715,9 @@ var import_client_protocol3 = require("@dxos/client-protocol");
|
|
|
2713
2715
|
var import_context7 = require("@dxos/context");
|
|
2714
2716
|
var import_debug4 = require("@dxos/debug");
|
|
2715
2717
|
var import_echo_pipeline = require("@dxos/echo-pipeline");
|
|
2718
|
+
var import_errors3 = require("@dxos/errors");
|
|
2716
2719
|
var import_keys8 = require("@dxos/keys");
|
|
2717
2720
|
var import_log10 = require("@dxos/log");
|
|
2718
|
-
var import_protocols7 = require("@dxos/protocols");
|
|
2719
2721
|
var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2720
2722
|
var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
2721
2723
|
var import_timeframe2 = require("@dxos/timeframe");
|
|
@@ -3024,7 +3026,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3024
3026
|
this._signingContext = params.signingContext;
|
|
3025
3027
|
this._callbacks = params.callbacks ?? {};
|
|
3026
3028
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
3027
|
-
trustedKeysProvider: () => new import_util4.ComplexSet(import_keys8.PublicKey.hash, Array.from(this._inner.spaceState.members.
|
|
3029
|
+
trustedKeysProvider: () => new import_util4.ComplexSet(import_keys8.PublicKey.hash, Array.from(this._inner.spaceState.members.keys())),
|
|
3028
3030
|
update: this._inner.stateUpdate,
|
|
3029
3031
|
authTimeout: import_client_protocol3.AUTH_TIMEOUT
|
|
3030
3032
|
});
|
|
@@ -3034,7 +3036,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3034
3036
|
state: import_services7.SpaceState[this._state]
|
|
3035
3037
|
}, {
|
|
3036
3038
|
F: __dxlog_file12,
|
|
3037
|
-
L:
|
|
3039
|
+
L: 112,
|
|
3038
3040
|
S: this,
|
|
3039
3041
|
C: (f, a) => f(...a)
|
|
3040
3042
|
});
|
|
@@ -3077,7 +3079,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3077
3079
|
state: import_services7.SpaceState[this._state]
|
|
3078
3080
|
}, {
|
|
3079
3081
|
F: __dxlog_file12,
|
|
3080
|
-
L:
|
|
3082
|
+
L: 159,
|
|
3081
3083
|
S: this,
|
|
3082
3084
|
C: (f, a) => f(...a)
|
|
3083
3085
|
});
|
|
@@ -3095,7 +3097,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3095
3097
|
state: import_services7.SpaceState[this._state]
|
|
3096
3098
|
}, {
|
|
3097
3099
|
F: __dxlog_file12,
|
|
3098
|
-
L:
|
|
3100
|
+
L: 173,
|
|
3099
3101
|
S: this,
|
|
3100
3102
|
C: (f, a) => f(...a)
|
|
3101
3103
|
});
|
|
@@ -3123,10 +3125,10 @@ var DataSpace = class DataSpace2 {
|
|
|
3123
3125
|
this.metrics.pipelineInitBegin = /* @__PURE__ */ new Date();
|
|
3124
3126
|
await this.initializeDataPipeline();
|
|
3125
3127
|
} catch (err) {
|
|
3126
|
-
if (err instanceof
|
|
3128
|
+
if (err instanceof import_errors3.CancelledError) {
|
|
3127
3129
|
(0, import_log10.log)("data pipeline initialization cancelled", err, {
|
|
3128
3130
|
F: __dxlog_file12,
|
|
3129
|
-
L:
|
|
3131
|
+
L: 205,
|
|
3130
3132
|
S: this,
|
|
3131
3133
|
C: (f, a) => f(...a)
|
|
3132
3134
|
});
|
|
@@ -3134,7 +3136,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3134
3136
|
}
|
|
3135
3137
|
import_log10.log.error("Error initializing data pipeline", err, {
|
|
3136
3138
|
F: __dxlog_file12,
|
|
3137
|
-
L:
|
|
3139
|
+
L: 209,
|
|
3138
3140
|
S: this,
|
|
3139
3141
|
C: (f, a) => f(...a)
|
|
3140
3142
|
});
|
|
@@ -3143,7 +3145,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3143
3145
|
state: import_services7.SpaceState[this._state]
|
|
3144
3146
|
}, {
|
|
3145
3147
|
F: __dxlog_file12,
|
|
3146
|
-
L:
|
|
3148
|
+
L: 211,
|
|
3147
3149
|
S: this,
|
|
3148
3150
|
C: (f, a) => f(...a)
|
|
3149
3151
|
});
|
|
@@ -3156,14 +3158,14 @@ var DataSpace = class DataSpace2 {
|
|
|
3156
3158
|
}
|
|
3157
3159
|
async initializeDataPipeline() {
|
|
3158
3160
|
if (this._state !== import_services7.SpaceState.CONTROL_ONLY) {
|
|
3159
|
-
throw new
|
|
3161
|
+
throw new import_errors3.SystemError("Invalid operation");
|
|
3160
3162
|
}
|
|
3161
3163
|
this._state = import_services7.SpaceState.INITIALIZING;
|
|
3162
3164
|
(0, import_log10.log)("new state", {
|
|
3163
3165
|
state: import_services7.SpaceState[this._state]
|
|
3164
3166
|
}, {
|
|
3165
3167
|
F: __dxlog_file12,
|
|
3166
|
-
L:
|
|
3168
|
+
L: 227,
|
|
3167
3169
|
S: this,
|
|
3168
3170
|
C: (f, a) => f(...a)
|
|
3169
3171
|
});
|
|
@@ -3174,7 +3176,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3174
3176
|
await (0, import_context7.cancelWithContext)(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
|
|
3175
3177
|
(0, import_log10.log)("waiting for data pipeline to reach target timeframe", void 0, {
|
|
3176
3178
|
F: __dxlog_file12,
|
|
3177
|
-
L:
|
|
3179
|
+
L: 241,
|
|
3178
3180
|
S: this,
|
|
3179
3181
|
C: (f, a) => f(...a)
|
|
3180
3182
|
});
|
|
@@ -3185,7 +3187,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3185
3187
|
this.metrics.dataPipelineReady = /* @__PURE__ */ new Date();
|
|
3186
3188
|
(0, import_log10.log)("data pipeline ready", void 0, {
|
|
3187
3189
|
F: __dxlog_file12,
|
|
3188
|
-
L:
|
|
3190
|
+
L: 250,
|
|
3189
3191
|
S: this,
|
|
3190
3192
|
C: (f, a) => f(...a)
|
|
3191
3193
|
});
|
|
@@ -3195,7 +3197,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3195
3197
|
state: import_services7.SpaceState[this._state]
|
|
3196
3198
|
}, {
|
|
3197
3199
|
F: __dxlog_file12,
|
|
3198
|
-
L:
|
|
3200
|
+
L: 254,
|
|
3199
3201
|
S: this,
|
|
3200
3202
|
C: (f, a) => f(...a)
|
|
3201
3203
|
});
|
|
@@ -3211,7 +3213,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3211
3213
|
await this._createWritableFeeds();
|
|
3212
3214
|
(0, import_log10.log)("writable feeds created", void 0, {
|
|
3213
3215
|
F: __dxlog_file12,
|
|
3214
|
-
L:
|
|
3216
|
+
L: 270,
|
|
3215
3217
|
S: this,
|
|
3216
3218
|
C: (f, a) => f(...a)
|
|
3217
3219
|
});
|
|
@@ -3316,7 +3318,7 @@ var DataSpace = class DataSpace2 {
|
|
|
3316
3318
|
state: import_services7.SpaceState[this._state]
|
|
3317
3319
|
}, {
|
|
3318
3320
|
F: __dxlog_file12,
|
|
3319
|
-
L:
|
|
3321
|
+
L: 386,
|
|
3320
3322
|
S: this,
|
|
3321
3323
|
C: (f, a) => f(...a)
|
|
3322
3324
|
});
|
|
@@ -3458,7 +3460,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3458
3460
|
S: this,
|
|
3459
3461
|
C: (f, a) => f(...a)
|
|
3460
3462
|
});
|
|
3461
|
-
import_log11.log.trace("dxos.echo.data-space-manager.open",
|
|
3463
|
+
import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols7.trace.begin({
|
|
3462
3464
|
id: this._instanceId
|
|
3463
3465
|
}), {
|
|
3464
3466
|
F: __dxlog_file13,
|
|
@@ -3504,7 +3506,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3504
3506
|
space.initializeDataPipelineAsync();
|
|
3505
3507
|
}
|
|
3506
3508
|
}
|
|
3507
|
-
import_log11.log.trace("dxos.echo.data-space-manager.open",
|
|
3509
|
+
import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols7.trace.end({
|
|
3508
3510
|
id: this._instanceId
|
|
3509
3511
|
}), {
|
|
3510
3512
|
F: __dxlog_file13,
|
|
@@ -3758,9 +3760,10 @@ DataSpaceManager = _ts_decorate4([
|
|
|
3758
3760
|
var import_async13 = require("@dxos/async");
|
|
3759
3761
|
var import_codec_protobuf11 = require("@dxos/codec-protobuf");
|
|
3760
3762
|
var import_debug6 = require("@dxos/debug");
|
|
3761
|
-
var
|
|
3763
|
+
var import_echo_pipeline2 = require("@dxos/echo-pipeline");
|
|
3764
|
+
var import_errors4 = require("@dxos/errors");
|
|
3762
3765
|
var import_log12 = require("@dxos/log");
|
|
3763
|
-
var
|
|
3766
|
+
var import_protocols8 = require("@dxos/protocols");
|
|
3764
3767
|
var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3765
3768
|
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3766
3769
|
var SpacesServiceImpl = class {
|
|
@@ -3780,7 +3783,7 @@ var SpacesServiceImpl = class {
|
|
|
3780
3783
|
}
|
|
3781
3784
|
async updateSpace({ spaceKey, state }) {
|
|
3782
3785
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3783
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3786
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3784
3787
|
if (state) {
|
|
3785
3788
|
switch (state) {
|
|
3786
3789
|
case import_services9.SpaceState.ACTIVE:
|
|
@@ -3790,7 +3793,7 @@ var SpacesServiceImpl = class {
|
|
|
3790
3793
|
await space.deactivate();
|
|
3791
3794
|
break;
|
|
3792
3795
|
default:
|
|
3793
|
-
throw new
|
|
3796
|
+
throw new import_errors4.ApiError("Invalid space state");
|
|
3794
3797
|
}
|
|
3795
3798
|
}
|
|
3796
3799
|
}
|
|
@@ -3845,14 +3848,14 @@ var SpacesServiceImpl = class {
|
|
|
3845
3848
|
}
|
|
3846
3849
|
async postMessage({ spaceKey, channel, message }) {
|
|
3847
3850
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3848
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3851
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3849
3852
|
await space.postMessage(getChannelId(channel), message);
|
|
3850
3853
|
}
|
|
3851
3854
|
subscribeMessages({ spaceKey, channel }) {
|
|
3852
3855
|
return new import_codec_protobuf11.Stream(({ ctx, next }) => {
|
|
3853
3856
|
(0, import_async13.scheduleTask)(ctx, async () => {
|
|
3854
3857
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3855
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3858
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3856
3859
|
const handle = space.listen(getChannelId(channel), (message) => {
|
|
3857
3860
|
next(message);
|
|
3858
3861
|
});
|
|
@@ -3860,83 +3863,38 @@ var SpacesServiceImpl = class {
|
|
|
3860
3863
|
});
|
|
3861
3864
|
});
|
|
3862
3865
|
}
|
|
3863
|
-
queryCredentials({ spaceKey
|
|
3864
|
-
return new import_codec_protobuf11.Stream(({ ctx, next
|
|
3865
|
-
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3866
|
+
queryCredentials({ spaceKey }) {
|
|
3867
|
+
return new import_codec_protobuf11.Stream(({ ctx, next }) => {
|
|
3868
|
+
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3866
3869
|
const processor = {
|
|
3867
3870
|
processCredential: async (credential) => {
|
|
3868
3871
|
next(credential);
|
|
3869
3872
|
}
|
|
3870
3873
|
};
|
|
3871
3874
|
ctx.onDispose(() => space.spaceState.removeCredentialProcessor(processor));
|
|
3872
|
-
(0, import_async13.scheduleTask)(ctx,
|
|
3873
|
-
await space.spaceState.addCredentialProcessor(processor);
|
|
3874
|
-
if (noTail) {
|
|
3875
|
-
close();
|
|
3876
|
-
}
|
|
3877
|
-
});
|
|
3875
|
+
(0, import_async13.scheduleTask)(ctx, () => space.spaceState.addCredentialProcessor(processor));
|
|
3878
3876
|
});
|
|
3879
3877
|
}
|
|
3880
3878
|
async writeCredentials({ spaceKey, credentials }) {
|
|
3881
|
-
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3879
|
+
const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3882
3880
|
for (const credential of credentials ?? []) {
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
credential
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
});
|
|
3889
|
-
} else {
|
|
3890
|
-
(0, import_invariant12.invariant)(!credential.id, "Id on unsigned credentials is not allowed", {
|
|
3891
|
-
F: __dxlog_file14,
|
|
3892
|
-
L: 168,
|
|
3893
|
-
S: this,
|
|
3894
|
-
A: [
|
|
3895
|
-
"!credential.id",
|
|
3896
|
-
"'Id on unsigned credentials is not allowed'"
|
|
3897
|
-
]
|
|
3898
|
-
});
|
|
3899
|
-
(0, import_invariant12.invariant)(this._identityManager.identity, "Identity is not available", {
|
|
3900
|
-
F: __dxlog_file14,
|
|
3901
|
-
L: 169,
|
|
3902
|
-
S: this,
|
|
3903
|
-
A: [
|
|
3904
|
-
"this._identityManager.identity",
|
|
3905
|
-
"'Identity is not available'"
|
|
3906
|
-
]
|
|
3907
|
-
});
|
|
3908
|
-
const signer = this._identityManager.identity.getIdentityCredentialSigner();
|
|
3909
|
-
(0, import_invariant12.invariant)(credential.issuer.equals(signer.getIssuer()), void 0, {
|
|
3910
|
-
F: __dxlog_file14,
|
|
3911
|
-
L: 171,
|
|
3912
|
-
S: this,
|
|
3913
|
-
A: [
|
|
3914
|
-
"credential.issuer.equals(signer.getIssuer())",
|
|
3915
|
-
""
|
|
3916
|
-
]
|
|
3917
|
-
});
|
|
3918
|
-
const signedCredential = await signer.createCredential({
|
|
3919
|
-
subject: credential.subject.id,
|
|
3920
|
-
assertion: credential.subject.assertion
|
|
3921
|
-
});
|
|
3922
|
-
await space.controlPipeline.writer.write({
|
|
3923
|
-
credential: {
|
|
3924
|
-
credential: signedCredential
|
|
3925
|
-
}
|
|
3926
|
-
});
|
|
3927
|
-
}
|
|
3881
|
+
await space.controlPipeline.writer.write({
|
|
3882
|
+
credential: {
|
|
3883
|
+
credential
|
|
3884
|
+
}
|
|
3885
|
+
});
|
|
3928
3886
|
}
|
|
3929
3887
|
}
|
|
3930
3888
|
async createEpoch({ spaceKey }) {
|
|
3931
3889
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
3932
|
-
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new
|
|
3890
|
+
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
3933
3891
|
await space.createEpoch();
|
|
3934
3892
|
}
|
|
3935
3893
|
_serializeSpace(space) {
|
|
3936
3894
|
return {
|
|
3937
3895
|
spaceKey: space.key,
|
|
3938
3896
|
state: space.state,
|
|
3939
|
-
error: space.error ? (0,
|
|
3897
|
+
error: space.error ? (0, import_protocols8.encodeError)(space.error) : void 0,
|
|
3940
3898
|
pipeline: {
|
|
3941
3899
|
currentEpoch: space.dataPipeline.currentEpoch,
|
|
3942
3900
|
appliedEpoch: space.dataPipeline.appliedEpoch,
|
|
@@ -3963,7 +3921,7 @@ var SpacesServiceImpl = class {
|
|
|
3963
3921
|
displayName: member.assertion.profile?.displayName
|
|
3964
3922
|
}
|
|
3965
3923
|
},
|
|
3966
|
-
presence:
|
|
3924
|
+
presence: isMe || peers.length > 0 ? import_services9.SpaceMember.PresenceState.ONLINE : import_services9.SpaceMember.PresenceState.OFFLINE,
|
|
3967
3925
|
peerStates: peers
|
|
3968
3926
|
};
|
|
3969
3927
|
}),
|
|
@@ -3995,11 +3953,11 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3995
3953
|
this.signalManager = signalManager;
|
|
3996
3954
|
this.modelFactory = modelFactory;
|
|
3997
3955
|
this.initialized = new import_async14.Trigger();
|
|
3998
|
-
this.dataServiceSubscriptions = new
|
|
3956
|
+
this.dataServiceSubscriptions = new import_echo_pipeline3.DataServiceSubscriptions();
|
|
3999
3957
|
this._handlerFactories = /* @__PURE__ */ new Map();
|
|
4000
3958
|
this._instanceId = import_keys10.PublicKey.random().toHex();
|
|
4001
|
-
this.metadataStore = new
|
|
4002
|
-
this.snapshotStore = new
|
|
3959
|
+
this.metadataStore = new import_echo_pipeline3.MetadataStore(storage.createDirectory("metadata"));
|
|
3960
|
+
this.snapshotStore = new import_echo_pipeline3.SnapshotStore(storage.createDirectory("snapshots"));
|
|
4003
3961
|
this.blobStore = new import_teleport_extension_object_sync.BlobStore(storage.createDirectory("blobs"));
|
|
4004
3962
|
this.keyring = new import_keyring.Keyring(storage.createDirectory("keyring"));
|
|
4005
3963
|
this.feedStore = new import_feed_store4.FeedStore({
|
|
@@ -4007,12 +3965,12 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4007
3965
|
root: storage.createDirectory("feeds"),
|
|
4008
3966
|
signer: this.keyring,
|
|
4009
3967
|
hypercore: {
|
|
4010
|
-
valueEncoding:
|
|
3968
|
+
valueEncoding: import_echo_pipeline3.valueEncoding,
|
|
4011
3969
|
stats: true
|
|
4012
3970
|
}
|
|
4013
3971
|
})
|
|
4014
3972
|
});
|
|
4015
|
-
this.spaceManager = new
|
|
3973
|
+
this.spaceManager = new import_echo_pipeline3.SpaceManager({
|
|
4016
3974
|
feedStore: this.feedStore,
|
|
4017
3975
|
networkManager: this.networkManager,
|
|
4018
3976
|
blobStore: this.blobStore,
|
|
@@ -4032,7 +3990,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4032
3990
|
S: this,
|
|
4033
3991
|
C: (f, a) => f(...a)
|
|
4034
3992
|
});
|
|
4035
|
-
import_log13.log.trace("dxos.sdk.service-context.open",
|
|
3993
|
+
import_log13.log.trace("dxos.sdk.service-context.open", import_protocols9.trace.begin({
|
|
4036
3994
|
id: this._instanceId
|
|
4037
3995
|
}), {
|
|
4038
3996
|
F: __dxlog_file15,
|
|
@@ -4048,7 +4006,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4048
4006
|
if (this.identityManager.identity) {
|
|
4049
4007
|
await this._initialize(ctx);
|
|
4050
4008
|
}
|
|
4051
|
-
import_log13.log.trace("dxos.sdk.service-context.open",
|
|
4009
|
+
import_log13.log.trace("dxos.sdk.service-context.open", import_protocols9.trace.end({
|
|
4052
4010
|
id: this._instanceId
|
|
4053
4011
|
}), {
|
|
4054
4012
|
F: __dxlog_file15,
|
|
@@ -4095,7 +4053,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4095
4053
|
}
|
|
4096
4054
|
getInvitationHandler(invitation) {
|
|
4097
4055
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
4098
|
-
(0,
|
|
4056
|
+
(0, import_invariant12.invariant)(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
4099
4057
|
F: __dxlog_file15,
|
|
4100
4058
|
L: 174,
|
|
4101
4059
|
S: this,
|
|
@@ -4113,8 +4071,8 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4113
4071
|
}
|
|
4114
4072
|
async _checkStorageVersion() {
|
|
4115
4073
|
await this.metadataStore.load();
|
|
4116
|
-
if (this.metadataStore.version !==
|
|
4117
|
-
throw new
|
|
4074
|
+
if (this.metadataStore.version !== import_protocols9.STORAGE_VERSION) {
|
|
4075
|
+
throw new Error(`Invalid storage version: current=${this.metadataStore.version}, expected=${import_protocols9.STORAGE_VERSION}`);
|
|
4118
4076
|
}
|
|
4119
4077
|
}
|
|
4120
4078
|
// Called when identity is created.
|
|
@@ -4142,7 +4100,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4142
4100
|
this.dataSpaceManager = new DataSpaceManager(this.spaceManager, this.metadataStore, this.dataServiceSubscriptions, this.keyring, signingContext, this.feedStore);
|
|
4143
4101
|
await this.dataSpaceManager.open();
|
|
4144
4102
|
this._handlerFactories.set(import_services10.Invitation.Kind.SPACE, (invitation) => {
|
|
4145
|
-
(0,
|
|
4103
|
+
(0, import_invariant12.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4146
4104
|
F: __dxlog_file15,
|
|
4147
4105
|
L: 218,
|
|
4148
4106
|
S: this,
|
|
@@ -4227,14 +4185,14 @@ var import_async17 = require("@dxos/async");
|
|
|
4227
4185
|
var import_client_protocol5 = require("@dxos/client-protocol");
|
|
4228
4186
|
var import_context10 = require("@dxos/context");
|
|
4229
4187
|
var import_document_model2 = require("@dxos/document-model");
|
|
4230
|
-
var
|
|
4231
|
-
var
|
|
4188
|
+
var import_echo_pipeline4 = require("@dxos/echo-pipeline");
|
|
4189
|
+
var import_invariant14 = require("@dxos/invariant");
|
|
4232
4190
|
var import_keys11 = require("@dxos/keys");
|
|
4233
4191
|
var import_log16 = require("@dxos/log");
|
|
4234
4192
|
var import_messaging = require("@dxos/messaging");
|
|
4235
4193
|
var import_model_factory = require("@dxos/model-factory");
|
|
4236
4194
|
var import_network_manager2 = require("@dxos/network-manager");
|
|
4237
|
-
var
|
|
4195
|
+
var import_protocols10 = require("@dxos/protocols");
|
|
4238
4196
|
var import_services14 = require("@dxos/protocols/proto/dxos/client/services");
|
|
4239
4197
|
var import_text_model = require("@dxos/text-model");
|
|
4240
4198
|
var import_tracing5 = require("@dxos/tracing");
|
|
@@ -4284,7 +4242,7 @@ var DevicesServiceImpl = class {
|
|
|
4284
4242
|
};
|
|
4285
4243
|
|
|
4286
4244
|
// packages/sdk/client-services/src/packlets/locks/node.ts
|
|
4287
|
-
var
|
|
4245
|
+
var import_invariant13 = require("@dxos/invariant");
|
|
4288
4246
|
var import_lock_file = require("@dxos/lock-file");
|
|
4289
4247
|
var import_log14 = require("@dxos/log");
|
|
4290
4248
|
function _ts_decorate6(decorators, target, key, desc) {
|
|
@@ -4325,7 +4283,7 @@ var Lock = class {
|
|
|
4325
4283
|
}
|
|
4326
4284
|
async release() {
|
|
4327
4285
|
await this._onRelease?.();
|
|
4328
|
-
(0,
|
|
4286
|
+
(0, import_invariant13.invariant)(this._fileHandle, "Lock is not acquired", {
|
|
4329
4287
|
F: __dxlog_file16,
|
|
4330
4288
|
L: 42,
|
|
4331
4289
|
S: this,
|
|
@@ -4493,7 +4451,7 @@ var NetworkServiceImpl = class {
|
|
|
4493
4451
|
|
|
4494
4452
|
// packages/sdk/client-services/src/packlets/storage/storage.ts
|
|
4495
4453
|
var import_client_protocol4 = require("@dxos/client-protocol");
|
|
4496
|
-
var
|
|
4454
|
+
var import_errors5 = require("@dxos/errors");
|
|
4497
4455
|
var import_config = require("@dxos/protocols/proto/dxos/config");
|
|
4498
4456
|
var import_random_access_storage = require("@dxos/random-access-storage");
|
|
4499
4457
|
var import_util8 = require("@dxos/util");
|
|
@@ -4501,16 +4459,16 @@ var StorageDriver = import_config.Runtime.Client.Storage.StorageDriver;
|
|
|
4501
4459
|
var createStorageObjects = (config) => {
|
|
4502
4460
|
const { path = (0, import_util8.isNode)() ? import_client_protocol4.DX_DATA : "dxos/storage", storageType, keyStorage, persistent = false } = config ?? {};
|
|
4503
4461
|
if (persistent && storageType === StorageDriver.RAM) {
|
|
4504
|
-
throw new
|
|
4462
|
+
throw new import_errors5.InvalidConfigError("RAM storage cannot be used in persistent mode.");
|
|
4505
4463
|
}
|
|
4506
4464
|
if (!persistent && storageType !== void 0 && storageType !== StorageDriver.RAM) {
|
|
4507
|
-
throw new
|
|
4465
|
+
throw new import_errors5.InvalidConfigError("Cannot use a persistent storage in not persistent mode.");
|
|
4508
4466
|
}
|
|
4509
4467
|
if (persistent && keyStorage === StorageDriver.RAM) {
|
|
4510
|
-
throw new
|
|
4468
|
+
throw new import_errors5.InvalidConfigError("RAM key storage cannot be used in persistent mode.");
|
|
4511
4469
|
}
|
|
4512
4470
|
if (!persistent && keyStorage !== StorageDriver.RAM && keyStorage !== void 0) {
|
|
4513
|
-
throw new
|
|
4471
|
+
throw new import_errors5.InvalidConfigError("Cannot use a persistent key storage in not persistent mode.");
|
|
4514
4472
|
}
|
|
4515
4473
|
return {
|
|
4516
4474
|
storage: (0, import_random_access_storage.createStorage)({
|
|
@@ -4717,7 +4675,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4717
4675
|
* Can only be called once.
|
|
4718
4676
|
*/
|
|
4719
4677
|
initialize({ config, ...options }) {
|
|
4720
|
-
(0,
|
|
4678
|
+
(0, import_invariant14.invariant)(!this._open, "service host is open", {
|
|
4721
4679
|
F: __dxlog_file17,
|
|
4722
4680
|
L: 184,
|
|
4723
4681
|
S: this,
|
|
@@ -4733,7 +4691,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4733
4691
|
C: (f, a) => f(...a)
|
|
4734
4692
|
});
|
|
4735
4693
|
if (config) {
|
|
4736
|
-
(0,
|
|
4694
|
+
(0, import_invariant14.invariant)(!this._config, "config already set", {
|
|
4737
4695
|
F: __dxlog_file17,
|
|
4738
4696
|
L: 188,
|
|
4739
4697
|
S: this,
|
|
@@ -4751,7 +4709,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4751
4709
|
iceServers: this._config?.get("runtime.services.ice")
|
|
4752
4710
|
}), signalManager = new import_messaging.WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
|
|
4753
4711
|
this._signalManager = signalManager;
|
|
4754
|
-
(0,
|
|
4712
|
+
(0, import_invariant14.invariant)(!this._networkManager, "network manager already set", {
|
|
4755
4713
|
F: __dxlog_file17,
|
|
4756
4714
|
L: 204,
|
|
4757
4715
|
S: this,
|
|
@@ -4777,7 +4735,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4777
4735
|
return;
|
|
4778
4736
|
}
|
|
4779
4737
|
const traceId = import_keys11.PublicKey.random().toHex();
|
|
4780
|
-
import_log16.log.trace("dxos.client-services.host.open",
|
|
4738
|
+
import_log16.log.trace("dxos.client-services.host.open", import_protocols10.trace.begin({
|
|
4781
4739
|
id: traceId
|
|
4782
4740
|
}), {
|
|
4783
4741
|
F: __dxlog_file17,
|
|
@@ -4785,7 +4743,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4785
4743
|
S: this,
|
|
4786
4744
|
C: (f, a) => f(...a)
|
|
4787
4745
|
});
|
|
4788
|
-
(0,
|
|
4746
|
+
(0, import_invariant14.invariant)(this._config, "config not set", {
|
|
4789
4747
|
F: __dxlog_file17,
|
|
4790
4748
|
L: 224,
|
|
4791
4749
|
S: this,
|
|
@@ -4794,7 +4752,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4794
4752
|
"'config not set'"
|
|
4795
4753
|
]
|
|
4796
4754
|
});
|
|
4797
|
-
(0,
|
|
4755
|
+
(0, import_invariant14.invariant)(this._storage, "storage not set", {
|
|
4798
4756
|
F: __dxlog_file17,
|
|
4799
4757
|
L: 225,
|
|
4800
4758
|
S: this,
|
|
@@ -4803,7 +4761,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4803
4761
|
"'storage not set'"
|
|
4804
4762
|
]
|
|
4805
4763
|
});
|
|
4806
|
-
(0,
|
|
4764
|
+
(0, import_invariant14.invariant)(this._signalManager, "signal manager not set", {
|
|
4807
4765
|
F: __dxlog_file17,
|
|
4808
4766
|
L: 226,
|
|
4809
4767
|
S: this,
|
|
@@ -4812,7 +4770,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4812
4770
|
"'signal manager not set'"
|
|
4813
4771
|
]
|
|
4814
4772
|
});
|
|
4815
|
-
(0,
|
|
4773
|
+
(0, import_invariant14.invariant)(this._networkManager, "network manager not set", {
|
|
4816
4774
|
F: __dxlog_file17,
|
|
4817
4775
|
L: 227,
|
|
4818
4776
|
S: this,
|
|
@@ -4842,7 +4800,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4842
4800
|
await this._serviceContext.initialized.wait();
|
|
4843
4801
|
return this._serviceContext.dataSpaceManager;
|
|
4844
4802
|
}),
|
|
4845
|
-
DataService: new
|
|
4803
|
+
DataService: new import_echo_pipeline4.DataServiceImpl(this._serviceContext.dataServiceSubscriptions),
|
|
4846
4804
|
NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager),
|
|
4847
4805
|
LoggingService: this._loggingService,
|
|
4848
4806
|
TracingService: this._tracingService,
|
|
@@ -4876,7 +4834,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4876
4834
|
S: this,
|
|
4877
4835
|
C: (f, a) => f(...a)
|
|
4878
4836
|
});
|
|
4879
|
-
import_log16.log.trace("dxos.client-services.host.open",
|
|
4837
|
+
import_log16.log.trace("dxos.client-services.host.open", import_protocols10.trace.end({
|
|
4880
4838
|
id: traceId
|
|
4881
4839
|
}), {
|
|
4882
4840
|
F: __dxlog_file17,
|
|
@@ -4917,7 +4875,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4917
4875
|
}
|
|
4918
4876
|
async reset() {
|
|
4919
4877
|
const traceId = import_keys11.PublicKey.random().toHex();
|
|
4920
|
-
import_log16.log.trace("dxos.sdk.client-services-host.reset",
|
|
4878
|
+
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols10.trace.begin({
|
|
4921
4879
|
id: traceId
|
|
4922
4880
|
}), {
|
|
4923
4881
|
F: __dxlog_file17,
|
|
@@ -4939,7 +4897,7 @@ var ClientServicesHost = class ClientServicesHost2 {
|
|
|
4939
4897
|
S: this,
|
|
4940
4898
|
C: (f, a) => f(...a)
|
|
4941
4899
|
});
|
|
4942
|
-
import_log16.log.trace("dxos.sdk.client-services-host.reset",
|
|
4900
|
+
import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols10.trace.end({
|
|
4943
4901
|
id: traceId
|
|
4944
4902
|
}), {
|
|
4945
4903
|
F: __dxlog_file17,
|
|
@@ -4980,7 +4938,7 @@ var import_util10 = require("@dxos/util");
|
|
|
4980
4938
|
// packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
|
|
4981
4939
|
var import_async18 = require("@dxos/async");
|
|
4982
4940
|
var import_client_protocol6 = require("@dxos/client-protocol");
|
|
4983
|
-
var
|
|
4941
|
+
var import_invariant15 = require("@dxos/invariant");
|
|
4984
4942
|
var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
|
|
4985
4943
|
var import_rpc2 = require("@dxos/rpc");
|
|
4986
4944
|
var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/shell-runtime.ts";
|
|
@@ -5009,7 +4967,7 @@ var ShellRuntimeImpl = class {
|
|
|
5009
4967
|
});
|
|
5010
4968
|
}
|
|
5011
4969
|
async setAppContext(context) {
|
|
5012
|
-
(0,
|
|
4970
|
+
(0, import_invariant15.invariant)(this._appRpc, "runtime not open", {
|
|
5013
4971
|
F: __dxlog_file18,
|
|
5014
4972
|
L: 44,
|
|
5015
4973
|
S: this,
|
|
@@ -5165,9 +5123,9 @@ _ts_decorate8([
|
|
|
5165
5123
|
// packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts
|
|
5166
5124
|
var import_async20 = require("@dxos/async");
|
|
5167
5125
|
var import_client_protocol8 = require("@dxos/client-protocol");
|
|
5126
|
+
var import_errors6 = require("@dxos/errors");
|
|
5168
5127
|
var import_log18 = require("@dxos/log");
|
|
5169
5128
|
var import_network_manager4 = require("@dxos/network-manager");
|
|
5170
|
-
var import_protocols13 = require("@dxos/protocols");
|
|
5171
5129
|
var import_rpc3 = require("@dxos/rpc");
|
|
5172
5130
|
var import_util11 = require("@dxos/util");
|
|
5173
5131
|
var __dxlog_file20 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts";
|
|
@@ -5223,7 +5181,7 @@ var IFrameProxyRuntime = class {
|
|
|
5223
5181
|
S: this,
|
|
5224
5182
|
C: (f, a) => f(...a)
|
|
5225
5183
|
});
|
|
5226
|
-
throw new
|
|
5184
|
+
throw new import_errors6.RemoteServiceConnectionError("Failed to connect to worker");
|
|
5227
5185
|
}
|
|
5228
5186
|
await this._shellRuntime?.open();
|
|
5229
5187
|
}
|
|
@@ -5248,7 +5206,7 @@ var import_network_manager5 = require("@dxos/network-manager");
|
|
|
5248
5206
|
// packages/sdk/client-services/src/packlets/vault/worker-session.ts
|
|
5249
5207
|
var import_async21 = require("@dxos/async");
|
|
5250
5208
|
var import_client_protocol9 = require("@dxos/client-protocol");
|
|
5251
|
-
var
|
|
5209
|
+
var import_invariant16 = require("@dxos/invariant");
|
|
5252
5210
|
var import_log19 = require("@dxos/log");
|
|
5253
5211
|
var import_rpc4 = require("@dxos/rpc");
|
|
5254
5212
|
var import_util12 = require("@dxos/util");
|
|
@@ -5267,7 +5225,7 @@ var WorkerSession = class {
|
|
|
5267
5225
|
constructor({ serviceHost, systemPort, appPort, shellPort, readySignal }) {
|
|
5268
5226
|
this._startTrigger = new import_async21.Trigger();
|
|
5269
5227
|
this.onClose = new import_util12.Callback();
|
|
5270
|
-
(0,
|
|
5228
|
+
(0, import_invariant16.invariant)(serviceHost, void 0, {
|
|
5271
5229
|
F: __dxlog_file21,
|
|
5272
5230
|
L: 49,
|
|
5273
5231
|
S: this,
|