@dxos/client-services 0.5.9-main.a75fa71 → 0.5.9-main.ac938b0
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-DS5JZ6S4.mjs → chunk-I5PIAH6J.mjs} +32 -10
- package/dist/lib/browser/{chunk-DS5JZ6S4.mjs.map → chunk-I5PIAH6J.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-NJ63ESAV.cjs → chunk-3WIKJ4BC.cjs} +35 -13
- package/dist/lib/node/{chunk-NJ63ESAV.cjs.map → chunk-3WIKJ4BC.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +45 -45
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- 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/storage/profile-archive.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +36 -36
- package/src/packlets/spaces/data-space.ts +2 -0
- package/src/packlets/spaces/spaces-service.ts +2 -0
- package/src/packlets/storage/profile-archive.ts +15 -1
- package/src/version.ts +1 -1
|
@@ -359,7 +359,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
359
359
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
360
360
|
|
|
361
361
|
// packages/sdk/client-services/src/version.ts
|
|
362
|
-
var DXOS_VERSION = "0.5.9-main.
|
|
362
|
+
var DXOS_VERSION = "0.5.9-main.ac938b0";
|
|
363
363
|
|
|
364
364
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
365
365
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -4646,7 +4646,7 @@ var DataSpace = class {
|
|
|
4646
4646
|
err
|
|
4647
4647
|
}, {
|
|
4648
4648
|
F: __dxlog_file18,
|
|
4649
|
-
L:
|
|
4649
|
+
L: 433,
|
|
4650
4650
|
S: this,
|
|
4651
4651
|
C: (f, a) => f(...a)
|
|
4652
4652
|
});
|
|
@@ -4732,7 +4732,7 @@ var DataSpace = class {
|
|
|
4732
4732
|
state: SpaceState2[this._state]
|
|
4733
4733
|
}, {
|
|
4734
4734
|
F: __dxlog_file18,
|
|
4735
|
-
L:
|
|
4735
|
+
L: 514,
|
|
4736
4736
|
S: this,
|
|
4737
4737
|
C: (f, a) => f(...a)
|
|
4738
4738
|
});
|
|
@@ -5746,7 +5746,8 @@ var SpacesServiceImpl = class {
|
|
|
5746
5746
|
startDataTimeframe: void 0,
|
|
5747
5747
|
currentDataTimeframe: void 0,
|
|
5748
5748
|
targetDataTimeframe: void 0,
|
|
5749
|
-
totalDataTimeframe: void 0
|
|
5749
|
+
totalDataTimeframe: void 0,
|
|
5750
|
+
spaceRootUrl: space.databaseRoot?.url
|
|
5750
5751
|
},
|
|
5751
5752
|
members: Array.from(space.inner.spaceState.members.values()).map((member) => {
|
|
5752
5753
|
const peers = space.presence.getPeersOnline().filter(({ identityKey }) => identityKey.equals(member.key));
|
|
@@ -6379,14 +6380,15 @@ var exportProfileData = async ({ storage, level }) => {
|
|
|
6379
6380
|
return archive;
|
|
6380
6381
|
};
|
|
6381
6382
|
var importProfileData = async ({ storage, level }, archive) => {
|
|
6382
|
-
|
|
6383
|
+
let batch = level.batch();
|
|
6384
|
+
let count = 0;
|
|
6383
6385
|
for (const entry2 of archive.storage) {
|
|
6384
6386
|
switch (entry2.type) {
|
|
6385
6387
|
case ProfileArchiveEntryType.FILE: {
|
|
6386
6388
|
const directory = await storage.createDirectory();
|
|
6387
6389
|
invariant17(typeof entry2.key === "string", "Invalid key type", {
|
|
6388
6390
|
F: __dxlog_file23,
|
|
6389
|
-
L:
|
|
6391
|
+
L: 79,
|
|
6390
6392
|
S: void 0,
|
|
6391
6393
|
A: [
|
|
6392
6394
|
"typeof entry.key === 'string'",
|
|
@@ -6396,7 +6398,7 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
6396
6398
|
const file = await directory.getOrCreateFile(entry2.key);
|
|
6397
6399
|
invariant17(entry2.value instanceof Uint8Array, "Invalid value type", {
|
|
6398
6400
|
F: __dxlog_file23,
|
|
6399
|
-
L:
|
|
6401
|
+
L: 81,
|
|
6400
6402
|
S: void 0,
|
|
6401
6403
|
A: [
|
|
6402
6404
|
"entry.value instanceof Uint8Array",
|
|
@@ -6410,7 +6412,7 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
6410
6412
|
case ProfileArchiveEntryType.KEY_VALUE: {
|
|
6411
6413
|
invariant17(entry2.key instanceof Uint8Array, "Invalid key type", {
|
|
6412
6414
|
F: __dxlog_file23,
|
|
6413
|
-
L:
|
|
6415
|
+
L: 87,
|
|
6414
6416
|
S: void 0,
|
|
6415
6417
|
A: [
|
|
6416
6418
|
"entry.key instanceof Uint8Array",
|
|
@@ -6419,7 +6421,7 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
6419
6421
|
});
|
|
6420
6422
|
invariant17(entry2.value instanceof Uint8Array, "Invalid value type", {
|
|
6421
6423
|
F: __dxlog_file23,
|
|
6422
|
-
L:
|
|
6424
|
+
L: 88,
|
|
6423
6425
|
S: void 0,
|
|
6424
6426
|
A: [
|
|
6425
6427
|
"entry.value instanceof Uint8Array",
|
|
@@ -6435,7 +6437,27 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
6435
6437
|
default:
|
|
6436
6438
|
throw new Error(`Invalid entry type: ${entry2.type}`);
|
|
6437
6439
|
}
|
|
6440
|
+
if (++count % 1e3 === 0) {
|
|
6441
|
+
await batch.write();
|
|
6442
|
+
batch = level.batch();
|
|
6443
|
+
log20.info("importing", {
|
|
6444
|
+
count,
|
|
6445
|
+
total: archive.storage.length,
|
|
6446
|
+
progress: `${(count / archive.storage.length * 100).toFixed()}%`
|
|
6447
|
+
}, {
|
|
6448
|
+
F: __dxlog_file23,
|
|
6449
|
+
L: 101,
|
|
6450
|
+
S: void 0,
|
|
6451
|
+
C: (f, a) => f(...a)
|
|
6452
|
+
});
|
|
6453
|
+
}
|
|
6438
6454
|
}
|
|
6455
|
+
log20.info("committing changes..", void 0, {
|
|
6456
|
+
F: __dxlog_file23,
|
|
6457
|
+
L: 109,
|
|
6458
|
+
S: void 0,
|
|
6459
|
+
C: (f, a) => f(...a)
|
|
6460
|
+
});
|
|
6439
6461
|
await batch.write();
|
|
6440
6462
|
};
|
|
6441
6463
|
|
|
@@ -7301,4 +7323,4 @@ export {
|
|
|
7301
7323
|
ClientServicesProviderResource,
|
|
7302
7324
|
DiagnosticsCollector
|
|
7303
7325
|
};
|
|
7304
|
-
//# sourceMappingURL=chunk-
|
|
7326
|
+
//# sourceMappingURL=chunk-I5PIAH6J.mjs.map
|