@dxos/client-services 0.4.10-main.ec8b427 → 0.4.10-main.f68a1ca
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-4NKBBUMB.mjs → chunk-B4JZEXRB.mjs} +128 -53
- package/dist/lib/browser/{chunk-4NKBBUMB.mjs.map → chunk-B4JZEXRB.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +48 -20
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-5YRLBMIC.cjs → chunk-EC2QGJ2V.cjs} +133 -58
- package/dist/lib/node/chunk-EC2QGJ2V.cjs.map +7 -0
- package/dist/lib/node/index.cjs +85 -57
- 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 +6 -6
- package/dist/types/src/packlets/indexing/util.d.ts +2 -2
- package/dist/types/src/packlets/indexing/util.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/shared-worker-connection.d.ts +5 -5
- package/dist/types/src/packlets/vault/shared-worker-connection.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-runtime.d.ts +2 -0
- package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-session.d.ts +2 -0
- package/dist/types/src/packlets/vault/worker-session.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +34 -34
- package/src/packlets/indexing/util.ts +3 -3
- package/src/packlets/services/service-context.ts +3 -3
- package/src/packlets/services/service-host.ts +15 -8
- package/src/packlets/spaces/data-space.ts +51 -2
- package/src/packlets/vault/shared-worker-connection.ts +3 -8
- package/src/packlets/vault/worker-runtime.ts +27 -2
- package/src/packlets/vault/worker-session.ts +6 -0
- package/src/version.ts +1 -1
- package/dist/lib/node/chunk-5YRLBMIC.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.f68a1ca";
|
|
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,7 +2885,9 @@ 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";
|
|
2888
2889
|
import { createMappedFeedWriter } from "@dxos/echo-pipeline";
|
|
2890
|
+
import { AutomergeDocumentLoaderImpl } from "@dxos/echo-pipeline";
|
|
2889
2891
|
import { failedInvariant, invariant as invariant11 } from "@dxos/invariant";
|
|
2890
2892
|
import { PublicKey as PublicKey8 } from "@dxos/keys";
|
|
2891
2893
|
import { log as log9 } from "@dxos/log";
|
|
@@ -2894,7 +2896,7 @@ import { SpaceState, CreateEpochRequest } from "@dxos/protocols/proto/dxos/clien
|
|
|
2894
2896
|
import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
2895
2897
|
import { Timeframe as Timeframe2 } from "@dxos/timeframe";
|
|
2896
2898
|
import { trace as trace6 } from "@dxos/tracing";
|
|
2897
|
-
import { ComplexSet as ComplexSet3 } from "@dxos/util";
|
|
2899
|
+
import { ComplexSet as ComplexSet3, assignDeep } from "@dxos/util";
|
|
2898
2900
|
|
|
2899
2901
|
// packages/sdk/client-services/src/packlets/spaces/automerge-space-state.ts
|
|
2900
2902
|
import { Event as Event4 } from "@dxos/async";
|
|
@@ -3249,7 +3251,7 @@ var DataSpace = class {
|
|
|
3249
3251
|
state: SpaceState[this._state]
|
|
3250
3252
|
}, {
|
|
3251
3253
|
F: __dxlog_file12,
|
|
3252
|
-
L:
|
|
3254
|
+
L: 140,
|
|
3253
3255
|
S: this,
|
|
3254
3256
|
C: (f, a) => f(...a)
|
|
3255
3257
|
});
|
|
@@ -3299,7 +3301,7 @@ var DataSpace = class {
|
|
|
3299
3301
|
state: SpaceState[this._state]
|
|
3300
3302
|
}, {
|
|
3301
3303
|
F: __dxlog_file12,
|
|
3302
|
-
L:
|
|
3304
|
+
L: 198,
|
|
3303
3305
|
S: this,
|
|
3304
3306
|
C: (f, a) => f(...a)
|
|
3305
3307
|
});
|
|
@@ -3317,7 +3319,7 @@ var DataSpace = class {
|
|
|
3317
3319
|
state: SpaceState[this._state]
|
|
3318
3320
|
}, {
|
|
3319
3321
|
F: __dxlog_file12,
|
|
3320
|
-
L:
|
|
3322
|
+
L: 212,
|
|
3321
3323
|
S: this,
|
|
3322
3324
|
C: (f, a) => f(...a)
|
|
3323
3325
|
});
|
|
@@ -3349,7 +3351,7 @@ var DataSpace = class {
|
|
|
3349
3351
|
if (err instanceof CancelledError || err instanceof ContextDisposedError) {
|
|
3350
3352
|
log9("data pipeline initialization cancelled", err, {
|
|
3351
3353
|
F: __dxlog_file12,
|
|
3352
|
-
L:
|
|
3354
|
+
L: 245,
|
|
3353
3355
|
S: this,
|
|
3354
3356
|
C: (f, a) => f(...a)
|
|
3355
3357
|
});
|
|
@@ -3357,7 +3359,7 @@ var DataSpace = class {
|
|
|
3357
3359
|
}
|
|
3358
3360
|
log9.error("Error initializing data pipeline", err, {
|
|
3359
3361
|
F: __dxlog_file12,
|
|
3360
|
-
L:
|
|
3362
|
+
L: 249,
|
|
3361
3363
|
S: this,
|
|
3362
3364
|
C: (f, a) => f(...a)
|
|
3363
3365
|
});
|
|
@@ -3366,7 +3368,7 @@ var DataSpace = class {
|
|
|
3366
3368
|
state: SpaceState[this._state]
|
|
3367
3369
|
}, {
|
|
3368
3370
|
F: __dxlog_file12,
|
|
3369
|
-
L:
|
|
3371
|
+
L: 251,
|
|
3370
3372
|
S: this,
|
|
3371
3373
|
C: (f, a) => f(...a)
|
|
3372
3374
|
});
|
|
@@ -3386,7 +3388,7 @@ var DataSpace = class {
|
|
|
3386
3388
|
state: SpaceState[this._state]
|
|
3387
3389
|
}, {
|
|
3388
3390
|
F: __dxlog_file12,
|
|
3389
|
-
L:
|
|
3391
|
+
L: 267,
|
|
3390
3392
|
S: this,
|
|
3391
3393
|
C: (f, a) => f(...a)
|
|
3392
3394
|
});
|
|
@@ -3396,7 +3398,7 @@ var DataSpace = class {
|
|
|
3396
3398
|
await cancelWithContext2(this._ctx, this.automergeSpaceState.ensureEpochInitialized());
|
|
3397
3399
|
log9("data pipeline ready", void 0, {
|
|
3398
3400
|
F: __dxlog_file12,
|
|
3399
|
-
L:
|
|
3401
|
+
L: 279,
|
|
3400
3402
|
S: this,
|
|
3401
3403
|
C: (f, a) => f(...a)
|
|
3402
3404
|
});
|
|
@@ -3406,7 +3408,7 @@ var DataSpace = class {
|
|
|
3406
3408
|
state: SpaceState[this._state]
|
|
3407
3409
|
}, {
|
|
3408
3410
|
F: __dxlog_file12,
|
|
3409
|
-
L:
|
|
3411
|
+
L: 283,
|
|
3410
3412
|
S: this,
|
|
3411
3413
|
C: (f, a) => f(...a)
|
|
3412
3414
|
});
|
|
@@ -3422,7 +3424,7 @@ var DataSpace = class {
|
|
|
3422
3424
|
await this._createWritableFeeds();
|
|
3423
3425
|
log9("writable feeds created", void 0, {
|
|
3424
3426
|
F: __dxlog_file12,
|
|
3425
|
-
L:
|
|
3427
|
+
L: 299,
|
|
3426
3428
|
S: this,
|
|
3427
3429
|
C: (f, a) => f(...a)
|
|
3428
3430
|
});
|
|
@@ -3485,7 +3487,7 @@ var DataSpace = class {
|
|
|
3485
3487
|
rootUrl
|
|
3486
3488
|
}, {
|
|
3487
3489
|
F: __dxlog_file12,
|
|
3488
|
-
L:
|
|
3490
|
+
L: 365,
|
|
3489
3491
|
S: this,
|
|
3490
3492
|
C: (f, a) => f(...a)
|
|
3491
3493
|
});
|
|
@@ -3517,7 +3519,7 @@ var DataSpace = class {
|
|
|
3517
3519
|
err
|
|
3518
3520
|
}, {
|
|
3519
3521
|
F: __dxlog_file12,
|
|
3520
|
-
L:
|
|
3522
|
+
L: 388,
|
|
3521
3523
|
S: this,
|
|
3522
3524
|
C: (f, a) => f(...a)
|
|
3523
3525
|
});
|
|
@@ -3572,7 +3574,7 @@ var DataSpace = class {
|
|
|
3572
3574
|
const newRoot = this._automergeHost.repo.create(rootHandle.docSync());
|
|
3573
3575
|
invariant11(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
|
|
3574
3576
|
F: __dxlog_file12,
|
|
3575
|
-
L:
|
|
3577
|
+
L: 438,
|
|
3576
3578
|
S: this,
|
|
3577
3579
|
A: [
|
|
3578
3580
|
"typeof newRoot.url === 'string' && newRoot.url.length > 0",
|
|
@@ -3587,6 +3589,66 @@ var DataSpace = class {
|
|
|
3587
3589
|
};
|
|
3588
3590
|
}
|
|
3589
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,
|
|
3625
|
+
S: this,
|
|
3626
|
+
A: [
|
|
3627
|
+
"typeof newRoot.url === 'string' && newRoot.url.length > 0",
|
|
3628
|
+
""
|
|
3629
|
+
]
|
|
3630
|
+
});
|
|
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
|
+
epoch = {
|
|
3645
|
+
previousId: this._automergeSpaceState.lastEpoch?.id,
|
|
3646
|
+
number: (this._automergeSpaceState.lastEpoch?.subject.assertion.number ?? -1) + 1,
|
|
3647
|
+
timeframe: this._automergeSpaceState.lastEpoch?.subject.assertion.timeframe ?? new Timeframe2(),
|
|
3648
|
+
automergeRoot: newRoot.url
|
|
3649
|
+
};
|
|
3650
|
+
}
|
|
3651
|
+
break;
|
|
3590
3652
|
}
|
|
3591
3653
|
if (!epoch) {
|
|
3592
3654
|
return;
|
|
@@ -3628,7 +3690,7 @@ var DataSpace = class {
|
|
|
3628
3690
|
state: SpaceState[this._state]
|
|
3629
3691
|
}, {
|
|
3630
3692
|
F: __dxlog_file12,
|
|
3631
|
-
L:
|
|
3693
|
+
L: 531,
|
|
3632
3694
|
S: this,
|
|
3633
3695
|
C: (f, a) => f(...a)
|
|
3634
3696
|
});
|
|
@@ -4344,7 +4406,7 @@ import { safeInstanceof } from "@dxos/util";
|
|
|
4344
4406
|
import { getHeads } from "@dxos/automerge/automerge";
|
|
4345
4407
|
import { warnAfterTimeout as warnAfterTimeout2 } from "@dxos/debug";
|
|
4346
4408
|
import { idCodec } from "@dxos/protocols";
|
|
4347
|
-
var
|
|
4409
|
+
var createSelectedDocumentsIterator = (automergeHost) => (
|
|
4348
4410
|
/**
|
|
4349
4411
|
* Get object data blobs from Automerge Repo by ids.
|
|
4350
4412
|
* @param ids
|
|
@@ -4367,7 +4429,7 @@ var createLoadDocuments = (automergeHost) => (
|
|
|
4367
4429
|
}
|
|
4368
4430
|
}
|
|
4369
4431
|
);
|
|
4370
|
-
var
|
|
4432
|
+
var createDocumentsIterator = (automergeHost) => (
|
|
4371
4433
|
/**
|
|
4372
4434
|
* Recursively get all object data blobs from Automerge Repo.
|
|
4373
4435
|
* @param ids
|
|
@@ -4390,7 +4452,7 @@ var createGetAllDocuments = (automergeHost) => (
|
|
|
4390
4452
|
objectId
|
|
4391
4453
|
}),
|
|
4392
4454
|
object,
|
|
4393
|
-
currentHash: heads.
|
|
4455
|
+
currentHash: heads.join("")
|
|
4394
4456
|
};
|
|
4395
4457
|
});
|
|
4396
4458
|
}
|
|
@@ -4474,8 +4536,8 @@ var ServiceContext = class {
|
|
|
4474
4536
|
directory: storage.createDirectory("index-store")
|
|
4475
4537
|
}),
|
|
4476
4538
|
metadataStore: this.indexMetadata,
|
|
4477
|
-
loadDocuments:
|
|
4478
|
-
getAllDocuments:
|
|
4539
|
+
loadDocuments: createSelectedDocumentsIterator(this.automergeHost),
|
|
4540
|
+
getAllDocuments: createDocumentsIterator(this.automergeHost)
|
|
4479
4541
|
});
|
|
4480
4542
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
4481
4543
|
this._handlerFactories.set(Invitation6.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined2(), this._acceptIdentity.bind(this)));
|
|
@@ -4885,11 +4947,12 @@ var toStorageType = (type) => {
|
|
|
4885
4947
|
};
|
|
4886
4948
|
|
|
4887
4949
|
// packages/sdk/client-services/src/packlets/services/service-host.ts
|
|
4888
|
-
import { Event as Event9, synchronized as synchronized3 } from "@dxos/async";
|
|
4889
|
-
import {
|
|
4950
|
+
import { Event as Event9, sleep as sleep3, synchronized as synchronized3 } from "@dxos/async";
|
|
4951
|
+
import { clientServiceBundle, defaultKey, PropertiesSchema } from "@dxos/client-protocol";
|
|
4890
4952
|
import { Context as Context11 } from "@dxos/context";
|
|
4891
4953
|
import { DataServiceImpl } from "@dxos/echo-pipeline";
|
|
4892
|
-
import
|
|
4954
|
+
import * as E from "@dxos/echo-schema";
|
|
4955
|
+
import { createRawObjectDoc } from "@dxos/echo-schema";
|
|
4893
4956
|
import { IndexServiceImpl } from "@dxos/indexing";
|
|
4894
4957
|
import { invariant as invariant16 } from "@dxos/invariant";
|
|
4895
4958
|
import { PublicKey as PublicKey12 } from "@dxos/keys";
|
|
@@ -4899,7 +4962,7 @@ import { NetworkManager, createSimplePeerTransportFactory } from "@dxos/network-
|
|
|
4899
4962
|
import { trace as trace9 } from "@dxos/protocols";
|
|
4900
4963
|
import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
4901
4964
|
import { TRACE_PROCESSOR as TRACE_PROCESSOR2, trace as Trace3 } from "@dxos/tracing";
|
|
4902
|
-
import { assignDeep } from "@dxos/util";
|
|
4965
|
+
import { assignDeep as assignDeep2 } from "@dxos/util";
|
|
4903
4966
|
import { WebsocketRpcClient } from "@dxos/websocket-rpc";
|
|
4904
4967
|
|
|
4905
4968
|
// packages/sdk/client-services/src/packlets/devices/devices-service.ts
|
|
@@ -5296,7 +5359,7 @@ var ClientServicesHost = class {
|
|
|
5296
5359
|
initialize({ config, ...options }) {
|
|
5297
5360
|
invariant16(!this._open, "service host is open", {
|
|
5298
5361
|
F: __dxlog_file18,
|
|
5299
|
-
L:
|
|
5362
|
+
L: 180,
|
|
5300
5363
|
S: this,
|
|
5301
5364
|
A: [
|
|
5302
5365
|
"!this._open",
|
|
@@ -5305,14 +5368,14 @@ var ClientServicesHost = class {
|
|
|
5305
5368
|
});
|
|
5306
5369
|
log15("initializing...", void 0, {
|
|
5307
5370
|
F: __dxlog_file18,
|
|
5308
|
-
L:
|
|
5371
|
+
L: 181,
|
|
5309
5372
|
S: this,
|
|
5310
5373
|
C: (f, a) => f(...a)
|
|
5311
5374
|
});
|
|
5312
5375
|
if (config) {
|
|
5313
5376
|
invariant16(!this._config, "config already set", {
|
|
5314
5377
|
F: __dxlog_file18,
|
|
5315
|
-
L:
|
|
5378
|
+
L: 184,
|
|
5316
5379
|
S: this,
|
|
5317
5380
|
A: [
|
|
5318
5381
|
"!this._config",
|
|
@@ -5324,13 +5387,21 @@ var ClientServicesHost = class {
|
|
|
5324
5387
|
this._storage = createStorageObjects(config.get("runtime.client.storage", {})).storage;
|
|
5325
5388
|
}
|
|
5326
5389
|
}
|
|
5390
|
+
if (!options.signalManager) {
|
|
5391
|
+
log15.warn("running signaling without telemetry metadata.", void 0, {
|
|
5392
|
+
F: __dxlog_file18,
|
|
5393
|
+
L: 192,
|
|
5394
|
+
S: this,
|
|
5395
|
+
C: (f, a) => f(...a)
|
|
5396
|
+
});
|
|
5397
|
+
}
|
|
5327
5398
|
const { connectionLog = true, transportFactory = createSimplePeerTransportFactory({
|
|
5328
5399
|
iceServers: this._config?.get("runtime.services.ice")
|
|
5329
5400
|
}), signalManager = new WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
|
|
5330
5401
|
this._signalManager = signalManager;
|
|
5331
5402
|
invariant16(!this._networkManager, "network manager already set", {
|
|
5332
5403
|
F: __dxlog_file18,
|
|
5333
|
-
L:
|
|
5404
|
+
L: 203,
|
|
5334
5405
|
S: this,
|
|
5335
5406
|
A: [
|
|
5336
5407
|
"!this._networkManager",
|
|
@@ -5344,7 +5415,7 @@ var ClientServicesHost = class {
|
|
|
5344
5415
|
});
|
|
5345
5416
|
log15("initialized", void 0, {
|
|
5346
5417
|
F: __dxlog_file18,
|
|
5347
|
-
L:
|
|
5418
|
+
L: 210,
|
|
5348
5419
|
S: this,
|
|
5349
5420
|
C: (f, a) => f(...a)
|
|
5350
5421
|
});
|
|
@@ -5358,13 +5429,13 @@ var ClientServicesHost = class {
|
|
|
5358
5429
|
id: traceId
|
|
5359
5430
|
}), {
|
|
5360
5431
|
F: __dxlog_file18,
|
|
5361
|
-
L:
|
|
5432
|
+
L: 221,
|
|
5362
5433
|
S: this,
|
|
5363
5434
|
C: (f, a) => f(...a)
|
|
5364
5435
|
});
|
|
5365
5436
|
invariant16(this._config, "config not set", {
|
|
5366
5437
|
F: __dxlog_file18,
|
|
5367
|
-
L:
|
|
5438
|
+
L: 223,
|
|
5368
5439
|
S: this,
|
|
5369
5440
|
A: [
|
|
5370
5441
|
"this._config",
|
|
@@ -5373,7 +5444,7 @@ var ClientServicesHost = class {
|
|
|
5373
5444
|
});
|
|
5374
5445
|
invariant16(this._storage, "storage not set", {
|
|
5375
5446
|
F: __dxlog_file18,
|
|
5376
|
-
L:
|
|
5447
|
+
L: 224,
|
|
5377
5448
|
S: this,
|
|
5378
5449
|
A: [
|
|
5379
5450
|
"this._storage",
|
|
@@ -5382,7 +5453,7 @@ var ClientServicesHost = class {
|
|
|
5382
5453
|
});
|
|
5383
5454
|
invariant16(this._signalManager, "signal manager not set", {
|
|
5384
5455
|
F: __dxlog_file18,
|
|
5385
|
-
L:
|
|
5456
|
+
L: 225,
|
|
5386
5457
|
S: this,
|
|
5387
5458
|
A: [
|
|
5388
5459
|
"this._signalManager",
|
|
@@ -5391,7 +5462,7 @@ var ClientServicesHost = class {
|
|
|
5391
5462
|
});
|
|
5392
5463
|
invariant16(this._networkManager, "network manager not set", {
|
|
5393
5464
|
F: __dxlog_file18,
|
|
5394
|
-
L:
|
|
5465
|
+
L: 226,
|
|
5395
5466
|
S: this,
|
|
5396
5467
|
A: [
|
|
5397
5468
|
"this._networkManager",
|
|
@@ -5403,7 +5474,7 @@ var ClientServicesHost = class {
|
|
|
5403
5474
|
lockKey: this._resourceLock?.lockKey
|
|
5404
5475
|
}, {
|
|
5405
5476
|
F: __dxlog_file18,
|
|
5406
|
-
L:
|
|
5477
|
+
L: 229,
|
|
5407
5478
|
S: this,
|
|
5408
5479
|
C: (f, a) => f(...a)
|
|
5409
5480
|
});
|
|
@@ -5437,7 +5508,7 @@ var ClientServicesHost = class {
|
|
|
5437
5508
|
await this._serviceContext.open(ctx);
|
|
5438
5509
|
invariant16(this.serviceRegistry.services.InvitationsService, void 0, {
|
|
5439
5510
|
F: __dxlog_file18,
|
|
5440
|
-
L:
|
|
5511
|
+
L: 290,
|
|
5441
5512
|
S: this,
|
|
5442
5513
|
A: [
|
|
5443
5514
|
"this.serviceRegistry.services.InvitationsService",
|
|
@@ -5449,7 +5520,7 @@ var ClientServicesHost = class {
|
|
|
5449
5520
|
count: loadedInvitations.invitations?.length
|
|
5450
5521
|
}, {
|
|
5451
5522
|
F: __dxlog_file18,
|
|
5452
|
-
L:
|
|
5523
|
+
L: 293,
|
|
5453
5524
|
S: this,
|
|
5454
5525
|
C: (f, a) => f(...a)
|
|
5455
5526
|
});
|
|
@@ -5471,7 +5542,7 @@ var ClientServicesHost = class {
|
|
|
5471
5542
|
deviceKey
|
|
5472
5543
|
}, {
|
|
5473
5544
|
F: __dxlog_file18,
|
|
5474
|
-
L:
|
|
5545
|
+
L: 310,
|
|
5475
5546
|
S: this,
|
|
5476
5547
|
C: (f, a) => f(...a)
|
|
5477
5548
|
});
|
|
@@ -5479,7 +5550,7 @@ var ClientServicesHost = class {
|
|
|
5479
5550
|
id: traceId
|
|
5480
5551
|
}), {
|
|
5481
5552
|
F: __dxlog_file18,
|
|
5482
|
-
L:
|
|
5553
|
+
L: 311,
|
|
5483
5554
|
S: this,
|
|
5484
5555
|
C: (f, a) => f(...a)
|
|
5485
5556
|
});
|
|
@@ -5493,7 +5564,7 @@ var ClientServicesHost = class {
|
|
|
5493
5564
|
deviceKey
|
|
5494
5565
|
}, {
|
|
5495
5566
|
F: __dxlog_file18,
|
|
5496
|
-
L:
|
|
5567
|
+
L: 322,
|
|
5497
5568
|
S: this,
|
|
5498
5569
|
C: (f, a) => f(...a)
|
|
5499
5570
|
});
|
|
@@ -5509,7 +5580,7 @@ var ClientServicesHost = class {
|
|
|
5509
5580
|
deviceKey
|
|
5510
5581
|
}, {
|
|
5511
5582
|
F: __dxlog_file18,
|
|
5512
|
-
L:
|
|
5583
|
+
L: 329,
|
|
5513
5584
|
S: this,
|
|
5514
5585
|
C: (f, a) => f(...a)
|
|
5515
5586
|
});
|
|
@@ -5520,13 +5591,13 @@ var ClientServicesHost = class {
|
|
|
5520
5591
|
id: traceId
|
|
5521
5592
|
}), {
|
|
5522
5593
|
F: __dxlog_file18,
|
|
5523
|
-
L:
|
|
5594
|
+
L: 334,
|
|
5524
5595
|
S: this,
|
|
5525
5596
|
C: (f, a) => f(...a)
|
|
5526
5597
|
});
|
|
5527
5598
|
log15("resetting...", void 0, {
|
|
5528
5599
|
F: __dxlog_file18,
|
|
5529
|
-
L:
|
|
5600
|
+
L: 336,
|
|
5530
5601
|
S: this,
|
|
5531
5602
|
C: (f, a) => f(...a)
|
|
5532
5603
|
});
|
|
@@ -5534,7 +5605,7 @@ var ClientServicesHost = class {
|
|
|
5534
5605
|
await this._storage.reset();
|
|
5535
5606
|
log15("reset", void 0, {
|
|
5536
5607
|
F: __dxlog_file18,
|
|
5537
|
-
L:
|
|
5608
|
+
L: 339,
|
|
5538
5609
|
S: this,
|
|
5539
5610
|
C: (f, a) => f(...a)
|
|
5540
5611
|
});
|
|
@@ -5542,7 +5613,7 @@ var ClientServicesHost = class {
|
|
|
5542
5613
|
id: traceId
|
|
5543
5614
|
}), {
|
|
5544
5615
|
F: __dxlog_file18,
|
|
5545
|
-
L:
|
|
5616
|
+
L: 340,
|
|
5546
5617
|
S: this,
|
|
5547
5618
|
C: (f, a) => f(...a)
|
|
5548
5619
|
});
|
|
@@ -5552,12 +5623,10 @@ var ClientServicesHost = class {
|
|
|
5552
5623
|
const identity = await this._serviceContext.createIdentity(params);
|
|
5553
5624
|
await this._serviceContext.initialized.wait();
|
|
5554
5625
|
const space = await this._serviceContext.dataSpaceManager.createSpace();
|
|
5555
|
-
const obj = new Properties(void 0);
|
|
5556
|
-
obj[defaultKey] = identity.identityKey.toHex();
|
|
5557
5626
|
const automergeIndex = space.automergeSpaceState.rootUrl;
|
|
5558
5627
|
invariant16(automergeIndex, void 0, {
|
|
5559
5628
|
F: __dxlog_file18,
|
|
5560
|
-
L:
|
|
5629
|
+
L: 352,
|
|
5561
5630
|
S: this,
|
|
5562
5631
|
A: [
|
|
5563
5632
|
"automergeIndex",
|
|
@@ -5566,12 +5635,18 @@ var ClientServicesHost = class {
|
|
|
5566
5635
|
});
|
|
5567
5636
|
const document = await this._serviceContext.automergeHost.repo.find(automergeIndex);
|
|
5568
5637
|
await document.whenReady();
|
|
5638
|
+
const objectDocument = createRawObjectDoc({
|
|
5639
|
+
[defaultKey]: identity.identityKey.toHex()
|
|
5640
|
+
}, {
|
|
5641
|
+
type: E.getTypeReference(PropertiesSchema)
|
|
5642
|
+
});
|
|
5569
5643
|
document.change((doc) => {
|
|
5570
|
-
|
|
5644
|
+
assignDeep2(doc, [
|
|
5571
5645
|
"objects",
|
|
5572
|
-
|
|
5573
|
-
],
|
|
5646
|
+
objectDocument.id
|
|
5647
|
+
], objectDocument.handle.docSync());
|
|
5574
5648
|
});
|
|
5649
|
+
await sleep3(200);
|
|
5575
5650
|
return identity;
|
|
5576
5651
|
}
|
|
5577
5652
|
};
|
|
@@ -5627,4 +5702,4 @@ export {
|
|
|
5627
5702
|
createStorageObjects,
|
|
5628
5703
|
ClientServicesHost
|
|
5629
5704
|
};
|
|
5630
|
-
//# sourceMappingURL=chunk-
|
|
5705
|
+
//# sourceMappingURL=chunk-B4JZEXRB.mjs.map
|