@dxos/client-services 0.5.9-main.a75fa71 → 0.5.9-main.ac938b0

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-DS5JZ6S4.mjs";
10
+ } from "../../chunk-I5PIAH6J.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_NJ63ESAV_exports = {};
30
- __export(chunk_NJ63ESAV_exports, {
29
+ var chunk_3WIKJ4BC_exports = {};
30
+ __export(chunk_3WIKJ4BC_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  ClientServicesProviderResource: () => ClientServicesProviderResource,
@@ -70,7 +70,7 @@ __export(chunk_NJ63ESAV_exports, {
70
70
  subscribeToSpaces: () => subscribeToSpaces,
71
71
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
72
72
  });
73
- module.exports = __toCommonJS(chunk_NJ63ESAV_exports);
73
+ module.exports = __toCommonJS(chunk_3WIKJ4BC_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");
@@ -646,7 +646,7 @@ var DevtoolsServiceImpl = class {
646
646
  });
647
647
  }
648
648
  };
649
- var DXOS_VERSION = "0.5.9-main.a75fa71";
649
+ var DXOS_VERSION = "0.5.9-main.ac938b0";
650
650
  var getPlatform = () => {
651
651
  if (process.browser) {
652
652
  if (typeof window !== "undefined") {
@@ -4661,7 +4661,7 @@ var DataSpace = class {
4661
4661
  err
4662
4662
  }, {
4663
4663
  F: __dxlog_file17,
4664
- L: 431,
4664
+ L: 433,
4665
4665
  S: this,
4666
4666
  C: (f, a) => f(...a)
4667
4667
  });
@@ -4747,7 +4747,7 @@ var DataSpace = class {
4747
4747
  state: import_services12.SpaceState[this._state]
4748
4748
  }, {
4749
4749
  F: __dxlog_file17,
4750
- L: 512,
4750
+ L: 514,
4751
4751
  S: this,
4752
4752
  C: (f, a) => f(...a)
4753
4753
  });
@@ -5720,7 +5720,8 @@ var SpacesServiceImpl = class {
5720
5720
  startDataTimeframe: void 0,
5721
5721
  currentDataTimeframe: void 0,
5722
5722
  targetDataTimeframe: void 0,
5723
- totalDataTimeframe: void 0
5723
+ totalDataTimeframe: void 0,
5724
+ spaceRootUrl: space.databaseRoot?.url
5724
5725
  },
5725
5726
  members: Array.from(space.inner.spaceState.members.values()).map((member) => {
5726
5727
  const peers = space.presence.getPeersOnline().filter(({ identityKey }) => identityKey.equals(member.key));
@@ -6239,14 +6240,15 @@ var exportProfileData = async ({ storage, level }) => {
6239
6240
  return archive;
6240
6241
  };
6241
6242
  var importProfileData = async ({ storage, level }, archive) => {
6242
- const batch = level.batch();
6243
+ let batch = level.batch();
6244
+ let count = 0;
6243
6245
  for (const entry2 of archive.storage) {
6244
6246
  switch (entry2.type) {
6245
6247
  case import_protocols15.ProfileArchiveEntryType.FILE: {
6246
6248
  const directory = await storage.createDirectory();
6247
6249
  (0, import_invariant19.invariant)(typeof entry2.key === "string", "Invalid key type", {
6248
6250
  F: __dxlog_file22,
6249
- L: 78,
6251
+ L: 79,
6250
6252
  S: void 0,
6251
6253
  A: [
6252
6254
  "typeof entry.key === 'string'",
@@ -6256,7 +6258,7 @@ var importProfileData = async ({ storage, level }, archive) => {
6256
6258
  const file = await directory.getOrCreateFile(entry2.key);
6257
6259
  (0, import_invariant19.invariant)(entry2.value instanceof Uint8Array, "Invalid value type", {
6258
6260
  F: __dxlog_file22,
6259
- L: 80,
6261
+ L: 81,
6260
6262
  S: void 0,
6261
6263
  A: [
6262
6264
  "entry.value instanceof Uint8Array",
@@ -6270,7 +6272,7 @@ var importProfileData = async ({ storage, level }, archive) => {
6270
6272
  case import_protocols15.ProfileArchiveEntryType.KEY_VALUE: {
6271
6273
  (0, import_invariant19.invariant)(entry2.key instanceof Uint8Array, "Invalid key type", {
6272
6274
  F: __dxlog_file22,
6273
- L: 86,
6275
+ L: 87,
6274
6276
  S: void 0,
6275
6277
  A: [
6276
6278
  "entry.key instanceof Uint8Array",
@@ -6279,7 +6281,7 @@ var importProfileData = async ({ storage, level }, archive) => {
6279
6281
  });
6280
6282
  (0, import_invariant19.invariant)(entry2.value instanceof Uint8Array, "Invalid value type", {
6281
6283
  F: __dxlog_file22,
6282
- L: 87,
6284
+ L: 88,
6283
6285
  S: void 0,
6284
6286
  A: [
6285
6287
  "entry.value instanceof Uint8Array",
@@ -6295,7 +6297,27 @@ var importProfileData = async ({ storage, level }, archive) => {
6295
6297
  default:
6296
6298
  throw new Error(`Invalid entry type: ${entry2.type}`);
6297
6299
  }
6300
+ if (++count % 1e3 === 0) {
6301
+ await batch.write();
6302
+ batch = level.batch();
6303
+ import_log19.log.info("importing", {
6304
+ count,
6305
+ total: archive.storage.length,
6306
+ progress: `${(count / archive.storage.length * 100).toFixed()}%`
6307
+ }, {
6308
+ F: __dxlog_file22,
6309
+ L: 101,
6310
+ S: void 0,
6311
+ C: (f, a) => f(...a)
6312
+ });
6313
+ }
6298
6314
  }
6315
+ import_log19.log.info("committing changes..", void 0, {
6316
+ F: __dxlog_file22,
6317
+ L: 109,
6318
+ S: void 0,
6319
+ C: (f, a) => f(...a)
6320
+ });
6299
6321
  await batch.write();
6300
6322
  };
6301
6323
  var __dxlog_file23 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
@@ -7104,4 +7126,4 @@ ClientServicesHost = _ts_decorate8([
7104
7126
  subscribeToSpaces,
7105
7127
  subscribeToSwarmInfo
7106
7128
  });
7107
- //# sourceMappingURL=chunk-NJ63ESAV.cjs.map
7129
+ //# sourceMappingURL=chunk-3WIKJ4BC.cjs.map