@dxos/client-services 0.5.9-main.c34beda → 0.5.9-main.cd3aaf7
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-Y5AUZFDK.mjs → chunk-4FNLRMHR.mjs} +32 -18
- package/dist/lib/browser/{chunk-Y5AUZFDK.mjs.map → chunk-4FNLRMHR.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-UHP765AN.cjs → chunk-ZTE7R6AZ.cjs} +35 -21
- package/dist/lib/node/{chunk-UHP765AN.cjs.map → chunk-ZTE7R6AZ.cjs.map} +2 -2
- package/dist/lib/node/index.cjs +45 -45
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/spaces/epoch-migrations.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +36 -36
- package/src/packlets/spaces/epoch-migrations.ts +12 -7
- package/src/version.ts +1 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
InvitationsManager,
|
|
8
8
|
ServiceContext,
|
|
9
9
|
SpaceInvitationProtocol
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-4FNLRMHR.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
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_ZTE7R6AZ_exports = {};
|
|
30
|
+
__export(chunk_ZTE7R6AZ_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
ClientServicesProviderResource: () => ClientServicesProviderResource,
|
|
@@ -70,7 +70,7 @@ __export(chunk_UHP765AN_exports, {
|
|
|
70
70
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
71
71
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
72
72
|
});
|
|
73
|
-
module.exports = __toCommonJS(
|
|
73
|
+
module.exports = __toCommonJS(chunk_ZTE7R6AZ_exports);
|
|
74
74
|
var import_async = require("@dxos/async");
|
|
75
75
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
76
76
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -650,7 +650,7 @@ var DevtoolsServiceImpl = class {
|
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
652
|
};
|
|
653
|
-
var DXOS_VERSION = "0.5.9-main.
|
|
653
|
+
var DXOS_VERSION = "0.5.9-main.cd3aaf7";
|
|
654
654
|
var getPlatform = () => {
|
|
655
655
|
if (process.browser) {
|
|
656
656
|
if (typeof window !== "undefined") {
|
|
@@ -3911,21 +3911,35 @@ var runEpochMigration = async (ctx, context) => {
|
|
|
3911
3911
|
});
|
|
3912
3912
|
const newRootContent = await (0, import_echo_db.convertLegacySpaceRootDoc)(structuredClone(rootHandle.docSync()));
|
|
3913
3913
|
for (const [id, url] of Object.entries(newRootContent.links ?? {})) {
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3914
|
+
try {
|
|
3915
|
+
const handle = context.repo.find(url);
|
|
3916
|
+
await (0, import_context12.cancelWithContext)(ctx, (0, import_async15.asyncTimeout)(handle.whenReady(), 1e4));
|
|
3917
|
+
(0, import_invariant13.invariant)(handle.docSync(), "Doc not found", {
|
|
3918
|
+
F: __dxlog_file15,
|
|
3919
|
+
L: 108,
|
|
3920
|
+
S: void 0,
|
|
3921
|
+
A: [
|
|
3922
|
+
"handle.docSync()",
|
|
3923
|
+
"'Doc not found'"
|
|
3924
|
+
]
|
|
3925
|
+
});
|
|
3926
|
+
const newDoc = await (0, import_echo_db.convertLegacyReferences)(structuredClone(handle.docSync()));
|
|
3927
|
+
const migratedDoc = (0, import_echo_db.migrateDocument)(handle.docSync(), newDoc);
|
|
3928
|
+
const newHandle = context.repo.import(import_automerge.next.save(migratedDoc));
|
|
3929
|
+
newRootContent.links[id] = newHandle.url;
|
|
3930
|
+
} catch (err) {
|
|
3931
|
+
import_log13.log.warn("Failed to migrate reference", {
|
|
3932
|
+
id,
|
|
3933
|
+
url,
|
|
3934
|
+
error: err
|
|
3935
|
+
}, {
|
|
3936
|
+
F: __dxlog_file15,
|
|
3937
|
+
L: 114,
|
|
3938
|
+
S: void 0,
|
|
3939
|
+
C: (f, a) => f(...a)
|
|
3940
|
+
});
|
|
3941
|
+
delete newRootContent.links[id];
|
|
3942
|
+
}
|
|
3929
3943
|
}
|
|
3930
3944
|
const migratedRoot = (0, import_echo_db.migrateDocument)(rootHandle.docSync(), newRootContent);
|
|
3931
3945
|
const newRoot = context.repo.import(import_automerge.next.save(migratedRoot));
|
|
@@ -3937,7 +3951,7 @@ var runEpochMigration = async (ctx, context) => {
|
|
|
3937
3951
|
case import_services13.CreateEpochRequest.Migration.REPLACE_AUTOMERGE_ROOT: {
|
|
3938
3952
|
(0, import_invariant13.invariant)(context.newAutomergeRoot, void 0, {
|
|
3939
3953
|
F: __dxlog_file15,
|
|
3940
|
-
L:
|
|
3954
|
+
L: 129,
|
|
3941
3955
|
S: void 0,
|
|
3942
3956
|
A: [
|
|
3943
3957
|
"context.newAutomergeRoot",
|
|
@@ -7070,4 +7084,4 @@ ClientServicesHost = _ts_decorate8([
|
|
|
7070
7084
|
subscribeToSpaces,
|
|
7071
7085
|
subscribeToSwarmInfo
|
|
7072
7086
|
});
|
|
7073
|
-
//# sourceMappingURL=chunk-
|
|
7087
|
+
//# sourceMappingURL=chunk-ZTE7R6AZ.cjs.map
|