@dxos/client-services 0.6.3-main.9e4e207 → 0.6.3-next.2f65b78

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.
@@ -359,7 +359,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
359
359
  import { TRACE_PROCESSOR } from "@dxos/tracing";
360
360
 
361
361
  // packages/sdk/client-services/src/version.ts
362
- var DXOS_VERSION = "0.6.3-main.9e4e207";
362
+ var DXOS_VERSION = "0.6.3-next.2f65b78";
363
363
 
364
364
  // packages/sdk/client-services/src/packlets/services/platform.ts
365
365
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -4628,15 +4628,17 @@ var DataSpace = class {
4628
4628
  };
4629
4629
  });
4630
4630
  }
4631
- const root = await this._echoHost.openSpaceRoot(this.id, handle.url);
4631
+ const root = await this._echoHost.openSpaceRoot(handle.url);
4632
4632
  this._databaseRoot = root;
4633
4633
  if (root.getVersion() !== SpaceDocVersion2.CURRENT) {
4634
- this._state = SpaceState2.REQUIRES_MIGRATION;
4635
- this.stateUpdate.emit();
4636
- } else if (this._state !== SpaceState2.READY) {
4637
- await this._enterReadyState();
4634
+ if (this._state !== SpaceState2.REQUIRES_MIGRATION) {
4635
+ this._state = SpaceState2.REQUIRES_MIGRATION;
4636
+ this.stateUpdate.emit();
4637
+ }
4638
4638
  } else {
4639
- this.stateUpdate.emit();
4639
+ if (this._state !== SpaceState2.READY) {
4640
+ await this._enterReadyState();
4641
+ }
4640
4642
  }
4641
4643
  } catch (_) {
4642
4644
  _usingCtx.e = _;
@@ -4653,7 +4655,7 @@ var DataSpace = class {
4653
4655
  err
4654
4656
  }, {
4655
4657
  F: __dxlog_file18,
4656
- L: 431,
4658
+ L: 433,
4657
4659
  S: this,
4658
4660
  C: (f, a) => f(...a)
4659
4661
  });
@@ -4706,18 +4708,14 @@ var DataSpace = class {
4706
4708
  credential
4707
4709
  }
4708
4710
  });
4709
- const timeframe = new Timeframe3([
4711
+ await this.inner.controlPipeline.state.waitUntilTimeframe(new Timeframe3([
4710
4712
  [
4711
4713
  receipt.feedKey,
4712
4714
  receipt.seq
4713
4715
  ]
4714
- ]);
4715
- await this.inner.controlPipeline.state.waitUntilTimeframe(timeframe);
4716
+ ]));
4716
4717
  await this._echoHost.updateIndexes();
4717
- return {
4718
- credential,
4719
- timeframe
4720
- };
4718
+ return credential;
4721
4719
  }
