@dxos/client-services 0.5.9-main.d63ef8d → 0.5.9-main.d787c80

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.
@@ -355,7 +355,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
355
355
  import { TRACE_PROCESSOR } from "@dxos/tracing";
356
356
 
357
357
  // packages/sdk/client-services/src/version.ts
358
- var DXOS_VERSION = "0.5.9-main.d63ef8d";
358
+ var DXOS_VERSION = "0.5.9-main.d787c80";
359
359
 
360
360
  // packages/sdk/client-services/src/packlets/services/platform.ts
361
361
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -4545,7 +4545,6 @@ var DataSpace = class {
4545
4545
  S: this,
4546
4546
  C: (f, a) => f(...a)
4547
4547
  });
4548
- this._echoHost.replicateDocument(rootUrl);
4549
4548
  const handle = this._echoHost.automergeRepo.find(rootUrl);
4550
4549
  queueMicrotask(async () => {
4551
4550
  try {
@@ -4572,8 +4571,10 @@ var DataSpace = class {
4572
4571
  const root = await this._echoHost.openSpaceRoot(handle.url);
4573
4572
  this._databaseRoot = root;
4574
4573
  if (root.getVersion() !== SpaceDocVersion.CURRENT) {
4575
- this._state = SpaceState2.REQUIRES_MIGRATION;
4576
- this.stateUpdate.emit();
4574
+ if (this._state !== SpaceState2.REQUIRES_MIGRATION) {
4575
+ this._state = SpaceState2.REQUIRES_MIGRATION;
4576
+ this.stateUpdate.emit();
4577
+ }
4577
4578
  } else {
4578
4579
  if (this._state !== SpaceState2.READY) {
4579
4580
  await this._enterReadyState();
@@ -5446,7 +5447,15 @@ var SpacesServiceImpl = class {
5446
5447
  const subscribeSpaces = () => {
5447
5448
  subscriptions.clear();
5448
5449
  for (const space of dataSpaceManager.spaces.values()) {
5449
- subscriptions.add(space.stateUpdate.on(ctx, () => scheduler.forceTrigger()));
5450
+ let lastState;
5451
+ subscriptions.add(space.stateUpdate.on(ctx, () => {
5452
+ if (space.state !== lastState) {
5453
+ scheduler.forceTrigger();
5454
+ } else {
5455
+ scheduler.trigger();
5456
+ }
5457
+ lastState = space.state;
5458
+ }));
5450
5459
  subscriptions.add(space.presence.updated.on(ctx, () => scheduler.trigger()));
5451
5460
  subscriptions.add(space.automergeSpaceState.onNewEpoch.on(ctx, () => scheduler.trigger()));
5452
5461
  subscriptions.add(space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger()));
@@ -5512,7 +5521,7 @@ var SpacesServiceImpl = class {
5512
5521
  } else {
5513
5522
  invariant15(!credential.id, "Id on unsigned credentials is not allowed", {
5514
5523
  F: __dxlog_file19,
5515
- L: 199,
5524
+ L: 209,
5516
5525
  S: this,
5517
5526
  A: [
5518
5527
  "!credential.id",
@@ -5521,7 +5530,7 @@ var SpacesServiceImpl = class {
5521
5530
  });
5522
5531
  invariant15(this._identityManager.identity, "Identity is not available", {
5523
5532
  F: __dxlog_file19,
5524
- L: 200,
5533
+ L: 210,
5525
5534
  S: this,
5526
5535
  A: [
5527
5536
  "this._identityManager.identity",
@@ -5531,7 +5540,7 @@ var SpacesServiceImpl = class {
5531
5540
  const signer = this._identityManager.identity.getIdentityCredentialSigner();
5532
5541
  invariant15(credential.issuer.equals(signer.getIssuer()), void 0, {
5533
5542
  F: __dxlog_file19,
5534
- L: 202,
5543
+ L: 212,
5535
5544
  S: this,
5536
5545
  A: [
5537
5546
  "credential.issuer.equals(signer.getIssuer())",
@@ -6897,4 +6906,4 @@ export {
6897
6906
  ClientServicesProviderResource,
6898
6907
  DiagnosticsCollector
6899
6908
  };
6900
- //# sourceMappingURL=chunk-C2VXW65X.mjs.map
6909
+ //# sourceMappingURL=chunk-IENZTAYS.mjs.map