@dxos/client-services 0.4.10-main.4c7b3fa → 0.4.10-main.4c8c73c

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.
@@ -4373,7 +4373,7 @@ var createSelectedDocumentsIterator = (automergeHost) => (
4373
4373
  async function* loadDocuments(ids) {
4374
4374
  for (const id of ids) {
4375
4375
  const { documentId, objectId } = idCodec.decode(id);
4376
- const handle = automergeHost.repo.find(documentId);
4376
+ const handle = automergeHost.repo.handles[documentId] ?? automergeHost.repo.find(documentId);
4377
4377
  if (!handle.isReady()) {
4378
4378
  await handle.whenReady();
4379
4379
  }
@@ -4423,7 +4423,7 @@ var createDocumentsIterator = (automergeHost) => (
4423
4423
  if (visited.has(id)) {
4424
4424
  continue;
4425
4425
  }
4426
- const linkHandle = automergeHost.repo.find(id);
4426
+ const linkHandle = automergeHost.repo.handles[id] ?? automergeHost.repo.find(id);
4427
4427
  for await (const result of getObjectsFromHandle(linkHandle)) {
4428
4428
  yield result;
4429
4429
  }
@@ -4761,7 +4761,7 @@ import { SpaceMember as SpaceMember3 } from "@dxos/protocols/proto/dxos/client/s
4761
4761
  import { TRACE_PROCESSOR } from "@dxos/tracing";
4762
4762
 
4763
4763
  // packages/sdk/client-services/src/version.ts
4764
- var DXOS_VERSION = "0.4.10-main.4c7b3fa";
4764
+ var DXOS_VERSION = "0.4.10-main.4c8c73c";
4765
4765
 
4766
4766
  // packages/sdk/client-services/src/packlets/services/platform.ts
4767
4767
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -5007,7 +5007,7 @@ import { clientServiceBundle, defaultKey, Properties } from "@dxos/client-protoc
5007
5007
  import { Context as Context10 } from "@dxos/context";
5008
5008
  import { DataServiceImpl, encodeReference } from "@dxos/echo-pipeline";
5009
5009
  import { getTypeReference } from "@dxos/echo-schema";
5010
- import { IndexServiceImpl } from "@dxos/indexing";
5010
+ import { QueryServiceImpl } from "@dxos/indexing";
5011
5011
  import { invariant as invariant16 } from "@dxos/invariant";
5012
5012
  import { PublicKey as PublicKey13 } from "@dxos/keys";
5013
5013
  import { log as log16 } from "@dxos/log";
@@ -5614,7 +5614,7 @@ var ClientServicesHost = class {
5614
5614
  initialize({ config, ...options }) {
5615
5615
  invariant16(!this._open, "service host is open", {
5616
5616
  F: __dxlog_file19,
5617
- L: 197,
5617
+ L: 198,
5618
5618
  S: this,
5619
5619
  A: [
5620
5620
  "!this._open",
@@ -5623,14 +5623,14 @@ var ClientServicesHost = class {
5623
5623
  });
5624
5624
  log16("initializing...", void 0, {
5625
5625
  F: __dxlog_file19,
5626
- L: 198,
5626
+ L: 199,
5627
5627
  S: this,
5628
5628
  C: (f, a) => f(...a)
5629
5629
  });
5630
5630
  if (config) {
5631
5631
  invariant16(!this._config, "config already set", {
5632
5632
  F: __dxlog_file19,
5633
- L: 201,
5633
+ L: 202,
5634
5634
  S: this,
5635
5635
  A: [
5636
5636
  "!this._config",
@@ -5645,7 +5645,7 @@ var ClientServicesHost = class {
5645
5645
  if (!options.signalManager) {
5646
5646
  log16.warn("running signaling without telemetry metadata.", void 0, {
5647
5647
  F: __dxlog_file19,
5648
- L: 209,
5648
+ L: 210,
5649
5649
  S: this,
5650
5650
  C: (f, a) => f(...a)
5651
5651
  });
@@ -5656,7 +5656,7 @@ var ClientServicesHost = class {
5656
5656
  this._signalManager = signalManager;
5657
5657
  invariant16(!this._networkManager, "network manager already set", {
5658
5658
  F: __dxlog_file19,
5659
- L: 220,
5659
+ L: 221,
5660
5660
  S: this,
5661
5661
  A: [
5662
5662
  "!this._networkManager",
@@ -5670,7 +5670,7 @@ var ClientServicesHost = class {
5670
5670
  });
5671
5671
  log16("initialized", void 0, {
5672
5672
  F: __dxlog_file19,
5673
- L: 227,
5673
+ L: 228,
5674
5674
  S: this,
5675
5675
  C: (f, a) => f(...a)
5676
5676
  });
@@ -5684,13 +5684,13 @@ var ClientServicesHost = class {
5684
5684
  id: traceId
5685
5685
  }), {
5686
5686
  F: __dxlog_file19,
5687
- L: 238,
5687
+ L: 239,
5688
5688
  S: this,
5689
5689
  C: (f, a) => f(...a)
5690
5690
  });
5691
5691
  invariant16(this._config, "config not set", {
5692
5692
  F: __dxlog_file19,
5693
- L: 240,
5693
+ L: 241,
5694
5694
  S: this,
5695
5695
  A: [
5696
5696
  "this._config",
@@ -5699,7 +5699,7 @@ var ClientServicesHost = class {
5699
5699
  });
5700
5700
  invariant16(this._storage, "storage not set", {
5701
5701
  F: __dxlog_file19,
5702
- L: 241,
5702
+ L: 242,
5703
5703
  S: this,
5704
5704
  A: [
5705
5705
  "this._storage",
@@ -5708,7 +5708,7 @@ var ClientServicesHost = class {
5708
5708
  });
5709
5709
  invariant16(this._signalManager, "signal manager not set", {
5710
5710
  F: __dxlog_file19,
5711
- L: 242,
5711
+ L: 243,
5712
5712
  S: this,
5713
5713
  A: [
5714
5714
  "this._signalManager",
@@ -5717,7 +5717,7 @@ var ClientServicesHost = class {
5717
5717
  });
5718
5718
  invariant16(this._networkManager, "network manager not set", {
5719
5719
  F: __dxlog_file19,
5720
- L: 243,
5720
+ L: 244,
5721
5721
  S: this,
5722
5722
  A: [
5723
5723
  "this._networkManager",
@@ -5729,7 +5729,7 @@ var ClientServicesHost = class {
5729
5729
  lockKey: this._resourceLock?.lockKey
5730
5730
  }, {
5731
5731
  F: __dxlog_file19,
5732
- L: 246,
5732
+ L: 247,
5733
5733
  S: this,
5734
5734
  C: (f, a) => f(...a)
5735
5735
  });
@@ -5740,6 +5740,11 @@ var ClientServicesHost = class {
5740
5740
  await this._resourceLock?.acquire();
5741
5741
  await this._loggingService.open();
5742
5742
  this._serviceContext = new ServiceContext(this._storage, this._level, this._networkManager, this._signalManager, this._runtimeParams);
5743
+ this._queryService = new QueryServiceImpl({
5744
+ indexer: this._serviceContext.indexer,
5745
+ automergeHost: this._serviceContext.automergeHost
5746
+ });
5747
+ await this._queryService.open(ctx);
5743
5748
  this._serviceRegistry.setServices({
5744
5749
  SystemService: this._systemService,
5745
5750
  IdentityService: new IdentityServiceImpl((params) => this._createIdentity(params), this._serviceContext.identityManager, this._serviceContext.keyring, (profile) => this._serviceContext.broadcastProfileUpdate(profile)),
@@ -5750,10 +5755,7 @@ var ClientServicesHost = class {
5750
5755
  return this._serviceContext.dataSpaceManager;
5751
5756
  }),
5752
5757
  DataService: new DataServiceImpl(this._serviceContext.automergeHost),
5753
- IndexService: new IndexServiceImpl({
5754
- indexer: this._serviceContext.indexer,
5755
- automergeHost: this._serviceContext.automergeHost
5756
- }),
5758
+ QueryService: this._queryService,
5757
5759
  NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager),
5758
5760
  LoggingService: this._loggingService,
5759
5761
  TracingService: this._tracingService,
@@ -5784,7 +5786,7 @@ var ClientServicesHost = class {
5784
5786
  deviceKey
5785
5787
  }, {
5786
5788
  F: __dxlog_file19,
5787
- L: 326,
5789
+ L: 330,
5788
5790
  S: this,
5789
5791
  C: (f, a) => f(...a)
5790
5792
  });
@@ -5792,7 +5794,7 @@ var ClientServicesHost = class {
5792
5794
  id: traceId
5793
5795
  }), {
5794
5796
  F: __dxlog_file19,
5795
- L: 327,
5797
+ L: 331,
5796
5798
  S: this,
5797
5799
  C: (f, a) => f(...a)
5798
5800
  });
@@ -5806,7 +5808,7 @@ var ClientServicesHost = class {
5806
5808
  deviceKey
5807
5809
  }, {
5808
5810
  F: __dxlog_file19,
5809
- L: 338,
5811
+ L: 342,
5810
5812
  S: this,
5811
5813
  C: (f, a) => f(...a)
5812
5814
  });
@@ -5816,6 +5818,7 @@ var ClientServicesHost = class {
5816
5818
  SystemService: this._systemService
5817
5819
  });
5818
5820
  await this._loggingService.close();
5821
+ await this._queryService.close();
5819
5822
  await this._serviceContext.close();
5820
5823
  await this._level?.close();
5821
5824
  this._open = false;
@@ -5824,7 +5827,7 @@ var ClientServicesHost = class {
5824
5827
  deviceKey
5825
5828
  }, {
5826
5829
  F: __dxlog_file19,
5827
- L: 347,
5830
+ L: 352,
5828
5831
  S: this,
5829
5832
  C: (f, a) => f(...a)
5830
5833
  });
@@ -5835,13 +5838,13 @@ var ClientServicesHost = class {
5835
5838
  id: traceId
5836
5839
  }), {
5837
5840
  F: __dxlog_file19,
5838
- L: 352,
5841
+ L: 357,
5839
5842
  S: this,
5840
5843
  C: (f, a) => f(...a)
5841
5844
  });
5842
5845
  log16("resetting...", void 0, {
5843
5846
  F: __dxlog_file19,
5844
- L: 354,
5847
+ L: 359,
5845
5848
  S: this,
5846
5849
  C: (f, a) => f(...a)
5847
5850
  });
@@ -5849,7 +5852,7 @@ var ClientServicesHost = class {
5849
5852
  await this._storage.reset();
5850
5853
  log16("reset", void 0, {
5851
5854
  F: __dxlog_file19,
5852
- L: 357,
5855
+ L: 362,
5853
5856
  S: this,
5854
5857
  C: (f, a) => f(...a)
5855
5858
  });
@@ -5857,7 +5860,7 @@ var ClientServicesHost = class {
5857
5860
  id: traceId
5858
5861
  }), {
5859
5862
  F: __dxlog_file19,
5860
- L: 358,
5863
+ L: 363,
5861
5864
  S: this,
5862
5865
  C: (f, a) => f(...a)
5863
5866
  });
@@ -5870,7 +5873,7 @@ var ClientServicesHost = class {
5870
5873
  const automergeIndex = space.automergeSpaceState.rootUrl;
5871
5874
  invariant16(automergeIndex, void 0, {
5872
5875
  F: __dxlog_file19,
5873
- L: 370,
5876
+ L: 375,
5874
5877
  S: this,
5875
5878
  A: [
5876
5879
  "automergeIndex",
@@ -5997,4 +6000,4 @@ export {
5997
6000
  ClientServicesHost,
5998
6001
  ClientServicesProviderResource
5999
6002
  };
6000
- //# sourceMappingURL=chunk-UWSCLXQ5.mjs.map
6003
+ //# sourceMappingURL=chunk-F4LOSBRJ.mjs.map