@dxos/client-services 0.1.58-main.88606fb → 0.1.58-main.9626f9e
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-RVATIMN6.mjs → chunk-WQTWAJOX.mjs} +73 -69
- package/dist/lib/browser/chunk-WQTWAJOX.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 +3 -3
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +108 -104
- 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 +114 -110
- 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 +3 -3
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.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.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts +5 -5
- package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -34
- package/src/packlets/invitations/invitation-extension.ts +2 -1
- package/src/packlets/invitations/invitations-handler.ts +8 -7
- package/src/packlets/invitations/invitations-service.ts +5 -5
- package/src/packlets/services/service-context.ts +2 -2
- package/src/packlets/spaces/data-space.ts +1 -1
- package/src/packlets/spaces/spaces-service.ts +3 -2
- package/src/packlets/storage/storage.ts +1 -1
- package/src/packlets/testing/invitation-utils.ts +9 -9
- package/src/packlets/vault/iframe-proxy-runtime.ts +1 -1
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-RVATIMN6.mjs.map +0 -7
|
@@ -1158,24 +1158,26 @@ var DeviceInvitationProtocol = class {
|
|
|
1158
1158
|
|
|
1159
1159
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1160
1160
|
import { PushStream, scheduleTask as scheduleTask2, TimeoutError, Trigger as Trigger3 } from "@dxos/async";
|
|
1161
|
-
import {
|
|
1161
|
+
import { AuthenticatingInvitationObservable, AUTHENTICATION_CODE_LENGTH, CancellableInvitationObservable, INVITATION_TIMEOUT } from "@dxos/client-protocol";
|
|
1162
1162
|
import { Context as Context5 } from "@dxos/context";
|
|
1163
1163
|
import { generatePasscode } from "@dxos/credentials";
|
|
1164
|
+
import { InvalidInvitationExtensionRoleError as InvalidInvitationExtensionRoleError2 } from "@dxos/errors";
|
|
1164
1165
|
import { invariant as invariant6 } from "@dxos/invariant";
|
|
1165
1166
|
import { PublicKey as PublicKey5 } from "@dxos/keys";
|
|
1166
1167
|
import { log as log5 } from "@dxos/log";
|
|
1167
1168
|
import { createTeleportProtocolFactory, StarTopology } from "@dxos/network-manager";
|
|
1168
|
-
import {
|
|
1169
|
+
import { trace as trace4 } from "@dxos/protocols";
|
|
1169
1170
|
import { Invitation as Invitation3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
1170
1171
|
import { AuthenticationResponse as AuthenticationResponse2 } from "@dxos/protocols/proto/dxos/halo/invitations";
|
|
1171
1172
|
|
|
1172
1173
|
// packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts
|
|
1173
1174
|
import { Trigger as Trigger2 } from "@dxos/async";
|
|
1174
1175
|
import { cancelWithContext, Context as Context4 } from "@dxos/context";
|
|
1176
|
+
import { InvalidInvitationExtensionRoleError } from "@dxos/errors";
|
|
1175
1177
|
import { invariant as invariant5 } from "@dxos/invariant";
|
|
1176
1178
|
import { PublicKey as PublicKey4 } from "@dxos/keys";
|
|
1177
1179
|
import { log as log4 } from "@dxos/log";
|
|
1178
|
-
import {
|
|
1180
|
+
import { schema as schema2, trace as trace3 } from "@dxos/protocols";
|
|
1179
1181
|
import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
1180
1182
|
import { AuthenticationResponse, Options } from "@dxos/protocols/proto/dxos/halo/invitations";
|
|
1181
1183
|
import { RpcExtension } from "@dxos/teleport";
|
|
@@ -1209,7 +1211,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1209
1211
|
options: async (options) => {
|
|
1210
1212
|
invariant5(!this._remoteOptions, "Remote options already set.", {
|
|
1211
1213
|
F: __dxlog_file6,
|
|
1212
|
-
L:
|
|
1214
|
+
L: 88,
|
|
1213
1215
|
S: this,
|
|
1214
1216
|
A: [
|
|
1215
1217
|
"!this._remoteOptions",
|
|
@@ -1226,7 +1228,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1226
1228
|
id: traceId
|
|
1227
1229
|
}), {
|
|
1228
1230
|
F: __dxlog_file6,
|
|
1229
|
-
L:
|
|
1231
|
+
L: 97,
|
|
1230
1232
|
S: this,
|
|
1231
1233
|
C: (f, a) => f(...a)
|
|
1232
1234
|
});
|
|
@@ -1236,7 +1238,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1236
1238
|
invitationId
|
|
1237
1239
|
}, {
|
|
1238
1240
|
F: __dxlog_file6,
|
|
1239
|
-
L:
|
|
1241
|
+
L: 101,
|
|
1240
1242
|
S: this,
|
|
1241
1243
|
C: (f, a) => f(...a)
|
|
1242
1244
|
});
|
|
@@ -1250,7 +1252,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1250
1252
|
guestProfile: profile
|
|
1251
1253
|
}, {
|
|
1252
1254
|
F: __dxlog_file6,
|
|
1253
|
-
L:
|
|
1255
|
+
L: 110,
|
|
1254
1256
|
S: this,
|
|
1255
1257
|
C: (f, a) => f(...a)
|
|
1256
1258
|
});
|
|
@@ -1263,7 +1265,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1263
1265
|
id: traceId
|
|
1264
1266
|
}), {
|
|
1265
1267
|
F: __dxlog_file6,
|
|
1266
|
-
L:
|
|
1268
|
+
L: 117,
|
|
1267
1269
|
S: this,
|
|
1268
1270
|
C: (f, a) => f(...a)
|
|
1269
1271
|
});
|
|
@@ -1278,7 +1280,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1278
1280
|
id: traceId
|
|
1279
1281
|
}), {
|
|
1280
1282
|
F: __dxlog_file6,
|
|
1281
|
-
L:
|
|
1283
|
+
L: 126,
|
|
1282
1284
|
S: this,
|
|
1283
1285
|
C: (f, a) => f(...a)
|
|
1284
1286
|
});
|
|
@@ -1286,14 +1288,14 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1286
1288
|
authCode: code
|
|
1287
1289
|
}, {
|
|
1288
1290
|
F: __dxlog_file6,
|
|
1289
|
-
L:
|
|
1291
|
+
L: 127,
|
|
1290
1292
|
S: this,
|
|
1291
1293
|
C: (f, a) => f(...a)
|
|
1292
1294
|
});
|
|
1293
1295
|
let status = AuthenticationResponse.Status.OK;
|
|
1294
1296
|
invariant5(this.invitation, "Invitation is not set.", {
|
|
1295
1297
|
F: __dxlog_file6,
|
|
1296
|
-
L:
|
|
1298
|
+
L: 130,
|
|
1297
1299
|
S: this,
|
|
1298
1300
|
A: [
|
|
1299
1301
|
"this.invitation",
|
|
@@ -1304,7 +1306,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1304
1306
|
case Invitation2.AuthMethod.NONE: {
|
|
1305
1307
|
log4("authentication not required", void 0, {
|
|
1306
1308
|
F: __dxlog_file6,
|
|
1307
|
-
L:
|
|
1309
|
+
L: 133,
|
|
1308
1310
|
S: this,
|
|
1309
1311
|
C: (f, a) => f(...a)
|
|
1310
1312
|
});
|
|
@@ -1329,7 +1331,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1329
1331
|
authMethod: this.invitation.authMethod
|
|
1330
1332
|
}, {
|
|
1331
1333
|
F: __dxlog_file6,
|
|
1332
|
-
L:
|
|
1334
|
+
L: 151,
|
|
1333
1335
|
S: this,
|
|
1334
1336
|
C: (f, a) => f(...a)
|
|
1335
1337
|
});
|
|
@@ -1344,7 +1346,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1344
1346
|
}
|
|
1345
1347
|
}), {
|
|
1346
1348
|
F: __dxlog_file6,
|
|
1347
|
-
L:
|
|
1349
|
+
L: 157,
|
|
1348
1350
|
S: this,
|
|
1349
1351
|
C: (f, a) => f(...a)
|
|
1350
1352
|
});
|
|
@@ -1358,14 +1360,14 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1358
1360
|
id: traceId
|
|
1359
1361
|
}), {
|
|
1360
1362
|
F: __dxlog_file6,
|
|
1361
|
-
L:
|
|
1363
|
+
L: 163,
|
|
1362
1364
|
S: this,
|
|
1363
1365
|
C: (f, a) => f(...a)
|
|
1364
1366
|
});
|
|
1365
1367
|
try {
|
|
1366
1368
|
invariant5(this.invitation, "Invitation is not set.", {
|
|
1367
1369
|
F: __dxlog_file6,
|
|
1368
|
-
L:
|
|
1370
|
+
L: 166,
|
|
1369
1371
|
S: this,
|
|
1370
1372
|
A: [
|
|
1371
1373
|
"this.invitation",
|
|
@@ -1380,7 +1382,7 @@ var InvitationHostExtension = class extends RpcExtension {
|
|
|
1380
1382
|
id: traceId
|
|
1381
1383
|
}), {
|
|
1382
1384
|
F: __dxlog_file6,
|
|
1383
|
-
L:
|
|
1385
|
+
L: 174,
|
|
1384
1386
|
S: this,
|
|
1385
1387
|
C: (f, a) => f(...a)
|
|
1386
1388
|
});
|
|
@@ -1437,7 +1439,7 @@ var InvitationGuestExtension = class extends RpcExtension {
|
|
|
1437
1439
|
options: async (options) => {
|
|
1438
1440
|
invariant5(!this._remoteOptions, "Remote options already set.", {
|
|
1439
1441
|
F: __dxlog_file6,
|
|
1440
|
-
L:
|
|
1442
|
+
L: 241,
|
|
1441
1443
|
S: this,
|
|
1442
1444
|
A: [
|
|
1443
1445
|
"!this._remoteOptions",
|
|
@@ -1464,7 +1466,7 @@ var InvitationGuestExtension = class extends RpcExtension {
|
|
|
1464
1466
|
try {
|
|
1465
1467
|
log4("begin options", void 0, {
|
|
1466
1468
|
F: __dxlog_file6,
|
|
1467
|
-
L:
|
|
1469
|
+
L: 262,
|
|
1468
1470
|
S: this,
|
|
1469
1471
|
C: (f, a) => f(...a)
|
|
1470
1472
|
});
|
|
@@ -1476,7 +1478,7 @@ var InvitationGuestExtension = class extends RpcExtension {
|
|
|
1476
1478
|
}));
|
|
1477
1479
|
log4("end options", void 0, {
|
|
1478
1480
|
F: __dxlog_file6,
|
|
1479
|
-
L:
|
|
1481
|
+
L: 265,
|
|
1480
1482
|
S: this,
|
|
1481
1483
|
C: (f, a) => f(...a)
|
|
1482
1484
|
});
|
|
@@ -1490,7 +1492,7 @@ var InvitationGuestExtension = class extends RpcExtension {
|
|
|
1490
1492
|
} catch (err) {
|
|
1491
1493
|
log4("openError", err, {
|
|
1492
1494
|
F: __dxlog_file6,
|
|
1493
|
-
L:
|
|
1495
|
+
L: 275,
|
|
1494
1496
|
S: this,
|
|
1495
1497
|
C: (f, a) => f(...a)
|
|
1496
1498
|
});
|
|
@@ -1500,7 +1502,7 @@ var InvitationGuestExtension = class extends RpcExtension {
|
|
|
1500
1502
|
async onClose() {
|
|
1501
1503
|
log4("onClose", void 0, {
|
|
1502
1504
|
F: __dxlog_file6,
|
|
1503
|
-
L:
|
|
1505
|
+
L: 281,
|
|
1504
1506
|
S: this,
|
|
1505
1507
|
C: (f, a) => f(...a)
|
|
1506
1508
|
});
|
|
@@ -1523,7 +1525,7 @@ var InvitationsHandler = class {
|
|
|
1523
1525
|
const authCode = options?.authCode ?? (authMethod === Invitation3.AuthMethod.SHARED_SECRET ? generatePasscode(AUTHENTICATION_CODE_LENGTH) : void 0);
|
|
1524
1526
|
invariant6(protocol, void 0, {
|
|
1525
1527
|
F: __dxlog_file7,
|
|
1526
|
-
L:
|
|
1528
|
+
L: 76,
|
|
1527
1529
|
S: this,
|
|
1528
1530
|
A: [
|
|
1529
1531
|
"protocol",
|
|
@@ -1552,7 +1554,7 @@ var InvitationsHandler = class {
|
|
|
1552
1554
|
...protocol.toJSON()
|
|
1553
1555
|
}, {
|
|
1554
1556
|
F: __dxlog_file7,
|
|
1555
|
-
L:
|
|
1557
|
+
L: 98,
|
|
1556
1558
|
S: this,
|
|
1557
1559
|
C: (f, a) => f(...a)
|
|
1558
1560
|
});
|
|
@@ -1577,7 +1579,7 @@ var InvitationsHandler = class {
|
|
|
1577
1579
|
const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
|
|
1578
1580
|
invariant6(deviceKey, void 0, {
|
|
1579
1581
|
F: __dxlog_file7,
|
|
1580
|
-
L:
|
|
1582
|
+
L: 119,
|
|
1581
1583
|
S: this,
|
|
1582
1584
|
A: [
|
|
1583
1585
|
"deviceKey",
|
|
@@ -1600,7 +1602,7 @@ var InvitationsHandler = class {
|
|
|
1600
1602
|
id: traceId
|
|
1601
1603
|
}), {
|
|
1602
1604
|
F: __dxlog_file7,
|
|
1603
|
-
L:
|
|
1605
|
+
L: 137,
|
|
1604
1606
|
S: this,
|
|
1605
1607
|
C: (f, a) => f(...a)
|
|
1606
1608
|
});
|
|
@@ -1608,7 +1610,7 @@ var InvitationsHandler = class {
|
|
|
1608
1610
|
...protocol.toJSON()
|
|
1609
1611
|
}, {
|
|
1610
1612
|
F: __dxlog_file7,
|
|
1611
|
-
L:
|
|
1613
|
+
L: 138,
|
|
1612
1614
|
S: this,
|
|
1613
1615
|
C: (f, a) => f(...a)
|
|
1614
1616
|
});
|
|
@@ -1624,7 +1626,7 @@ var InvitationsHandler = class {
|
|
|
1624
1626
|
...protocol.toJSON()
|
|
1625
1627
|
}, {
|
|
1626
1628
|
F: __dxlog_file7,
|
|
1627
|
-
L:
|
|
1629
|
+
L: 141,
|
|
1628
1630
|
S: this,
|
|
1629
1631
|
C: (f, a) => f(...a)
|
|
1630
1632
|
});
|
|
@@ -1636,7 +1638,7 @@ var InvitationsHandler = class {
|
|
|
1636
1638
|
id: traceId
|
|
1637
1639
|
}), {
|
|
1638
1640
|
F: __dxlog_file7,
|
|
1639
|
-
L:
|
|
1641
|
+
L: 143,
|
|
1640
1642
|
S: this,
|
|
1641
1643
|
C: (f, a) => f(...a)
|
|
1642
1644
|
});
|
|
@@ -1646,7 +1648,7 @@ var InvitationsHandler = class {
|
|
|
1646
1648
|
...protocol.toJSON()
|
|
1647
1649
|
}, {
|
|
1648
1650
|
F: __dxlog_file7,
|
|
1649
|
-
L:
|
|
1651
|
+
L: 146,
|
|
1650
1652
|
S: this,
|
|
1651
1653
|
C: (f, a) => f(...a)
|
|
1652
1654
|
});
|
|
@@ -1657,7 +1659,7 @@ var InvitationsHandler = class {
|
|
|
1657
1659
|
} else {
|
|
1658
1660
|
log5.error("failed", err, {
|
|
1659
1661
|
F: __dxlog_file7,
|
|
1660
|
-
L:
|
|
1662
|
+
L: 149,
|
|
1661
1663
|
S: this,
|
|
1662
1664
|
C: (f, a) => f(...a)
|
|
1663
1665
|
});
|
|
@@ -1668,7 +1670,7 @@ var InvitationsHandler = class {
|
|
|
1668
1670
|
error: err
|
|
1669
1671
|
}), {
|
|
1670
1672
|
F: __dxlog_file7,
|
|
1671
|
-
L:
|
|
1673
|
+
L: 152,
|
|
1672
1674
|
S: this,
|
|
1673
1675
|
C: (f, a) => f(...a)
|
|
1674
1676
|
});
|
|
@@ -1689,7 +1691,7 @@ var InvitationsHandler = class {
|
|
|
1689
1691
|
...protocol.toJSON()
|
|
1690
1692
|
}, {
|
|
1691
1693
|
F: __dxlog_file7,
|
|
1692
|
-
L:
|
|
1694
|
+
L: 167,
|
|
1693
1695
|
S: this,
|
|
1694
1696
|
C: (f, a) => f(...a)
|
|
1695
1697
|
});
|
|
@@ -1700,7 +1702,7 @@ var InvitationsHandler = class {
|
|
|
1700
1702
|
} else {
|
|
1701
1703
|
log5.error("failed", err, {
|
|
1702
1704
|
F: __dxlog_file7,
|
|
1703
|
-
L:
|
|
1705
|
+
L: 170,
|
|
1704
1706
|
S: this,
|
|
1705
1707
|
C: (f, a) => f(...a)
|
|
1706
1708
|
});
|
|
@@ -1728,7 +1730,7 @@ var InvitationsHandler = class {
|
|
|
1728
1730
|
state: Invitation3.State.CONNECTING
|
|
1729
1731
|
});
|
|
1730
1732
|
});
|
|
1731
|
-
const observable = new
|
|
1733
|
+
const observable = new CancellableInvitationObservable({
|
|
1732
1734
|
initialInvitation: invitation,
|
|
1733
1735
|
subscriber: stream.observable,
|
|
1734
1736
|
onCancel: async () => {
|
|
@@ -1745,7 +1747,7 @@ var InvitationsHandler = class {
|
|
|
1745
1747
|
const { timeout = INVITATION_TIMEOUT } = invitation;
|
|
1746
1748
|
invariant6(protocol, void 0, {
|
|
1747
1749
|
F: __dxlog_file7,
|
|
1748
|
-
L:
|
|
1750
|
+
L: 211,
|
|
1749
1751
|
S: this,
|
|
1750
1752
|
A: [
|
|
1751
1753
|
"protocol",
|
|
@@ -1759,7 +1761,7 @@ var InvitationsHandler = class {
|
|
|
1759
1761
|
const setState = (newData) => {
|
|
1760
1762
|
invariant6(newData.state !== void 0, void 0, {
|
|
1761
1763
|
F: __dxlog_file7,
|
|
1762
|
-
L:
|
|
1764
|
+
L: 222,
|
|
1763
1765
|
S: this,
|
|
1764
1766
|
A: [
|
|
1765
1767
|
"newData.state !== undefined",
|
|
@@ -1779,7 +1781,7 @@ var InvitationsHandler = class {
|
|
|
1779
1781
|
...protocol.toJSON()
|
|
1780
1782
|
}, {
|
|
1781
1783
|
F: __dxlog_file7,
|
|
1782
|
-
L:
|
|
1784
|
+
L: 230,
|
|
1783
1785
|
S: this,
|
|
1784
1786
|
C: (f, a) => f(...a)
|
|
1785
1787
|
});
|
|
@@ -1789,7 +1791,7 @@ var InvitationsHandler = class {
|
|
|
1789
1791
|
} else {
|
|
1790
1792
|
log5.warn("auth failed", err, {
|
|
1791
1793
|
F: __dxlog_file7,
|
|
1792
|
-
L:
|
|
1794
|
+
L: 233,
|
|
1793
1795
|
S: this,
|
|
1794
1796
|
C: (f, a) => f(...a)
|
|
1795
1797
|
});
|
|
@@ -1803,7 +1805,7 @@ var InvitationsHandler = class {
|
|
|
1803
1805
|
...protocol.toJSON()
|
|
1804
1806
|
}, {
|
|
1805
1807
|
F: __dxlog_file7,
|
|
1806
|
-
L:
|
|
1808
|
+
L: 241,
|
|
1807
1809
|
S: this,
|
|
1808
1810
|
C: (f, a) => f(...a)
|
|
1809
1811
|
});
|
|
@@ -1818,7 +1820,7 @@ var InvitationsHandler = class {
|
|
|
1818
1820
|
currentState
|
|
1819
1821
|
}, {
|
|
1820
1822
|
F: __dxlog_file7,
|
|
1821
|
-
L:
|
|
1823
|
+
L: 251,
|
|
1822
1824
|
S: this,
|
|
1823
1825
|
C: (f, a) => f(...a)
|
|
1824
1826
|
});
|
|
@@ -1833,7 +1835,7 @@ var InvitationsHandler = class {
|
|
|
1833
1835
|
id: traceId
|
|
1834
1836
|
}), {
|
|
1835
1837
|
F: __dxlog_file7,
|
|
1836
|
-
L:
|
|
1838
|
+
L: 260,
|
|
1837
1839
|
S: this,
|
|
1838
1840
|
C: (f, a) => f(...a)
|
|
1839
1841
|
});
|
|
@@ -1845,7 +1847,7 @@ var InvitationsHandler = class {
|
|
|
1845
1847
|
...protocol.toJSON()
|
|
1846
1848
|
}, {
|
|
1847
1849
|
F: __dxlog_file7,
|
|
1848
|
-
L:
|
|
1850
|
+
L: 268,
|
|
1849
1851
|
S: this,
|
|
1850
1852
|
C: (f, a) => f(...a)
|
|
1851
1853
|
});
|
|
@@ -1856,7 +1858,7 @@ var InvitationsHandler = class {
|
|
|
1856
1858
|
...protocol.toJSON()
|
|
1857
1859
|
}, {
|
|
1858
1860
|
F: __dxlog_file7,
|
|
1859
|
-
L:
|
|
1861
|
+
L: 272,
|
|
1860
1862
|
S: this,
|
|
1861
1863
|
C: (f, a) => f(...a)
|
|
1862
1864
|
});
|
|
@@ -1866,7 +1868,7 @@ var InvitationsHandler = class {
|
|
|
1866
1868
|
response: introductionResponse
|
|
1867
1869
|
}, {
|
|
1868
1870
|
F: __dxlog_file7,
|
|
1869
|
-
L:
|
|
1871
|
+
L: 276,
|
|
1870
1872
|
S: this,
|
|
1871
1873
|
C: (f, a) => f(...a)
|
|
1872
1874
|
});
|
|
@@ -1878,7 +1880,7 @@ var InvitationsHandler = class {
|
|
|
1878
1880
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1879
1881
|
log5("guest waiting for authentication code...", void 0, {
|
|
1880
1882
|
F: __dxlog_file7,
|
|
1881
|
-
L:
|
|
1883
|
+
L: 285,
|
|
1882
1884
|
S: this,
|
|
1883
1885
|
C: (f, a) => f(...a)
|
|
1884
1886
|
});
|
|
@@ -1890,7 +1892,7 @@ var InvitationsHandler = class {
|
|
|
1890
1892
|
});
|
|
1891
1893
|
log5("sending authentication request", void 0, {
|
|
1892
1894
|
F: __dxlog_file7,
|
|
1893
|
-
L:
|
|
1895
|
+
L: 289,
|
|
1894
1896
|
S: this,
|
|
1895
1897
|
C: (f, a) => f(...a)
|
|
1896
1898
|
});
|
|
@@ -1911,7 +1913,7 @@ var InvitationsHandler = class {
|
|
|
1911
1913
|
attempt
|
|
1912
1914
|
}, {
|
|
1913
1915
|
F: __dxlog_file7,
|
|
1914
|
-
L:
|
|
1916
|
+
L: 300,
|
|
1915
1917
|
S: this,
|
|
1916
1918
|
C: (f, a) => f(...a)
|
|
1917
1919
|
});
|
|
@@ -1928,7 +1930,7 @@ var InvitationsHandler = class {
|
|
|
1928
1930
|
...protocol.toJSON()
|
|
1929
1931
|
}, {
|
|
1930
1932
|
F: __dxlog_file7,
|
|
1931
|
-
L:
|
|
1933
|
+
L: 311,
|
|
1932
1934
|
S: this,
|
|
1933
1935
|
C: (f, a) => f(...a)
|
|
1934
1936
|
});
|
|
@@ -1940,7 +1942,7 @@ var InvitationsHandler = class {
|
|
|
1940
1942
|
...protocol.toJSON()
|
|
1941
1943
|
}, {
|
|
1942
1944
|
F: __dxlog_file7,
|
|
1943
|
-
L:
|
|
1945
|
+
L: 322,
|
|
1944
1946
|
S: this,
|
|
1945
1947
|
C: (f, a) => f(...a)
|
|
1946
1948
|
});
|
|
@@ -1952,7 +1954,7 @@ var InvitationsHandler = class {
|
|
|
1952
1954
|
id: traceId
|
|
1953
1955
|
}), {
|
|
1954
1956
|
F: __dxlog_file7,
|
|
1955
|
-
L:
|
|
1957
|
+
L: 324,
|
|
1956
1958
|
S: this,
|
|
1957
1959
|
C: (f, a) => f(...a)
|
|
1958
1960
|
});
|
|
@@ -1962,7 +1964,7 @@ var InvitationsHandler = class {
|
|
|
1962
1964
|
...protocol.toJSON()
|
|
1963
1965
|
}, {
|
|
1964
1966
|
F: __dxlog_file7,
|
|
1965
|
-
L:
|
|
1967
|
+
L: 327,
|
|
1966
1968
|
S: this,
|
|
1967
1969
|
C: (f, a) => f(...a)
|
|
1968
1970
|
});
|
|
@@ -1972,7 +1974,7 @@ var InvitationsHandler = class {
|
|
|
1972
1974
|
} else {
|
|
1973
1975
|
log5("auth failed", err, {
|
|
1974
1976
|
F: __dxlog_file7,
|
|
1975
|
-
L:
|
|
1977
|
+
L: 330,
|
|
1976
1978
|
S: this,
|
|
1977
1979
|
C: (f, a) => f(...a)
|
|
1978
1980
|
});
|
|
@@ -1983,7 +1985,7 @@ var InvitationsHandler = class {
|
|
|
1983
1985
|
error: err
|
|
1984
1986
|
}), {
|
|
1985
1987
|
F: __dxlog_file7,
|
|
1986
|
-
L:
|
|
1988
|
+
L: 333,
|
|
1987
1989
|
S: this,
|
|
1988
1990
|
C: (f, a) => f(...a)
|
|
1989
1991
|
});
|
|
@@ -2001,7 +2003,7 @@ var InvitationsHandler = class {
|
|
|
2001
2003
|
...protocol.toJSON()
|
|
2002
2004
|
}, {
|
|
2003
2005
|
F: __dxlog_file7,
|
|
2004
|
-
L:
|
|
2006
|
+
L: 344,
|
|
2005
2007
|
S: this,
|
|
2006
2008
|
C: (f, a) => f(...a)
|
|
2007
2009
|
});
|
|
@@ -2011,7 +2013,7 @@ var InvitationsHandler = class {
|
|
|
2011
2013
|
} else {
|
|
2012
2014
|
log5("auth failed", err, {
|
|
2013
2015
|
F: __dxlog_file7,
|
|
2014
|
-
L:
|
|
2016
|
+
L: 347,
|
|
2015
2017
|
S: this,
|
|
2016
2018
|
C: (f, a) => f(...a)
|
|
2017
2019
|
});
|
|
@@ -2024,7 +2026,7 @@ var InvitationsHandler = class {
|
|
|
2024
2026
|
scheduleTask2(ctx, async () => {
|
|
2025
2027
|
invariant6(invitation.swarmKey, void 0, {
|
|
2026
2028
|
F: __dxlog_file7,
|
|
2027
|
-
L:
|
|
2029
|
+
L: 357,
|
|
2028
2030
|
S: this,
|
|
2029
2031
|
A: [
|
|
2030
2032
|
"invitation.swarmKey",
|
|
@@ -2046,7 +2048,7 @@ var InvitationsHandler = class {
|
|
|
2046
2048
|
state: Invitation3.State.CONNECTING
|
|
2047
2049
|
});
|
|
2048
2050
|
});
|
|
2049
|
-
const observable = new
|
|
2051
|
+
const observable = new AuthenticatingInvitationObservable({
|
|
2050
2052
|
initialInvitation: invitation,
|
|
2051
2053
|
subscriber: stream.observable,
|
|
2052
2054
|
onCancel: async () => {
|
|
@@ -2471,7 +2473,7 @@ import { STORAGE_VERSION } from "@dxos/protocols";
|
|
|
2471
2473
|
import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
2472
2474
|
|
|
2473
2475
|
// packages/sdk/client-services/src/version.ts
|
|
2474
|
-
var DXOS_VERSION = "0.1.58-main.
|
|
2476
|
+
var DXOS_VERSION = "0.1.58-main.9626f9e";
|
|
2475
2477
|
|
|
2476
2478
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
2477
2479
|
var getPlatform = () => {
|
|
@@ -2625,9 +2627,9 @@ import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
|
|
|
2625
2627
|
import { cancelWithContext as cancelWithContext2, Context as Context7 } from "@dxos/context";
|
|
2626
2628
|
import { timed } from "@dxos/debug";
|
|
2627
2629
|
import { createMappedFeedWriter } from "@dxos/echo-pipeline";
|
|
2630
|
+
import { CancelledError, SystemError } from "@dxos/errors";
|
|
2628
2631
|
import { PublicKey as PublicKey7 } from "@dxos/keys";
|
|
2629
2632
|
import { log as log10 } from "@dxos/log";
|
|
2630
|
-
import { CancelledError, SystemError } from "@dxos/protocols";
|
|
2631
2633
|
import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
|
|
2632
2634
|
import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
2633
2635
|
import { Timeframe as Timeframe2 } from "@dxos/timeframe";
|
|
@@ -3682,9 +3684,11 @@ DataSpaceManager = _ts_decorate4([
|
|
|
3682
3684
|
import { EventSubscriptions as EventSubscriptions2, UpdateScheduler, scheduleTask as scheduleTask5 } from "@dxos/async";
|
|
3683
3685
|
import { Stream as Stream10 } from "@dxos/codec-protobuf";
|
|
3684
3686
|
import { raise as raise2 } from "@dxos/debug";
|
|
3687
|
+
import { SpaceNotFoundError } from "@dxos/echo-pipeline";
|
|
3688
|
+
import { ApiError } from "@dxos/errors";
|
|
3685
3689
|
import { invariant as invariant12 } from "@dxos/invariant";
|
|
3686
3690
|
import { log as log12 } from "@dxos/log";
|
|
3687
|
-
import {
|
|
3691
|
+
import { encodeError } from "@dxos/protocols";
|
|
3688
3692
|
import { SpaceMember as SpaceMember3, SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
3689
3693
|
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3690
3694
|
var SpacesServiceImpl = class {
|
|
@@ -3727,7 +3731,7 @@ var SpacesServiceImpl = class {
|
|
|
3727
3731
|
spaces
|
|
3728
3732
|
}, {
|
|
3729
3733
|
F: __dxlog_file14,
|
|
3730
|
-
L:
|
|
3734
|
+
L: 79,
|
|
3731
3735
|
S: this,
|
|
3732
3736
|
C: (f, a) => f(...a)
|
|
3733
3737
|
});
|
|
@@ -3813,7 +3817,7 @@ var SpacesServiceImpl = class {
|
|
|
3813
3817
|
} else {
|
|
3814
3818
|
invariant12(!credential.id, "Id on unsigned credentials is not allowed", {
|
|
3815
3819
|
F: __dxlog_file14,
|
|
3816
|
-
L:
|
|
3820
|
+
L: 169,
|
|
3817
3821
|
S: this,
|
|
3818
3822
|
A: [
|
|
3819
3823
|
"!credential.id",
|
|
@@ -3822,7 +3826,7 @@ var SpacesServiceImpl = class {
|
|
|
3822
3826
|
});
|
|
3823
3827
|
invariant12(this._identityManager.identity, "Identity is not available", {
|
|
3824
3828
|
F: __dxlog_file14,
|
|
3825
|
-
L:
|
|
3829
|
+
L: 170,
|
|
3826
3830
|
S: this,
|
|
3827
3831
|
A: [
|
|
3828
3832
|
"this._identityManager.identity",
|
|
@@ -3832,7 +3836,7 @@ var SpacesServiceImpl = class {
|
|
|
3832
3836
|
const signer = this._identityManager.identity.getIdentityCredentialSigner();
|
|
3833
3837
|
invariant12(credential.issuer.equals(signer.getIssuer()), void 0, {
|
|
3834
3838
|
F: __dxlog_file14,
|
|
3835
|
-
L:
|
|
3839
|
+
L: 172,
|
|
3836
3840
|
S: this,
|
|
3837
3841
|
A: [
|
|
3838
3842
|
"credential.issuer.equals(signer.getIssuer())",
|
|
@@ -3910,7 +3914,7 @@ import { invariant as invariant13 } from "@dxos/invariant";
|
|
|
3910
3914
|
import { Keyring } from "@dxos/keyring";
|
|
3911
3915
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
3912
3916
|
import { log as log13 } from "@dxos/log";
|
|
3913
|
-
import {
|
|
3917
|
+
import { STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
|
|
3914
3918
|
import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
|
|
3915
3919
|
import { BlobStore } from "@dxos/teleport-extension-object-sync";
|
|
3916
3920
|
import { trace as Trace2 } from "@dxos/tracing";
|
|
@@ -4053,7 +4057,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4053
4057
|
async _checkStorageVersion() {
|
|
4054
4058
|
await this.metadataStore.load();
|
|
4055
4059
|
if (this.metadataStore.version !== STORAGE_VERSION2) {
|
|
4056
|
-
throw new
|
|
4060
|
+
throw new Error(`Invalid storage version: current=${this.metadataStore.version}, expected=${STORAGE_VERSION2}`);
|
|
4057
4061
|
}
|
|
4058
4062
|
}
|
|
4059
4063
|
// Called when identity is created.
|
|
@@ -4287,7 +4291,7 @@ var isLocked = (lockPath) => {
|
|
|
4287
4291
|
|
|
4288
4292
|
// packages/sdk/client-services/src/packlets/storage/storage.ts
|
|
4289
4293
|
import { DX_DATA } from "@dxos/client-protocol";
|
|
4290
|
-
import { InvalidConfigError } from "@dxos/
|
|
4294
|
+
import { InvalidConfigError } from "@dxos/errors";
|
|
4291
4295
|
import { Runtime } from "@dxos/protocols/proto/dxos/config";
|
|
4292
4296
|
import { createStorage, StorageType } from "@dxos/random-access-storage";
|
|
4293
4297
|
import { isNode } from "@dxos/util";
|
|
@@ -5005,4 +5009,4 @@ export {
|
|
|
5005
5009
|
createDefaultModelFactory,
|
|
5006
5010
|
ClientServicesHost
|
|
5007
5011
|
};
|
|
5008
|
-
//# sourceMappingURL=chunk-
|
|
5012
|
+
//# sourceMappingURL=chunk-WQTWAJOX.mjs.map
|