@dxos/client-services 0.1.53-next.e9dc2bc → 0.1.54-main.270ec56
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-3EI4PM2V.mjs → chunk-F4BHRFH4.mjs} +74 -20
- package/dist/lib/browser/chunk-F4BHRFH4.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +20 -59
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +101 -87
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +62 -57
- package/dist/lib/node/packlets/testing/index.cjs.map +4 -4
- package/dist/types/src/packlets/services/index.d.ts +1 -0
- package/dist/types/src/packlets/services/index.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-session.d.ts.map +1 -1
- package/package.json +32 -32
- package/src/packlets/services/index.ts +1 -0
- package/src/packlets/vault/worker-session.ts +5 -4
- package/dist/lib/browser/chunk-3EI4PM2V.mjs.map +0 -7
|
@@ -65,11 +65,16 @@ var import_tiny_invariant14 = __toESM(require("tiny-invariant"));
|
|
|
65
65
|
var import_async18 = require("@dxos/async");
|
|
66
66
|
var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
|
|
67
67
|
|
|
68
|
+
// packages/sdk/client-services/src/packlets/services/client-rpc-server.ts
|
|
69
|
+
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
70
|
+
var import_debug = require("@dxos/debug");
|
|
71
|
+
var import_rpc = require("@dxos/rpc");
|
|
72
|
+
|
|
68
73
|
// packages/sdk/client-services/src/packlets/services/service-context.ts
|
|
69
74
|
var import_tiny_invariant11 = __toESM(require("tiny-invariant"));
|
|
70
75
|
var import_async11 = require("@dxos/async");
|
|
71
76
|
var import_credentials14 = require("@dxos/credentials");
|
|
72
|
-
var
|
|
77
|
+
var import_debug7 = require("@dxos/debug");
|
|
73
78
|
var import_echo_pipeline3 = require("@dxos/echo-pipeline");
|
|
74
79
|
var import_feed_store3 = require("@dxos/feed-store");
|
|
75
80
|
var import_keyring = require("@dxos/keyring");
|
|
@@ -200,7 +205,7 @@ var import_tiny_invariant = __toESM(require("tiny-invariant"));
|
|
|
200
205
|
var import_async2 = require("@dxos/async");
|
|
201
206
|
var import_client_protocol = require("@dxos/client-protocol");
|
|
202
207
|
var import_credentials3 = require("@dxos/credentials");
|
|
203
|
-
var
|
|
208
|
+
var import_debug2 = require("@dxos/debug");
|
|
204
209
|
var import_feed_store = require("@dxos/feed-store");
|
|
205
210
|
var import_log2 = require("@dxos/log");
|
|
206
211
|
var import_credentials4 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
@@ -270,8 +275,8 @@ var Identity = class {
|
|
|
270
275
|
var _a, _b;
|
|
271
276
|
return {
|
|
272
277
|
deviceKey: this.deviceKey,
|
|
273
|
-
controlFeedKey: (_a = this.space.controlFeedKey) != null ? _a : (0,
|
|
274
|
-
dataFeedKey: (_b = this.space.dataFeedKey) != null ? _b : (0,
|
|
278
|
+
controlFeedKey: (_a = this.space.controlFeedKey) != null ? _a : (0, import_debug2.failUndefined)(),
|
|
279
|
+
dataFeedKey: (_b = this.space.dataFeedKey) != null ? _b : (0, import_debug2.failUndefined)()
|
|
275
280
|
};
|
|
276
281
|
}
|
|
277
282
|
/**
|
|
@@ -605,9 +610,9 @@ var IdentityManager = class {
|
|
|
605
610
|
|
|
606
611
|
// packages/sdk/client-services/src/packlets/identity/identity-service.ts
|
|
607
612
|
var import_tiny_invariant3 = __toESM(require("tiny-invariant"));
|
|
608
|
-
var
|
|
613
|
+
var import_codec_protobuf2 = require("@dxos/codec-protobuf");
|
|
609
614
|
var import_credentials7 = require("@dxos/credentials");
|
|
610
|
-
var
|
|
615
|
+
var import_debug3 = require("@dxos/debug");
|
|
611
616
|
var IdentityServiceImpl = class {
|
|
612
617
|
// TODO(wittjosiah): Remove dependency on service context.
|
|
613
618
|
constructor(_serviceContext) {
|
|
@@ -618,10 +623,10 @@ var IdentityServiceImpl = class {
|
|
|
618
623
|
return this._getIdentity();
|
|
619
624
|
}
|
|
620
625
|
async recoverIdentity(request) {
|
|
621
|
-
return (0,
|
|
626
|
+
return (0, import_debug3.todo)();
|
|
622
627
|
}
|
|
623
628
|
queryIdentity() {
|
|
624
|
-
return new
|
|
629
|
+
return new import_codec_protobuf2.Stream(({ next }) => {
|
|
625
630
|
const emitNext = () => next({
|
|
626
631
|
identity: this._getIdentity()
|
|
627
632
|
});
|
|
@@ -1558,7 +1563,7 @@ var InvitationsHandler = class {
|
|
|
1558
1563
|
// packages/sdk/client-services/src/packlets/invitations/invitations-service.ts
|
|
1559
1564
|
var import_tiny_invariant7 = __toESM(require("tiny-invariant"));
|
|
1560
1565
|
var import_async6 = require("@dxos/async");
|
|
1561
|
-
var
|
|
1566
|
+
var import_codec_protobuf3 = require("@dxos/codec-protobuf");
|
|
1562
1567
|
var import_log6 = require("@dxos/log");
|
|
1563
1568
|
var import_services4 = require("@dxos/protocols/proto/dxos/client/services");
|
|
1564
1569
|
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
|
|
@@ -1588,7 +1593,7 @@ var InvitationsServiceImpl = class {
|
|
|
1588
1593
|
this._createInvitations.set(invitation.get().invitationId, invitation);
|
|
1589
1594
|
this._invitationCreated.emit(invitation.get());
|
|
1590
1595
|
}
|
|
1591
|
-
return new
|
|
1596
|
+
return new import_codec_protobuf3.Stream(({ next, close }) => {
|
|
1592
1597
|
invitation.subscribe((invitation2) => {
|
|
1593
1598
|
next(invitation2);
|
|
1594
1599
|
}, (err) => {
|
|
@@ -1610,7 +1615,7 @@ var InvitationsServiceImpl = class {
|
|
|
1610
1615
|
this._acceptInvitations.set(invitation.get().invitationId, invitation);
|
|
1611
1616
|
this._invitationAccepted.emit(invitation.get());
|
|
1612
1617
|
}
|
|
1613
|
-
return new
|
|
1618
|
+
return new import_codec_protobuf3.Stream(({ next, close }) => {
|
|
1614
1619
|
invitation.subscribe((invitation2) => {
|
|
1615
1620
|
next(invitation2);
|
|
1616
1621
|
}, (err) => {
|
|
@@ -1673,7 +1678,7 @@ var InvitationsServiceImpl = class {
|
|
|
1673
1678
|
}
|
|
1674
1679
|
}
|
|
1675
1680
|
queryInvitations() {
|
|
1676
|
-
return new
|
|
1681
|
+
return new import_codec_protobuf3.Stream(({ next, ctx }) => {
|
|
1677
1682
|
this._invitationCreated.on(ctx, (invitation) => {
|
|
1678
1683
|
next({
|
|
1679
1684
|
action: import_services4.QueryInvitationsResponse.Action.ADDED,
|
|
@@ -1831,7 +1836,7 @@ var import_util4 = require("@dxos/util");
|
|
|
1831
1836
|
var import_async8 = require("@dxos/async");
|
|
1832
1837
|
var import_client_protocol3 = require("@dxos/client-protocol");
|
|
1833
1838
|
var import_context5 = require("@dxos/context");
|
|
1834
|
-
var
|
|
1839
|
+
var import_debug4 = require("@dxos/debug");
|
|
1835
1840
|
var import_echo_pipeline = require("@dxos/echo-pipeline");
|
|
1836
1841
|
var import_errors3 = require("@dxos/errors");
|
|
1837
1842
|
var import_keys6 = require("@dxos/keys");
|
|
@@ -2365,7 +2370,7 @@ _ts_decorate([
|
|
|
2365
2370
|
import_async8.synchronized
|
|
2366
2371
|
], DataSpace.prototype, "close", null);
|
|
2367
2372
|
_ts_decorate([
|
|
2368
|
-
(0,
|
|
2373
|
+
(0, import_debug4.timed)(1e4)
|
|
2369
2374
|
], DataSpace.prototype, "_createWritableFeeds", null);
|
|
2370
2375
|
_ts_decorate([
|
|
2371
2376
|
import_async8.synchronized
|
|
@@ -2379,7 +2384,7 @@ DataSpace = _ts_decorate([
|
|
|
2379
2384
|
|
|
2380
2385
|
// packages/sdk/client-services/src/packlets/spaces/genesis.ts
|
|
2381
2386
|
var import_credentials11 = require("@dxos/credentials");
|
|
2382
|
-
var
|
|
2387
|
+
var import_debug5 = require("@dxos/debug");
|
|
2383
2388
|
var import_credentials12 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
2384
2389
|
var import_timeframe2 = require("@dxos/timeframe");
|
|
2385
2390
|
var spaceGenesis = async (keyring, signingContext, space) => {
|
|
@@ -2403,11 +2408,11 @@ var spaceGenesis = async (keyring, signingContext, space) => {
|
|
|
2403
2408
|
spaceKey: space.key,
|
|
2404
2409
|
role: import_credentials12.SpaceMember.Role.ADMIN,
|
|
2405
2410
|
profile: signingContext.profile,
|
|
2406
|
-
genesisFeedKey: (_a = space.controlFeedKey) != null ? _a : (0,
|
|
2411
|
+
genesisFeedKey: (_a = space.controlFeedKey) != null ? _a : (0, import_debug5.failUndefined)()
|
|
2407
2412
|
}
|
|
2408
2413
|
}),
|
|
2409
2414
|
await signingContext.credentialSigner.createCredential({
|
|
2410
|
-
subject: (_b = space.controlFeedKey) != null ? _b : (0,
|
|
2415
|
+
subject: (_b = space.controlFeedKey) != null ? _b : (0, import_debug5.failUndefined)(),
|
|
2411
2416
|
assertion: {
|
|
2412
2417
|
"@type": "dxos.halo.credentials.AdmittedFeed",
|
|
2413
2418
|
spaceKey: space.key,
|
|
@@ -2417,7 +2422,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
|
|
|
2417
2422
|
}
|
|
2418
2423
|
}),
|
|
2419
2424
|
await signingContext.credentialSigner.createCredential({
|
|
2420
|
-
subject: (_c = space.dataFeedKey) != null ? _c : (0,
|
|
2425
|
+
subject: (_c = space.dataFeedKey) != null ? _c : (0, import_debug5.failUndefined)(),
|
|
2421
2426
|
assertion: {
|
|
2422
2427
|
"@type": "dxos.halo.credentials.AdmittedFeed",
|
|
2423
2428
|
spaceKey: space.key,
|
|
@@ -2427,7 +2432,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
|
|
|
2427
2432
|
}
|
|
2428
2433
|
}),
|
|
2429
2434
|
await signingContext.credentialSigner.createCredential({
|
|
2430
|
-
subject: (_d = space.key) != null ? _d : (0,
|
|
2435
|
+
subject: (_d = space.key) != null ? _d : (0, import_debug5.failUndefined)(),
|
|
2431
2436
|
assertion: {
|
|
2432
2437
|
"@type": "dxos.halo.credentials.Epoch",
|
|
2433
2438
|
number: 0,
|
|
@@ -2749,8 +2754,8 @@ DataSpaceManager = _ts_decorate2([
|
|
|
2749
2754
|
|
|
2750
2755
|
// packages/sdk/client-services/src/packlets/spaces/spaces-service.ts
|
|
2751
2756
|
var import_async10 = require("@dxos/async");
|
|
2752
|
-
var
|
|
2753
|
-
var
|
|
2757
|
+
var import_codec_protobuf4 = require("@dxos/codec-protobuf");
|
|
2758
|
+
var import_debug6 = require("@dxos/debug");
|
|
2754
2759
|
var import_echo_pipeline2 = require("@dxos/echo-pipeline");
|
|
2755
2760
|
var import_errors4 = require("@dxos/errors");
|
|
2756
2761
|
var import_log11 = require("@dxos/log");
|
|
@@ -2776,7 +2781,7 @@ var SpacesServiceImpl = class {
|
|
|
2776
2781
|
async updateSpace({ spaceKey, state }) {
|
|
2777
2782
|
var _a;
|
|
2778
2783
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2779
|
-
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0,
|
|
2784
|
+
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
2780
2785
|
if (state) {
|
|
2781
2786
|
switch (state) {
|
|
2782
2787
|
case import_services8.SpaceState.ACTIVE:
|
|
@@ -2791,7 +2796,7 @@ var SpacesServiceImpl = class {
|
|
|
2791
2796
|
}
|
|
2792
2797
|
}
|
|
2793
2798
|
querySpaces() {
|
|
2794
|
-
return new
|
|
2799
|
+
return new import_codec_protobuf4.Stream(({ next, ctx }) => {
|
|
2795
2800
|
const scheduler = new import_async10.UpdateScheduler(ctx, async () => {
|
|
2796
2801
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2797
2802
|
const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this._serializeSpace(space));
|
|
@@ -2842,15 +2847,15 @@ var SpacesServiceImpl = class {
|
|
|
2842
2847
|
async postMessage({ spaceKey, channel, message }) {
|
|
2843
2848
|
var _a;
|
|
2844
2849
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2845
|
-
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0,
|
|
2850
|
+
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
2846
2851
|
await space.postMessage(getChannelId(channel), message);
|
|
2847
2852
|
}
|
|
2848
2853
|
subscribeMessages({ spaceKey, channel }) {
|
|
2849
|
-
return new
|
|
2854
|
+
return new import_codec_protobuf4.Stream(({ ctx, next }) => {
|
|
2850
2855
|
(0, import_async10.scheduleTask)(ctx, async () => {
|
|
2851
2856
|
var _a;
|
|
2852
2857
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2853
|
-
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0,
|
|
2858
|
+
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
2854
2859
|
const handle = space.listen(getChannelId(channel), (message) => {
|
|
2855
2860
|
next(message);
|
|
2856
2861
|
});
|
|
@@ -2859,9 +2864,9 @@ var SpacesServiceImpl = class {
|
|
|
2859
2864
|
});
|
|
2860
2865
|
}
|
|
2861
2866
|
queryCredentials({ spaceKey }) {
|
|
2862
|
-
return new
|
|
2867
|
+
return new import_codec_protobuf4.Stream(({ ctx, next }) => {
|
|
2863
2868
|
var _a;
|
|
2864
|
-
const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0,
|
|
2869
|
+
const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
2865
2870
|
const processor = {
|
|
2866
2871
|
processCredential: async (credential) => {
|
|
2867
2872
|
next(credential);
|
|
@@ -2873,7 +2878,7 @@ var SpacesServiceImpl = class {
|
|
|
2873
2878
|
}
|
|
2874
2879
|
async writeCredentials({ spaceKey, credentials }) {
|
|
2875
2880
|
var _a;
|
|
2876
|
-
const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0,
|
|
2881
|
+
const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
2877
2882
|
for (const credential of credentials != null ? credentials : []) {
|
|
2878
2883
|
await space.controlPipeline.writer.write({
|
|
2879
2884
|
credential: {
|
|
@@ -2885,7 +2890,7 @@ var SpacesServiceImpl = class {
|
|
|
2885
2890
|
async createEpoch({ spaceKey }) {
|
|
2886
2891
|
var _a;
|
|
2887
2892
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2888
|
-
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0,
|
|
2893
|
+
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
2889
2894
|
await space.createEpoch();
|
|
2890
2895
|
}
|
|
2891
2896
|
_serializeSpace(space) {
|
|
@@ -2965,7 +2970,7 @@ var ServiceContext = class {
|
|
|
2965
2970
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
2966
2971
|
this._handlerFactories.set(import_services9.Invitation.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => {
|
|
2967
2972
|
var _a;
|
|
2968
|
-
return (_a = this.identityManager.identity) != null ? _a : (0,
|
|
2973
|
+
return (_a = this.identityManager.identity) != null ? _a : (0, import_debug7.failUndefined)();
|
|
2969
2974
|
}, this._acceptIdentity.bind(this)));
|
|
2970
2975
|
}
|
|
2971
2976
|
async open() {
|
|
@@ -3061,7 +3066,7 @@ var ServiceContext = class {
|
|
|
3061
3066
|
S: this,
|
|
3062
3067
|
C: (f, a) => f(...a)
|
|
3063
3068
|
});
|
|
3064
|
-
const identity = (_a = this.identityManager.identity) != null ? _a : (0,
|
|
3069
|
+
const identity = (_a = this.identityManager.identity) != null ? _a : (0, import_debug7.failUndefined)();
|
|
3065
3070
|
const signingContext = {
|
|
3066
3071
|
credentialSigner: identity.getIdentityCredentialSigner(),
|
|
3067
3072
|
identityKey: identity.identityKey,
|
|
@@ -3157,7 +3162,7 @@ var import_text_model = require("@dxos/text-model");
|
|
|
3157
3162
|
|
|
3158
3163
|
// packages/sdk/client-services/src/packlets/devices/devices-service.ts
|
|
3159
3164
|
var import_async12 = require("@dxos/async");
|
|
3160
|
-
var
|
|
3165
|
+
var import_codec_protobuf5 = require("@dxos/codec-protobuf");
|
|
3161
3166
|
var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3162
3167
|
var DevicesServiceImpl = class {
|
|
3163
3168
|
constructor(_identityManager) {
|
|
@@ -3167,7 +3172,7 @@ var DevicesServiceImpl = class {
|
|
|
3167
3172
|
throw new Error("Method not implemented.");
|
|
3168
3173
|
}
|
|
3169
3174
|
queryDevices() {
|
|
3170
|
-
return new
|
|
3175
|
+
return new import_codec_protobuf5.Stream(({ next }) => {
|
|
3171
3176
|
const update = () => {
|
|
3172
3177
|
var _a;
|
|
3173
3178
|
const deviceKeys = (_a = this._identityManager.identity) == null ? void 0 : _a.authorizedDeviceKeys;
|
|
@@ -3204,16 +3209,16 @@ var DevicesServiceImpl = class {
|
|
|
3204
3209
|
|
|
3205
3210
|
// packages/sdk/client-services/src/packlets/devtools/devtools.ts
|
|
3206
3211
|
var import_async15 = require("@dxos/async");
|
|
3207
|
-
var
|
|
3212
|
+
var import_codec_protobuf11 = require("@dxos/codec-protobuf");
|
|
3208
3213
|
|
|
3209
3214
|
// packages/sdk/client-services/src/packlets/devtools/feeds.ts
|
|
3210
3215
|
var import_async13 = require("@dxos/async");
|
|
3211
|
-
var
|
|
3216
|
+
var import_codec_protobuf6 = require("@dxos/codec-protobuf");
|
|
3212
3217
|
var import_feed_store4 = require("@dxos/feed-store");
|
|
3213
3218
|
var import_keys9 = require("@dxos/keys");
|
|
3214
3219
|
var import_util6 = require("@dxos/util");
|
|
3215
3220
|
var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
|
|
3216
|
-
return new
|
|
3221
|
+
return new import_codec_protobuf6.Stream(({ next }) => {
|
|
3217
3222
|
const subscriptions = new import_async13.EventSubscriptions();
|
|
3218
3223
|
const feedMap = new import_util6.ComplexMap(import_keys9.PublicKey.hash);
|
|
3219
3224
|
const update = () => {
|
|
@@ -3245,7 +3250,7 @@ var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
|
|
|
3245
3250
|
});
|
|
3246
3251
|
};
|
|
3247
3252
|
var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
|
|
3248
|
-
return new
|
|
3253
|
+
return new import_codec_protobuf6.Stream(({ next }) => {
|
|
3249
3254
|
if (!feedKey) {
|
|
3250
3255
|
return;
|
|
3251
3256
|
}
|
|
@@ -3285,8 +3290,8 @@ var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
|
|
|
3285
3290
|
|
|
3286
3291
|
// packages/sdk/client-services/src/packlets/devtools/keys.ts
|
|
3287
3292
|
var import_async14 = require("@dxos/async");
|
|
3288
|
-
var
|
|
3289
|
-
var subscribeToKeyringKeys = ({ keyring }) => new
|
|
3293
|
+
var import_codec_protobuf7 = require("@dxos/codec-protobuf");
|
|
3294
|
+
var subscribeToKeyringKeys = ({ keyring }) => new import_codec_protobuf7.Stream(({ next, ctx }) => {
|
|
3290
3295
|
const update = async () => {
|
|
3291
3296
|
next({
|
|
3292
3297
|
keys: await keyring.list()
|
|
@@ -3297,8 +3302,8 @@ var subscribeToKeyringKeys = ({ keyring }) => new import_codec_protobuf6.Stream(
|
|
|
3297
3302
|
});
|
|
3298
3303
|
|
|
3299
3304
|
// packages/sdk/client-services/src/packlets/devtools/metadata.ts
|
|
3300
|
-
var
|
|
3301
|
-
var subscribeToMetadata = ({ context }) => new
|
|
3305
|
+
var import_codec_protobuf8 = require("@dxos/codec-protobuf");
|
|
3306
|
+
var subscribeToMetadata = ({ context }) => new import_codec_protobuf8.Stream(({ next, ctx }) => {
|
|
3302
3307
|
context.metadataStore.update.on(ctx, (data) => next({
|
|
3303
3308
|
metadata: data
|
|
3304
3309
|
}));
|
|
@@ -3308,10 +3313,10 @@ var subscribeToMetadata = ({ context }) => new import_codec_protobuf7.Stream(({
|
|
|
3308
3313
|
});
|
|
3309
3314
|
|
|
3310
3315
|
// packages/sdk/client-services/src/packlets/devtools/network.ts
|
|
3311
|
-
var
|
|
3316
|
+
var import_codec_protobuf9 = require("@dxos/codec-protobuf");
|
|
3312
3317
|
var import_context7 = require("@dxos/context");
|
|
3313
3318
|
var import_keys10 = require("@dxos/keys");
|
|
3314
|
-
var subscribeToNetworkStatus = ({ signalManager }) => new
|
|
3319
|
+
var subscribeToNetworkStatus = ({ signalManager }) => new import_codec_protobuf9.Stream(({ next, close }) => {
|
|
3315
3320
|
const update = () => {
|
|
3316
3321
|
try {
|
|
3317
3322
|
const status = signalManager.getStatus();
|
|
@@ -3325,7 +3330,7 @@ var subscribeToNetworkStatus = ({ signalManager }) => new import_codec_protobuf8
|
|
|
3325
3330
|
signalManager.statusChanged.on(() => update());
|
|
3326
3331
|
update();
|
|
3327
3332
|
});
|
|
3328
|
-
var subscribeToSignal = ({ signalManager }) => new
|
|
3333
|
+
var subscribeToSignal = ({ signalManager }) => new import_codec_protobuf9.Stream(({ next }) => {
|
|
3329
3334
|
const ctx = new import_context7.Context();
|
|
3330
3335
|
signalManager.onMessage.on(ctx, (message) => {
|
|
3331
3336
|
next({
|
|
@@ -3347,7 +3352,7 @@ var subscribeToSignal = ({ signalManager }) => new import_codec_protobuf8.Stream
|
|
|
3347
3352
|
return ctx.dispose();
|
|
3348
3353
|
};
|
|
3349
3354
|
});
|
|
3350
|
-
var subscribeToSwarmInfo = ({ networkManager }) => new
|
|
3355
|
+
var subscribeToSwarmInfo = ({ networkManager }) => new import_codec_protobuf9.Stream(({ next }) => {
|
|
3351
3356
|
var _a;
|
|
3352
3357
|
const update = () => {
|
|
3353
3358
|
var _a2;
|
|
@@ -3363,9 +3368,9 @@ var subscribeToSwarmInfo = ({ networkManager }) => new import_codec_protobuf8.St
|
|
|
3363
3368
|
});
|
|
3364
3369
|
|
|
3365
3370
|
// packages/sdk/client-services/src/packlets/devtools/spaces.ts
|
|
3366
|
-
var
|
|
3371
|
+
var import_codec_protobuf10 = require("@dxos/codec-protobuf");
|
|
3367
3372
|
var subscribeToSpaces = (context, { spaceKeys = [] }) => {
|
|
3368
|
-
return new
|
|
3373
|
+
return new import_codec_protobuf10.Stream(({ next }) => {
|
|
3369
3374
|
let unsubscribe;
|
|
3370
3375
|
const update = async () => {
|
|
3371
3376
|
const spaces = [
|
|
@@ -3409,7 +3414,7 @@ var DevtoolsServiceImpl = class {
|
|
|
3409
3414
|
this.params = params;
|
|
3410
3415
|
}
|
|
3411
3416
|
events(request) {
|
|
3412
|
-
return new
|
|
3417
|
+
return new import_codec_protobuf11.Stream(({ next }) => {
|
|
3413
3418
|
this.params.events.ready.on(() => {
|
|
3414
3419
|
next({
|
|
3415
3420
|
ready: {}
|
|
@@ -3569,7 +3574,7 @@ _ts_decorate3([
|
|
|
3569
3574
|
|
|
3570
3575
|
// packages/sdk/client-services/src/packlets/logging/logging-service.ts
|
|
3571
3576
|
var import_async16 = require("@dxos/async");
|
|
3572
|
-
var
|
|
3577
|
+
var import_codec_protobuf12 = require("@dxos/codec-protobuf");
|
|
3573
3578
|
var import_log14 = require("@dxos/log");
|
|
3574
3579
|
var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3575
3580
|
var import_util7 = require("@dxos/util");
|
|
@@ -3588,7 +3593,7 @@ var LoggingServiceImpl = class {
|
|
|
3588
3593
|
import_log14.log.runtimeConfig.processors.splice(index, 1);
|
|
3589
3594
|
}
|
|
3590
3595
|
queryLogs(request) {
|
|
3591
|
-
return new
|
|
3596
|
+
return new import_codec_protobuf12.Stream(({ ctx, next }) => {
|
|
3592
3597
|
const handler = (entry2) => {
|
|
3593
3598
|
var _a, _b, _c, _d, _e;
|
|
3594
3599
|
if (LOG_PROCESSING > 0) {
|
|
@@ -3644,14 +3649,14 @@ var shouldLog = (entry2, request) => {
|
|
|
3644
3649
|
var LOG_PROCESSING = 0;
|
|
3645
3650
|
|
|
3646
3651
|
// packages/sdk/client-services/src/packlets/network/network-service.ts
|
|
3647
|
-
var
|
|
3652
|
+
var import_codec_protobuf13 = require("@dxos/codec-protobuf");
|
|
3648
3653
|
var NetworkServiceImpl = class {
|
|
3649
3654
|
constructor(networkManager, signalManager) {
|
|
3650
3655
|
this.networkManager = networkManager;
|
|
3651
3656
|
this.signalManager = signalManager;
|
|
3652
3657
|
}
|
|
3653
3658
|
queryStatus() {
|
|
3654
|
-
return new
|
|
3659
|
+
return new import_codec_protobuf13.Stream(({ next }) => {
|
|
3655
3660
|
const update = () => {
|
|
3656
3661
|
next({
|
|
3657
3662
|
swarm: this.networkManager.connectionState,
|
|
@@ -3725,7 +3730,7 @@ var toStorageType = (type) => {
|
|
|
3725
3730
|
};
|
|
3726
3731
|
|
|
3727
3732
|
// packages/sdk/client-services/src/packlets/system/system-service.ts
|
|
3728
|
-
var
|
|
3733
|
+
var import_codec_protobuf14 = require("@dxos/codec-protobuf");
|
|
3729
3734
|
var SystemServiceImpl = class {
|
|
3730
3735
|
constructor({ config, statusUpdate, onUpdateStatus, getCurrentStatus, onReset }) {
|
|
3731
3736
|
this._config = config;
|
|
@@ -3742,7 +3747,7 @@ var SystemServiceImpl = class {
|
|
|
3742
3747
|
await this._onUpdateStatus(status);
|
|
3743
3748
|
}
|
|
3744
3749
|
queryStatus() {
|
|
3745
|
-
return new
|
|
3750
|
+
return new import_codec_protobuf14.Stream(({ next }) => {
|
|
3746
3751
|
const update = () => {
|
|
3747
3752
|
next({
|
|
3748
3753
|
status: this._getCurrentStatus()
|
|
@@ -4216,7 +4221,7 @@ var acceptInvitation = (guest, invitation) => {
|
|
|
4216
4221
|
// packages/sdk/client-services/src/packlets/testing/test-builder.ts
|
|
4217
4222
|
var import_context8 = require("@dxos/context");
|
|
4218
4223
|
var import_credentials15 = require("@dxos/credentials");
|
|
4219
|
-
var
|
|
4224
|
+
var import_debug8 = require("@dxos/debug");
|
|
4220
4225
|
var import_echo_pipeline5 = require("@dxos/echo-pipeline");
|
|
4221
4226
|
var import_testing = require("@dxos/echo-pipeline/testing");
|
|
4222
4227
|
var import_feed_store5 = require("@dxos/feed-store");
|
|
@@ -4340,7 +4345,7 @@ var TestPeer = class {
|
|
|
4340
4345
|
}
|
|
4341
4346
|
get identity() {
|
|
4342
4347
|
var _a;
|
|
4343
|
-
return (_a = this._props.signingContext) != null ? _a : (0,
|
|
4348
|
+
return (_a = this._props.signingContext) != null ? _a : (0, import_debug8.failUndefined)();
|
|
4344
4349
|
}
|
|
4345
4350
|
get dataSpaceManager() {
|
|
4346
4351
|
var _a, _b;
|