@dxos/client-services 0.1.51-main.b7fee56 → 0.1.51-main.b9e09c2

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.
@@ -2198,6 +2198,7 @@ import { PublicKey as PublicKey7 } from "@dxos/keys";
2198
2198
  import { log as log10 } from "@dxos/log";
2199
2199
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
2200
2200
  import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
2201
+ import { Timeframe } from "@dxos/timeframe";
2201
2202
  import { ComplexSet as ComplexSet2 } from "@dxos/util";
2202
2203
 
2203
2204
  // packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
@@ -2540,7 +2541,7 @@ var DataSpace = class DataSpace2 {
2540
2541
  if (err instanceof CancelledError) {
2541
2542
  log10("Data pipeline initialization cancelled", err, {
2542
2543
  file: "data-space.ts",
2543
- line: 172,
2544
+ line: 173,
2544
2545
  scope: this,
2545
2546
  callSite: (f, a) => f(...a)
2546
2547
  });
@@ -2548,7 +2549,7 @@ var DataSpace = class DataSpace2 {
2548
2549
  }
2549
2550
  log10.error("Error initializing data pipeline", err, {
2550
2551
  file: "data-space.ts",
2551
- line: 176,
2552
+ line: 177,
2552
2553
  scope: this,
2553
2554
  callSite: (f, a) => f(...a)
2554
2555
  });
@@ -2655,7 +2656,7 @@ var DataSpace = class DataSpace2 {
2655
2656
  async createEpoch() {
2656
2657
  var _a, _b;
2657
2658
  const epoch = await this.dataPipeline.createEpoch();
2658
- await this.inner.controlPipeline.writer.write({
2659
+ const receipt = await this.inner.controlPipeline.writer.write({
2659
2660
  credential: {
2660
2661
  credential: await this._signingContext.credentialSigner.createCredential({
2661
2662
  subject: this.key,
@@ -2666,6 +2667,12 @@ var DataSpace = class DataSpace2 {
2666
2667
  })
2667
2668
  }
2668
2669
  });
2670
+ await this.inner.controlPipeline.state.waitUntilTimeframe(new Timeframe([
2671
+ [
2672
+ receipt.feedKey,
2673
+ receipt.seq
2674
+ ]
2675
+ ]));
2669
2676
  for (const feed of (_b = (_a = this.inner.dataPipeline.pipelineState) == null ? void 0 : _a.feeds) != null ? _b : []) {
2670
2677
  const indexBeforeEpoch = epoch.timeframe.get(feed.key);
2671
2678
  if (indexBeforeEpoch) {
@@ -2697,7 +2704,7 @@ import { ComplexMap as ComplexMap3, deferFunction as deferFunction2 } from "@dxo
2697
2704
  import { createCredential } from "@dxos/credentials";
2698
2705
  import { failUndefined as failUndefined2 } from "@dxos/debug";
2699
2706
  import { AdmittedFeed as AdmittedFeed4, SpaceMember } from "@dxos/protocols/proto/dxos/halo/credentials";
2700
- import { Timeframe } from "@dxos/timeframe";
2707
+ import { Timeframe as Timeframe2 } from "@dxos/timeframe";
2701
2708
  var spaceGenesis = async (keyring, signingContext, space) => {
2702
2709
  var _a, _b, _c, _d;
2703
2710
  const credentials = [
@@ -2748,7 +2755,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
2748
2755
  "@type": "dxos.halo.credentials.Epoch",
2749
2756
  number: 0,
2750
2757
  previousId: void 0,
2751
- timeframe: new Timeframe(),
2758
+ timeframe: new Timeframe2(),
2752
2759
  snapshotCid: void 0
2753
2760
  }
2754
2761
  })
@@ -3082,7 +3089,7 @@ var SpacesServiceImpl = class {
3082
3089
  spaces
3083
3090
  }, {
3084
3091
  file: "spaces-service.ts",
3085
- line: 59,
3092
+ line: 60,
3086
3093
  scope: this,
3087
3094
  callSite: (f, a) => f(...a)
3088
3095
  });
@@ -3169,12 +3176,13 @@ var SpacesServiceImpl = class {
3169
3176
  await space.createEpoch();
3170
3177
  }
3171
3178
  _transformSpace(space) {
3172
- var _a, _b, _c, _d, _e;
3179
+ var _a, _b, _c, _d, _e, _f;
3173
3180
  return {
3174
3181
  spaceKey: space.key,
3175
3182
  state: space.state,
3176
3183
  error: space.error ? encodeError(space.error) : void 0,
3177
3184
  pipeline: {
3185
+ currentEpoch: space.dataPipeline.currentEpoch,
3178
3186
  controlFeeds: space.inner.controlPipeline.state.feeds.map((feed) => feed.key),
3179
3187
  currentControlTimeframe: space.inner.controlPipeline.state.timeframe,
3180
3188
  targetControlTimeframe: space.inner.controlPipeline.state.targetTimeframe,
@@ -3196,6 +3204,7 @@ var SpacesServiceImpl = class {
3196
3204
  presence: ((_c2 = this._identityManager.identity) == null ? void 0 : _c2.identityKey.equals(member.key)) || space.presence.getPeersOnline().filter(({ identityKey }) => identityKey.equals(member.key)).length > 0 ? SpaceMember2.PresenceState.ONLINE : SpaceMember2.PresenceState.OFFLINE
3197
3205
  };
3198
3206
  }),
3207
+ creator: (_f = space.inner.spaceState.creator) == null ? void 0 : _f.key,
3199
3208
  cache: space.cache,
3200
3209
  metrics: space.metrics
3201
3210
  };
@@ -3955,4 +3964,4 @@ export {
3955
3964
  ClientServicesHost,
3956
3965
  LocalClientServices
3957
3966
  };
3958
- //# sourceMappingURL=chunk-5W2L64HI.mjs.map
3967
+ //# sourceMappingURL=chunk-YPN5TDAA.mjs.map