@dxos/client-services 0.4.3-main.38898ae → 0.4.3-main.3e1206a

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.
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_Y6DVFZYV_exports = {};
30
- __export(chunk_Y6DVFZYV_exports, {
29
+ var chunk_AG75PFD4_exports = {};
30
+ __export(chunk_AG75PFD4_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  DataSpace: () => DataSpace,
@@ -60,7 +60,7 @@ __export(chunk_Y6DVFZYV_exports, {
60
60
  subscribeToSpaces: () => subscribeToSpaces,
61
61
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
62
62
  });
63
- module.exports = __toCommonJS(chunk_Y6DVFZYV_exports);
63
+ module.exports = __toCommonJS(chunk_AG75PFD4_exports);
64
64
  var import_async = require("@dxos/async");
65
65
  var import_codec_protobuf = require("@dxos/codec-protobuf");
66
66
  var import_feed_store = require("@dxos/feed-store");
@@ -2675,7 +2675,7 @@ var getPlatform = () => {
2675
2675
  };
2676
2676
  }
2677
2677
  };
2678
- var DXOS_VERSION = "0.4.3-main.38898ae";
2678
+ var DXOS_VERSION = "0.4.3-main.3e1206a";
2679
2679
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2680
2680
  var DEFAULT_TIMEOUT = 1e3;
2681
2681
  var createDiagnostics = async (clientServices, serviceContext, config) => {
@@ -3389,7 +3389,12 @@ var DataSpace = class {
3389
3389
  const handle = this._automergeHost.repo.find(rootUrl);
3390
3390
  queueMicrotask(async () => {
3391
3391
  try {
3392
- await (0, import_async10.asyncTimeout)(handle.whenReady(), 5e3);
3392
+ await (0, import_debug4.warnAfterTimeout)(5e3, "Automerge root doc load timeout (DataSpace)", async () => {
3393
+ await (0, import_context6.cancelWithContext)(this._ctx, handle.whenReady());
3394
+ });
3395
+ if (this._ctx.disposed) {
3396
+ return;
3397
+ }
3393
3398
  const doc = handle.docSync() ?? (0, import_invariant10.failedInvariant)();
3394
3399
  if (!doc.experimental_spaceKey) {
3395
3400
  handle.change((doc2) => {
@@ -3397,13 +3402,16 @@ var DataSpace = class {
3397
3402
  });
3398
3403
  }
3399
3404
  } catch (err) {
3405
+ if (err instanceof import_context6.ContextDisposedError) {
3406
+ return;
3407
+ }
3400
3408
  import_log9.log.warn("error loading automerge root doc", {
3401
3409
  space: this.key,
3402
3410
  rootUrl,
3403
3411
  err
3404
3412
  }, {
3405
3413
  F: __dxlog_file12,
3406
- L: 394,
3414
+ L: 403,
3407
3415
  S: this,
3408
3416
  C: (f, a) => f(...a)
3409
3417
  });
@@ -3493,7 +3501,7 @@ var DataSpace = class {
3493
3501
  state: import_services8.SpaceState[this._state]
3494
3502
  }, {
3495
3503
  F: __dxlog_file12,
3496
- L: 483,
3504
+ L: 492,
3497
3505
  S: this,
3498
3506
  C: (f, a) => f(...a)
3499
3507
  });
@@ -4723,7 +4731,7 @@ var SystemServiceImpl = class {
4723
4731
  this._onReset = onReset;
4724
4732
  }
4725
4733
  async getConfig() {
4726
- return this._config?.values ?? {};
4734
+ return (await this._config?.())?.values ?? {};
4727
4735
  }
4728
4736
  /**
4729
4737
  * NOTE: Since this is serialized as a JSON object, we allow the option to serialize keys.
@@ -4828,7 +4836,7 @@ var ClientServicesHost = class {
4828
4836
  });
4829
4837
  }
4830
4838
  this._systemService = new SystemServiceImpl({
4831
- config: this._config,
4839
+ config: () => this._config,
4832
4840
  statusUpdate: this._statusUpdate,
4833
4841
  getCurrentStatus: () => this.isOpen ? import_services12.SystemStatus.ACTIVE : import_services12.SystemStatus.INACTIVE,
4834
4842
  getDiagnostics: () => {
@@ -5199,4 +5207,4 @@ ClientServicesHost = _ts_decorate8([
5199
5207
  subscribeToSpaces,
5200
5208
  subscribeToSwarmInfo
5201
5209
  });
5202
- //# sourceMappingURL=chunk-Y6DVFZYV.cjs.map
5210
+ //# sourceMappingURL=chunk-AG75PFD4.cjs.map