@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.
@@ -7,7 +7,7 @@ import {
7
7
  InvitationsManager,
8
8
  ServiceContext,
9
9
  SpaceInvitationProtocol
10
- } from "../../chunk-Y5AUZFDK.mjs";
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 chunk_UHP765AN_exports = {};
30
- __export(chunk_UHP765AN_exports, {
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(chunk_UHP765AN_exports);
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.c34beda";
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
- const handle = context.repo.find(url);
3915
- await (0, import_context12.cancelWithContext)(ctx, (0, import_async15.asyncTimeout)(handle.whenReady(), 1e4));
3916
- (0, import_invariant13.invariant)(handle.docSync(), "Doc not found", {
3917
- F: __dxlog_file15,
3918
- L: 107,
3919
- S: void 0,
3920
- A: [
3921
- "handle.docSync()",
3922
- "'Doc not found'"
3923
- ]
3924
- });
3925
- const newDoc = await (0, import_echo_db.convertLegacyReferences)(structuredClone(handle.docSync()));
3926
- const migratedDoc = (0, import_echo_db.migrateDocument)(handle.docSync(), newDoc);
3927
- const newHandle = context.repo.import(import_automerge.next.save(migratedDoc));
3928
- newRootContent.links[id] = newHandle.url;
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: 124,
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-UHP765AN.cjs.map
7087
+ //# sourceMappingURL=chunk-ZTE7R6AZ.cjs.map