@dxos/client-services 0.1.48 → 0.1.49-next.55d8a92
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-KN2NX2RP.mjs → chunk-KMQOZOUZ.mjs} +12 -12
- package/dist/lib/browser/chunk-KMQOZOUZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +18 -5
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +11 -11
- 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 +28 -15
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +10 -3
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/packlets/devtools/feeds.ts +1 -1
- package/src/packlets/services/service-host.ts +1 -0
- package/src/packlets/spaces/data-space-manager.test.ts +43 -0
- package/src/packlets/testing/test-builder.ts +23 -4
- package/dist/lib/browser/chunk-KN2NX2RP.mjs.map +0 -7
|
@@ -151,7 +151,7 @@ var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
|
|
|
151
151
|
feeds: Array.from(feedMap.values()).map((feed) => ({
|
|
152
152
|
feedKey: feed.key,
|
|
153
153
|
length: feed.properties.length,
|
|
154
|
-
|
|
154
|
+
bytes: feed.core.byteLength
|
|
155
155
|
}))
|
|
156
156
|
});
|
|
157
157
|
};
|
|
@@ -4190,7 +4190,7 @@ var ClientServicesHost = class {
|
|
|
4190
4190
|
id: traceId
|
|
4191
4191
|
}), {
|
|
4192
4192
|
file: "service-host.ts",
|
|
4193
|
-
line:
|
|
4193
|
+
line: 187,
|
|
4194
4194
|
scope: this,
|
|
4195
4195
|
callSite: (f, a) => f(...a)
|
|
4196
4196
|
});
|
|
@@ -4203,7 +4203,7 @@ var ClientServicesHost = class {
|
|
|
4203
4203
|
lockKey: (_a = this._resourceLock) == null ? void 0 : _a.lockKey
|
|
4204
4204
|
}, {
|
|
4205
4205
|
file: "service-host.ts",
|
|
4206
|
-
line:
|
|
4206
|
+
line: 195,
|
|
4207
4207
|
scope: this,
|
|
4208
4208
|
callSite: (f, a) => f(...a)
|
|
4209
4209
|
});
|
|
@@ -4238,7 +4238,7 @@ var ClientServicesHost = class {
|
|
|
4238
4238
|
deviceKey
|
|
4239
4239
|
}, {
|
|
4240
4240
|
file: "service-host.ts",
|
|
4241
|
-
line:
|
|
4241
|
+
line: 250,
|
|
4242
4242
|
scope: this,
|
|
4243
4243
|
callSite: (f, a) => f(...a)
|
|
4244
4244
|
});
|
|
@@ -4246,7 +4246,7 @@ var ClientServicesHost = class {
|
|
|
4246
4246
|
id: traceId
|
|
4247
4247
|
}), {
|
|
4248
4248
|
file: "service-host.ts",
|
|
4249
|
-
line:
|
|
4249
|
+
line: 251,
|
|
4250
4250
|
scope: this,
|
|
4251
4251
|
callSite: (f, a) => f(...a)
|
|
4252
4252
|
});
|
|
@@ -4261,7 +4261,7 @@ var ClientServicesHost = class {
|
|
|
4261
4261
|
deviceKey
|
|
4262
4262
|
}, {
|
|
4263
4263
|
file: "service-host.ts",
|
|
4264
|
-
line:
|
|
4264
|
+
line: 260,
|
|
4265
4265
|
scope: this,
|
|
4266
4266
|
callSite: (f, a) => f(...a)
|
|
4267
4267
|
});
|
|
@@ -4276,7 +4276,7 @@ var ClientServicesHost = class {
|
|
|
4276
4276
|
deviceKey
|
|
4277
4277
|
}, {
|
|
4278
4278
|
file: "service-host.ts",
|
|
4279
|
-
line:
|
|
4279
|
+
line: 266,
|
|
4280
4280
|
scope: this,
|
|
4281
4281
|
callSite: (f, a) => f(...a)
|
|
4282
4282
|
});
|
|
@@ -4288,13 +4288,13 @@ var ClientServicesHost = class {
|
|
|
4288
4288
|
id: traceId
|
|
4289
4289
|
}), {
|
|
4290
4290
|
file: "service-host.ts",
|
|
4291
|
-
line:
|
|
4291
|
+
line: 271,
|
|
4292
4292
|
scope: this,
|
|
4293
4293
|
callSite: (f, a) => f(...a)
|
|
4294
4294
|
});
|
|
4295
4295
|
(0, import_log19.log)("resetting...", {}, {
|
|
4296
4296
|
file: "service-host.ts",
|
|
4297
|
-
line:
|
|
4297
|
+
line: 273,
|
|
4298
4298
|
scope: this,
|
|
4299
4299
|
callSite: (f, a) => f(...a)
|
|
4300
4300
|
});
|
|
@@ -4302,7 +4302,7 @@ var ClientServicesHost = class {
|
|
|
4302
4302
|
await this._storage.reset();
|
|
4303
4303
|
(0, import_log19.log)("reset", {}, {
|
|
4304
4304
|
file: "service-host.ts",
|
|
4305
|
-
line:
|
|
4305
|
+
line: 276,
|
|
4306
4306
|
scope: this,
|
|
4307
4307
|
callSite: (f, a) => f(...a)
|
|
4308
4308
|
});
|
|
@@ -4310,7 +4310,7 @@ var ClientServicesHost = class {
|
|
|
4310
4310
|
id: traceId
|
|
4311
4311
|
}), {
|
|
4312
4312
|
file: "service-host.ts",
|
|
4313
|
-
line:
|
|
4313
|
+
line: 277,
|
|
4314
4314
|
scope: this,
|
|
4315
4315
|
callSite: (f, a) => f(...a)
|
|
4316
4316
|
});
|
|
@@ -4513,6 +4513,7 @@ var acceptInvitation = (guest, invitation) => {
|
|
|
4513
4513
|
|
|
4514
4514
|
// packages/sdk/client-services/src/packlets/testing/test-builder.ts
|
|
4515
4515
|
var import_client_protocol10 = require("@dxos/client-protocol");
|
|
4516
|
+
var import_context8 = require("@dxos/context");
|
|
4516
4517
|
var import_credentials15 = require("@dxos/credentials");
|
|
4517
4518
|
var import_echo_pipeline5 = require("@dxos/echo-pipeline");
|
|
4518
4519
|
var import_testing = require("@dxos/echo-pipeline/testing");
|
|
@@ -4560,20 +4561,29 @@ var syncItemsLocal = async (db1, db2) => {
|
|
|
4560
4561
|
var TestBuilder = class {
|
|
4561
4562
|
constructor() {
|
|
4562
4563
|
this.signalContext = new import_messaging4.MemorySignalManagerContext();
|
|
4564
|
+
this._ctx = new import_context8.Context();
|
|
4563
4565
|
}
|
|
4564
|
-
createPeer() {
|
|
4565
|
-
|
|
4566
|
+
createPeer(peerOptions) {
|
|
4567
|
+
const peer = new TestPeer(this.signalContext, peerOptions);
|
|
4568
|
+
this._ctx.onDispose(async () => peer.destroy());
|
|
4569
|
+
return peer;
|
|
4570
|
+
}
|
|
4571
|
+
async destroy() {
|
|
4572
|
+
await this._ctx.dispose();
|
|
4566
4573
|
}
|
|
4567
4574
|
};
|
|
4568
4575
|
var TestPeer = class {
|
|
4569
|
-
constructor(signalContext
|
|
4576
|
+
constructor(signalContext, opts = {
|
|
4577
|
+
storageType: import_random_access_storage2.StorageType.RAM
|
|
4578
|
+
}) {
|
|
4570
4579
|
this.signalContext = signalContext;
|
|
4580
|
+
this.opts = opts;
|
|
4571
4581
|
this._props = {};
|
|
4572
4582
|
}
|
|
4573
4583
|
get storage() {
|
|
4574
4584
|
var _a, _b;
|
|
4575
4585
|
return (_b = (_a = this._props).storage) != null ? _b : _a.storage = (0, import_random_access_storage2.createStorage)({
|
|
4576
|
-
type:
|
|
4586
|
+
type: this.opts.storageType
|
|
4577
4587
|
});
|
|
4578
4588
|
}
|
|
4579
4589
|
get keyring() {
|
|
@@ -4617,6 +4627,9 @@ var TestPeer = class {
|
|
|
4617
4627
|
snapshotStore: this.snapshotStore
|
|
4618
4628
|
});
|
|
4619
4629
|
}
|
|
4630
|
+
async destroy() {
|
|
4631
|
+
await this.storage.reset();
|
|
4632
|
+
}
|
|
4620
4633
|
};
|
|
4621
4634
|
var createSigningContext = async (keyring) => {
|
|
4622
4635
|
const identityKey = await keyring.createKey();
|