@dxos/client-services 0.1.53-main.3ecc504 → 0.1.53-main.602887f
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-5JZKP3BY.mjs → chunk-6ITWCQIT.mjs} +20 -17
- package/dist/lib/browser/chunk-6ITWCQIT.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 +18 -15
- 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 -15
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/devtools/devtools.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/devtools/devtools.ts +2 -2
- package/src/packlets/spaces/spaces-service.ts +20 -24
- package/dist/lib/browser/chunk-5JZKP3BY.mjs.map +0 -7
|
@@ -248,8 +248,10 @@ var DevtoolsServiceImpl = class {
|
|
|
248
248
|
});
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
getConfig(request) {
|
|
252
|
-
|
|
251
|
+
async getConfig(request) {
|
|
252
|
+
return {
|
|
253
|
+
config: JSON.stringify(this.params.config.values)
|
|
254
|
+
};
|
|
253
255
|
}
|
|
254
256
|
async getStorageInfo() {
|
|
255
257
|
var _a, _b, _c, _d, _e;
|
|
@@ -2939,7 +2941,7 @@ DataSpaceManager = __decorate2([
|
|
|
2939
2941
|
], DataSpaceManager);
|
|
2940
2942
|
|
|
2941
2943
|
// packages/sdk/client-services/src/packlets/spaces/spaces-service.ts
|
|
2942
|
-
import { EventSubscriptions as EventSubscriptions2, scheduleTask as scheduleTask5 } from "@dxos/async";
|
|
2944
|
+
import { EventSubscriptions as EventSubscriptions2, UpdateScheduler, scheduleTask as scheduleTask5 } from "@dxos/async";
|
|
2943
2945
|
import { Stream as Stream9 } from "@dxos/codec-protobuf";
|
|
2944
2946
|
import { raise, todo as todo2 } from "@dxos/debug";
|
|
2945
2947
|
import { SpaceNotFoundError } from "@dxos/echo-pipeline";
|
|
@@ -2947,7 +2949,6 @@ import { log as log11 } from "@dxos/log";
|
|
|
2947
2949
|
import { encodeError } from "@dxos/protocols";
|
|
2948
2950
|
import { SpaceMember as SpaceMember2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
2949
2951
|
import { humanize } from "@dxos/util";
|
|
2950
|
-
var TIMEFRAME_UPDATE_DEBOUNCE_TIME = 500;
|
|
2951
2952
|
var SpacesServiceImpl = class {
|
|
2952
2953
|
constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
|
|
2953
2954
|
this._identityManager = _identityManager;
|
|
@@ -2961,16 +2962,16 @@ var SpacesServiceImpl = class {
|
|
|
2961
2962
|
}
|
|
2962
2963
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2963
2964
|
const space = await dataSpaceManager.createSpace();
|
|
2964
|
-
return this.
|
|
2965
|
+
return this._serializeSpace(space);
|
|
2965
2966
|
}
|
|
2966
2967
|
async updateSpace(request) {
|
|
2967
2968
|
todo2();
|
|
2968
2969
|
}
|
|
2969
2970
|
querySpaces() {
|
|
2970
2971
|
return new Stream9(({ next, ctx }) => {
|
|
2971
|
-
const
|
|
2972
|
+
const scheduler = new UpdateScheduler(ctx, async () => {
|
|
2972
2973
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2973
|
-
const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this.
|
|
2974
|
+
const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this._serializeSpace(space));
|
|
2974
2975
|
log11("update", {
|
|
2975
2976
|
spaces
|
|
2976
2977
|
}, {
|
|
@@ -2982,7 +2983,9 @@ var SpacesServiceImpl = class {
|
|
|
2982
2983
|
next({
|
|
2983
2984
|
spaces
|
|
2984
2985
|
});
|
|
2985
|
-
}
|
|
2986
|
+
}, {
|
|
2987
|
+
maxFrequency: 2
|
|
2988
|
+
});
|
|
2986
2989
|
scheduleTask5(ctx, async () => {
|
|
2987
2990
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
2988
2991
|
const subscriptions = new EventSubscriptions2();
|
|
@@ -2990,21 +2993,21 @@ var SpacesServiceImpl = class {
|
|
|
2990
2993
|
const subscribeSpaces = () => {
|
|
2991
2994
|
subscriptions.clear();
|
|
2992
2995
|
for (const space of dataSpaceManager.spaces.values()) {
|
|
2993
|
-
subscriptions.add(space.stateUpdate.on(ctx,
|
|
2994
|
-
subscriptions.add(space.presence.updated.on(ctx,
|
|
2995
|
-
subscriptions.add(space.dataPipeline.onNewEpoch.on(ctx,
|
|
2996
|
-
space.inner.controlPipeline.state.timeframeUpdate.
|
|
2996
|
+
subscriptions.add(space.stateUpdate.on(ctx, () => scheduler.trigger()));
|
|
2997
|
+
subscriptions.add(space.presence.updated.on(ctx, () => scheduler.trigger()));
|
|
2998
|
+
subscriptions.add(space.dataPipeline.onNewEpoch.on(ctx, () => scheduler.trigger()));
|
|
2999
|
+
space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger());
|
|
2997
3000
|
if (space.dataPipeline.pipelineState) {
|
|
2998
|
-
subscriptions.add(space.dataPipeline.pipelineState.timeframeUpdate.
|
|
3001
|
+
subscriptions.add(space.dataPipeline.pipelineState.timeframeUpdate.on(ctx, () => scheduler.trigger()));
|
|
2999
3002
|
}
|
|
3000
3003
|
}
|
|
3001
3004
|
};
|
|
3002
3005
|
dataSpaceManager.updated.on(ctx, () => {
|
|
3003
3006
|
subscribeSpaces();
|
|
3004
|
-
|
|
3007
|
+
scheduler.trigger();
|
|
3005
3008
|
});
|
|
3006
3009
|
subscribeSpaces();
|
|
3007
|
-
|
|
3010
|
+
scheduler.trigger();
|
|
3008
3011
|
});
|
|
3009
3012
|
if (!this._identityManager.identity) {
|
|
3010
3013
|
next({
|
|
@@ -3062,7 +3065,7 @@ var SpacesServiceImpl = class {
|
|
|
3062
3065
|
const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : raise(new SpaceNotFoundError(spaceKey));
|
|
3063
3066
|
await space.createEpoch();
|
|
3064
3067
|
}
|
|
3065
|
-
|
|
3068
|
+
_serializeSpace(space) {
|
|
3066
3069
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3067
3070
|
return {
|
|
3068
3071
|
spaceKey: space.key,
|
|
@@ -4004,4 +4007,4 @@ export {
|
|
|
4004
4007
|
ServiceRegistry,
|
|
4005
4008
|
ClientServicesHost
|
|
4006
4009
|
};
|
|
4007
|
-
//# sourceMappingURL=chunk-
|
|
4010
|
+
//# sourceMappingURL=chunk-6ITWCQIT.mjs.map
|