@dxos/client-services 0.1.53-main.b6f5d87 → 0.1.53-main.d095ee3
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-CPSUVMSC.mjs → chunk-BSRQYPXL.mjs} +20 -19
- package/dist/lib/browser/{chunk-CPSUVMSC.mjs.map → chunk-BSRQYPXL.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/index.cjs +18 -17
- 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 +18 -17
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/package.json +32 -32
- package/src/packlets/spaces/data-space-manager.ts +0 -1
- package/src/packlets/spaces/spaces-service.ts +20 -24
|
@@ -2564,7 +2564,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
2564
2564
|
metadata
|
|
2565
2565
|
}, {
|
|
2566
2566
|
file: "data-space-manager.ts",
|
|
2567
|
-
line:
|
|
2567
|
+
line: 180,
|
|
2568
2568
|
scope: this,
|
|
2569
2569
|
callSite: (f, a) => f(...a)
|
|
2570
2570
|
});
|
|
@@ -2600,7 +2600,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
2600
2600
|
onAuthFailure: () => {
|
|
2601
2601
|
import_log10.log.warn("auth failure", {}, {
|
|
2602
2602
|
file: "data-space-manager.ts",
|
|
2603
|
-
line:
|
|
2603
|
+
line: 211,
|
|
2604
2604
|
scope: this,
|
|
2605
2605
|
callSite: (f, a) => f(...a)
|
|
2606
2606
|
});
|
|
@@ -2623,7 +2623,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
2623
2623
|
space: space.key
|
|
2624
2624
|
}, {
|
|
2625
2625
|
file: "data-space-manager.ts",
|
|
2626
|
-
line:
|
|
2626
|
+
line: 228,
|
|
2627
2627
|
scope: this,
|
|
2628
2628
|
callSite: (f, a) => f(...a)
|
|
2629
2629
|
});
|
|
@@ -2635,7 +2635,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
2635
2635
|
open: this._isOpen
|
|
2636
2636
|
}, {
|
|
2637
2637
|
file: "data-space-manager.ts",
|
|
2638
|
-
line:
|
|
2638
|
+
line: 235,
|
|
2639
2639
|
scope: this,
|
|
2640
2640
|
callSite: (f, a) => f(...a)
|
|
2641
2641
|
});
|
|
@@ -2682,7 +2682,6 @@ var import_log11 = require("@dxos/log");
|
|
|
2682
2682
|
var import_protocols7 = require("@dxos/protocols");
|
|
2683
2683
|
var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2684
2684
|
var import_util5 = require("@dxos/util");
|
|
2685
|
-
var TIMEFRAME_UPDATE_DEBOUNCE_TIME = 500;
|
|
2686
2685
|
var SpacesServiceImpl = class {
|
|
2687
2686
|
constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
|
|
2688
2687
|
this._identityManager = _identityManager;
|
|
@@ -2696,16 +2695,16 @@ var SpacesServiceImpl = class {
|
|
|
2696
2695
|
}
|
|
2697
2696
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2698
2697
|
const space = await dataSpaceManager.createSpace();
|
|
2699
|
-
return this.
|
|
2698
|
+
return this._serializeSpace(space);
|
|
2700
2699
|
}
|
|
2701
2700
|
async updateSpace(request) {
|
|
2702
2701
|
(0, import_debug5.todo)();
|
|
2703
2702
|
}
|
|
2704
2703
|
querySpaces() {
|
|
2705
2704
|
return new import_codec_protobuf3.Stream(({ next, ctx }) => {
|
|
2706
|
-
const
|
|
2705
|
+
const scheduler = new import_async10.UpdateScheduler(ctx, async () => {
|
|
2707
2706
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2708
|
-
const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this.
|
|
2707
|
+
const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this._serializeSpace(space));
|
|
2709
2708
|
(0, import_log11.log)("update", {
|
|
2710
2709
|
spaces
|
|
2711
2710
|
}, {
|
|
@@ -2717,7 +2716,9 @@ var SpacesServiceImpl = class {
|
|
|
2717
2716
|
next({
|
|
2718
2717
|
spaces
|
|
2719
2718
|
});
|
|
2720
|
-
}
|
|
2719
|
+
}, {
|
|
2720
|
+
maxFrequency: 2
|
|
2721
|
+
});
|
|
2721
2722
|
(0, import_async10.scheduleTask)(ctx, async () => {
|
|
2722
2723
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2723
2724
|
const subscriptions = new import_async10.EventSubscriptions();
|
|
@@ -2725,21 +2726,21 @@ var SpacesServiceImpl = class {
|
|
|
2725
2726
|
const subscribeSpaces = () => {
|
|
2726
2727
|
subscriptions.clear();
|
|
2727
2728
|
for (const space of dataSpaceManager.spaces.values()) {
|
|
2728
|
-
subscriptions.add(space.stateUpdate.on(ctx,
|
|
2729
|
-
subscriptions.add(space.presence.updated.on(ctx,
|
|
2730
|
-
subscriptions.add(space.dataPipeline.onNewEpoch.on(ctx,
|
|
2731
|
-
space.inner.controlPipeline.state.timeframeUpdate.
|
|
2729
|
+
subscriptions.add(space.stateUpdate.on(ctx, () => scheduler.trigger()));
|
|
2730
|
+
subscriptions.add(space.presence.updated.on(ctx, () => scheduler.trigger()));
|
|
2731
|
+
subscriptions.add(space.dataPipeline.onNewEpoch.on(ctx, () => scheduler.trigger()));
|
|
2732
|
+
space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger());
|
|
2732
2733
|
if (space.dataPipeline.pipelineState) {
|
|
2733
|
-
subscriptions.add(space.dataPipeline.pipelineState.timeframeUpdate.
|
|
2734
|
+
subscriptions.add(space.dataPipeline.pipelineState.timeframeUpdate.on(ctx, () => scheduler.trigger()));
|
|
2734
2735
|
}
|
|
2735
2736
|
}
|
|
2736
2737
|
};
|
|
2737
2738
|
dataSpaceManager.updated.on(ctx, () => {
|
|
2738
2739
|
subscribeSpaces();
|
|
2739
|
-
|
|
2740
|
+
scheduler.trigger();
|
|
2740
2741
|
});
|
|
2741
2742
|
subscribeSpaces();
|
|
2742
|
-
|
|
2743
|
+
scheduler.trigger();
|
|
2743
2744
|
});
|
|
2744
2745
|
if (!this._identityManager.identity) {
|
|
2745
2746
|
next({
|
|
@@ -2797,7 +2798,7 @@ var SpacesServiceImpl = class {
|
|
|
2797
2798
|
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug5.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
|
|
2798
2799
|
await space.createEpoch();
|
|
2799
2800
|
}
|
|
2800
|
-
|
|
2801
|
+
_serializeSpace(space) {
|
|
2801
2802
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2802
2803
|
return {
|
|
2803
2804
|
spaceKey: space.key,
|