@dxos/client-services 0.5.9-main.a50ff17 → 0.5.9-main.af4882d

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.a50ff17";
358
+ var DXOS_VERSION = "0.5.9-main.af4882d";
359
359
 
360
360
  // packages/sdk/client-services/src/packlets/services/platform.ts
361
361
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -4572,8 +4572,10 @@ var DataSpace = class {
4572
4572
  const root = await this._echoHost.openSpaceRoot(handle.url);
4573
4573
  this._databaseRoot = root;
4574
4574
  if (root.getVersion() !== SpaceDocVersion.CURRENT) {
4575
- this._state = SpaceState2.REQUIRES_MIGRATION;
4576
- this.stateUpdate.emit();
4575
+ if (this._state !== SpaceState2.REQUIRES_MIGRATION) {
4576
+ this._state = SpaceState2.REQUIRES_MIGRATION;
4577
+ this.stateUpdate.emit();
4578
+ }
4577
4579
  } else {
4578
4580
  if (this._state !== SpaceState2.READY) {
4579
4581
  await this._enterReadyState();
@@ -4594,7 +4596,7 @@ var DataSpace = class {
4594
4596
  err
4595
4597
  }, {
4596
4598
  F: __dxlog_file17,
4597
- L: 431,
4599
+ L: 433,
4598
4600
  S: this,
4599
4601
  C: (f, a) => f(...a)
4600
4602
  });
@@ -4680,7 +4682,7 @@ var DataSpace = class {
4680
4682
  state: SpaceState2[this._state]
4681
4683
  }, {
4682
4684
  F: __dxlog_file17,
4683
- L: 512,
4685
+ L: 514,
4684
4686
  S: this,
4685
4687
  C: (f, a) => f(...a)
4686
4688
  });
@@ -5446,7 +5448,15 @@ var SpacesServiceImpl = class {
5446
5448
  const subscribeSpaces = () => {
5447
5449
  subscriptions.clear();
5448
5450
  for (const space of dataSpaceManager.spaces.values()) {
5449
- subscriptions.add(space.stateUpdate.on(ctx, () => scheduler.forceTrigger()));
5451
+ let lastState;
5452
+ subscriptions.add(space.stateUpdate.on(ctx, () => {
5453
+ if (space.state !== lastState) {
5454
+ scheduler.forceTrigger();
5455
+ } else {
5456
+ scheduler.trigger();
5457
+ }
5458
+ lastState = space.state;
5459
+ }));
5450
5460
  subscriptions.add(space.presence.updated.on(ctx, () => scheduler.trigger()));
5451
5461
  subscriptions.add(space.automergeSpaceState.onNewEpoch.on(ctx, () => scheduler.trigger()));
5452
5462
  subscriptions.add(space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger()));
@@ -5512,7 +5522,7 @@ var SpacesServiceImpl = class {
5512
5522
  } else {
5513
5523
  invariant15(!credential.id, "Id on unsigned credentials is not allowed", {
5514
5524
  F: __dxlog_file19,
5515
- L: 199,
5525
+ L: 209,
5516
5526
  S: this,
5517
5527
  A: [
5518
5528
  "!credential.id",
@@ -5521,7 +5531,7 @@ var SpacesServiceImpl = class {
5521
5531
  });
5522
5532
  invariant15(this._identityManager.identity, "Identity is not available", {
5523
5533
  F: __dxlog_file19,
5524
- L: 200,
5534
+ L: 210,
5525
5535
  S: this,
5526
5536
  A: [
5527
5537
  "this._identityManager.identity",
@@ -5531,7 +5541,7 @@ var SpacesServiceImpl = class {
5531
5541
  const signer = this._identityManager.identity.getIdentityCredentialSigner();
5532
5542
  invariant15(credential.issuer.equals(signer.getIssuer()), void 0, {
5533
5543
  F: __dxlog_file19,
5534
- L: 202,
5544
+ L: 212,
5535
5545
  S: this,
5536
5546
  A: [
5537
5547
  "credential.issuer.equals(signer.getIssuer())",
@@ -6897,4 +6907,4 @@ export {
6897
6907
  ClientServicesProviderResource,
6898
6908
  DiagnosticsCollector
6899
6909
  };
6900
- //# sourceMappingURL=chunk-K6NPH6LF.mjs.map
6910
+ //# sourceMappingURL=chunk-6347C7P7.mjs.map