@dxos/client-services 0.5.9-main.bdf733d → 0.5.9-main.d9a4917

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.bdf733d";
358
+ var DXOS_VERSION = "0.5.9-main.d9a4917";
359
359
 
360
360
  // packages/sdk/client-services/src/packlets/services/platform.ts
361
361
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -3929,7 +3929,7 @@ var DataSpace = class {
3929
3929
  state: SpaceState[this._state]
3930
3930
  }, {
3931
3931
  F: __dxlog_file15,
3932
- L: 142,
3932
+ L: 143,
3933
3933
  S: this,
3934
3934
  C: (f, a) => f(...a)
3935
3935
  });
@@ -3982,7 +3982,7 @@ var DataSpace = class {
3982
3982
  state: SpaceState[this._state]
3983
3983
  }, {
3984
3984
  F: __dxlog_file15,
3985
- L: 205,
3985
+ L: 206,
3986
3986
  S: this,
3987
3987
  C: (f, a) => f(...a)
3988
3988
  });
@@ -4000,7 +4000,7 @@ var DataSpace = class {
4000
4000
  state: SpaceState[this._state]
4001
4001
  }, {
4002
4002
  F: __dxlog_file15,
4003
- L: 219,
4003
+ L: 220,
4004
4004
  S: this,
4005
4005
  C: (f, a) => f(...a)
4006
4006
  });
@@ -4032,7 +4032,7 @@ var DataSpace = class {
4032
4032
  if (err instanceof CancelledError || err instanceof ContextDisposedError3) {
4033
4033
  log12("data pipeline initialization cancelled", err, {
4034
4034
  F: __dxlog_file15,
4035
- L: 252,
4035
+ L: 253,
4036
4036
  S: this,
4037
4037
  C: (f, a) => f(...a)
4038
4038
  });
@@ -4040,7 +4040,7 @@ var DataSpace = class {
4040
4040
  }
4041
4041
  log12.error("Error initializing data pipeline", err, {
4042
4042
  F: __dxlog_file15,
4043
- L: 256,
4043
+ L: 257,
4044
4044
  S: this,
4045
4045
  C: (f, a) => f(...a)
4046
4046
  });
@@ -4049,7 +4049,7 @@ var DataSpace = class {
4049
4049
  state: SpaceState[this._state]
4050
4050
  }, {
4051
4051
  F: __dxlog_file15,
4052
- L: 258,
4052
+ L: 259,
4053
4053
  S: this,
4054
4054
  C: (f, a) => f(...a)
4055
4055
  });
@@ -4069,7 +4069,7 @@ var DataSpace = class {
4069
4069
  state: SpaceState[this._state]
4070
4070
  }, {
4071
4071
  F: __dxlog_file15,
4072
- L: 274,
4072
+ L: 275,
4073
4073
  S: this,
4074
4074
  C: (f, a) => f(...a)
4075
4075
  });
@@ -4079,7 +4079,7 @@ var DataSpace = class {
4079
4079
  await cancelWithContext4(this._ctx, this.automergeSpaceState.ensureEpochInitialized());
4080
4080
  log12("data pipeline ready", void 0, {
4081
4081
  F: __dxlog_file15,
4082
- L: 286,
4082
+ L: 287,
4083
4083
  S: this,
4084
4084
  C: (f, a) => f(...a)
4085
4085
  });
@@ -4089,7 +4089,7 @@ var DataSpace = class {
4089
4089
  state: SpaceState[this._state]
4090
4090
  }, {
4091
4091
  F: __dxlog_file15,
4092
- L: 290,
4092
+ L: 291,
4093
4093
  S: this,
4094
4094
  C: (f, a) => f(...a)
4095
4095
  });
@@ -4105,7 +4105,7 @@ var DataSpace = class {
4105
4105
  await this._createWritableFeeds();
4106
4106
  log12("writable feeds created", void 0, {
4107
4107
  F: __dxlog_file15,
4108
- L: 306,
4108
+ L: 307,
4109
4109
  S: this,
4110
4110
  C: (f, a) => f(...a)
4111
4111
  });
@@ -4168,7 +4168,7 @@ var DataSpace = class {
4168
4168
  rootUrl
4169
4169
  }, {
4170
4170
  F: __dxlog_file15,
4171
- L: 372,
4171
+ L: 373,
4172
4172
  S: this,
4173
4173
  C: (f, a) => f(...a)
4174
4174
  });
@@ -4198,7 +4198,7 @@ var DataSpace = class {
4198
4198
  rootUrl
4199
4199
  }, {
4200
4200
  F: __dxlog_file15,
4201
- L: 399,
4201
+ L: 400,
4202
4202
  S: this,
4203
4203
  C: (f, a) => f(...a)
4204
4204
  });
