@dxos/client-services 0.4.10-main.826d4ee → 0.4.10-main.93fda5f
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-3JVGDOFN.mjs → chunk-ULO2U4N6.mjs} +19 -81
- package/dist/lib/browser/{chunk-3JVGDOFN.mjs.map → chunk-ULO2U4N6.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-IGZXOIKB.cjs → chunk-4TLGRMKO.cjs} +27 -89
- package/dist/lib/node/chunk-4TLGRMKO.cjs.map +7 -0
- package/dist/lib/node/index.cjs +37 -37
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +6 -6
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +34 -34
- package/src/packlets/services/service-host.ts +2 -2
- package/src/packlets/spaces/data-space.ts +2 -51
- package/src/version.ts +1 -1
- package/dist/lib/node/chunk-IGZXOIKB.cjs.map +0 -7
|
@@ -2769,7 +2769,7 @@ var getPlatform = () => {
|
|
|
2769
2769
|
};
|
|
2770
2770
|
|
|
2771
2771
|
// packages/sdk/client-services/src/version.ts
|
|
2772
|
-
var DXOS_VERSION = "0.4.10-main.
|
|
2772
|
+
var DXOS_VERSION = "0.4.10-main.93fda5f";
|
|
2773
2773
|
|
|
2774
2774
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2775
2775
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
@@ -2885,9 +2885,7 @@ import { Event as Event6, asyncTimeout, scheduleTask as scheduleTask5, sleep as
|
|
|
2885
2885
|
import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
|
|
2886
2886
|
import { cancelWithContext as cancelWithContext2, Context as Context8, ContextDisposedError } from "@dxos/context";
|
|
2887
2887
|
import { timed, warnAfterTimeout } from "@dxos/debug";
|
|
2888
|
-
import { TYPE_PROPERTIES } from "@dxos/echo-db";
|
|
2889
2888
|
import { createMappedFeedWriter } from "@dxos/echo-pipeline";
|
|
2890
|
-
import { AutomergeDocumentLoaderImpl } from "@dxos/echo-pipeline";
|
|
2891
2889
|
import { failedInvariant, invariant as invariant11 } from "@dxos/invariant";
|
|
2892
2890
|
import { PublicKey as PublicKey8 } from "@dxos/keys";
|
|
2893
2891
|
import { log as log9 } from "@dxos/log";
|
|
@@ -2896,7 +2894,7 @@ import { SpaceState, CreateEpochRequest } from "@dxos/protocols/proto/dxos/clien
|
|
|
2896
2894
|
import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
2897
2895
|
import { Timeframe as Timeframe2 } from "@dxos/timeframe";
|
|
2898
2896
|
import { trace as trace6 } from "@dxos/tracing";
|
|
2899
|
-
import { ComplexSet as ComplexSet3
|
|
2897
|
+
import { ComplexSet as ComplexSet3 } from "@dxos/util";
|
|
2900
2898
|
|
|
2901
2899
|
// packages/sdk/client-services/src/packlets/spaces/automerge-space-state.ts
|
|
2902
2900
|
import { Event as Event4 } from "@dxos/async";
|
|
@@ -3251,7 +3249,7 @@ var DataSpace = class {
|
|
|
3251
3249
|
state: SpaceState[this._state]
|
|
3252
3250
|
}, {
|
|
3253
3251
|
F: __dxlog_file12,
|
|
3254
|
-
L:
|
|
3252
|
+
L: 132,
|
|
3255
3253
|
S: this,
|
|
3256
3254
|
C: (f, a) => f(...a)
|
|
3257
3255
|
});
|
|
@@ -3301,7 +3299,7 @@ var DataSpace = class {
|
|
|
3301
3299
|
state: SpaceState[this._state]
|
|
3302
3300
|
}, {
|
|
3303
3301
|
F: __dxlog_file12,
|
|
3304
|
-
L:
|
|
3302
|
+
L: 190,
|
|
3305
3303
|
S: this,
|
|
3306
3304
|
C: (f, a) => f(...a)
|
|
3307
3305
|
});
|
|
@@ -3319,7 +3317,7 @@ var DataSpace = class {
|
|
|
3319
3317
|
state: SpaceState[this._state]
|
|
3320
3318
|
}, {
|
|
3321
3319
|
F: __dxlog_file12,
|
|
3322
|
-
L:
|
|
3320
|
+
L: 204,
|
|
3323
3321
|
S: this,
|
|
3324
3322
|
C: (f, a) => f(...a)
|
|
3325
3323
|
});
|
|
@@ -3351,7 +3349,7 @@ var DataSpace = class {
|
|
|
3351
3349
|
if (err instanceof CancelledError || err instanceof ContextDisposedError) {
|
|
3352
3350
|
log9("data pipeline initialization cancelled", err, {
|
|
3353
3351
|
F: __dxlog_file12,
|
|
3354
|
-
L:
|
|
3352
|
+
L: 237,
|
|
3355
3353
|
S: this,
|
|
3356
3354
|
C: (f, a) => f(...a)
|
|
3357
3355
|
});
|
|
@@ -3359,7 +3357,7 @@ var DataSpace = class {
|
|
|
3359
3357
|
}
|
|
3360
3358
|
log9.error("Error initializing data pipeline", err, {
|
|
3361
3359
|
F: __dxlog_file12,
|
|
3362
|
-
L:
|
|
3360
|
+
L: 241,
|
|
3363
3361
|
S: this,
|
|
3364
3362
|
C: (f, a) => f(...a)
|
|
3365
3363
|
});
|
|
@@ -3368,7 +3366,7 @@ var DataSpace = class {
|
|
|
3368
3366
|
state: SpaceState[this._state]
|
|
3369
3367
|
}, {
|
|
3370
3368
|
F: __dxlog_file12,
|
|
3371
|
-
L:
|
|
3369
|
+
L: 243,
|
|
3372
3370
|
S: this,
|
|
3373
3371
|
C: (f, a) => f(...a)
|
|
3374
3372
|
});
|
|
@@ -3388,7 +3386,7 @@ var DataSpace = class {
|
|
|
3388
3386
|
state: SpaceState[this._state]
|
|
3389
3387
|
}, {
|
|
3390
3388
|
F: __dxlog_file12,
|
|
3391
|
-
L:
|
|
3389
|
+
L: 259,
|
|
3392
3390
|
S: this,
|
|
3393
3391
|
C: (f, a) => f(...a)
|
|
3394
3392
|
});
|
|
@@ -3398,7 +3396,7 @@ var DataSpace = class {
|
|
|
3398
3396
|
await cancelWithContext2(this._ctx, this.automergeSpaceState.ensureEpochInitialized());
|
|
3399
3397
|
log9("data pipeline ready", void 0, {
|
|
3400
3398
|
F: __dxlog_file12,
|
|
3401
|
-
L:
|
|
3399
|
+
L: 271,
|
|
3402
3400
|
S: this,
|
|
3403
3401
|
C: (f, a) => f(...a)
|
|
3404
3402
|
});
|
|
@@ -3408,7 +3406,7 @@ var DataSpace = class {
|
|
|
3408
3406
|
state: SpaceState[this._state]
|
|
3409
3407
|
}, {
|
|
3410
3408
|
F: __dxlog_file12,
|
|
3411
|
-
L:
|
|
3409
|
+
L: 275,
|
|
3412
3410
|
S: this,
|
|
3413
3411
|
C: (f, a) => f(...a)
|
|
3414
3412
|
});
|
|
@@ -3424,7 +3422,7 @@ var DataSpace = class {
|
|
|
3424
3422
|
await this._createWritableFeeds();
|
|
3425
3423
|
log9("writable feeds created", void 0, {
|
|
3426
3424
|
F: __dxlog_file12,
|
|
3427
|
-
L:
|
|
3425
|
+
L: 291,
|
|
3428
3426
|
S: this,
|
|
3429
3427
|
C: (f, a) => f(...a)
|
|
3430
3428
|
});
|
|
@@ -3487,7 +3485,7 @@ var DataSpace = class {
|
|
|
3487
3485
|
rootUrl
|
|
3488
3486
|
}, {
|
|
3489
3487
|
F: __dxlog_file12,
|
|
3490
|
-
L:
|
|
3488
|
+
L: 357,
|
|
3491
3489
|
S: this,
|
|
3492
3490
|
C: (f, a) => f(...a)
|
|
3493
3491
|
});
|
|
@@ -3519,7 +3517,7 @@ var DataSpace = class {
|
|
|
3519
3517
|
err
|
|
3520
3518
|
}, {
|
|
3521
3519
|
F: __dxlog_file12,
|
|
3522
|
-
L:
|
|
3520
|
+
L: 380,
|
|
3523
3521
|
S: this,
|
|
3524
3522
|
C: (f, a) => f(...a)
|
|
3525
3523
|
});
|
|
@@ -3574,73 +3572,13 @@ var DataSpace = class {
|
|
|
3574
3572
|
const newRoot = this._automergeHost.repo.create(rootHandle.docSync());
|
|
3575
3573
|
invariant11(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
|
|
3576
3574
|
F: __dxlog_file12,
|
|
3577
|
-
L:
|
|
3578
|
-
S: this,
|
|
3579
|
-
A: [
|
|
3580
|
-
"typeof newRoot.url === 'string' && newRoot.url.length > 0",
|
|
3581
|
-
""
|
|
3582
|
-
]
|
|
3583
|
-
});
|
|
3584
|
-
epoch = {
|
|
3585
|
-
previousId: this._automergeSpaceState.lastEpoch?.id,
|
|
3586
|
-
number: (this._automergeSpaceState.lastEpoch?.subject.assertion.number ?? -1) + 1,
|
|
3587
|
-
timeframe: this._automergeSpaceState.lastEpoch?.subject.assertion.timeframe ?? new Timeframe2(),
|
|
3588
|
-
automergeRoot: newRoot.url
|
|
3589
|
-
};
|
|
3590
|
-
}
|
|
3591
|
-
break;
|
|
3592
|
-
case CreateEpochRequest.Migration.FRAGMENT_AUTOMERGE_ROOT:
|
|
3593
|
-
{
|
|
3594
|
-
log9.info("Fragmenting", void 0, {
|
|
3595
|
-
F: __dxlog_file12,
|
|
3596
|
-
L: 450,
|
|
3597
|
-
S: this,
|
|
3598
|
-
C: (f, a) => f(...a)
|
|
3599
|
-
});
|
|
3600
|
-
const currentRootUrl = this._automergeSpaceState.rootUrl;
|
|
3601
|
-
const rootHandle = this._automergeHost.repo.find(currentRootUrl);
|
|
3602
|
-
await cancelWithContext2(this._ctx, asyncTimeout(rootHandle.whenReady(), 1e4));
|
|
3603
|
-
const objects = Object.entries(rootHandle.docSync().objects);
|
|
3604
|
-
const properties = objects.find(([_, value]) => value.system.type?.itemId === TYPE_PROPERTIES);
|
|
3605
|
-
const otherObjects = objects.filter(([key]) => key !== properties?.[0]);
|
|
3606
|
-
invariant11(properties, "Properties not found", {
|
|
3607
|
-
F: __dxlog_file12,
|
|
3608
|
-
L: 460,
|
|
3609
|
-
S: this,
|
|
3610
|
-
A: [
|
|
3611
|
-
"properties",
|
|
3612
|
-
"'Properties not found'"
|
|
3613
|
-
]
|
|
3614
|
-
});
|
|
3615
|
-
const newSpaceDoc = {
|
|
3616
|
-
...rootHandle.docSync(),
|
|
3617
|
-
objects: Object.fromEntries([
|
|
3618
|
-
properties
|
|
3619
|
-
])
|
|
3620
|
-
};
|
|
3621
|
-
const newRoot = this._automergeHost.repo.create(newSpaceDoc);
|
|
3622
|
-
invariant11(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
|
|
3623
|
-
F: __dxlog_file12,
|
|
3624
|
-
L: 465,
|
|
3575
|
+
L: 430,
|
|
3625
3576
|
S: this,
|
|
3626
3577
|
A: [
|
|
3627
3578
|
"typeof newRoot.url === 'string' && newRoot.url.length > 0",
|
|
3628
3579
|
""
|
|
3629
3580
|
]
|
|
3630
3581
|
});
|
|
3631
|
-
const docLoader = new AutomergeDocumentLoaderImpl(this.key, this._automergeHost.repo);
|
|
3632
|
-
await docLoader.loadSpaceRootDocHandle(this._ctx, {
|
|
3633
|
-
rootUrl: newRoot.url
|
|
3634
|
-
});
|
|
3635
|
-
otherObjects.forEach(([key, value]) => {
|
|
3636
|
-
const handle = docLoader.createDocumentForObject(key);
|
|
3637
|
-
handle.change((doc) => {
|
|
3638
|
-
assignDeep(doc, [
|
|
3639
|
-
"objects",
|
|
3640
|
-
key
|
|
3641
|
-
], value);
|
|
3642
|
-
});
|
|
3643
|
-
});
|
|
3644
3582
|
epoch = {
|
|
3645
3583
|
previousId: this._automergeSpaceState.lastEpoch?.id,
|
|
3646
3584
|
number: (this._automergeSpaceState.lastEpoch?.subject.assertion.number ?? -1) + 1,
|
|
@@ -3690,7 +3628,7 @@ var DataSpace = class {
|
|
|
3690
3628
|
state: SpaceState[this._state]
|
|
3691
3629
|
}, {
|
|
3692
3630
|
F: __dxlog_file12,
|
|
3693
|
-
L:
|
|
3631
|
+
L: 482,
|
|
3694
3632
|
S: this,
|
|
3695
3633
|
C: (f, a) => f(...a)
|
|
3696
3634
|
});
|
|
@@ -4961,7 +4899,7 @@ import { NetworkManager, createSimplePeerTransportFactory } from "@dxos/network-
|
|
|
4961
4899
|
import { trace as trace9 } from "@dxos/protocols";
|
|
4962
4900
|
import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
4963
4901
|
import { TRACE_PROCESSOR as TRACE_PROCESSOR2, trace as Trace3 } from "@dxos/tracing";
|
|
4964
|
-
import { assignDeep
|
|
4902
|
+
import { assignDeep } from "@dxos/util";
|
|
4965
4903
|
import { WebsocketRpcClient } from "@dxos/websocket-rpc";
|
|
4966
4904
|
|
|
4967
4905
|
// packages/sdk/client-services/src/packlets/devices/devices-service.ts
|
|
@@ -5637,7 +5575,7 @@ var ClientServicesHost = class {
|
|
|
5637
5575
|
const document = await this._serviceContext.automergeHost.repo.find(automergeIndex);
|
|
5638
5576
|
await document.whenReady();
|
|
5639
5577
|
document.change((doc) => {
|
|
5640
|
-
|
|
5578
|
+
assignDeep(doc, [
|
|
5641
5579
|
"objects",
|
|
5642
5580
|
getAutomergeObjectCore(obj).id
|
|
5643
5581
|
], getRawDoc(obj).handle.docSync());
|
|
@@ -5697,4 +5635,4 @@ export {
|
|
|
5697
5635
|
createStorageObjects,
|
|
5698
5636
|
ClientServicesHost
|
|
5699
5637
|
};
|
|
5700
|
-
//# sourceMappingURL=chunk-
|
|
5638
|
+
//# sourceMappingURL=chunk-ULO2U4N6.mjs.map
|