@dxos/client-services 0.1.32-next.86f5578 → 0.1.34
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-E3FD43YN.mjs → chunk-H5IXSSI7.mjs} +125 -39
- package/dist/lib/browser/chunk-H5IXSSI7.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 +1 -1
- package/dist/lib/node/index.cjs +132 -46
- 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 +134 -48
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/identity/identity-manager.d.ts +1 -0
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +1 -0
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +1 -0
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/packlets/identity/identity-manager.ts +18 -0
- package/src/packlets/services/service-context.ts +8 -0
- package/src/packlets/services/service-host.ts +8 -1
- package/dist/lib/browser/chunk-E3FD43YN.mjs.map +0 -7
|
@@ -564,7 +564,9 @@ var Identity = class {
|
|
|
564
564
|
import assert2 from "@dxos/node-std/assert";
|
|
565
565
|
import { Event as Event2 } from "@dxos/async";
|
|
566
566
|
import { createCredentialSignerWithKey as createCredentialSignerWithKey2, CredentialGenerator } from "@dxos/credentials";
|
|
567
|
+
import { PublicKey as PublicKey3 } from "@dxos/keys";
|
|
567
568
|
import { log as log3 } from "@dxos/log";
|
|
569
|
+
import { trace } from "@dxos/protocols";
|
|
568
570
|
import { AdmittedFeed as AdmittedFeed2 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
569
571
|
import { deferFunction } from "@dxos/util";
|
|
570
572
|
var IdentityManager = class {
|
|
@@ -576,18 +578,28 @@ var IdentityManager = class {
|
|
|
576
578
|
this._feedStore = _feedStore;
|
|
577
579
|
this._spaceManager = _spaceManager;
|
|
578
580
|
this.stateUpdate = new Event2();
|
|
581
|
+
this._instanceId = PublicKey3.random().toHex();
|
|
579
582
|
}
|
|
580
583
|
get identity() {
|
|
581
584
|
return this._identity;
|
|
582
585
|
}
|
|
583
586
|
async open() {
|
|
587
|
+
var _a;
|
|
588
|
+
log3.trace("dxos.halo.identity-manager", trace.begin({
|
|
589
|
+
id: this._instanceId
|
|
590
|
+
}), {
|
|
591
|
+
file: "identity-manager.ts",
|
|
592
|
+
line: 71,
|
|
593
|
+
scope: this,
|
|
594
|
+
callSite: (f, a) => f(...a)
|
|
595
|
+
});
|
|
584
596
|
await this._metadataStore.load();
|
|
585
597
|
const identityRecord = this._metadataStore.getIdentityRecord();
|
|
586
598
|
log3("identity record", {
|
|
587
599
|
identityRecord
|
|
588
600
|
}, {
|
|
589
601
|
file: "identity-manager.ts",
|
|
590
|
-
line:
|
|
602
|
+
line: 75,
|
|
591
603
|
scope: this,
|
|
592
604
|
callSite: (f, a) => f(...a)
|
|
593
605
|
});
|
|
@@ -595,18 +607,36 @@ var IdentityManager = class {
|
|
|
595
607
|
this._identity = await this._constructIdentity(identityRecord);
|
|
596
608
|
await this._identity.open();
|
|
597
609
|
await this._identity.ready();
|
|
610
|
+
log3.trace("dxos.halo.identity", {
|
|
611
|
+
identityKey: identityRecord.identityKey,
|
|
612
|
+
displayName: (_a = this._identity.profileDocument) == null ? void 0 : _a.displayName
|
|
613
|
+
}, {
|
|
614
|
+
file: "identity-manager.ts",
|
|
615
|
+
line: 80,
|
|
616
|
+
scope: this,
|
|
617
|
+
callSite: (f, a) => f(...a)
|
|
618
|
+
});
|
|
598
619
|
this.stateUpdate.emit();
|
|
599
620
|
}
|
|
600
621
|
}
|
|
601
622
|
async close() {
|
|
602
623
|
var _a;
|
|
603
624
|
await ((_a = this._identity) == null ? void 0 : _a.close());
|
|
625
|
+
log3.trace("dxos.halo.identity-manager", trace.end({
|
|
626
|
+
id: this._instanceId
|
|
627
|
+
}), {
|
|
628
|
+
file: "identity-manager.ts",
|
|
629
|
+
line: 90,
|
|
630
|
+
scope: this,
|
|
631
|
+
callSite: (f, a) => f(...a)
|
|
632
|
+
});
|
|
604
633
|
}
|
|
605
634
|
async createIdentity({ displayName } = {}) {
|
|
635
|
+
var _a;
|
|
606
636
|
assert2(!this._identity, "Identity already exists.");
|
|
607
637
|
log3("creating identity...", {}, {
|
|
608
638
|
file: "identity-manager.ts",
|
|
609
|
-
line:
|
|
639
|
+
line: 95,
|
|
610
640
|
scope: this,
|
|
611
641
|
callSite: (f, a) => f(...a)
|
|
612
642
|
});
|
|
@@ -650,13 +680,22 @@ var IdentityManager = class {
|
|
|
650
680
|
await this._metadataStore.setIdentityRecord(identityRecord);
|
|
651
681
|
this._identity = identity;
|
|
652
682
|
await this._identity.ready();
|
|
683
|
+
log3.trace("dxos.halo.identity", {
|
|
684
|
+
identityKey: identityRecord.identityKey,
|
|
685
|
+
displayName: (_a = this._identity.profileDocument) == null ? void 0 : _a.displayName
|
|
686
|
+
}, {
|
|
687
|
+
file: "identity-manager.ts",
|
|
688
|
+
line: 150,
|
|
689
|
+
scope: this,
|
|
690
|
+
callSite: (f, a) => f(...a)
|
|
691
|
+
});
|
|
653
692
|
this.stateUpdate.emit();
|
|
654
693
|
log3("created identity", {
|
|
655
694
|
identityKey: identity.identityKey,
|
|
656
695
|
deviceKey: identity.deviceKey
|
|
657
696
|
}, {
|
|
658
697
|
file: "identity-manager.ts",
|
|
659
|
-
line:
|
|
698
|
+
line: 156,
|
|
660
699
|
scope: this,
|
|
661
700
|
callSite: (f, a) => f(...a)
|
|
662
701
|
});
|
|
@@ -666,11 +705,12 @@ var IdentityManager = class {
|
|
|
666
705
|
* Accept an existing identity. Expects it's device key to be authorized (now or later).
|
|
667
706
|
*/
|
|
668
707
|
async acceptIdentity(params) {
|
|
708
|
+
var _a;
|
|
669
709
|
log3("accepting identity", {
|
|
670
710
|
params
|
|
671
711
|
}, {
|
|
672
712
|
file: "identity-manager.ts",
|
|
673
|
-
line:
|
|
713
|
+
line: 164,
|
|
674
714
|
scope: this,
|
|
675
715
|
callSite: (f, a) => f(...a)
|
|
676
716
|
});
|
|
@@ -691,13 +731,22 @@ var IdentityManager = class {
|
|
|
691
731
|
this._identity = identity;
|
|
692
732
|
await this._metadataStore.setIdentityRecord(identityRecord);
|
|
693
733
|
await this._identity.ready();
|
|
734
|
+
log3.trace("dxos.halo.identity", {
|
|
735
|
+
identityKey: identityRecord.identityKey,
|
|
736
|
+
displayName: (_a = this._identity.profileDocument) == null ? void 0 : _a.displayName
|
|
737
|
+
}, {
|
|
738
|
+
file: "identity-manager.ts",
|
|
739
|
+
line: 184,
|
|
740
|
+
scope: this,
|
|
741
|
+
callSite: (f, a) => f(...a)
|
|
742
|
+
});
|
|
694
743
|
this.stateUpdate.emit();
|
|
695
744
|
log3("accepted identity", {
|
|
696
745
|
identityKey: identity.identityKey,
|
|
697
746
|
deviceKey: identity.deviceKey
|
|
698
747
|
}, {
|
|
699
748
|
file: "identity-manager.ts",
|
|
700
|
-
line:
|
|
749
|
+
line: 190,
|
|
701
750
|
scope: this,
|
|
702
751
|
callSite: (f, a) => f(...a)
|
|
703
752
|
});
|
|
@@ -709,7 +758,7 @@ var IdentityManager = class {
|
|
|
709
758
|
identityRecord
|
|
710
759
|
}, {
|
|
711
760
|
file: "identity-manager.ts",
|
|
712
|
-
line:
|
|
761
|
+
line: 196,
|
|
713
762
|
scope: this,
|
|
714
763
|
callSite: (f, a) => f(...a)
|
|
715
764
|
});
|
|
@@ -742,7 +791,7 @@ var IdentityManager = class {
|
|
|
742
791
|
identityKey: identityRecord.identityKey
|
|
743
792
|
}, {
|
|
744
793
|
file: "identity-manager.ts",
|
|
745
|
-
line:
|
|
794
|
+
line: 224,
|
|
746
795
|
scope: this,
|
|
747
796
|
callSite: (f, a) => f(...a)
|
|
748
797
|
});
|
|
@@ -818,7 +867,7 @@ import { scheduleTask, sleep, Trigger as Trigger2 } from "@dxos/async";
|
|
|
818
867
|
import { AbstractInvitationsHandler, AuthenticatingInvitationProvider, AUTHENTICATION_CODE_LENGTH, InvitationObservableProvider, INVITATION_TIMEOUT, ON_CLOSE_DELAY } from "@dxos/client";
|
|
819
868
|
import { Context as Context3 } from "@dxos/context";
|
|
820
869
|
import { generatePasscode } from "@dxos/credentials";
|
|
821
|
-
import { PublicKey as
|
|
870
|
+
import { PublicKey as PublicKey4 } from "@dxos/keys";
|
|
822
871
|
import { log as log4 } from "@dxos/log";
|
|
823
872
|
import { createTeleportProtocolFactory, StarTopology } from "@dxos/network-manager";
|
|
824
873
|
import { schema as schema2 } from "@dxos/protocols";
|
|
@@ -840,8 +889,8 @@ var DeviceInvitationsHandler = class extends AbstractInvitationsHandler {
|
|
|
840
889
|
const identity = this._params.getIdentity();
|
|
841
890
|
const invitation = {
|
|
842
891
|
type,
|
|
843
|
-
invitationId:
|
|
844
|
-
swarmKey: swarmKey != null ? swarmKey :
|
|
892
|
+
invitationId: PublicKey4.random().toHex(),
|
|
893
|
+
swarmKey: swarmKey != null ? swarmKey : PublicKey4.random(),
|
|
845
894
|
authenticationCode: generatePasscode(AUTHENTICATION_CODE_LENGTH)
|
|
846
895
|
};
|
|
847
896
|
const ctx = new Context3({
|
|
@@ -1102,7 +1151,7 @@ var DeviceInvitationsHandler = class extends AbstractInvitationsHandler {
|
|
|
1102
1151
|
const topic = invitation.swarmKey;
|
|
1103
1152
|
const swarmConnection = await this._networkManager.joinSwarm({
|
|
1104
1153
|
topic,
|
|
1105
|
-
peerId:
|
|
1154
|
+
peerId: PublicKey4.random(),
|
|
1106
1155
|
protocolProvider: createTeleportProtocolFactory(async (teleport) => {
|
|
1107
1156
|
teleport.addExtension("dxos.halo.invitations", createExtension());
|
|
1108
1157
|
}),
|
|
@@ -1407,7 +1456,7 @@ import { AuthenticatingInvitationProvider as AuthenticatingInvitationProvider2,
|
|
|
1407
1456
|
import { Context as Context4 } from "@dxos/context";
|
|
1408
1457
|
import { createAdmissionCredentials, generatePasscode as generatePasscode2, getCredentialAssertion } from "@dxos/credentials";
|
|
1409
1458
|
import { writeMessages as writeMessages2 } from "@dxos/feed-store";
|
|
1410
|
-
import { PublicKey as
|
|
1459
|
+
import { PublicKey as PublicKey5 } from "@dxos/keys";
|
|
1411
1460
|
import { log as log6 } from "@dxos/log";
|
|
1412
1461
|
import { createTeleportProtocolFactory as createTeleportProtocolFactory2, StarTopology as StarTopology2 } from "@dxos/network-manager";
|
|
1413
1462
|
import { schema as schema3 } from "@dxos/protocols";
|
|
@@ -1433,8 +1482,8 @@ var SpaceInvitationsHandler = class extends AbstractInvitationsHandler2 {
|
|
|
1433
1482
|
assert6(space);
|
|
1434
1483
|
const invitation = {
|
|
1435
1484
|
type,
|
|
1436
|
-
invitationId:
|
|
1437
|
-
swarmKey: swarmKey != null ? swarmKey :
|
|
1485
|
+
invitationId: PublicKey5.random().toHex(),
|
|
1486
|
+
swarmKey: swarmKey != null ? swarmKey : PublicKey5.random(),
|
|
1438
1487
|
spaceKey: space.key,
|
|
1439
1488
|
authMethod: (_a = options == null ? void 0 : options.authMethod) != null ? _a : AuthMethod.SHARED_SECRET,
|
|
1440
1489
|
authenticationCode: generatePasscode2(AUTHENTICATION_CODE_LENGTH2)
|
|
@@ -1787,7 +1836,7 @@ var SpaceInvitationsHandler = class extends AbstractInvitationsHandler2 {
|
|
|
1787
1836
|
const topic = invitation.swarmKey;
|
|
1788
1837
|
const swarmConnection = await this._networkManager.joinSwarm({
|
|
1789
1838
|
topic,
|
|
1790
|
-
peerId:
|
|
1839
|
+
peerId: PublicKey5.random(),
|
|
1791
1840
|
protocolProvider: createTeleportProtocolFactory2(async (teleport) => {
|
|
1792
1841
|
teleport.addExtension("dxos.halo.invitations", createExtension());
|
|
1793
1842
|
}),
|
|
@@ -2014,10 +2063,11 @@ import { getAsyncValue } from "@dxos/util";
|
|
|
2014
2063
|
// packages/sdk/client-services/src/packlets/services/service-host.ts
|
|
2015
2064
|
import assert12 from "@dxos/node-std/assert";
|
|
2016
2065
|
import { Event as Event7 } from "@dxos/async";
|
|
2017
|
-
import { clientServiceBundle, createDefaultModelFactory } from "@dxos/client";
|
|
2066
|
+
import { clientServiceBundle, createDefaultModelFactory, PublicKey as PublicKey10 } from "@dxos/client";
|
|
2018
2067
|
import { raise as raise3 } from "@dxos/debug";
|
|
2019
2068
|
import { DataServiceImpl } from "@dxos/echo-pipeline";
|
|
2020
2069
|
import { log as log15 } from "@dxos/log";
|
|
2070
|
+
import { trace as trace3 } from "@dxos/protocols";
|
|
2021
2071
|
import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
2022
2072
|
|
|
2023
2073
|
// packages/sdk/client-services/src/packlets/deprecated/tracing.ts
|
|
@@ -2109,7 +2159,7 @@ import { SpaceState as SpaceState2 } from "@dxos/client";
|
|
|
2109
2159
|
import { cancelWithContext, Context as Context7 } from "@dxos/context";
|
|
2110
2160
|
import { getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credentials";
|
|
2111
2161
|
import { SnapshotManager, spaceGenesis } from "@dxos/echo-pipeline";
|
|
2112
|
-
import { PublicKey as
|
|
2162
|
+
import { PublicKey as PublicKey8 } from "@dxos/keys";
|
|
2113
2163
|
import { log as log9 } from "@dxos/log";
|
|
2114
2164
|
import { Gossip, Presence } from "@dxos/teleport-extension-gossip";
|
|
2115
2165
|
import { ComplexMap as ComplexMap3, deferFunction as deferFunction2 } from "@dxos/util";
|
|
@@ -2121,7 +2171,7 @@ import { Context as Context6 } from "@dxos/context";
|
|
|
2121
2171
|
import { timed } from "@dxos/debug";
|
|
2122
2172
|
import { createMappedFeedWriter, DataPipeline } from "@dxos/echo-pipeline";
|
|
2123
2173
|
import { CancelledError, SystemError } from "@dxos/errors";
|
|
2124
|
-
import { PublicKey as
|
|
2174
|
+
import { PublicKey as PublicKey7 } from "@dxos/keys";
|
|
2125
2175
|
import { log as log8 } from "@dxos/log";
|
|
2126
2176
|
import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
2127
2177
|
import { ComplexSet as ComplexSet2 } from "@dxos/util";
|
|
@@ -2130,7 +2180,7 @@ import { ComplexSet as ComplexSet2 } from "@dxos/util";
|
|
|
2130
2180
|
import assert9 from "@dxos/node-std/assert";
|
|
2131
2181
|
import { DeferredTask, Event as Event4, scheduleTask as scheduleTask3, sleep as sleep3, TimeoutError, Trigger as Trigger4 } from "@dxos/async";
|
|
2132
2182
|
import { Context as Context5, rejectOnDispose } from "@dxos/context";
|
|
2133
|
-
import { PublicKey as
|
|
2183
|
+
import { PublicKey as PublicKey6 } from "@dxos/keys";
|
|
2134
2184
|
import { log as log7 } from "@dxos/log";
|
|
2135
2185
|
import { schema as schema4 } from "@dxos/protocols";
|
|
2136
2186
|
import { RpcExtension as RpcExtension3 } from "@dxos/teleport";
|
|
@@ -2143,8 +2193,8 @@ var NotarizationPlugin = class {
|
|
|
2143
2193
|
this._ctx = new Context5();
|
|
2144
2194
|
this._extensionOpened = new Event4();
|
|
2145
2195
|
this._extensions = /* @__PURE__ */ new Set();
|
|
2146
|
-
this._processedCredentials = new ComplexSet(
|
|
2147
|
-
this._processCredentialsTriggers = new ComplexMap2(
|
|
2196
|
+
this._processedCredentials = new ComplexSet(PublicKey6.hash);
|
|
2197
|
+
this._processCredentialsTriggers = new ComplexMap2(PublicKey6.hash);
|
|
2148
2198
|
}
|
|
2149
2199
|
async open() {
|
|
2150
2200
|
}
|
|
@@ -2402,7 +2452,7 @@ var DataSpace = class DataSpace2 {
|
|
|
2402
2452
|
snapshotId: params.snapshotId
|
|
2403
2453
|
});
|
|
2404
2454
|
this.authVerifier = new TrustedKeySetAuthVerifier({
|
|
2405
|
-
trustedKeysProvider: () => new ComplexSet2(
|
|
2455
|
+
trustedKeysProvider: () => new ComplexSet2(PublicKey7.hash, Array.from(this._inner.spaceState.members.keys())),
|
|
2406
2456
|
update: this._inner.stateUpdate,
|
|
2407
2457
|
authTimeout: AUTH_TIMEOUT2
|
|
2408
2458
|
});
|
|
@@ -2605,7 +2655,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
2605
2655
|
this._snapshotStore = _snapshotStore;
|
|
2606
2656
|
this._ctx = new Context7();
|
|
2607
2657
|
this.updated = new Event6();
|
|
2608
|
-
this._spaces = new ComplexMap3(
|
|
2658
|
+
this._spaces = new ComplexMap3(PublicKey8.hash);
|
|
2609
2659
|
this._isOpen = false;
|
|
2610
2660
|
}
|
|
2611
2661
|
// TODO(burdon): Remove.
|
|
@@ -3513,7 +3563,9 @@ import { failUndefined as failUndefined2 } from "@dxos/debug";
|
|
|
3513
3563
|
import { valueEncoding, MetadataStore, SpaceManager, DataServiceSubscriptions, SnapshotStore } from "@dxos/echo-pipeline";
|
|
3514
3564
|
import { FeedFactory, FeedStore } from "@dxos/feed-store";
|
|
3515
3565
|
import { Keyring } from "@dxos/keyring";
|
|
3566
|
+
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
3516
3567
|
import { log as log14 } from "@dxos/log";
|
|
3568
|
+
import { trace as trace2 } from "@dxos/protocols";
|
|
3517
3569
|
var ServiceContext = class {
|
|
3518
3570
|
// prettier-ignore
|
|
3519
3571
|
constructor(storage, networkManager, modelFactory) {
|
|
@@ -3522,6 +3574,7 @@ var ServiceContext = class {
|
|
|
3522
3574
|
this.modelFactory = modelFactory;
|
|
3523
3575
|
this.initialized = new Trigger8();
|
|
3524
3576
|
this.dataServiceSubscriptions = new DataServiceSubscriptions();
|
|
3577
|
+
this._instanceId = PublicKey9.random().toHex();
|
|
3525
3578
|
this.metadataStore = new MetadataStore(storage.createDirectory("metadata"));
|
|
3526
3579
|
this.snapshotStore = new SnapshotStore(storage.createDirectory("snapshots"));
|
|
3527
3580
|
this.keyring = new Keyring(storage.createDirectory("keyring"));
|
|
@@ -3550,9 +3603,17 @@ var ServiceContext = class {
|
|
|
3550
3603
|
});
|
|
3551
3604
|
}
|
|
3552
3605
|
async open() {
|
|
3606
|
+
log14.trace("dxos.sdk.client-services", trace2.begin({
|
|
3607
|
+
id: this._instanceId
|
|
3608
|
+
}), {
|
|
3609
|
+
file: "service-context.ts",
|
|
3610
|
+
line: 98,
|
|
3611
|
+
scope: this,
|
|
3612
|
+
callSite: (f, a) => f(...a)
|
|
3613
|
+
});
|
|
3553
3614
|
log14("opening...", {}, {
|
|
3554
3615
|
file: "service-context.ts",
|
|
3555
|
-
line:
|
|
3616
|
+
line: 100,
|
|
3556
3617
|
scope: this,
|
|
3557
3618
|
callSite: (f, a) => f(...a)
|
|
3558
3619
|
});
|
|
@@ -3564,7 +3625,7 @@ var ServiceContext = class {
|
|
|
3564
3625
|
}
|
|
3565
3626
|
log14("opened", {}, {
|
|
3566
3627
|
file: "service-context.ts",
|
|
3567
|
-
line:
|
|
3628
|
+
line: 107,
|
|
3568
3629
|
scope: this,
|
|
3569
3630
|
callSite: (f, a) => f(...a)
|
|
3570
3631
|
});
|
|
@@ -3573,7 +3634,7 @@ var ServiceContext = class {
|
|
|
3573
3634
|
var _a, _b;
|
|
3574
3635
|
log14("closing...", {}, {
|
|
3575
3636
|
file: "service-context.ts",
|
|
3576
|
-
line:
|
|
3637
|
+
line: 111,
|
|
3577
3638
|
scope: this,
|
|
3578
3639
|
callSite: (f, a) => f(...a)
|
|
3579
3640
|
});
|
|
@@ -3586,7 +3647,15 @@ var ServiceContext = class {
|
|
|
3586
3647
|
this.dataServiceSubscriptions.clear();
|
|
3587
3648
|
log14("closed", {}, {
|
|
3588
3649
|
file: "service-context.ts",
|
|
3589
|
-
line:
|
|
3650
|
+
line: 119,
|
|
3651
|
+
scope: this,
|
|
3652
|
+
callSite: (f, a) => f(...a)
|
|
3653
|
+
});
|
|
3654
|
+
log14.trace("dxos.sdk.client-services", trace2.end({
|
|
3655
|
+
id: this._instanceId
|
|
3656
|
+
}), {
|
|
3657
|
+
file: "service-context.ts",
|
|
3658
|
+
line: 121,
|
|
3590
3659
|
scope: this,
|
|
3591
3660
|
callSite: (f, a) => f(...a)
|
|
3592
3661
|
});
|
|
@@ -3594,7 +3663,7 @@ var ServiceContext = class {
|
|
|
3594
3663
|
async reset() {
|
|
3595
3664
|
log14("resetting...", {}, {
|
|
3596
3665
|
file: "service-context.ts",
|
|
3597
|
-
line:
|
|
3666
|
+
line: 125,
|
|
3598
3667
|
scope: this,
|
|
3599
3668
|
callSite: (f, a) => f(...a)
|
|
3600
3669
|
});
|
|
@@ -3602,7 +3671,7 @@ var ServiceContext = class {
|
|
|
3602
3671
|
await this.storage.reset();
|
|
3603
3672
|
log14("reset", {}, {
|
|
3604
3673
|
file: "service-context.ts",
|
|
3605
|
-
line:
|
|
3674
|
+
line: 128,
|
|
3606
3675
|
scope: this,
|
|
3607
3676
|
callSite: (f, a) => f(...a)
|
|
3608
3677
|
});
|
|
@@ -3622,7 +3691,7 @@ var ServiceContext = class {
|
|
|
3622
3691
|
var _a;
|
|
3623
3692
|
log14("initializing spaces...", {}, {
|
|
3624
3693
|
file: "service-context.ts",
|
|
3625
|
-
line:
|
|
3694
|
+
line: 147,
|
|
3626
3695
|
scope: this,
|
|
3627
3696
|
callSite: (f, a) => f(...a)
|
|
3628
3697
|
});
|
|
@@ -3658,7 +3727,7 @@ var ServiceContext = class {
|
|
|
3658
3727
|
details: assertion
|
|
3659
3728
|
}, {
|
|
3660
3729
|
file: "service-context.ts",
|
|
3661
|
-
line:
|
|
3730
|
+
line: 190,
|
|
3662
3731
|
scope: this,
|
|
3663
3732
|
callSite: (f, a) => f(...a)
|
|
3664
3733
|
});
|
|
@@ -3669,7 +3738,7 @@ var ServiceContext = class {
|
|
|
3669
3738
|
details: assertion
|
|
3670
3739
|
}, {
|
|
3671
3740
|
file: "service-context.ts",
|
|
3672
|
-
line:
|
|
3741
|
+
line: 194,
|
|
3673
3742
|
scope: this,
|
|
3674
3743
|
callSite: (f, a) => f(...a)
|
|
3675
3744
|
});
|
|
@@ -3680,7 +3749,7 @@ var ServiceContext = class {
|
|
|
3680
3749
|
details: assertion
|
|
3681
3750
|
}, {
|
|
3682
3751
|
file: "service-context.ts",
|
|
3683
|
-
line:
|
|
3752
|
+
line: 199,
|
|
3684
3753
|
scope: this,
|
|
3685
3754
|
callSite: (f, a) => f(...a)
|
|
3686
3755
|
});
|
|
@@ -3691,7 +3760,7 @@ var ServiceContext = class {
|
|
|
3691
3760
|
} catch (err) {
|
|
3692
3761
|
log14.catch(err, {}, {
|
|
3693
3762
|
file: "service-context.ts",
|
|
3694
|
-
line:
|
|
3763
|
+
line: 205,
|
|
3695
3764
|
scope: this,
|
|
3696
3765
|
callSite: (f, a) => f(...a)
|
|
3697
3766
|
});
|
|
@@ -3740,6 +3809,7 @@ var ClientServicesHost = class {
|
|
|
3740
3809
|
this._statusUpdate = new Event7();
|
|
3741
3810
|
this._opening = false;
|
|
3742
3811
|
this._open = false;
|
|
3812
|
+
this._instanceId = PublicKey10.random().toHex();
|
|
3743
3813
|
this._storage = storage;
|
|
3744
3814
|
this._modelFactory = modelFactory;
|
|
3745
3815
|
if (config) {
|
|
@@ -3812,6 +3882,14 @@ var ClientServicesHost = class {
|
|
|
3812
3882
|
if (this._open) {
|
|
3813
3883
|
return;
|
|
3814
3884
|
}
|
|
3885
|
+
log15.trace("dxos.sdk.client-services-host", trace3.begin({
|
|
3886
|
+
id: this._instanceId
|
|
3887
|
+
}), {
|
|
3888
|
+
file: "service-host.ts",
|
|
3889
|
+
line: 168,
|
|
3890
|
+
scope: this,
|
|
3891
|
+
callSite: (f, a) => f(...a)
|
|
3892
|
+
});
|
|
3815
3893
|
assert12(this._config, "config not set");
|
|
3816
3894
|
assert12(this._storage, "storage not set");
|
|
3817
3895
|
assert12(this._networkManager, "network manager not set");
|
|
@@ -3820,7 +3898,7 @@ var ClientServicesHost = class {
|
|
|
3820
3898
|
lockKey: (_a = this._resourceLock) == null ? void 0 : _a.lockKey
|
|
3821
3899
|
}, {
|
|
3822
3900
|
file: "service-host.ts",
|
|
3823
|
-
line:
|
|
3901
|
+
line: 175,
|
|
3824
3902
|
scope: this,
|
|
3825
3903
|
callSite: (f, a) => f(...a)
|
|
3826
3904
|
});
|
|
@@ -3861,7 +3939,7 @@ var ClientServicesHost = class {
|
|
|
3861
3939
|
deviceKey
|
|
3862
3940
|
}, {
|
|
3863
3941
|
file: "service-host.ts",
|
|
3864
|
-
line:
|
|
3942
|
+
line: 229,
|
|
3865
3943
|
scope: this,
|
|
3866
3944
|
callSite: (f, a) => f(...a)
|
|
3867
3945
|
});
|
|
@@ -3876,7 +3954,7 @@ var ClientServicesHost = class {
|
|
|
3876
3954
|
deviceKey
|
|
3877
3955
|
}, {
|
|
3878
3956
|
file: "service-host.ts",
|
|
3879
|
-
line:
|
|
3957
|
+
line: 238,
|
|
3880
3958
|
scope: this,
|
|
3881
3959
|
callSite: (f, a) => f(...a)
|
|
3882
3960
|
});
|
|
@@ -3890,7 +3968,15 @@ var ClientServicesHost = class {
|
|
|
3890
3968
|
deviceKey
|
|
3891
3969
|
}, {
|
|
3892
3970
|
file: "service-host.ts",
|
|
3893
|
-
line:
|
|
3971
|
+
line: 243,
|
|
3972
|
+
scope: this,
|
|
3973
|
+
callSite: (f, a) => f(...a)
|
|
3974
|
+
});
|
|
3975
|
+
log15.trace("dxos.sdk.client-services-host", trace3.end({
|
|
3976
|
+
id: this._instanceId
|
|
3977
|
+
}), {
|
|
3978
|
+
file: "service-host.ts",
|
|
3979
|
+
line: 245,
|
|
3894
3980
|
scope: this,
|
|
3895
3981
|
callSite: (f, a) => f(...a)
|
|
3896
3982
|
});
|
|
@@ -4112,4 +4198,4 @@ export {
|
|
|
4112
4198
|
LocalClientServices,
|
|
4113
4199
|
fromHost
|
|
4114
4200
|
};
|
|
4115
|
-
//# sourceMappingURL=chunk-
|
|
4201
|
+
//# sourceMappingURL=chunk-H5IXSSI7.mjs.map
|