@dxos/client-services 0.4.10-main.30a328e → 0.4.10-main.32aef1b

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.
@@ -7,7 +7,7 @@ import {
7
7
  InvitationsManager,
8
8
  ServiceContext,
9
9
  SpaceInvitationProtocol
10
- } from "../../chunk-RCJRMCJI.mjs";
10
+ } from "../../chunk-W4P2OHIB.mjs";
11
11
 
12
12
  // packages/sdk/client-services/src/packlets/testing/credential-utils.ts
13
13
  import { createCredential } from "@dxos/credentials";
@@ -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_OMVCNWC3_exports = {};
30
- __export(chunk_OMVCNWC3_exports, {
29
+ var chunk_7LUR3JCC_exports = {};
30
+ __export(chunk_7LUR3JCC_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  ClientServicesProviderResource: () => ClientServicesProviderResource,
@@ -66,7 +66,7 @@ __export(chunk_OMVCNWC3_exports, {
66
66
  subscribeToSpaces: () => subscribeToSpaces,
67
67
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
68
68
  });
69
- module.exports = __toCommonJS(chunk_OMVCNWC3_exports);
69
+ module.exports = __toCommonJS(chunk_7LUR3JCC_exports);
70
70
  var import_async = require("@dxos/async");
71
71
  var import_codec_protobuf = require("@dxos/codec-protobuf");
72
72
  var import_feed_store = require("@dxos/feed-store");
@@ -4564,59 +4564,6 @@ var createSelectedDocumentsIterator = (automergeHost) => (
4564
4564
  }
4565
4565
  }
4566
4566
  );
4567
- var createDocumentsIterator = (automergeHost) => (
4568
- /**
4569
- * Recursively get all object data blobs from Automerge Repo.
4570
- * @param ids
4571
- */
4572
- // TODO(mykola): Unload automerge handles after usage.
4573
- async function* getAllDocuments() {
4574
- const visited = /* @__PURE__ */ new Set();
4575
- async function* getObjectsFromHandle(handle) {
4576
- if (visited.has(handle.documentId)) {
4577
- return;
4578
- }
4579
- if (!handle.isReady()) {
4580
- await handle.whenReady();
4581
- }
4582
- const doc = handle.docSync();
4583
- const heads = (0, import_automerge.getHeads)(doc);
4584
- if (doc.objects) {
4585
- yield Object.entries(doc.objects).map(([objectId, object]) => {
4586
- return {
4587
- id: import_protocols12.idCodec.encode({
4588
- documentId: handle.documentId,
4589
- objectId
4590
- }),
4591
- object,
4592
- currentHash: heads.join("")
4593
- };
4594
- });
4595
- }
4596
- if (doc.links) {
4597
- for (const id of Object.values(doc.links)) {
4598
- if (visited.has(id)) {
4599
- continue;
4600
- }
4601
- const linkHandle = automergeHost.repo.handles[id] ?? automergeHost.repo.find(id);
4602
- for await (const result of getObjectsFromHandle(linkHandle)) {
4603
- yield result;
4604
- }
4605
- }
4606
- }
4607
- visited.add(handle.documentId);
4608
- }
4609
- for (const handle of Object.values(automergeHost.repo.handles)) {
4610
- if (visited.has(handle.documentId)) {
4611
- continue;
4612
- }
4613
- for await (const result of getObjectsFromHandle(handle)) {
4614
- yield result;
4615
- }
4616
- visited.add(handle.documentId);
4617
- }
4618
- }
4619
- );
4620
4567
  function _ts_decorate6(decorators, target, key, desc) {
4621
4568
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4622
4569
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -4673,12 +4620,12 @@ var ServiceContext = class extends import_context10.Resource {
4673
4620
  })
4674
4621
  });
4675
4622
  this.indexer = new import_indexing.Indexer({
4623
+ db: this.level,
4676
4624
  indexStore: new import_indexing.IndexStore({
4677
4625
  db: level.sublevel("index-storage")
4678
4626
  }),
4679
4627
  metadataStore: this.indexMetadata,
4680
- loadDocuments: createSelectedDocumentsIterator(this.automergeHost),
4681
- getAllDocuments: createDocumentsIterator(this.automergeHost)
4628
+ loadDocuments: createSelectedDocumentsIterator(this.automergeHost)
4682
4629
  });
4683
4630
  this.invitations = new InvitationsHandler(this.networkManager);
4684
4631
  this.invitationsManager = new InvitationsManager(this.invitations, (invitation) => this.getInvitationHandler(invitation), this.metadataStore);
@@ -4922,7 +4869,7 @@ var ServiceRegistry = class {
4922
4869
  delete this._handlers[name];
4923
4870
  }
4924
4871
  };
4925
- var DXOS_VERSION = "0.4.10-main.30a328e";
4872
+ var DXOS_VERSION = "0.4.10-main.32aef1b";
4926
4873
  var getPlatform = () => {
4927
4874
  if (process.browser) {
4928
4875
  if (typeof window !== "undefined") {
@@ -5934,4 +5881,4 @@ var findConfigs = () => {
5934
5881
  subscribeToSpaces,
5935
5882
  subscribeToSwarmInfo
5936
5883
  });
5937
- //# sourceMappingURL=chunk-OMVCNWC3.cjs.map
5884
+ //# sourceMappingURL=chunk-7LUR3JCC.cjs.map