4722
4720
  async activate() {
4723
4721
  if (![
@@ -4743,7 +4741,7 @@ var DataSpace = class {
4743
4741
  state: SpaceState2[this._state]
4744
4742
  }, {
4745
4743
  F: __dxlog_file18,
4746
- L: 513,
4744
+ L: 514,
4747
4745
  S: this,
4748
4746
  C: (f, a) => f(...a)
4749
4747
  });
@@ -5271,37 +5269,19 @@ var DataSpaceManager = class {
5271
5269
  credentialProvider: createAuthProvider(this._signingContext.credentialSigner),
5272
5270
  credentialAuthenticator: deferFunction2(() => dataSpace.authVerifier.verifier)
5273
5271
  },
5274
- onAuthorizedConnection: (session) => queueMicrotask(async () => {
5275
- try {
5276
- if (!session.isOpen) {
5277
- return;
5278
- }
5279
- session.addExtension("dxos.mesh.teleport.admission-discovery", new CredentialServerExtension(space));
5280
- session.addExtension("dxos.mesh.teleport.gossip", gossip.createExtension({
5281
- remotePeerId: session.remotePeerId
5282
- }));
5283
- session.addExtension("dxos.mesh.teleport.notarization", dataSpace.notarizationPlugin.createExtension());
5284
- await this._echoHost.authorizeDevice(space.key, session.remotePeerId);
5285
- if (!session.isOpen) {
5286
- return;
5287
- }
5288
- session.addExtension("dxos.mesh.teleport.automerge", this._echoHost.createReplicationExtension());
5289
- } catch (err) {
5290
- log16.warn("error on authorized connection", {
5291
- err
5292
- }, {
5293
- F: __dxlog_file19,
5294
- L: 403,
5295
- S: this,
5296
- C: (f, a) => f(...a)
5297
- });
5298
- await session.close(err);
5299
- }
5300
- }),
5272
+ onAuthorizedConnection: (session) => {
5273
+ session.addExtension("dxos.mesh.teleport.admission-discovery", new CredentialServerExtension(space));
5274
+ session.addExtension("dxos.mesh.teleport.gossip", gossip.createExtension({
5275
+ remotePeerId: session.remotePeerId
5276
+ }));
5277
+ session.addExtension("dxos.mesh.teleport.notarization", dataSpace.notarizationPlugin.createExtension());
5278
+ this._echoHost.authorizeDevice(space.key, session.remotePeerId);
5279
+ session.addExtension("dxos.mesh.teleport.automerge", this._echoHost.createReplicationExtension());
5280
+ },
5301
5281
  onAuthFailure: () => {
5302
5282
  log16.warn("auth failure", void 0, {
5303
5283
  F: __dxlog_file19,
5304
- L: 408,
5284
+ L: 396,
5305
5285
  S: this,
5306
5286
  C: (f, a) => f(...a)
5307
5287
  });
@@ -5334,7 +5314,7 @@ var DataSpaceManager = class {
5334
5314
  space: space.key
5335
5315
  }, {
5336
5316
  F: __dxlog_file19,
5337
- L: 435,
5317
+ L: 423,
5338
5318
  S: this,
5339
5319
  C: (f, a) => f(...a)
5340
5320
  });
@@ -5345,7 +5325,7 @@ var DataSpaceManager = class {
5345
5325
  open: this._isOpen
5346
5326
  }, {
5347
5327
  F: __dxlog_file19,
5348
- L: 438,
5328
+ L: 426,
5349
5329
  S: this,
5350
5330
  C: (f, a) => f(...a)
5351
5331
  });
@@ -5364,7 +5344,7 @@ var DataSpaceManager = class {
5364
5344
  space: space.key
5365
5345
  }, {
5366
5346
  F: __dxlog_file19,
5367
- L: 446,
5347
+ L: 434,
5368
5348
  S: this,
5369
5349
  C: (f, a) => f(...a)
5370
5350
  });
@@ -5405,7 +5385,7 @@ var DataSpaceManager = class {
5405
5385
  closedSessions
5406
5386
  }, {
5407
5387
  F: __dxlog_file19,
5408
- L: 482,
5388
+ L: 470,
5409
5389
  S: this,
5410
5390
  C: (f, a) => f(...a)
5411
5391
  });
@@ -5420,7 +5400,7 @@ var DataSpaceManager = class {
5420
5400
  peerId: peerState.peerId
5421
5401
  }, {
5422
5402
  F: __dxlog_file19,
5423
- L: 496,
5403
+ L: 484,
5424
5404
  S: this,
5425
5405
  C: (f, a) => f(...a)
5426
5406
  });
@@ -5560,9 +5540,9 @@ var SpacesServiceImpl = class {
5560
5540
  const scheduler = new UpdateScheduler(ctx, async () => {
5561
5541
  const dataSpaceManager = await this._getDataSpaceManager();
5562
5542
  const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this._serializeSpace(space));
5563
- log17("update", () => ({
5564
- ids: spaces.map((space) => space.id)
5565
- }), {
5543
+ log17("update", {
5544
+ spaces
5545
+ }, {
5566
5546
  F: __dxlog_file20,
5567
5547
  L: 115,
5568
5548
  S: this,
@@ -5697,13 +5677,12 @@ var SpacesServiceImpl = class {
5697
5677
  async createEpoch({ spaceKey, migration, automergeRootUrl }) {
5698
5678
  const dataSpaceManager = await this._getDataSpaceManager();
5699
5679
  const space = dataSpaceManager.spaces.get(spaceKey) ?? raise2(new SpaceNotFoundError2(spaceKey));
5700
- const result = await space.createEpoch({
5680
+ const credential = await space.createEpoch({
5701
5681
  migration,
5702
5682
  newAutomergeRoot: automergeRootUrl
5703
5683
  });
5704
5684
  return {
5705
- epochCredential: result?.credential,
5706
- controlTimeframe: result?.timeframe
5685
+ epochCredential: credential ?? void 0
5707
5686
  };
5708
5687
  }
5709
5688
  async admitContact(request) {
@@ -7353,4 +7332,4 @@ export {
7353
7332
  ClientServicesProviderResource,
7354
7333
  DiagnosticsCollector
7355
7334
  };
7356
- //# sourceMappingURL=chunk-LOXM2SQM.mjs.map
7335
+ //# sourceMappingURL=chunk-XDR7UKWW.mjs.map