@dxos/client-services 0.3.11-main.df1e30a → 0.3.11-main.e19f39d
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-NA7EQA7E.mjs → chunk-LUXAN22G.mjs} +15 -9
- package/dist/lib/browser/chunk-LUXAN22G.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/{chunk-LTQYCVFH.cjs → chunk-45NL4DNZ.cjs} +67 -61
- package/dist/lib/node/chunk-45NL4DNZ.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 +8 -8
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts +1 -2
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/services/platform.d.ts +1 -14
- package/dist/types/src/packlets/services/platform.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +2 -1
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -35
- package/src/packlets/network/network-service.ts +1 -0
- package/src/packlets/services/diagnostics.ts +2 -1
- package/src/packlets/services/platform.ts +7 -19
- package/src/packlets/system/system-service.ts +6 -0
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-NA7EQA7E.mjs.map +0 -7
- package/dist/lib/node/chunk-LTQYCVFH.cjs.map +0 -7
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_45NL4DNZ_exports = {};
|
|
30
|
+
__export(chunk_45NL4DNZ_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
DataSpace: () => DataSpace,
|
|
@@ -60,7 +60,7 @@ __export(chunk_LTQYCVFH_exports, {
|
|
|
60
60
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
61
61
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
62
62
|
});
|
|
63
|
-
module.exports = __toCommonJS(
|
|
63
|
+
module.exports = __toCommonJS(chunk_45NL4DNZ_exports);
|
|
64
64
|
var import_async = require("@dxos/async");
|
|
65
65
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
66
66
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -153,6 +153,7 @@ var import_invariant9 = require("@dxos/invariant");
|
|
|
153
153
|
var import_log8 = require("@dxos/log");
|
|
154
154
|
var import_protocols7 = require("@dxos/protocols");
|
|
155
155
|
var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
|
|
156
|
+
var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
|
|
156
157
|
var import_async10 = require("@dxos/async");
|
|
157
158
|
var import_client_protocol3 = require("@dxos/client-protocol");
|
|
158
159
|
var import_context6 = require("@dxos/context");
|
|
@@ -162,7 +163,7 @@ var import_invariant10 = require("@dxos/invariant");
|
|
|
162
163
|
var import_keys7 = require("@dxos/keys");
|
|
163
164
|
var import_log9 = require("@dxos/log");
|
|
164
165
|
var import_protocols8 = require("@dxos/protocols");
|
|
165
|
-
var
|
|
166
|
+
var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
|
|
166
167
|
var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
167
168
|
var import_timeframe2 = require("@dxos/timeframe");
|
|
168
169
|
var import_tracing4 = require("@dxos/tracing");
|
|
@@ -183,7 +184,7 @@ var import_invariant12 = require("@dxos/invariant");
|
|
|
183
184
|
var import_keys9 = require("@dxos/keys");
|
|
184
185
|
var import_log11 = require("@dxos/log");
|
|
185
186
|
var import_protocols10 = require("@dxos/protocols");
|
|
186
|
-
var
|
|
187
|
+
var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
|
|
187
188
|
var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
|
|
188
189
|
var import_util6 = require("@dxos/util");
|
|
189
190
|
var import_credentials13 = require("@dxos/credentials");
|
|
@@ -196,7 +197,7 @@ var import_debug6 = require("@dxos/debug");
|
|
|
196
197
|
var import_invariant13 = require("@dxos/invariant");
|
|
197
198
|
var import_log12 = require("@dxos/log");
|
|
198
199
|
var import_protocols11 = require("@dxos/protocols");
|
|
199
|
-
var
|
|
200
|
+
var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
|
|
200
201
|
var import_async14 = require("@dxos/async");
|
|
201
202
|
var import_context9 = require("@dxos/context");
|
|
202
203
|
var import_credentials15 = require("@dxos/credentials");
|
|
@@ -208,7 +209,7 @@ var import_keyring = require("@dxos/keyring");
|
|
|
208
209
|
var import_keys10 = require("@dxos/keys");
|
|
209
210
|
var import_log13 = require("@dxos/log");
|
|
210
211
|
var import_protocols12 = require("@dxos/protocols");
|
|
211
|
-
var
|
|
212
|
+
var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
|
|
212
213
|
var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
|
|
213
214
|
var import_tracing5 = require("@dxos/tracing");
|
|
214
215
|
var import_util7 = require("@dxos/util");
|
|
@@ -233,21 +234,21 @@ var import_messaging = require("@dxos/messaging");
|
|
|
233
234
|
var import_model_factory = require("@dxos/model-factory");
|
|
234
235
|
var import_network_manager2 = require("@dxos/network-manager");
|
|
235
236
|
var import_protocols14 = require("@dxos/protocols");
|
|
236
|
-
var
|
|
237
|
+
var import_services12 = require("@dxos/protocols/proto/dxos/client/services");
|
|
237
238
|
var import_text_model = require("@dxos/text-model");
|
|
238
239
|
var import_tracing6 = require("@dxos/tracing");
|
|
239
240
|
var import_websocket_rpc = require("@dxos/websocket-rpc");
|
|
240
241
|
var import_async16 = require("@dxos/async");
|
|
241
242
|
var import_codec_protobuf12 = require("@dxos/codec-protobuf");
|
|
242
|
-
var
|
|
243
|
+
var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
|
|
243
244
|
var import_async17 = require("@dxos/async");
|
|
244
245
|
var import_codec_protobuf13 = require("@dxos/codec-protobuf");
|
|
245
246
|
var import_log16 = require("@dxos/log");
|
|
246
|
-
var
|
|
247
|
+
var import_services14 = require("@dxos/protocols/proto/dxos/client/services");
|
|
247
248
|
var import_util9 = require("@dxos/util");
|
|
248
249
|
var import_codec_protobuf14 = require("@dxos/codec-protobuf");
|
|
249
250
|
var import_codec_protobuf15 = require("@dxos/codec-protobuf");
|
|
250
|
-
var
|
|
251
|
+
var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
|
|
251
252
|
var import_util10 = require("@dxos/util");
|
|
252
253
|
var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
|
|
253
254
|
return new import_codec_protobuf.Stream(({ next }) => {
|
|
@@ -2651,28 +2652,29 @@ var getPlatform = () => {
|
|
|
2651
2652
|
if (typeof window !== "undefined") {
|
|
2652
2653
|
const { userAgent } = window.navigator;
|
|
2653
2654
|
return {
|
|
2654
|
-
type:
|
|
2655
|
+
type: import_services7.Platform.PLATFORM_TYPE.BROWSER,
|
|
2655
2656
|
userAgent,
|
|
2656
2657
|
uptime: Math.floor((Date.now() - window.performance.timeOrigin) / 1e3)
|
|
2657
2658
|
};
|
|
2658
2659
|
} else {
|
|
2659
2660
|
return {
|
|
2660
|
-
type:
|
|
2661
|
+
type: import_services7.Platform.PLATFORM_TYPE.SHARED_WORKER,
|
|
2661
2662
|
uptime: Math.floor((Date.now() - performance.timeOrigin) / 1e3)
|
|
2662
2663
|
};
|
|
2663
2664
|
}
|
|
2664
2665
|
} else {
|
|
2665
2666
|
const { platform: platform2, version, arch } = process;
|
|
2666
2667
|
return {
|
|
2667
|
-
type:
|
|
2668
|
-
platform:
|
|
2669
|
-
|
|
2668
|
+
type: import_services7.Platform.PLATFORM_TYPE.NODE,
|
|
2669
|
+
platform: platform2,
|
|
2670
|
+
arch,
|
|
2671
|
+
runtime: version,
|
|
2670
2672
|
uptime: Math.floor(process.uptime()),
|
|
2671
2673
|
memory: process.memoryUsage()
|
|
2672
2674
|
};
|
|
2673
2675
|
}
|
|
2674
2676
|
};
|
|
2675
|
-
var DXOS_VERSION = "0.3.11-main.
|
|
2677
|
+
var DXOS_VERSION = "0.3.11-main.e19f39d";
|
|
2676
2678
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
2677
2679
|
var DEFAULT_TIMEOUT = 1e3;
|
|
2678
2680
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
@@ -2689,7 +2691,7 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
|
2689
2691
|
{
|
|
2690
2692
|
(0, import_invariant9.invariant)(clientServices.LoggingService, "SystemService is not available.", {
|
|
2691
2693
|
F: __dxlog_file10,
|
|
2692
|
-
L:
|
|
2694
|
+
L: 94,
|
|
2693
2695
|
S: void 0,
|
|
2694
2696
|
A: [
|
|
2695
2697
|
"clientServices.LoggingService",
|
|
@@ -2755,7 +2757,7 @@ var getProperties = (space) => {
|
|
|
2755
2757
|
} catch (err) {
|
|
2756
2758
|
import_log8.log.warn(err.message, void 0, {
|
|
2757
2759
|
F: __dxlog_file10,
|
|
2758
|
-
L:
|
|
2760
|
+
L: 179,
|
|
2759
2761
|
S: void 0,
|
|
2760
2762
|
C: (f, a) => f(...a)
|
|
2761
2763
|
});
|
|
@@ -3102,7 +3104,7 @@ var DataSpace = class {
|
|
|
3102
3104
|
this._notarizationPlugin = new NotarizationPlugin();
|
|
3103
3105
|
this._cache = void 0;
|
|
3104
3106
|
this._automergeSpaceState = new AutomergeSpaceState((rootUrl) => this._onNewAutomergeRoot(rootUrl));
|
|
3105
|
-
this._state =
|
|
3107
|
+
this._state = import_services8.SpaceState.CLOSED;
|
|
3106
3108
|
this.error = void 0;
|
|
3107
3109
|
this.stateUpdate = new import_async10.Event();
|
|
3108
3110
|
this.metrics = {};
|
|
@@ -3124,7 +3126,7 @@ var DataSpace = class {
|
|
|
3124
3126
|
this._cache = params.cache;
|
|
3125
3127
|
this._state = params.initialState;
|
|
3126
3128
|
(0, import_log9.log)("new state", {
|
|
3127
|
-
state:
|
|
3129
|
+
state: import_services8.SpaceState[this._state]
|
|
3128
3130
|
}, {
|
|
3129
3131
|
F: __dxlog_file12,
|
|
3130
3132
|
L: 138,
|
|
@@ -3169,9 +3171,9 @@ var DataSpace = class {
|
|
|
3169
3171
|
await this._inner.spaceState.addCredentialProcessor(this._notarizationPlugin);
|
|
3170
3172
|
await this._inner.spaceState.addCredentialProcessor(this._automergeSpaceState);
|
|
3171
3173
|
await this._inner.open(new import_context6.Context());
|
|
3172
|
-
this._state =
|
|
3174
|
+
this._state = import_services8.SpaceState.CONTROL_ONLY;
|
|
3173
3175
|
(0, import_log9.log)("new state", {
|
|
3174
|
-
state:
|
|
3176
|
+
state: import_services8.SpaceState[this._state]
|
|
3175
3177
|
}, {
|
|
3176
3178
|
F: __dxlog_file12,
|
|
3177
3179
|
L: 190,
|
|
@@ -3187,9 +3189,9 @@ var DataSpace = class {
|
|
|
3187
3189
|
}
|
|
3188
3190
|
async _close() {
|
|
3189
3191
|
await this._callbacks.beforeClose?.();
|
|
3190
|
-
this._state =
|
|
3192
|
+
this._state = import_services8.SpaceState.CLOSED;
|
|
3191
3193
|
(0, import_log9.log)("new state", {
|
|
3192
|
-
state:
|
|
3194
|
+
state: import_services8.SpaceState[this._state]
|
|
3193
3195
|
}, {
|
|
3194
3196
|
F: __dxlog_file12,
|
|
3195
3197
|
L: 204,
|
|
@@ -3236,9 +3238,9 @@ var DataSpace = class {
|
|
|
3236
3238
|
S: this,
|
|
3237
3239
|
C: (f, a) => f(...a)
|
|
3238
3240
|
});
|
|
3239
|
-
this._state =
|
|
3241
|
+
this._state = import_services8.SpaceState.ERROR;
|
|
3240
3242
|
(0, import_log9.log)("new state", {
|
|
3241
|
-
state:
|
|
3243
|
+
state: import_services8.SpaceState[this._state]
|
|
3242
3244
|
}, {
|
|
3243
3245
|
F: __dxlog_file12,
|
|
3244
3246
|
L: 243,
|
|
@@ -3253,12 +3255,12 @@ var DataSpace = class {
|
|
|
3253
3255
|
});
|
|
3254
3256
|
}
|
|
3255
3257
|
async initializeDataPipeline() {
|
|
3256
|
-
if (this._state !==
|
|
3258
|
+
if (this._state !== import_services8.SpaceState.CONTROL_ONLY) {
|
|
3257
3259
|
throw new import_protocols8.SystemError("Invalid operation");
|
|
3258
3260
|
}
|
|
3259
|
-
this._state =
|
|
3261
|
+
this._state = import_services8.SpaceState.INITIALIZING;
|
|
3260
3262
|
(0, import_log9.log)("new state", {
|
|
3261
|
-
state:
|
|
3263
|
+
state: import_services8.SpaceState[this._state]
|
|
3262
3264
|
}, {
|
|
3263
3265
|
F: __dxlog_file12,
|
|
3264
3266
|
L: 259,
|
|
@@ -3288,9 +3290,9 @@ var DataSpace = class {
|
|
|
3288
3290
|
C: (f, a) => f(...a)
|
|
3289
3291
|
});
|
|
3290
3292
|
await this._callbacks.beforeReady?.();
|
|
3291
|
-
this._state =
|
|
3293
|
+
this._state = import_services8.SpaceState.READY;
|
|
3292
3294
|
(0, import_log9.log)("new state", {
|
|
3293
|
-
state:
|
|
3295
|
+
state: import_services8.SpaceState[this._state]
|
|
3294
3296
|
}, {
|
|
3295
3297
|
F: __dxlog_file12,
|
|
3296
3298
|
L: 286,
|
|
@@ -3419,12 +3421,12 @@ var DataSpace = class {
|
|
|
3419
3421
|
let epoch;
|
|
3420
3422
|
switch (options?.migration) {
|
|
3421
3423
|
case void 0:
|
|
3422
|
-
case
|
|
3424
|
+
case import_services8.CreateEpochRequest.Migration.NONE:
|
|
3423
3425
|
{
|
|
3424
3426
|
epoch = await this.dataPipeline.createEpoch();
|
|
3425
3427
|
}
|
|
3426
3428
|
break;
|
|
3427
|
-
case
|
|
3429
|
+
case import_services8.CreateEpochRequest.Migration.INIT_AUTOMERGE: {
|
|
3428
3430
|
const document = this._automergeHost.repo.create();
|
|
3429
3431
|
epoch = {
|
|
3430
3432
|
previousId: this._automergeSpaceState.lastEpoch?.id,
|
|
@@ -3465,22 +3467,22 @@ var DataSpace = class {
|
|
|
3465
3467
|
}
|
|
3466
3468
|
}
|
|
3467
3469
|
async activate() {
|
|
3468
|
-
if (this._state !==
|
|
3470
|
+
if (this._state !== import_services8.SpaceState.INACTIVE) {
|
|
3469
3471
|
return;
|
|
3470
3472
|
}
|
|
3471
|
-
await this._metadataStore.setSpaceState(this.key,
|
|
3473
|
+
await this._metadataStore.setSpaceState(this.key, import_services8.SpaceState.ACTIVE);
|
|
3472
3474
|
await this._open();
|
|
3473
3475
|
this.initializeDataPipelineAsync();
|
|
3474
3476
|
}
|
|
3475
3477
|
async deactivate() {
|
|
3476
|
-
if (this._state ===
|
|
3478
|
+
if (this._state === import_services8.SpaceState.INACTIVE) {
|
|
3477
3479
|
return;
|
|
3478
3480
|
}
|
|
3479
|
-
await this._metadataStore.setSpaceState(this.key,
|
|
3481
|
+
await this._metadataStore.setSpaceState(this.key, import_services8.SpaceState.INACTIVE);
|
|
3480
3482
|
await this._close();
|
|
3481
|
-
this._state =
|
|
3483
|
+
this._state = import_services8.SpaceState.INACTIVE;
|
|
3482
3484
|
(0, import_log9.log)("new state", {
|
|
3483
|
-
state:
|
|
3485
|
+
state: import_services8.SpaceState[this._state]
|
|
3484
3486
|
}, {
|
|
3485
3487
|
F: __dxlog_file12,
|
|
3486
3488
|
L: 470,
|
|
@@ -3663,7 +3665,7 @@ var DataSpaceManager = class {
|
|
|
3663
3665
|
this._isOpen = true;
|
|
3664
3666
|
this.updated.emit();
|
|
3665
3667
|
for (const space of this._spaces.values()) {
|
|
3666
|
-
if (space.state !==
|
|
3668
|
+
if (space.state !== import_services9.SpaceState.INACTIVE) {
|
|
3667
3669
|
space.initializeDataPipelineAsync();
|
|
3668
3670
|
}
|
|
3669
3671
|
}
|
|
@@ -3710,7 +3712,7 @@ var DataSpaceManager = class {
|
|
|
3710
3712
|
genesisFeedKey: controlFeedKey,
|
|
3711
3713
|
controlFeedKey,
|
|
3712
3714
|
dataFeedKey,
|
|
3713
|
-
state:
|
|
3715
|
+
state: import_services9.SpaceState.ACTIVE
|
|
3714
3716
|
};
|
|
3715
3717
|
(0, import_log11.log)("creating space...", {
|
|
3716
3718
|
spaceKey
|
|
@@ -3790,7 +3792,7 @@ var DataSpaceManager = class {
|
|
|
3790
3792
|
async waitUntilSpaceReady(spaceKey) {
|
|
3791
3793
|
await (0, import_context8.cancelWithContext)(this._ctx, this.updated.waitForCondition(() => {
|
|
3792
3794
|
const space = this._spaces.get(spaceKey);
|
|
3793
|
-
return !!space && space.state ===
|
|
3795
|
+
return !!space && space.state === import_services9.SpaceState.READY;
|
|
3794
3796
|
}));
|
|
3795
3797
|
}
|
|
3796
3798
|
async _constructSpace(metadata) {
|
|
@@ -3847,7 +3849,7 @@ var DataSpaceManager = class {
|
|
|
3847
3849
|
dataFeed && space.setDataFeed(dataFeed);
|
|
3848
3850
|
const dataSpace = new DataSpace({
|
|
3849
3851
|
inner: space,
|
|
3850
|
-
initialState: metadata.state ===
|
|
3852
|
+
initialState: metadata.state === import_services9.SpaceState.INACTIVE ? import_services9.SpaceState.INACTIVE : import_services9.SpaceState.CLOSED,
|
|
3851
3853
|
metadataStore: this._metadataStore,
|
|
3852
3854
|
gossip,
|
|
3853
3855
|
presence,
|
|
@@ -3895,7 +3897,7 @@ var DataSpaceManager = class {
|
|
|
3895
3897
|
cache: metadata.cache,
|
|
3896
3898
|
automergeHost: this._automergeHost
|
|
3897
3899
|
});
|
|
3898
|
-
if (metadata.state !==
|
|
3900
|
+
if (metadata.state !== import_services9.SpaceState.INACTIVE) {
|
|
3899
3901
|
await dataSpace.open();
|
|
3900
3902
|
}
|
|
3901
3903
|
if (metadata.controlTimeframe) {
|
|
@@ -3944,10 +3946,10 @@ var SpacesServiceImpl = class {
|
|
|
3944
3946
|
const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
|
|
3945
3947
|
if (state) {
|
|
3946
3948
|
switch (state) {
|
|
3947
|
-
case
|
|
3949
|
+
case import_services10.SpaceState.ACTIVE:
|
|
3948
3950
|
await space.activate();
|
|
3949
3951
|
break;
|
|
3950
|
-
case
|
|
3952
|
+
case import_services10.SpaceState.INACTIVE:
|
|
3951
3953
|
await space.deactivate();
|
|
3952
3954
|
break;
|
|
3953
3955
|
default:
|
|
@@ -4124,7 +4126,7 @@ var SpacesServiceImpl = class {
|
|
|
4124
4126
|
displayName: member.profile?.displayName
|
|
4125
4127
|
}
|
|
4126
4128
|
},
|
|
4127
|
-
presence: member.removed ?
|
|
4129
|
+
presence: member.removed ? import_services10.SpaceMember.PresenceState.REMOVED : isMe || peers.length > 0 ? import_services10.SpaceMember.PresenceState.ONLINE : import_services10.SpaceMember.PresenceState.OFFLINE,
|
|
4128
4130
|
peerStates: peers
|
|
4129
4131
|
};
|
|
4130
4132
|
}),
|
|
@@ -4181,7 +4183,7 @@ var ServiceContext = class {
|
|
|
4181
4183
|
this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager);
|
|
4182
4184
|
this.automergeHost = new import_echo_pipeline2.AutomergeHost(storage.createDirectory("automerge"));
|
|
4183
4185
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
4184
|
-
this._handlerFactories.set(
|
|
4186
|
+
this._handlerFactories.set(import_services11.Invitation.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? (0, import_debug7.failUndefined)(), this._acceptIdentity.bind(this)));
|
|
4185
4187
|
}
|
|
4186
4188
|
async open(ctx) {
|
|
4187
4189
|
await this._checkStorageVersion();
|
|
@@ -4309,7 +4311,7 @@ var ServiceContext = class {
|
|
|
4309
4311
|
};
|
|
4310
4312
|
this.dataSpaceManager = new DataSpaceManager(this.spaceManager, this.metadataStore, this.dataServiceSubscriptions, this.keyring, signingContext, this.feedStore, this.automergeHost);
|
|
4311
4313
|
await this.dataSpaceManager.open();
|
|
4312
|
-
this._handlerFactories.set(
|
|
4314
|
+
this._handlerFactories.set(import_services11.Invitation.Kind.SPACE, (invitation) => {
|
|
4313
4315
|
(0, import_invariant14.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4314
4316
|
F: __dxlog_file15,
|
|
4315
4317
|
L: 228,
|
|
@@ -4526,7 +4528,7 @@ var DevicesServiceImpl = class {
|
|
|
4526
4528
|
next({
|
|
4527
4529
|
devices: Array.from(deviceKeys.entries()).map(([key, profile]) => ({
|
|
4528
4530
|
deviceKey: key,
|
|
4529
|
-
kind: this._identityManager.identity?.deviceKey.equals(key) ?
|
|
4531
|
+
kind: this._identityManager.identity?.deviceKey.equals(key) ? import_services13.DeviceKind.CURRENT : import_services13.DeviceKind.TRUSTED,
|
|
4530
4532
|
profile
|
|
4531
4533
|
}))
|
|
4532
4534
|
});
|
|
@@ -4641,16 +4643,16 @@ var LoggingServiceImpl = class {
|
|
|
4641
4643
|
};
|
|
4642
4644
|
var matchFilter = (filter, level, path, options) => {
|
|
4643
4645
|
switch (options) {
|
|
4644
|
-
case
|
|
4646
|
+
case import_services14.QueryLogsRequest.MatchingOptions.INCLUSIVE:
|
|
4645
4647
|
return level >= filter.level && (!filter.pattern || path.includes(filter.pattern));
|
|
4646
|
-
case
|
|
4648
|
+
case import_services14.QueryLogsRequest.MatchingOptions.EXPLICIT:
|
|
4647
4649
|
return level === filter.level && (!filter.pattern || path.includes(filter.pattern));
|
|
4648
4650
|
}
|
|
4649
4651
|
};
|
|
4650
4652
|
var shouldLog = (entry2, request) => {
|
|
4651
|
-
const options = request.options ??
|
|
4653
|
+
const options = request.options ?? import_services14.QueryLogsRequest.MatchingOptions.INCLUSIVE;
|
|
4652
4654
|
if (request.filters === void 0) {
|
|
4653
|
-
return options ===
|
|
4655
|
+
return options === import_services14.QueryLogsRequest.MatchingOptions.INCLUSIVE;
|
|
4654
4656
|
} else {
|
|
4655
4657
|
return request.filters.some((filter) => matchFilter(filter, entry2.level, entry2.meta?.F ?? "", options));
|
|
4656
4658
|
}
|
|
@@ -4666,6 +4668,7 @@ var NetworkServiceImpl = class {
|
|
|
4666
4668
|
const update = () => {
|
|
4667
4669
|
next({
|
|
4668
4670
|
swarm: this.networkManager.connectionState,
|
|
4671
|
+
connectionInfo: this.networkManager.connectionLog?.swarms,
|
|
4669
4672
|
signaling: this.signalManager.getStatus().map(({ host, state }) => ({
|
|
4670
4673
|
server: host,
|
|
4671
4674
|
state
|
|
@@ -4705,11 +4708,14 @@ var SystemServiceImpl = class {
|
|
|
4705
4708
|
return {
|
|
4706
4709
|
timestamp: /* @__PURE__ */ new Date(),
|
|
4707
4710
|
diagnostics: JSON.parse(JSON.stringify(diagnostics, (0, import_util10.jsonKeyReplacer)({
|
|
4708
|
-
truncate: keys ===
|
|
4709
|
-
humanize: keys ===
|
|
4711
|
+
truncate: keys === import_services15.GetDiagnosticsRequest.KEY_OPTION.TRUNCATE,
|
|
4712
|
+
humanize: keys === import_services15.GetDiagnosticsRequest.KEY_OPTION.HUMANIZE
|
|
4710
4713
|
})))
|
|
4711
4714
|
};
|
|
4712
4715
|
}
|
|
4716
|
+
async getPlatform() {
|
|
4717
|
+
return getPlatform();
|
|
4718
|
+
}
|
|
4713
4719
|
async updateStatus({ status }) {
|
|
4714
4720
|
await this._onUpdateStatus(status);
|
|
4715
4721
|
}
|
|
@@ -4799,14 +4805,14 @@ var ClientServicesHost = class {
|
|
|
4799
4805
|
this._systemService = new SystemServiceImpl({
|
|
4800
4806
|
config: this._config,
|
|
4801
4807
|
statusUpdate: this._statusUpdate,
|
|
4802
|
-
getCurrentStatus: () => this.isOpen ?
|
|
4808
|
+
getCurrentStatus: () => this.isOpen ? import_services12.SystemStatus.ACTIVE : import_services12.SystemStatus.INACTIVE,
|
|
4803
4809
|
getDiagnostics: () => {
|
|
4804
4810
|
return createDiagnostics(this._serviceRegistry.services, this._serviceContext, this._config);
|
|
4805
4811
|
},
|
|
4806
4812
|
onUpdateStatus: async (status) => {
|
|
4807
|
-
if (!this.isOpen && status ===
|
|
4813
|
+
if (!this.isOpen && status === import_services12.SystemStatus.ACTIVE) {
|
|
4808
4814
|
await this._resourceLock?.acquire();
|
|
4809
|
-
} else if (this.isOpen && status ===
|
|
4815
|
+
} else if (this.isOpen && status === import_services12.SystemStatus.INACTIVE) {
|
|
4810
4816
|
await this._resourceLock?.release();
|
|
4811
4817
|
}
|
|
4812
4818
|
},
|
|
@@ -5168,4 +5174,4 @@ ClientServicesHost = _ts_decorate8([
|
|
|
5168
5174
|
subscribeToSpaces,
|
|
5169
5175
|
subscribeToSwarmInfo
|
|
5170
5176
|
});
|
|
5171
|
-
//# sourceMappingURL=chunk-
|
|
5177
|
+
//# sourceMappingURL=chunk-45NL4DNZ.cjs.map
|