@dxos/client-services 0.4.10-main.3e0c8a5 → 0.4.10-main.41107c4

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.
@@ -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_D5VK6MZQ_exports = {};
30
- __export(chunk_D5VK6MZQ_exports, {
29
+ var chunk_H3DVFUSA_exports = {};
30
+ __export(chunk_H3DVFUSA_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  DataSpace: () => DataSpace,
@@ -60,7 +60,7 @@ __export(chunk_D5VK6MZQ_exports, {
60
60
  subscribeToSpaces: () => subscribeToSpaces,
61
61
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
62
62
  });
63
- module.exports = __toCommonJS(chunk_D5VK6MZQ_exports);
63
+ module.exports = __toCommonJS(chunk_H3DVFUSA_exports);
64
64
  var import_async = require("@dxos/async");
65
65
  var import_codec_protobuf = require("@dxos/codec-protobuf");
66
66
  var import_feed_store = require("@dxos/feed-store");
@@ -233,7 +233,6 @@ var import_client_protocol5 = require("@dxos/client-protocol");
233
233
  var import_context11 = require("@dxos/context");
234
234
  var import_echo_pipeline4 = require("@dxos/echo-pipeline");
235
235
  var E = __toESM(require("@dxos/echo-schema"));
236
- var import_echo_schema = require("@dxos/echo-schema");
237
236
  var import_indexing2 = require("@dxos/indexing");
238
237
  var import_invariant16 = require("@dxos/invariant");
239
238
  var import_keys11 = require("@dxos/keys");
@@ -2887,7 +2886,7 @@ var getPlatform = () => {
2887
2886
  };
2888
2887
  }
2889
2888
  };
2890
- var DXOS_VERSION = "0.4.10-main.3e0c8a5";
2889
+ var DXOS_VERSION = "0.4.10-main.41107c4";
2891
2890
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2892
2891
  var DEFAULT_TIMEOUT = 1e3;
2893
2892
  var createDiagnostics = async (clientServices, serviceContext, config) => {
@@ -5261,7 +5260,7 @@ var ClientServicesHost = class {
5261
5260
  initialize({ config, ...options }) {
5262
5261
  (0, import_invariant16.invariant)(!this._open, "service host is open", {
5263
5262
  F: __dxlog_file18,
5264
- L: 180,
5263
+ L: 179,
5265
5264
  S: this,
5266
5265
  A: [
5267
5266
  "!this._open",
@@ -5270,14 +5269,14 @@ var ClientServicesHost = class {
5270
5269
  });
5271
5270
  (0, import_log14.log)("initializing...", void 0, {
5272
5271
  F: __dxlog_file18,
5273
- L: 181,
5272
+ L: 180,
5274
5273
  S: this,
5275
5274
  C: (f, a) => f(...a)
5276
5275
  });
5277
5276
  if (config) {
5278
5277
  (0, import_invariant16.invariant)(!this._config, "config already set", {
5279
5278
  F: __dxlog_file18,
5280
- L: 184,
5279
+ L: 183,
5281
5280
  S: this,
5282
5281
  A: [
5283
5282
  "!this._config",
@@ -5292,7 +5291,7 @@ var ClientServicesHost = class {
5292
5291
  if (!options.signalManager) {
5293
5292
  import_log14.log.warn("running signaling without telemetry metadata.", void 0, {
5294
5293
  F: __dxlog_file18,
5295
- L: 192,
5294
+ L: 191,
5296
5295
  S: this,
5297
5296
  C: (f, a) => f(...a)
5298
5297
  });
@@ -5303,7 +5302,7 @@ var ClientServicesHost = class {
5303
5302
  this._signalManager = signalManager;
5304
5303
  (0, import_invariant16.invariant)(!this._networkManager, "network manager already set", {
5305
5304
  F: __dxlog_file18,
5306
- L: 203,
5305
+ L: 202,
5307
5306
  S: this,
5308
5307
  A: [
5309
5308
  "!this._networkManager",
@@ -5317,7 +5316,7 @@ var ClientServicesHost = class {
5317
5316
  });
5318
5317
  (0, import_log14.log)("initialized", void 0, {
5319
5318
  F: __dxlog_file18,
5320
- L: 210,
5319
+ L: 209,
5321
5320
  S: this,
5322
5321
  C: (f, a) => f(...a)
5323
5322
  });
@@ -5331,13 +5330,13 @@ var ClientServicesHost = class {
5331
5330
  id: traceId
5332
5331
  }), {
5333
5332
  F: __dxlog_file18,
5334
- L: 221,
5333
+ L: 220,
5335
5334
  S: this,
5336
5335
  C: (f, a) => f(...a)
5337
5336
  });
5338
5337
  (0, import_invariant16.invariant)(this._config, "config not set", {
5339
5338
  F: __dxlog_file18,
5340
- L: 223,
5339
+ L: 222,
5341
5340
  S: this,
5342
5341
  A: [
5343
5342
  "this._config",
@@ -5346,7 +5345,7 @@ var ClientServicesHost = class {
5346
5345
  });
5347
5346
  (0, import_invariant16.invariant)(this._storage, "storage not set", {
5348
5347
  F: __dxlog_file18,
5349
- L: 224,
5348
+ L: 223,
5350
5349
  S: this,
5351
5350
  A: [
5352
5351
  "this._storage",
@@ -5355,7 +5354,7 @@ var ClientServicesHost = class {
5355
5354
  });
5356
5355
  (0, import_invariant16.invariant)(this._signalManager, "signal manager not set", {
5357
5356
  F: __dxlog_file18,
5358
- L: 225,
5357
+ L: 224,
5359
5358
  S: this,
5360
5359
  A: [
5361
5360
  "this._signalManager",
@@ -5364,7 +5363,7 @@ var ClientServicesHost = class {
5364
5363
  });
5365
5364
  (0, import_invariant16.invariant)(this._networkManager, "network manager not set", {
5366
5365
  F: __dxlog_file18,
5367
- L: 226,
5366
+ L: 225,
5368
5367
  S: this,
5369
5368
  A: [
5370
5369
  "this._networkManager",
@@ -5376,7 +5375,7 @@ var ClientServicesHost = class {
5376
5375
  lockKey: this._resourceLock?.lockKey
5377
5376
  }, {
5378
5377
  F: __dxlog_file18,
5379
- L: 229,
5378
+ L: 228,
5380
5379
  S: this,
5381
5380
  C: (f, a) => f(...a)
5382
5381
  });
@@ -5410,7 +5409,7 @@ var ClientServicesHost = class {
5410
5409
  await this._serviceContext.open(ctx);
5411
5410
  (0, import_invariant16.invariant)(this.serviceRegistry.services.InvitationsService, void 0, {
5412
5411
  F: __dxlog_file18,
5413
- L: 290,
5412
+ L: 289,
5414
5413
  S: this,
5415
5414
  A: [
5416
5415
  "this.serviceRegistry.services.InvitationsService",
@@ -5422,7 +5421,7 @@ var ClientServicesHost = class {
5422
5421
  count: loadedInvitations.invitations?.length
5423
5422
  }, {
5424
5423
  F: __dxlog_file18,
5425
- L: 293,
5424
+ L: 292,
5426
5425
  S: this,
5427
5426
  C: (f, a) => f(...a)
5428
5427
  });
@@ -5444,7 +5443,7 @@ var ClientServicesHost = class {
5444
5443
  deviceKey
5445
5444
  }, {
5446
5445
  F: __dxlog_file18,
5447
- L: 310,
5446
+ L: 309,
5448
5447
  S: this,
5449
5448
  C: (f, a) => f(...a)
5450
5449
  });
@@ -5452,7 +5451,7 @@ var ClientServicesHost = class {
5452
5451
  id: traceId
5453
5452
  }), {
5454
5453
  F: __dxlog_file18,
5455
- L: 311,
5454
+ L: 310,
5456
5455
  S: this,
5457
5456
  C: (f, a) => f(...a)
5458
5457
  });
@@ -5466,7 +5465,7 @@ var ClientServicesHost = class {
5466
5465
  deviceKey
5467
5466
  }, {
5468
5467
  F: __dxlog_file18,
5469
- L: 322,
5468
+ L: 321,
5470
5469
  S: this,
5471
5470
  C: (f, a) => f(...a)
5472
5471
  });
@@ -5482,7 +5481,7 @@ var ClientServicesHost = class {
5482
5481
  deviceKey
5483
5482
  }, {
5484
5483
  F: __dxlog_file18,
5485
- L: 329,
5484
+ L: 328,
5486
5485
  S: this,
5487
5486
  C: (f, a) => f(...a)
5488
5487
  });
@@ -5493,13 +5492,13 @@ var ClientServicesHost = class {
5493
5492
  id: traceId
5494
5493
  }), {
5495
5494
  F: __dxlog_file18,
5496
- L: 334,
5495
+ L: 333,
5497
5496
  S: this,
5498
5497
  C: (f, a) => f(...a)
5499
5498
  });
5500
5499
  (0, import_log14.log)("resetting...", void 0, {
5501
5500
  F: __dxlog_file18,
5502
- L: 336,
5501
+ L: 335,
5503
5502
  S: this,
5504
5503
  C: (f, a) => f(...a)
5505
5504
  });
@@ -5507,7 +5506,7 @@ var ClientServicesHost = class {
5507
5506
  await this._storage.reset();
5508
5507
  (0, import_log14.log)("reset", void 0, {
5509
5508
  F: __dxlog_file18,
5510
- L: 339,
5509
+ L: 338,
5511
5510
  S: this,
5512
5511
  C: (f, a) => f(...a)
5513
5512
  });
@@ -5515,7 +5514,7 @@ var ClientServicesHost = class {
5515
5514
  id: traceId
5516
5515
  }), {
5517
5516
  F: __dxlog_file18,
5518
- L: 340,
5517
+ L: 339,
5519
5518
  S: this,
5520
5519
  C: (f, a) => f(...a)
5521
5520
  });
@@ -5528,7 +5527,7 @@ var ClientServicesHost = class {
5528
5527
  const automergeIndex = space.automergeSpaceState.rootUrl;
5529
5528
  (0, import_invariant16.invariant)(automergeIndex, void 0, {
5530
5529
  F: __dxlog_file18,
5531
- L: 352,
5530
+ L: 351,
5532
5531
  S: this,
5533
5532
  A: [
5534
5533
  "automergeIndex",
@@ -5537,18 +5536,25 @@ var ClientServicesHost = class {
5537
5536
  });
5538
5537
  const document = await this._serviceContext.automergeHost.repo.find(automergeIndex);
5539
5538
  await document.whenReady();
5540
- const objectDocument = (0, import_echo_schema.createRawObjectDoc)({
5541
- [import_client_protocol5.defaultKey]: identity.identityKey.toHex()
5542
- }, {
5543
- type: E.getTypeReference(import_client_protocol5.PropertiesSchema)
5544
- });
5539
+ const properties = {
5540
+ system: {
5541
+ type: (0, import_echo_pipeline4.encodeReference)(E.getTypeReference(import_client_protocol5.Properties))
5542
+ },
5543
+ data: {
5544
+ [import_client_protocol5.defaultKey]: identity.identityKey.toHex()
5545
+ },
5546
+ meta: {
5547
+ keys: []
5548
+ }
5549
+ };
5550
+ const propertiesId = import_keys11.PublicKey.random().toHex();
5545
5551
  document.change((doc) => {
5546
5552
  (0, import_util9.assignDeep)(doc, [
5547
5553
  "objects",
5548
- objectDocument.id
5549
- ], objectDocument.handle.docSync());
5554
+ propertiesId
5555
+ ], properties);
5550
5556
  });
5551
- await (0, import_async16.sleep)(200);
5557
+ await this._serviceContext.automergeHost.repo.flush();
5552
5558
  return identity;
5553
5559
  }
5554
5560
  };
@@ -5603,4 +5609,4 @@ ClientServicesHost = _ts_decorate8([
5603
5609
  subscribeToSpaces,
5604
5610
  subscribeToSwarmInfo
5605
5611
  });
5606
- //# sourceMappingURL=chunk-D5VK6MZQ.cjs.map
5612
+ //# sourceMappingURL=chunk-H3DVFUSA.cjs.map