@dxos/client-services 0.7.4 → 0.7.5-main.9d26e3a
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-27A4ATQX.mjs} +45 -37
- package/dist/lib/browser/chunk-27A4ATQX.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-7FKXMJDD.cjs} +48 -40
- package/dist/lib/node/chunk-7FKXMJDD.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-HGN7FHFK.mjs} +45 -37
- package/dist/lib/node-esm/chunk-HGN7FHFK.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/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 +2 -1
- package/src/packlets/spaces/edge-feed-replicator.ts +11 -5
- 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
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
InvitationsManager,
|
|
7
7
|
ServiceContext,
|
|
8
8
|
SpaceInvitationProtocol
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-27A4ATQX.mjs";
|
|
10
10
|
|
|
11
11
|
// packages/sdk/client-services/src/packlets/testing/credential-utils.ts
|
|
12
12
|
import { createCredential } from "@dxos/credentials";
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_7FKXMJDD_exports = {};
|
|
30
|
+
__export(chunk_7FKXMJDD_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
DataSpace: () => DataSpace,
|
|
@@ -72,7 +72,7 @@ __export(chunk_ZS24HRVA_exports, {
|
|
|
72
72
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
73
73
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
74
74
|
});
|
|
75
|
-
module.exports = __toCommonJS(
|
|
75
|
+
module.exports = __toCommonJS(chunk_7FKXMJDD_exports);
|
|
76
76
|
var import_async = require("@dxos/async");
|
|
77
77
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
78
78
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -735,7 +735,7 @@ var DevtoolsServiceImpl = class {
|
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
};
|
|
738
|
-
var DXOS_VERSION = "0.7.
|
|
738
|
+
var DXOS_VERSION = "0.7.5-main.9d26e3a";
|
|
739
739
|
var getPlatform = () => {
|
|
740
740
|
if (process.browser) {
|
|
741
741
|
if (typeof window !== "undefined") {
|
|
@@ -1256,21 +1256,20 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1256
1256
|
});
|
|
1257
1257
|
return;
|
|
1258
1258
|
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
});
|
|
1259
|
+
if (message.type === "data") {
|
|
1260
|
+
import_log3.log.info("sending blocks", {
|
|
1261
|
+
feedKey: message.feedKey,
|
|
1262
|
+
blocks: message.blocks.map((b) => b.index)
|
|
1263
|
+
}, {
|
|
1264
|
+
F: __dxlog_file5,
|
|
1265
|
+
L: 151,
|
|
1266
|
+
S: this,
|
|
1267
|
+
C: (f, a) => f(...a)
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1271
1270
|
(0, import_invariant2.invariant)(message.feedKey, void 0, {
|
|
1272
1271
|
F: __dxlog_file5,
|
|
1273
|
-
L:
|
|
1272
|
+
L: 157,
|
|
1274
1273
|
S: this,
|
|
1275
1274
|
A: [
|
|
1276
1275
|
"message.feedKey",
|
|
@@ -1282,7 +1281,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1282
1281
|
type: message.type
|
|
1283
1282
|
}, {
|
|
1284
1283
|
F: __dxlog_file5,
|
|
1285
|
-
L:
|
|
1284
|
+
L: 160,
|
|
1286
1285
|
S: this,
|
|
1287
1286
|
C: (f, a) => f(...a)
|
|
1288
1287
|
});
|
|
@@ -1301,7 +1300,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1301
1300
|
if (!this._connectionCtx) {
|
|
1302
1301
|
import_log3.log.warn("received message after connection context was disposed", void 0, {
|
|
1303
1302
|
F: __dxlog_file5,
|
|
1304
|
-
L:
|
|
1303
|
+
L: 175,
|
|
1305
1304
|
S: this,
|
|
1306
1305
|
C: (f, a) => f(...a)
|
|
1307
1306
|
});
|
|
@@ -1312,14 +1311,6 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1312
1311
|
case "metadata": {
|
|
1313
1312
|
try {
|
|
1314
1313
|
var _usingCtx = _using_ctx();
|
|
1315
|
-
import_log3.log.info("received metadata", {
|
|
1316
|
-
message
|
|
1317
|
-
}, {
|
|
1318
|
-
F: __dxlog_file5,
|
|
1319
|
-
L: 178,
|
|
1320
|
-
S: this,
|
|
1321
|
-
C: (f, a) => f(...a)
|
|
1322
|
-
});
|
|
1323
1314
|
const feedKey = import_keys3.PublicKey.fromHex(message.feedKey);
|
|
1324
1315
|
const feed = this._feeds.get(feedKey);
|
|
1325
1316
|
if (!feed) {
|
|
@@ -1327,7 +1318,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1327
1318
|
feedKey
|
|
1328
1319
|
}, {
|
|
1329
1320
|
F: __dxlog_file5,
|
|
1330
|
-
L:
|
|
1321
|
+
L: 184,
|
|
1331
1322
|
S: this,
|
|
1332
1323
|
C: (f, a) => f(...a)
|
|
1333
1324
|
});
|
|
@@ -1335,7 +1326,18 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1335
1326
|
}
|
|
1336
1327
|
const _guard = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
|
|
1337
1328
|
this._remoteLength.set(feedKey, message.length);
|
|
1329
|
+
const logMeta = {
|
|
1330
|
+
localLength: feed.length,
|
|
1331
|
+
remoteLength: message.length,
|
|
1332
|
+
feedKey
|
|
1333
|
+
};
|
|
1338
1334
|
if (message.length > feed.length) {
|
|
1335
|
+
import_log3.log.info("requesting missing blocks", logMeta, {
|
|
1336
|
+
F: __dxlog_file5,
|
|
1337
|
+
L: 194,
|
|
1338
|
+
S: this,
|
|
1339
|
+
C: (f, a) => f(...a)
|
|
1340
|
+
});
|
|
1339
1341
|
await this._sendMessage({
|
|
1340
1342
|
type: "request",
|
|
1341
1343
|
feedKey: feedKey.toHex(),
|
|
@@ -1345,6 +1347,12 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1345
1347
|
}
|
|
1346
1348
|
});
|
|
1347
1349
|
} else if (message.length < feed.length) {
|
|
1350
|
+
import_log3.log.info("pushing blocks to remote", logMeta, {
|
|
1351
|
+
F: __dxlog_file5,
|
|
1352
|
+
L: 202,
|
|
1353
|
+
S: this,
|
|
1354
|
+
C: (f, a) => f(...a)
|
|
1355
|
+
});
|
|
1348
1356
|
await this._pushBlocks(feed, message.length, feed.length);
|
|
1349
1357
|
}
|
|
1350
1358
|
break;
|
|
@@ -1360,7 +1368,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1360
1368
|
blocks: message.blocks.map((b) => b.index)
|
|
1361
1369
|
}, {
|
|
1362
1370
|
F: __dxlog_file5,
|
|
1363
|
-
L:
|
|
1371
|
+
L: 211,
|
|
1364
1372
|
S: this,
|
|
1365
1373
|
C: (f, a) => f(...a)
|
|
1366
1374
|
});
|
|
@@ -1371,7 +1379,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1371
1379
|
feedKey
|
|
1372
1380
|
}, {
|
|
1373
1381
|
F: __dxlog_file5,
|
|
1374
|
-
L:
|
|
1382
|
+
L: 216,
|
|
1375
1383
|
S: this,
|
|
1376
1384
|
C: (f, a) => f(...a)
|
|
1377
1385
|
});
|
|
@@ -1385,7 +1393,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1385
1393
|
...message
|
|
1386
1394
|
}, {
|
|
1387
1395
|
F: __dxlog_file5,
|
|
1388
|
-
L:
|
|
1396
|
+
L: 225,
|
|
1389
1397
|
S: this,
|
|
1390
1398
|
C: (f, a) => f(...a)
|
|
1391
1399
|
});
|
|
@@ -1400,7 +1408,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1400
1408
|
to
|
|
1401
1409
|
}, {
|
|
1402
1410
|
F: __dxlog_file5,
|
|
1403
|
-
L:
|
|
1411
|
+
L: 232,
|
|
1404
1412
|
S: this,
|
|
1405
1413
|
C: (f, a) => f(...a)
|
|
1406
1414
|
});
|
|
@@ -1410,7 +1418,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1410
1418
|
});
|
|
1411
1419
|
(0, import_invariant2.invariant)(data instanceof Uint8Array, void 0, {
|
|
1412
1420
|
F: __dxlog_file5,
|
|
1413
|
-
L:
|
|
1421
|
+
L: 237,
|
|
1414
1422
|
S: this,
|
|
1415
1423
|
A: [
|
|
1416
1424
|
"data instanceof Uint8Array",
|
|
@@ -1438,7 +1446,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1438
1446
|
blocks: blocks.length
|
|
1439
1447
|
}, {
|
|
1440
1448
|
F: __dxlog_file5,
|
|
1441
|
-
L:
|
|
1449
|
+
L: 258,
|
|
1442
1450
|
S: this,
|
|
1443
1451
|
C: (f, a) => f(...a)
|
|
1444
1452
|
});
|
|
@@ -1460,7 +1468,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1460
1468
|
if (!this._remoteLength.has(feed.key)) {
|
|
1461
1469
|
(0, import_log3.log)("blocks not pushed because remote length is unknown", void 0, {
|
|
1462
1470
|
F: __dxlog_file5,
|
|
1463
|
-
L:
|
|
1471
|
+
L: 279,
|
|
1464
1472
|
S: this,
|
|
1465
1473
|
C: (f, a) => f(...a)
|
|
1466
1474
|
});
|
|
@@ -1485,7 +1493,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1485
1493
|
if (err instanceof import_edge_client.EdgeIdentityChangedError || err instanceof import_edge_client.EdgeConnectionClosedError) {
|
|
1486
1494
|
(0, import_log3.log)("resetting on reconnect", void 0, {
|
|
1487
1495
|
F: __dxlog_file5,
|
|
1488
|
-
L:
|
|
1496
|
+
L: 296,
|
|
1489
1497
|
S: this,
|
|
1490
1498
|
C: (f, a) => f(...a)
|
|
1491
1499
|
});
|
|
@@ -1496,7 +1504,7 @@ var EdgeFeedReplicator = class extends import_context3.Resource {
|
|
|
1496
1504
|
}
|
|
1497
1505
|
}, {
|
|
1498
1506
|
F: __dxlog_file5,
|
|
1499
|
-
L:
|
|
1507
|
+
L: 290
|
|
1500
1508
|
});
|
|
1501
1509
|
return connectionCtx;
|
|
1502
1510
|
}
|
|
@@ -7759,7 +7767,7 @@ var ServiceContext = class extends import_context16.Resource {
|
|
|
7759
7767
|
let edgeIdentity;
|
|
7760
7768
|
const identity = this.identityManager.identity;
|
|
7761
7769
|
if (identity) {
|
|
7762
|
-
import_log22.log
|
|
7770
|
+
(0, import_log22.log)("setting identity on edge connection", {
|
|
7763
7771
|
identity: identity.identityKey.toHex(),
|
|
7764
7772
|
swarms: this.networkManager.topics
|
|
7765
7773
|
}, {
|
|
@@ -7778,7 +7786,7 @@ var ServiceContext = class extends import_context16.Resource {
|
|
|
7778
7786
|
});
|
|
7779
7787
|
(0, import_invariant21.invariant)(identity.deviceCredentialChain, void 0, {
|
|
7780
7788
|
F: __dxlog_file27,
|
|
7781
|
-
L:
|
|
7789
|
+
L: 402,
|
|
7782
7790
|
S: this,
|
|
7783
7791
|
A: [
|
|
7784
7792
|
"identity.deviceCredentialChain",
|
|
@@ -8850,4 +8858,4 @@ ClientServicesHost = _ts_decorate11([
|
|
|
8850
8858
|
subscribeToSpaces,
|
|
8851
8859
|
subscribeToSwarmInfo
|
|
8852
8860
|
});
|
|
8853
|
-
//# sourceMappingURL=chunk-
|
|
8861
|
+
//# sourceMappingURL=chunk-7FKXMJDD.cjs.map
|