@dxos/client-services 0.7.4 → 0.7.5-main.9cb18ac
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-423GRVVV.mjs → chunk-2VSGKKFD.mjs} +103 -89
- package/dist/lib/browser/chunk-2VSGKKFD.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-ZS24HRVA.cjs → chunk-B64P5OCZ.cjs} +106 -92
- package/dist/lib/node/chunk-B64P5OCZ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +47 -47
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +8 -8
- package/dist/lib/node-esm/{chunk-OQOXRHWF.mjs → chunk-C3BNCKWT.mjs} +103 -89
- package/dist/lib/node-esm/chunk-C3BNCKWT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts +3 -0
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +38 -38
- package/src/packlets/services/service-context.ts +3 -1
- package/src/packlets/spaces/edge-feed-replicator.ts +11 -5
- package/src/packlets/spaces/notarization-plugin.ts +32 -17
- package/src/version.ts +1 -5
- package/dist/lib/browser/chunk-423GRVVV.mjs.map +0 -7
- package/dist/lib/node/chunk-ZS24HRVA.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-OQOXRHWF.mjs.map +0 -7
|
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
397
397
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
398
398
|
|
|
399
399
|
// packages/sdk/client-services/src/version.ts
|
|
400
|
-
var DXOS_VERSION = "0.7.
|
|
400
|
+
var DXOS_VERSION = "0.7.5-main.9cb18ac";
|
|
401
401
|
|
|
402
402
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -1036,21 +1036,20 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1036
1036
|
});
|
|
1037
1037
|
return;
|
|
1038
1038
|
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
});
|
|
1039
|
+
if (message.type === "data") {
|
|
1040
|
+
log4.info("sending blocks", {
|
|
1041
|
+
feedKey: message.feedKey,
|
|
1042
|
+
blocks: message.blocks.map((b) => b.index)
|
|
1043
|
+
}, {
|
|
1044
|
+
F: __dxlog_file6,
|
|
1045
|
+
L: 151,
|
|
1046
|
+
S: this,
|
|
1047
|
+
C: (f, a) => f(...a)
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1051
1050
|
invariant2(message.feedKey, void 0, {
|
|
1052
1051
|
F: __dxlog_file6,
|
|
1053
|
-
L:
|
|
1052
|
+
L: 157,
|
|
1054
1053
|
S: this,
|
|
1055
1054
|
A: [
|
|
1056
1055
|
"message.feedKey",
|
|
@@ -1062,7 +1061,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1062
1061
|
type: message.type
|
|
1063
1062
|
}, {
|
|
1064
1063
|
F: __dxlog_file6,
|
|
1065
|
-
L:
|
|
1064
|
+
L: 160,
|
|
1066
1065
|
S: this,
|
|
1067
1066
|
C: (f, a) => f(...a)
|
|
1068
1067
|
});
|
|
@@ -1081,7 +1080,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1081
1080
|
if (!this._connectionCtx) {
|
|
1082
1081
|
log4.warn("received message after connection context was disposed", void 0, {
|
|
1083
1082
|
F: __dxlog_file6,
|
|
1084
|
-
L:
|
|
1083
|
+
L: 175,
|
|
1085
1084
|
S: this,
|
|
1086
1085
|
C: (f, a) => f(...a)
|
|
1087
1086
|
});
|
|
@@ -1092,14 +1091,6 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1092
1091
|
case "metadata": {
|
|
1093
1092
|
try {
|
|
1094
1093
|
var _usingCtx = _using_ctx();
|
|
1095
|
-
log4.info("received metadata", {
|
|
1096
|
-
message
|
|
1097
|
-
}, {
|
|
1098
|
-
F: __dxlog_file6,
|
|
1099
|
-
L: 178,
|
|
1100
|
-
S: this,
|
|
1101
|
-
C: (f, a) => f(...a)
|
|
1102
|
-
});
|
|
1103
1094
|
const feedKey = PublicKey3.fromHex(message.feedKey);
|
|
1104
1095
|
const feed = this._feeds.get(feedKey);
|
|
1105
1096
|
if (!feed) {
|
|
@@ -1107,7 +1098,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1107
1098
|
feedKey
|
|
1108
1099
|
}, {
|
|
1109
1100
|
F: __dxlog_file6,
|
|
1110
|
-
L:
|
|
1101
|
+
L: 184,
|
|
1111
1102
|
S: this,
|
|
1112
1103
|
C: (f, a) => f(...a)
|
|
1113
1104
|
});
|
|
@@ -1115,7 +1106,18 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1115
1106
|
}
|
|
1116
1107
|
const _guard = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
|
|
1117
1108
|
this._remoteLength.set(feedKey, message.length);
|
|
1109
|
+
const logMeta = {
|
|
1110
|
+
localLength: feed.length,
|
|
1111
|
+
remoteLength: message.length,
|
|
1112
|
+
feedKey
|
|
1113
|
+
};
|
|
1118
1114
|
if (message.length > feed.length) {
|
|
1115
|
+
log4.info("requesting missing blocks", logMeta, {
|
|
1116
|
+
F: __dxlog_file6,
|
|
1117
|
+
L: 194,
|
|
1118
|
+
S: this,
|
|
1119
|
+
C: (f, a) => f(...a)
|
|
1120
|
+
});
|
|
1119
1121
|
await this._sendMessage({
|
|
1120
1122
|
type: "request",
|
|
1121
1123
|
feedKey: feedKey.toHex(),
|
|
@@ -1125,6 +1127,12 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1125
1127
|
}
|
|
1126
1128
|
});
|
|
1127
1129
|
} else if (message.length < feed.length) {
|
|
1130
|
+
log4.info("pushing blocks to remote", logMeta, {
|
|
1131
|
+
F: __dxlog_file6,
|
|
1132
|
+
L: 202,
|
|
1133
|
+
S: this,
|
|
1134
|
+
C: (f, a) => f(...a)
|
|
1135
|
+
});
|
|
1128
1136
|
await this._pushBlocks(feed, message.length, feed.length);
|
|
1129
1137
|
}
|
|
1130
1138
|
break;
|
|
@@ -1140,7 +1148,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1140
1148
|
blocks: message.blocks.map((b) => b.index)
|
|
1141
1149
|
}, {
|
|
1142
1150
|
F: __dxlog_file6,
|
|
1143
|
-
L:
|
|
1151
|
+
L: 211,
|
|
1144
1152
|
S: this,
|
|
1145
1153
|
C: (f, a) => f(...a)
|
|
1146
1154
|
});
|
|
@@ -1151,7 +1159,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1151
1159
|
feedKey
|
|
1152
1160
|
}, {
|
|
1153
1161
|
F: __dxlog_file6,
|
|
1154
|
-
L:
|
|
1162
|
+
L: 216,
|
|
1155
1163
|
S: this,
|
|
1156
1164
|
C: (f, a) => f(...a)
|
|
1157
1165
|
});
|
|
@@ -1165,7 +1173,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1165
1173
|
...message
|
|
1166
1174
|
}, {
|
|
1167
1175
|
F: __dxlog_file6,
|
|
1168
|
-
L:
|
|
1176
|
+
L: 225,
|
|
1169
1177
|
S: this,
|
|
1170
1178
|
C: (f, a) => f(...a)
|
|
1171
1179
|
});
|
|
@@ -1180,7 +1188,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1180
1188
|
to
|
|
1181
1189
|
}, {
|
|
1182
1190
|
F: __dxlog_file6,
|
|
1183
|
-
L:
|
|
1191
|
+
L: 232,
|
|
1184
1192
|
S: this,
|
|
1185
1193
|
C: (f, a) => f(...a)
|
|
1186
1194
|
});
|
|
@@ -1190,7 +1198,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1190
1198
|
});
|
|
1191
1199
|
invariant2(data instanceof Uint8Array, void 0, {
|
|
1192
1200
|
F: __dxlog_file6,
|
|
1193
|
-
L:
|
|
1201
|
+
L: 237,
|
|
1194
1202
|
S: this,
|
|
1195
1203
|
A: [
|
|
1196
1204
|
"data instanceof Uint8Array",
|
|
@@ -1218,7 +1226,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1218
1226
|
blocks: blocks.length
|
|
1219
1227
|
}, {
|
|
1220
1228
|
F: __dxlog_file6,
|
|
1221
|
-
L:
|
|
1229
|
+
L: 258,
|
|
1222
1230
|
S: this,
|
|
1223
1231
|
C: (f, a) => f(...a)
|
|
1224
1232
|
});
|
|
@@ -1240,7 +1248,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1240
1248
|
if (!this._remoteLength.has(feed.key)) {
|
|
1241
1249
|
log4("blocks not pushed because remote length is unknown", void 0, {
|
|
1242
1250
|
F: __dxlog_file6,
|
|
1243
|
-
L:
|
|
1251
|
+
L: 279,
|
|
1244
1252
|
S: this,
|
|
1245
1253
|
C: (f, a) => f(...a)
|
|
1246
1254
|
});
|
|
@@ -1265,7 +1273,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1265
1273
|
if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
|
|
1266
1274
|
log4("resetting on reconnect", void 0, {
|
|
1267
1275
|
F: __dxlog_file6,
|
|
1268
|
-
L:
|
|
1276
|
+
L: 296,
|
|
1269
1277
|
S: this,
|
|
1270
1278
|
C: (f, a) => f(...a)
|
|
1271
1279
|
});
|
|
@@ -1276,7 +1284,7 @@ var EdgeFeedReplicator = class extends Resource {
|
|
|
1276
1284
|
}
|
|
1277
1285
|
}, {
|
|
1278
1286
|
F: __dxlog_file6,
|
|
1279
|
-
L:
|
|
1287
|
+
L: 290
|
|
1280
1288
|
});
|
|
1281
1289
|
return connectionCtx;
|
|
1282
1290
|
}
|
|
@@ -1443,6 +1451,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1443
1451
|
this._processedCredentials = new ComplexSet(PublicKey4.hash);
|
|
1444
1452
|
this._processCredentialsTriggers = new ComplexMap3(PublicKey4.hash);
|
|
1445
1453
|
this._activeEdgePollingIntervalHandle = void 0;
|
|
1454
|
+
this._activeEdgePollingEnabled = false;
|
|
1446
1455
|
this._spaceId = params.spaceId;
|
|
1447
1456
|
this._activeEdgePollingInterval = params.activeEdgePollingInterval ?? DEFAULT_ACTIVE_EDGE_POLLING_INTERVAL;
|
|
1448
1457
|
if (params.edgeClient && params.edgeFeatures?.feedReplicator) {
|
|
@@ -1450,15 +1459,6 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1450
1459
|
}
|
|
1451
1460
|
}
|
|
1452
1461
|
setActiveEdgePollingEnabled(enabled) {
|
|
1453
|
-
invariant4(this.isOpen, void 0, {
|
|
1454
|
-
F: __dxlog_file8,
|
|
1455
|
-
L: 109,
|
|
1456
|
-
S: this,
|
|
1457
|
-
A: [
|
|
1458
|
-
"this.isOpen",
|
|
1459
|
-
""
|
|
1460
|
-
]
|
|
1461
|
-
});
|
|
1462
1462
|
const client = this._edgeClient;
|
|
1463
1463
|
invariant4(client, void 0, {
|
|
1464
1464
|
F: __dxlog_file8,
|
|
@@ -1469,30 +1469,30 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1469
1469
|
""
|
|
1470
1470
|
]
|
|
1471
1471
|
});
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
clearInterval(this._activeEdgePollingIntervalHandle);
|
|
1480
|
-
this._activeEdgePollingIntervalHandle = void 0;
|
|
1472
|
+
this._activeEdgePollingEnabled = enabled;
|
|
1473
|
+
if (this.isOpen) {
|
|
1474
|
+
if (enabled && !this._activeEdgePollingIntervalHandle) {
|
|
1475
|
+
this._startPeriodicEdgePolling(client);
|
|
1476
|
+
} else if (!enabled && this._activeEdgePollingIntervalHandle) {
|
|
1477
|
+
this._stopPeriodicEdgePolling();
|
|
1478
|
+
}
|
|
1481
1479
|
}
|
|
1482
1480
|
}
|
|
1483
1481
|
get hasWriter() {
|
|
1484
1482
|
return !!this._writer;
|
|
1485
1483
|
}
|
|
1486
1484
|
async _open() {
|
|
1487
|
-
if (this._edgeClient
|
|
1488
|
-
|
|
1485
|
+
if (this._edgeClient) {
|
|
1486
|
+
if (this._activeEdgePollingEnabled) {
|
|
1487
|
+
this._startPeriodicEdgePolling(this._edgeClient);
|
|
1488
|
+
}
|
|
1489
|
+
if (this._writer) {
|
|
1490
|
+
this._notarizePendingEdgeCredentials(this._edgeClient, this._writer);
|
|
1491
|
+
}
|
|
1489
1492
|
}
|
|
1490
1493
|
}
|
|
1491
1494
|
async _close() {
|
|
1492
|
-
|
|
1493
|
-
clearInterval(this._activeEdgePollingIntervalHandle);
|
|
1494
|
-
this._activeEdgePollingIntervalHandle = void 0;
|
|
1495
|
-
}
|
|
1495
|
+
this._stopPeriodicEdgePolling();
|
|
1496
1496
|
await this._ctx.dispose();
|
|
1497
1497
|
}
|
|
1498
1498
|
/**
|
|
@@ -1670,10 +1670,23 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1670
1670
|
]
|
|
1671
1671
|
});
|
|
1672
1672
|
this._writer = writer;
|
|
1673
|
-
if (this._edgeClient) {
|
|
1673
|
+
if (this._edgeClient && this.isOpen) {
|
|
1674
1674
|
this._notarizePendingEdgeCredentials(this._edgeClient, writer);
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
|
+
_startPeriodicEdgePolling(client) {
|
|
1678
|
+
this._activeEdgePollingIntervalHandle = setInterval(() => {
|
|
1679
|
+
if (this._writer) {
|
|
1680
|
+
this._notarizePendingEdgeCredentials(client, this._writer);
|
|
1681
|
+
}
|
|
1682
|
+
}, this._activeEdgePollingInterval);
|
|
1683
|
+
}
|
|
1684
|
+
_stopPeriodicEdgePolling() {
|
|
1685
|
+
if (this._activeEdgePollingIntervalHandle) {
|
|
1686
|
+
clearInterval(this._activeEdgePollingIntervalHandle);
|
|
1687
|
+
this._activeEdgePollingIntervalHandle = void 0;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1677
1690
|
/**
|
|
1678
1691
|
* The method is used only for adding agent feeds to spaces.
|
|
1679
1692
|
* When an agent is created we can admit them into all the existing spaces. In case the operation fails
|
|
@@ -1692,7 +1705,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1692
1705
|
if (!credentials.length) {
|
|
1693
1706
|
log5("edge did not return credentials for notarization", void 0, {
|
|
1694
1707
|
F: __dxlog_file8,
|
|
1695
|
-
L:
|
|
1708
|
+
L: 311,
|
|
1696
1709
|
S: this,
|
|
1697
1710
|
C: (f, a) => f(...a)
|
|
1698
1711
|
});
|
|
@@ -1702,7 +1715,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1702
1715
|
count: credentials.length
|
|
1703
1716
|
}, {
|
|
1704
1717
|
F: __dxlog_file8,
|
|
1705
|
-
L:
|
|
1718
|
+
L: 315,
|
|
1706
1719
|
S: this,
|
|
1707
1720
|
C: (f, a) => f(...a)
|
|
1708
1721
|
});
|
|
@@ -1715,7 +1728,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1715
1728
|
count: decodedCredentials.length
|
|
1716
1729
|
}, {
|
|
1717
1730
|
F: __dxlog_file8,
|
|
1718
|
-
L:
|
|
1731
|
+
L: 324,
|
|
1719
1732
|
S: this,
|
|
1720
1733
|
C: (f, a) => f(...a)
|
|
1721
1734
|
});
|
|
@@ -1743,7 +1756,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1743
1756
|
for (const credential of credentials) {
|
|
1744
1757
|
invariant4(credential.id, "Credential must have an id", {
|
|
1745
1758
|
F: __dxlog_file8,
|
|
1746
|
-
L:
|
|
1759
|
+
L: 350,
|
|
1747
1760
|
S: this,
|
|
1748
1761
|
A: [
|
|
1749
1762
|
"credential.id",
|
|
@@ -1767,7 +1780,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1767
1780
|
peer: extension.localPeerId
|
|
1768
1781
|
}, {
|
|
1769
1782
|
F: __dxlog_file8,
|
|
1770
|
-
L:
|
|
1783
|
+
L: 365,
|
|
1771
1784
|
S: this,
|
|
1772
1785
|
C: (f, a) => f(...a)
|
|
1773
1786
|
});
|
|
@@ -1779,7 +1792,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1779
1792
|
peer: extension.localPeerId
|
|
1780
1793
|
}, {
|
|
1781
1794
|
F: __dxlog_file8,
|
|
1782
|
-
L:
|
|
1795
|
+
L: 370,
|
|
1783
1796
|
S: this,
|
|
1784
1797
|
C: (f, a) => f(...a)
|
|
1785
1798
|
});
|
|
@@ -1796,7 +1809,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1796
1809
|
peers: Array.from(this._extensions).map((extension) => extension.remotePeerId)
|
|
1797
1810
|
}, {
|
|
1798
1811
|
F: __dxlog_file8,
|
|
1799
|
-
L:
|
|
1812
|
+
L: 382,
|
|
1800
1813
|
S: this,
|
|
1801
1814
|
C: (f, a) => f(...a)
|
|
1802
1815
|
});
|
|
@@ -1812,7 +1825,7 @@ var handleEdgeError = (error) => {
|
|
|
1812
1825
|
if (!(error instanceof EdgeCallFailedError) || error.errorData) {
|
|
1813
1826
|
log5.catch(error, void 0, {
|
|
1814
1827
|
F: __dxlog_file8,
|
|
1815
|
-
L:
|
|
1828
|
+
L: 396,
|
|
1816
1829
|
S: void 0,
|
|
1817
1830
|
C: (f, a) => f(...a)
|
|
1818
1831
|
});
|
|
@@ -1821,7 +1834,7 @@ var handleEdgeError = (error) => {
|
|
|
1821
1834
|
reason: error.reason
|
|
1822
1835
|
}, {
|
|
1823
1836
|
F: __dxlog_file8,
|
|
1824
|
-
L:
|
|
1837
|
+
L: 398,
|
|
1825
1838
|
S: void 0,
|
|
1826
1839
|
C: (f, a) => f(...a)
|
|
1827
1840
|
});
|
|
@@ -7622,7 +7635,8 @@ var ServiceContext = class extends Resource7 {
|
|
|
7622
7635
|
this.recoveryManager = new EdgeIdentityRecoveryManager(this.keyring, this._edgeHttpClient, () => this.identityManager.identity, this._acceptIdentity.bind(this));
|
|
7623
7636
|
this.echoHost = new EchoHost({
|
|
7624
7637
|
kv: this.level,
|
|
7625
|
-
peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex()
|
|
7638
|
+
peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex(),
|
|
7639
|
+
getSpaceKeyByRootDocumentId: (documentId) => this.spaceManager.findSpaceByRootDocumentId(documentId)?.key
|
|
7626
7640
|
});
|
|
7627
7641
|
this._meshReplicator = new MeshEchoReplicator();
|
|
7628
7642
|
this.invitations = new InvitationsHandler(this.networkManager, this._edgeHttpClient, _runtimeParams?.invitationConnectionDefaultParams);
|
|
@@ -7641,7 +7655,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7641
7655
|
await this._checkStorageVersion();
|
|
7642
7656
|
log24("opening...", void 0, {
|
|
7643
7657
|
F: __dxlog_file28,
|
|
7644
|
-
L:
|
|
7658
|
+
L: 199,
|
|
7645
7659
|
S: this,
|
|
7646
7660
|
C: (f, a) => f(...a)
|
|
7647
7661
|
});
|
|
@@ -7649,7 +7663,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7649
7663
|
id: this._instanceId
|
|
7650
7664
|
}), {
|
|
7651
7665
|
F: __dxlog_file28,
|
|
7652
|
-
L:
|
|
7666
|
+
L: 200,
|
|
7653
7667
|
S: this,
|
|
7654
7668
|
C: (f, a) => f(...a)
|
|
7655
7669
|
});
|
|
@@ -7676,7 +7690,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7676
7690
|
count: loadedInvitations.invitations?.length
|
|
7677
7691
|
}, {
|
|
7678
7692
|
F: __dxlog_file28,
|
|
7679
|
-
L:
|
|
7693
|
+
L: 228,
|
|
7680
7694
|
S: this,
|
|
7681
7695
|
C: (f, a) => f(...a)
|
|
7682
7696
|
});
|
|
@@ -7684,13 +7698,13 @@ var ServiceContext = class extends Resource7 {
|
|
|
7684
7698
|
id: this._instanceId
|
|
7685
7699
|
}), {
|
|
7686
7700
|
F: __dxlog_file28,
|
|
7687
|
-
L:
|
|
7701
|
+
L: 230,
|
|
7688
7702
|
S: this,
|
|
7689
7703
|
C: (f, a) => f(...a)
|
|
7690
7704
|
});
|
|
7691
7705
|
log24("opened", void 0, {
|
|
7692
7706
|
F: __dxlog_file28,
|
|
7693
|
-
L:
|
|
7707
|
+
L: 231,
|
|
7694
7708
|
S: this,
|
|
7695
7709
|
C: (f, a) => f(...a)
|
|
7696
7710
|
});
|
|
@@ -7698,7 +7712,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7698
7712
|
async _close(ctx) {
|
|
7699
7713
|
log24("closing...", void 0, {
|
|
7700
7714
|
F: __dxlog_file28,
|
|
7701
|
-
L:
|
|
7715
|
+
L: 235,
|
|
7702
7716
|
S: this,
|
|
7703
7717
|
C: (f, a) => f(...a)
|
|
7704
7718
|
});
|
|
@@ -7717,7 +7731,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7717
7731
|
await this._edgeConnection?.close();
|
|
7718
7732
|
log24("closed", void 0, {
|
|
7719
7733
|
F: __dxlog_file28,
|
|
7720
|
-
L:
|
|
7734
|
+
L: 251,
|
|
7721
7735
|
S: this,
|
|
7722
7736
|
C: (f, a) => f(...a)
|
|
7723
7737
|
});
|
|
@@ -7728,7 +7742,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7728
7742
|
await identity.joinNetwork();
|
|
7729
7743
|
await this._initialize(new Context9(void 0, {
|
|
7730
7744
|
F: __dxlog_file28,
|
|
7731
|
-
L:
|
|
7745
|
+
L: 258
|
|
7732
7746
|
}));
|
|
7733
7747
|
return identity;
|
|
7734
7748
|
}
|
|
@@ -7739,7 +7753,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7739
7753
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
7740
7754
|
invariant20(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
7741
7755
|
F: __dxlog_file28,
|
|
7742
|
-
L:
|
|
7756
|
+
L: 267,
|
|
7743
7757
|
S: this,
|
|
7744
7758
|
A: [
|
|
7745
7759
|
"factory",
|
|
@@ -7765,7 +7779,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7765
7779
|
await this.identityManager.acceptIdentity(identity, identityRecord, params.deviceProfile);
|
|
7766
7780
|
await this._initialize(new Context9(void 0, {
|
|
7767
7781
|
F: __dxlog_file28,
|
|
7768
|
-
L:
|
|
7782
|
+
L: 286
|
|
7769
7783
|
}));
|
|
7770
7784
|
return identity;
|
|
7771
7785
|
}
|
|
@@ -7779,7 +7793,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7779
7793
|
async _initialize(ctx) {
|
|
7780
7794
|
log24("initializing spaces...", void 0, {
|
|
7781
7795
|
F: __dxlog_file28,
|
|
7782
|
-
L:
|
|
7796
|
+
L: 301,
|
|
7783
7797
|
S: this,
|
|
7784
7798
|
C: (f, a) => f(...a)
|
|
7785
7799
|
});
|
|
@@ -7818,7 +7832,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7818
7832
|
this._handlerFactories.set(Invitation10.Kind.SPACE, (invitation) => {
|
|
7819
7833
|
invariant20(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
7820
7834
|
F: __dxlog_file28,
|
|
7821
|
-
L:
|
|
7835
|
+
L: 339,
|
|
7822
7836
|
S: this,
|
|
7823
7837
|
A: [
|
|
7824
7838
|
"this.dataSpaceManager",
|
|
@@ -7842,7 +7856,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7842
7856
|
details: assertion
|
|
7843
7857
|
}, {
|
|
7844
7858
|
F: __dxlog_file28,
|
|
7845
|
-
L:
|
|
7859
|
+
L: 355,
|
|
7846
7860
|
S: this,
|
|
7847
7861
|
C: (f, a) => f(...a)
|
|
7848
7862
|
});
|
|
@@ -7853,7 +7867,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7853
7867
|
details: assertion
|
|
7854
7868
|
}, {
|
|
7855
7869
|
F: __dxlog_file28,
|
|
7856
|
-
L:
|
|
7870
|
+
L: 359,
|
|
7857
7871
|
S: this,
|
|
7858
7872
|
C: (f, a) => f(...a)
|
|
7859
7873
|
});
|
|
@@ -7864,7 +7878,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7864
7878
|
details: assertion
|
|
7865
7879
|
}, {
|
|
7866
7880
|
F: __dxlog_file28,
|
|
7867
|
-
L:
|
|
7881
|
+
L: 364,
|
|
7868
7882
|
S: this,
|
|
7869
7883
|
C: (f, a) => f(...a)
|
|
7870
7884
|
});
|
|
@@ -7875,7 +7889,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7875
7889
|
} catch (err) {
|
|
7876
7890
|
log24.catch(err, void 0, {
|
|
7877
7891
|
F: __dxlog_file28,
|
|
7878
|
-
L:
|
|
7892
|
+
L: 370,
|
|
7879
7893
|
S: this,
|
|
7880
7894
|
C: (f, a) => f(...a)
|
|
7881
7895
|
});
|
|
@@ -7891,12 +7905,12 @@ var ServiceContext = class extends Resource7 {
|
|
|
7891
7905
|
let edgeIdentity;
|
|
7892
7906
|
const identity = this.identityManager.identity;
|
|
7893
7907
|
if (identity) {
|
|
7894
|
-
log24
|
|
7908
|
+
log24("setting identity on edge connection", {
|
|
7895
7909
|
identity: identity.identityKey.toHex(),
|
|
7896
7910
|
swarms: this.networkManager.topics
|
|
7897
7911
|
}, {
|
|
7898
7912
|
F: __dxlog_file28,
|
|
7899
|
-
L:
|
|
7913
|
+
L: 384,
|
|
7900
7914
|
S: this,
|
|
7901
7915
|
C: (f, a) => f(...a)
|
|
7902
7916
|
});
|
|
@@ -7910,7 +7924,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7910
7924
|
});
|
|
7911
7925
|
invariant20(identity.deviceCredentialChain, void 0, {
|
|
7912
7926
|
F: __dxlog_file28,
|
|
7913
|
-
L:
|
|
7927
|
+
L: 403,
|
|
7914
7928
|
S: this,
|
|
7915
7929
|
A: [
|
|
7916
7930
|
"identity.deviceCredentialChain",
|
|
@@ -9053,4 +9067,4 @@ export {
|
|
|
9053
9067
|
importProfileData,
|
|
9054
9068
|
ClientServicesHost
|
|
9055
9069
|
};
|
|
9056
|
-
//# sourceMappingURL=chunk-
|
|
9070
|
+
//# sourceMappingURL=chunk-2VSGKKFD.mjs.map
|