@dxos/client-services 0.4.10-main.6132afb → 0.4.10-main.697c7a4
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.
- package/dist/lib/browser/{chunk-7DK3CG35.mjs → chunk-O5MZARG4.mjs} +27 -16
- package/dist/lib/browser/{chunk-7DK3CG35.mjs.map → chunk-O5MZARG4.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-OP35CLAW.cjs → chunk-NL45CUJT.cjs} +29 -18
- package/dist/lib/node/{chunk-OP35CLAW.cjs.map → chunk-NL45CUJT.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +37 -37
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +6 -6
- package/dist/types/src/packlets/indexing/util.d.ts +2 -2
- package/dist/types/src/packlets/indexing/util.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +34 -34
- package/src/packlets/indexing/util.ts +4 -4
- package/src/packlets/services/service-context.ts +3 -3
- package/src/packlets/services/service-host.ts +18 -6
- package/src/version.ts +1 -1
|
@@ -2769,7 +2769,7 @@ var getPlatform = () => {
|
|
|
2769
2769
|
};
|
|
2770
2770
|
|
|
2771
2771
|
// packages/sdk/client-services/src/version.ts
|
|
2772
|
-
var DXOS_VERSION = "0.4.10-main.
|
|
2772
|
+
var DXOS_VERSION = "0.4.10-main.697c7a4";
|
|
2773
2773
|
|
|
2774
2774
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2775
2775
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
@@ -4406,7 +4406,7 @@ import { safeInstanceof } from "@dxos/util";
|
|
|
4406
4406
|
import { getHeads } from "@dxos/automerge/automerge";
|
|
4407
4407
|
import { warnAfterTimeout as warnAfterTimeout2 } from "@dxos/debug";
|
|
4408
4408
|
import { idCodec } from "@dxos/protocols";
|
|
4409
|
-
var
|
|
4409
|
+
var createSelectedDocumentsIterator = (automergeHost) => (
|
|
4410
4410
|
/**
|
|
4411
4411
|
* Get object data blobs from Automerge Repo by ids.
|
|
4412
4412
|
* @param ids
|
|
@@ -4419,17 +4419,17 @@ var createLoadDocuments = (automergeHost) => (
|
|
|
4419
4419
|
await warnAfterTimeout2(5e3, "to long to load doc", () => handle.whenReady());
|
|
4420
4420
|
const doc = handle.docSync();
|
|
4421
4421
|
const hash = getHeads(doc).join("");
|
|
4422
|
-
yield [
|
|
4422
|
+
yield doc.objects?.[objectId] ? [
|
|
4423
4423
|
{
|
|
4424
4424
|
id,
|
|
4425
4425
|
object: doc.objects[objectId],
|
|
4426
4426
|
currentHash: hash
|
|
4427
4427
|
}
|
|
4428
|
-
];
|
|
4428
|
+
] : [];
|
|
4429
4429
|
}
|
|
4430
4430
|
}
|
|
4431
4431
|
);
|
|
4432
|
-
var
|
|
4432
|
+
var createDocumentsIterator = (automergeHost) => (
|
|
4433
4433
|
/**
|
|
4434
4434
|
* Recursively get all object data blobs from Automerge Repo.
|
|
4435
4435
|
* @param ids
|
|
@@ -4452,7 +4452,7 @@ var createGetAllDocuments = (automergeHost) => (
|
|
|
4452
4452
|
objectId
|
|
4453
4453
|
}),
|
|
4454
4454
|
object,
|
|
4455
|
-
currentHash: heads.
|
|
4455
|
+
currentHash: heads.join("")
|
|
4456
4456
|
};
|
|
4457
4457
|
});
|
|
4458
4458
|
}
|
|
@@ -4536,8 +4536,8 @@ var ServiceContext = class {
|
|
|
4536
4536
|
directory: storage.createDirectory("index-store")
|
|
4537
4537
|
}),
|
|
4538
4538
|
metadataStore: this.indexMetadata,
|
|
4539
|
-
loadDocuments:
|
|
4540
|
-
getAllDocuments:
|
|
4539
|
+
loadDocuments: createSelectedDocumentsIterator(this.automergeHost),
|
|
4540
|
+
getAllDocuments: createDocumentsIterator(this.automergeHost)
|
|
4541
4541
|
});
|
|
4542
4542
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
4543
4543
|
this._handlerFactories.set(Invitation6.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined2(), this._acceptIdentity.bind(this)));
|
|
@@ -4950,8 +4950,8 @@ var toStorageType = (type) => {
|
|
|
4950
4950
|
import { Event as Event9, synchronized as synchronized3 } from "@dxos/async";
|
|
4951
4951
|
import { Properties, clientServiceBundle, defaultKey } from "@dxos/client-protocol";
|
|
4952
4952
|
import { Context as Context11 } from "@dxos/context";
|
|
4953
|
-
import { DataServiceImpl } from "@dxos/echo-pipeline";
|
|
4954
|
-
import
|
|
4953
|
+
import { DataServiceImpl, encodeReference } from "@dxos/echo-pipeline";
|
|
4954
|
+
import * as E from "@dxos/echo-schema";
|
|
4955
4955
|
import { IndexServiceImpl } from "@dxos/indexing";
|
|
4956
4956
|
import { invariant as invariant16 } from "@dxos/invariant";
|
|
4957
4957
|
import { PublicKey as PublicKey12 } from "@dxos/keys";
|
|
@@ -5622,12 +5622,10 @@ var ClientServicesHost = class {
|
|
|
5622
5622
|
const identity = await this._serviceContext.createIdentity(params);
|
|
5623
5623
|
await this._serviceContext.initialized.wait();
|
|
5624
5624
|
const space = await this._serviceContext.dataSpaceManager.createSpace();
|
|
5625
|
-
const obj = new Properties(void 0);
|
|
5626
|
-
obj[defaultKey] = identity.identityKey.toHex();
|
|
5627
5625
|
const automergeIndex = space.automergeSpaceState.rootUrl;
|
|
5628
5626
|
invariant16(automergeIndex, void 0, {
|
|
5629
5627
|
F: __dxlog_file18,
|
|
5630
|
-
L:
|
|
5628
|
+
L: 351,
|
|
5631
5629
|
S: this,
|
|
5632
5630
|
A: [
|
|
5633
5631
|
"automergeIndex",
|
|
@@ -5636,12 +5634,25 @@ var ClientServicesHost = class {
|
|
|
5636
5634
|
});
|
|
5637
5635
|
const document = await this._serviceContext.automergeHost.repo.find(automergeIndex);
|
|
5638
5636
|
await document.whenReady();
|
|
5637
|
+
const properties = {
|
|
5638
|
+
system: {
|
|
5639
|
+
type: encodeReference(E.getTypeReference(Properties))
|
|
5640
|
+
},
|
|
5641
|
+
data: {
|
|
5642
|
+
[defaultKey]: identity.identityKey.toHex()
|
|
5643
|
+
},
|
|
5644
|
+
meta: {
|
|
5645
|
+
keys: []
|
|
5646
|
+
}
|
|
5647
|
+
};
|
|
5648
|
+
const propertiesId = PublicKey12.random().toHex();
|
|
5639
5649
|
document.change((doc) => {
|
|
5640
5650
|
assignDeep2(doc, [
|
|
5641
5651
|
"objects",
|
|
5642
|
-
|
|
5643
|
-
],
|
|
5652
|
+
propertiesId
|
|
5653
|
+
], properties);
|
|
5644
5654
|
});
|
|
5655
|
+
await this._serviceContext.automergeHost.repo.flush();
|
|
5645
5656
|
return identity;
|
|
5646
5657
|
}
|
|
5647
5658
|
};
|
|
@@ -5697,4 +5708,4 @@ export {
|
|
|
5697
5708
|
createStorageObjects,
|
|
5698
5709
|
ClientServicesHost
|
|
5699
5710
|
};
|
|
5700
|
-
//# sourceMappingURL=chunk-
|
|
5711
|
+
//# sourceMappingURL=chunk-O5MZARG4.mjs.map
|