@@ -4213,7 +4213,7 @@ var DataSpace = class {
4213
4213
  err
4214
4214
  }, {
4215
4215
  F: __dxlog_file15,
4216
- L: 405,
4216
+ L: 406,
4217
4217
  S: this,
4218
4218
  C: (f, a) => f(...a)
4219
4219
  });
@@ -4268,7 +4268,7 @@ var DataSpace = class {
4268
4268
  const newRoot = this._echoHost.automergeRepo.create(rootHandle.docSync());
4269
4269
  invariant13(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
4270
4270
  F: __dxlog_file15,
4271
- L: 455,
4271
+ L: 456,
4272
4272
  S: this,
4273
4273
  A: [
4274
4274
  "typeof newRoot.url === 'string' && newRoot.url.length > 0",
@@ -4287,7 +4287,7 @@ var DataSpace = class {
4287
4287
  {
4288
4288
  log12.info("Fragmenting", void 0, {
4289
4289
  F: __dxlog_file15,
4290
- L: 467,
4290
+ L: 468,
4291
4291
  S: this,
4292
4292
  C: (f, a) => f(...a)
4293
4293
  });
@@ -4299,7 +4299,7 @@ var DataSpace = class {
4299
4299
  const otherObjects = objects.filter(([key]) => key !== properties?.[0]);
4300
4300
  invariant13(properties, "Properties not found", {
4301
4301
  F: __dxlog_file15,
4302
- L: 477,
4302
+ L: 478,
4303
4303
  S: this,
4304
4304
  A: [
4305
4305
  "properties",
@@ -4315,7 +4315,7 @@ var DataSpace = class {
4315
4315
  const newRoot = this._echoHost.automergeRepo.create(newSpaceDoc);
4316
4316
  invariant13(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
4317
4317
  F: __dxlog_file15,
4318
- L: 482,
4318
+ L: 483,
4319
4319
  S: this,
4320
4320
  A: [
4321
4321
  "typeof newRoot.url === 'string' && newRoot.url.length > 0",
@@ -4343,6 +4343,25 @@ var DataSpace = class {
4343
4343
  };
4344
4344
  }
4345
4345
  break;
4346
+ case CreateEpochRequest.Migration.REPLACE_AUTOMERGE_ROOT:
4347
+ {
4348
+ invariant13(options.newAutomergeRoot, void 0, {
4349
+ F: __dxlog_file15,
4350
+ L: 513,
4351
+ S: this,
4352
+ A: [
4353
+ "options.newAutomergeRoot",
4354
+ ""
4355
+ ]
4356
+ });
4357
+ epoch = {
4358
+ previousId: this._automergeSpaceState.lastEpoch?.id,
4359
+ number: (this._automergeSpaceState.lastEpoch?.subject.assertion.number ?? -1) + 1,
4360
+ timeframe: this._automergeSpaceState.lastEpoch?.subject.assertion.timeframe ?? new Timeframe2(),
4361
+ automergeRoot: options.newAutomergeRoot
4362
+ };
4363
+ }
4364
+ break;
4346
4365
  }
4347
4366
  if (!epoch) {
4348
4367
  return;
@@ -4364,6 +4383,7 @@ var DataSpace = class {
4364
4383
  receipt.seq
4365
4384
  ]
4366
4385
  ]));
4386
+ await this._echoHost.updateIndexes();
4367
4387
  }
4368
4388
  async activate() {
4369
4389
  if (this._state !== SpaceState.INACTIVE) {
@@ -4384,7 +4404,7 @@ var DataSpace = class {
4384
4404
  state: SpaceState[this._state]
4385
4405
  }, {
4386
4406
  F: __dxlog_file15,
4387
- L: 552,
4407
+ L: 566,
4388
4408
  S: this,
4389
4409
  C: (f, a) => f(...a)
4390
4410
  });
@@ -5202,11 +5222,12 @@ var SpacesServiceImpl = class {
5202
5222
  }
5203
5223
  }
5204
5224
  }
5205
- async createEpoch({ spaceKey, migration }) {
5225
+ async createEpoch({ spaceKey, migration, automergeRootUrl }) {
5206
5226
  const dataSpaceManager = await this._getDataSpaceManager();
5207
5227
  const space = dataSpaceManager.spaces.get(spaceKey) ?? raise2(new SpaceNotFoundError2(spaceKey));
5208
5228
  await space.createEpoch({
5209
- migration
5229
+ migration,
5230
+ newAutomergeRoot: automergeRootUrl
5210
5231
  });
5211
5232
  }
5212
5233
  _serializeSpace(space) {
@@ -6580,4 +6601,4 @@ export {
6580
6601
  ClientServicesProviderResource,
6581
6602
  DiagnosticsCollector
6582
6603
  };
6583
- //# sourceMappingURL=chunk-KNGR7BYM.mjs.map
6604
+ //# sourceMappingURL=chunk-XEG7XZN4.mjs.map