@dxos/client-services 0.4.9-main.9dad131 → 0.4.9-main.9fa1362

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.
Files changed (30) hide show
  1. package/dist/lib/browser/{chunk-IBKVU472.mjs → chunk-GPXO7YUM.mjs} +42 -53
  2. package/dist/lib/browser/{chunk-IBKVU472.mjs.map → chunk-GPXO7YUM.mjs.map} +3 -3
  3. package/dist/lib/browser/index.mjs +1 -3
  4. package/dist/lib/browser/index.mjs.map +1 -1
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/packlets/testing/index.mjs +3 -6
  7. package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
  8. package/dist/lib/node/{chunk-IBIGR324.cjs → chunk-TKR6CKUB.cjs} +42 -54
  9. package/dist/lib/node/{chunk-IBIGR324.cjs.map → chunk-TKR6CKUB.cjs.map} +3 -3
  10. package/dist/lib/node/index.cjs +37 -39
  11. package/dist/lib/node/index.cjs.map +1 -1
  12. package/dist/lib/node/meta.json +1 -1
  13. package/dist/lib/node/packlets/testing/index.cjs +6 -8
  14. package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
  15. package/dist/types/src/packlets/services/diagnostics.d.ts +1 -1
  16. package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
  17. package/dist/types/src/packlets/services/service-context.d.ts +1 -3
  18. package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
  19. package/dist/types/src/packlets/services/service-host.d.ts +1 -5
  20. package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
  21. package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
  22. package/dist/types/src/version.d.ts +1 -1
  23. package/package.json +34 -37
  24. package/src/packlets/identity/identity-manager.test.ts +0 -2
  25. package/src/packlets/identity/identity.test.ts +0 -4
  26. package/src/packlets/services/diagnostics.ts +3 -3
  27. package/src/packlets/services/service-context.ts +0 -3
  28. package/src/packlets/services/service-host.ts +5 -18
  29. package/src/packlets/testing/test-builder.ts +2 -4
  30. 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.9-main.9dad131";
2772
+ var DXOS_VERSION = "0.4.9-main.9fa1362";
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";
@@ -4432,11 +4432,10 @@ function _ts_decorate6(decorators, target, key, desc) {
4432
4432
  }
4433
4433
  var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
4434
4434
  var ServiceContext = class {
4435
- constructor(storage, networkManager, signalManager, modelFactory, _runtimeParams) {
4435
+ constructor(storage, networkManager, signalManager, _runtimeParams) {
4436
4436
  this.storage = storage;
4437
4437
  this.networkManager = networkManager;
4438
4438
  this.signalManager = signalManager;
4439
- this.modelFactory = modelFactory;
4440
4439
  this._runtimeParams = _runtimeParams;
4441
4440
  this.initialized = new Trigger5();
4442
4441
  this._handlerFactories = /* @__PURE__ */ new Map();
@@ -4460,7 +4459,6 @@ var ServiceContext = class {
4460
4459
  networkManager: this.networkManager,
4461
4460
  blobStore: this.blobStore,
4462
4461
  metadataStore: this.metadataStore,
4463
- modelFactory: this.modelFactory,
4464
4462
  snapshotStore: this.snapshotStore
4465
4463
  });
4466
4464
  this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager, this._runtimeParams);
@@ -4486,7 +4484,7 @@ var ServiceContext = class {
4486
4484
  await this._checkStorageVersion();
4487
4485
  log12("opening...", void 0, {
4488
4486
  F: __dxlog_file15,
4489
- L: 154,
4487
+ L: 151,
4490
4488
  S: this,
4491
4489
  C: (f, a) => f(...a)
4492
4490
  });
@@ -4494,7 +4492,7 @@ var ServiceContext = class {
4494
4492
  id: this._instanceId
4495
4493
  }), {
4496
4494
  F: __dxlog_file15,
4497
- L: 155,
4495
+ L: 152,
4498
4496
  S: this,
4499
4497
  C: (f, a) => f(...a)
4500
4498
  });
@@ -4510,13 +4508,13 @@ var ServiceContext = class {
4510
4508
  id: this._instanceId
4511
4509
  }), {
4512
4510
  F: __dxlog_file15,
4513
- L: 165,
4511
+ L: 162,
4514
4512
  S: this,
4515
4513
  C: (f, a) => f(...a)
4516
4514
  });
4517
4515
  log12("opened", void 0, {
4518
4516
  F: __dxlog_file15,
4519
- L: 166,
4517
+ L: 163,
4520
4518
  S: this,
4521
4519
  C: (f, a) => f(...a)
4522
4520
  });
@@ -4524,7 +4522,7 @@ var ServiceContext = class {
4524
4522
  async close() {
4525
4523
  log12("closing...", void 0, {
4526
4524
  F: __dxlog_file15,
4527
- L: 170,
4525
+ L: 167,
4528
4526
  S: this,
4529
4527
  C: (f, a) => f(...a)
4530
4528
  });
@@ -4542,7 +4540,7 @@ var ServiceContext = class {
4542
4540
  await this.indexer.destroy();
4543
4541
  log12("closed", void 0, {
4544
4542
  F: __dxlog_file15,
4545
- L: 183,
4543
+ L: 180,
4546
4544
  S: this,
4547
4545
  C: (f, a) => f(...a)
4548
4546
  });
@@ -4556,7 +4554,7 @@ var ServiceContext = class {
4556
4554
  const factory = this._handlerFactories.get(invitation.kind);
4557
4555
  invariant14(factory, `Unknown invitation kind: ${invitation.kind}`, {
4558
4556
  F: __dxlog_file15,
4559
- L: 194,
4557
+ L: 191,
4560
4558
  S: this,
4561
4559
  A: [
4562
4560
  "factory",
@@ -4588,7 +4586,7 @@ var ServiceContext = class {
4588
4586
  async _initialize(ctx) {
4589
4587
  log12("initializing spaces...", void 0, {
4590
4588
  F: __dxlog_file15,
4591
- L: 225,
4589
+ L: 222,
4592
4590
  S: this,
4593
4591
  C: (f, a) => f(...a)
4594
4592
  });
@@ -4611,7 +4609,7 @@ var ServiceContext = class {
4611
4609
  this._handlerFactories.set(Invitation6.Kind.SPACE, (invitation) => {
4612
4610
  invariant14(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
4613
4611
  F: __dxlog_file15,
4614
- L: 249,
4612
+ L: 246,
4615
4613
  S: this,
4616
4614
  A: [
4617
4615
  "this.dataSpaceManager",
@@ -4635,7 +4633,7 @@ var ServiceContext = class {
4635
4633
  details: assertion
4636
4634
  }, {
4637
4635
  F: __dxlog_file15,
4638
- L: 265,
4636
+ L: 262,
4639
4637
  S: this,
4640
4638
  C: (f, a) => f(...a)
4641
4639
  });
@@ -4646,7 +4644,7 @@ var ServiceContext = class {
4646
4644
  details: assertion
4647
4645
  }, {
4648
4646
  F: __dxlog_file15,
4649
- L: 269,
4647
+ L: 266,
4650
4648
  S: this,
4651
4649
  C: (f, a) => f(...a)
4652
4650
  });
@@ -4657,7 +4655,7 @@ var ServiceContext = class {
4657
4655
  details: assertion
4658
4656
  }, {
4659
4657
  F: __dxlog_file15,
4660
- L: 274,
4658
+ L: 271,
4661
4659
  S: this,
4662
4660
  C: (f, a) => f(...a)
4663
4661
  });
@@ -4668,7 +4666,7 @@ var ServiceContext = class {
4668
4666
  } catch (err) {
4669
4667
  log12.catch(err, void 0, {
4670
4668
  F: __dxlog_file15,
4671
- L: 280,
4669
+ L: 277,
4672
4670
  S: this,
4673
4671
  C: (f, a) => f(...a)
4674
4672
  });
@@ -4888,21 +4886,18 @@ var toStorageType = (type) => {
4888
4886
 
4889
4887
  // packages/sdk/client-services/src/packlets/services/service-host.ts
4890
4888
  import { Event as Event9, synchronized as synchronized3 } from "@dxos/async";
4891
- import { clientServiceBundle, defaultKey, Properties } from "@dxos/client-protocol";
4889
+ import { Properties, clientServiceBundle, defaultKey } from "@dxos/client-protocol";
4892
4890
  import { Context as Context11 } from "@dxos/context";
4893
- import { DocumentModel } from "@dxos/document-model";
4894
4891
  import { DataServiceImpl } from "@dxos/echo-pipeline";
4895
- import { getRawDoc, getAutomergeObjectCore } from "@dxos/echo-schema";
4892
+ import { getAutomergeObjectCore, getRawDoc } from "@dxos/echo-schema";
4896
4893
  import { IndexServiceImpl } from "@dxos/indexing";
4897
4894
  import { invariant as invariant16 } from "@dxos/invariant";
4898
4895
  import { PublicKey as PublicKey12 } from "@dxos/keys";
4899
4896
  import { log as log15 } from "@dxos/log";
4900
4897
  import { WebsocketSignalManager } from "@dxos/messaging";
4901
- import { ModelFactory } from "@dxos/model-factory";
4902
- import { createSimplePeerTransportFactory, NetworkManager } from "@dxos/network-manager";
4898
+ import { NetworkManager, createSimplePeerTransportFactory } from "@dxos/network-manager";
4903
4899
  import { trace as trace9 } from "@dxos/protocols";
4904
4900
  import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
4905
- import { TextModel } from "@dxos/text-model";
4906
4901
  import { TRACE_PROCESSOR as TRACE_PROCESSOR2, trace as Trace3 } from "@dxos/tracing";
4907
4902
  import { assignDeep } from "@dxos/util";
4908
4903
  import { WebsocketRpcClient } from "@dxos/websocket-rpc";
@@ -5215,13 +5210,9 @@ function _ts_decorate8(decorators, target, key, desc) {
5215
5210
  return c > 3 && r && Object.defineProperty(target, key, r), r;
5216
5211
  }
5217
5212
  var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
5218
- var createDefaultModelFactory = () => {
5219
- return new ModelFactory().registerModel(DocumentModel).registerModel(TextModel);
5220
- };
5221
5213
  var ClientServicesHost = class {
5222
5214
  constructor({
5223
5215
  config,
5224
- modelFactory = createDefaultModelFactory(),
5225
5216
  transportFactory,
5226
5217
  signalManager,
5227
5218
  storage,
@@ -5235,7 +5226,6 @@ var ClientServicesHost = class {
5235
5226
  this._opening = false;
5236
5227
  this._open = false;
5237
5228
  this._storage = storage;
5238
- this._modelFactory = modelFactory;
5239
5229
  this._callbacks = callbacks;
5240
5230
  this._runtimeParams = runtimeParams;
5241
5231
  if (config) {
@@ -5306,7 +5296,7 @@ var ClientServicesHost = class {
5306
5296
  initialize({ config, ...options }) {
5307
5297
  invariant16(!this._open, "service host is open", {
5308
5298
  F: __dxlog_file18,
5309
- L: 191,
5299
+ L: 179,
5310
5300
  S: this,
5311
5301
  A: [
5312
5302
  "!this._open",
@@ -5315,14 +5305,14 @@ var ClientServicesHost = class {
5315
5305
  });
5316
5306
  log15("initializing...", void 0, {
5317
5307
  F: __dxlog_file18,
5318
- L: 192,
5308
+ L: 180,
5319
5309
  S: this,
5320
5310
  C: (f, a) => f(...a)
5321
5311
  });
5322
5312
  if (config) {
5323
5313
  invariant16(!this._config, "config already set", {
5324
5314
  F: __dxlog_file18,
5325
- L: 195,
5315
+ L: 183,
5326
5316
  S: this,
5327
5317
  A: [
5328
5318
  "!this._config",
@@ -5340,7 +5330,7 @@ var ClientServicesHost = class {
5340
5330
  this._signalManager = signalManager;
5341
5331
  invariant16(!this._networkManager, "network manager already set", {
5342
5332
  F: __dxlog_file18,
5343
- L: 211,
5333
+ L: 199,
5344
5334
  S: this,
5345
5335
  A: [
5346
5336
  "!this._networkManager",
@@ -5354,7 +5344,7 @@ var ClientServicesHost = class {
5354
5344
  });
5355
5345
  log15("initialized", void 0, {
5356
5346
  F: __dxlog_file18,
5357
- L: 218,
5347
+ L: 206,
5358
5348
  S: this,
5359
5349
  C: (f, a) => f(...a)
5360
5350
  });
@@ -5368,13 +5358,13 @@ var ClientServicesHost = class {
5368
5358
  id: traceId
5369
5359
  }), {
5370
5360
  F: __dxlog_file18,
5371
- L: 229,
5361
+ L: 217,
5372
5362
  S: this,
5373
5363
  C: (f, a) => f(...a)
5374
5364
  });
5375
5365
  invariant16(this._config, "config not set", {
5376
5366
  F: __dxlog_file18,
5377
- L: 231,
5367
+ L: 219,
5378
5368
  S: this,
5379
5369
  A: [
5380
5370
  "this._config",
@@ -5383,7 +5373,7 @@ var ClientServicesHost = class {
5383
5373
  });
5384
5374
  invariant16(this._storage, "storage not set", {
5385
5375
  F: __dxlog_file18,
5386
- L: 232,
5376
+ L: 220,
5387
5377
  S: this,
5388
5378
  A: [
5389
5379
  "this._storage",
@@ -5392,7 +5382,7 @@ var ClientServicesHost = class {
5392
5382
  });
5393
5383
  invariant16(this._signalManager, "signal manager not set", {
5394
5384
  F: __dxlog_file18,
5395
- L: 233,
5385
+ L: 221,
5396
5386
  S: this,
5397
5387
  A: [
5398
5388
  "this._signalManager",
@@ -5401,7 +5391,7 @@ var ClientServicesHost = class {
5401
5391
  });
5402
5392
  invariant16(this._networkManager, "network manager not set", {
5403
5393
  F: __dxlog_file18,
5404
- L: 234,
5394
+ L: 222,
5405
5395
  S: this,
5406
5396
  A: [
5407
5397
  "this._networkManager",
@@ -5413,13 +5403,13 @@ var ClientServicesHost = class {
5413
5403
  lockKey: this._resourceLock?.lockKey
5414
5404
  }, {
5415
5405
  F: __dxlog_file18,
5416
- L: 237,
5406
+ L: 225,
5417
5407
  S: this,
5418
5408
  C: (f, a) => f(...a)
5419
5409
  });
5420
5410
  await this._resourceLock?.acquire();
5421
5411
  await this._loggingService.open();
5422
- this._serviceContext = new ServiceContext(this._storage, this._networkManager, this._signalManager, this._modelFactory, this._runtimeParams);
5412
+ this._serviceContext = new ServiceContext(this._storage, this._networkManager, this._signalManager, this._runtimeParams);
5423
5413
  this._serviceRegistry.setServices({
5424
5414
  SystemService: this._systemService,
5425
5415
  IdentityService: new IdentityServiceImpl((params) => this._createIdentity(params), this._serviceContext.identityManager, this._serviceContext.keyring, (profile) => this._serviceContext.broadcastProfileUpdate(profile)),
@@ -5447,7 +5437,7 @@ var ClientServicesHost = class {
5447
5437
  await this._serviceContext.open(ctx);
5448
5438
  invariant16(this.serviceRegistry.services.InvitationsService, void 0, {
5449
5439
  F: __dxlog_file18,
5450
- L: 299,
5440
+ L: 286,
5451
5441
  S: this,
5452
5442
  A: [
5453
5443
  "this.serviceRegistry.services.InvitationsService",
@@ -5459,7 +5449,7 @@ var ClientServicesHost = class {
5459
5449
  count: loadedInvitations.invitations?.length
5460
5450
  }, {
5461
5451
  F: __dxlog_file18,
5462
- L: 302,
5452
+ L: 289,
5463
5453
  S: this,
5464
5454
  C: (f, a) => f(...a)
5465
5455
  });
@@ -5481,7 +5471,7 @@ var ClientServicesHost = class {
5481
5471
  deviceKey
5482
5472
  }, {
5483
5473
  F: __dxlog_file18,
5484
- L: 319,
5474
+ L: 306,
5485
5475
  S: this,
5486
5476
  C: (f, a) => f(...a)
5487
5477
  });
@@ -5489,7 +5479,7 @@ var ClientServicesHost = class {
5489
5479
  id: traceId
5490
5480
  }), {
5491
5481
  F: __dxlog_file18,
5492
- L: 320,
5482
+ L: 307,
5493
5483
  S: this,
5494
5484
  C: (f, a) => f(...a)
5495
5485
  });
@@ -5503,7 +5493,7 @@ var ClientServicesHost = class {
5503
5493
  deviceKey
5504
5494
  }, {
5505
5495
  F: __dxlog_file18,
5506
- L: 331,
5496
+ L: 318,
5507
5497
  S: this,
5508
5498
  C: (f, a) => f(...a)
5509
5499
  });
@@ -5519,7 +5509,7 @@ var ClientServicesHost = class {
5519
5509
  deviceKey
5520
5510
  }, {
5521
5511
  F: __dxlog_file18,
5522
- L: 338,
5512
+ L: 325,
5523
5513
  S: this,
5524
5514
  C: (f, a) => f(...a)
5525
5515
  });
@@ -5530,13 +5520,13 @@ var ClientServicesHost = class {
5530
5520
  id: traceId
5531
5521
  }), {
5532
5522
  F: __dxlog_file18,
5533
- L: 343,
5523
+ L: 330,
5534
5524
  S: this,
5535
5525
  C: (f, a) => f(...a)
5536
5526
  });
5537
5527
  log15("resetting...", void 0, {
5538
5528
  F: __dxlog_file18,
5539
- L: 345,
5529
+ L: 332,
5540
5530
  S: this,
5541
5531
  C: (f, a) => f(...a)
5542
5532
  });
@@ -5544,7 +5534,7 @@ var ClientServicesHost = class {
5544
5534
  await this._storage.reset();
5545
5535
  log15("reset", void 0, {
5546
5536
  F: __dxlog_file18,
5547
- L: 348,
5537
+ L: 335,
5548
5538
  S: this,
5549
5539
  C: (f, a) => f(...a)
5550
5540
  });
@@ -5552,7 +5542,7 @@ var ClientServicesHost = class {
5552
5542
  id: traceId
5553
5543
  }), {
5554
5544
  F: __dxlog_file18,
5555
- L: 349,
5545
+ L: 336,
5556
5546
  S: this,
5557
5547
  C: (f, a) => f(...a)
5558
5548
  });
@@ -5567,7 +5557,7 @@ var ClientServicesHost = class {
5567
5557
  const automergeIndex = space.automergeSpaceState.rootUrl;
5568
5558
  invariant16(automergeIndex, void 0, {
5569
5559
  F: __dxlog_file18,
5570
- L: 364,
5560
+ L: 351,
5571
5561
  S: this,
5572
5562
  A: [
5573
5563
  "automergeIndex",
@@ -5635,7 +5625,6 @@ export {
5635
5625
  Lock,
5636
5626
  isLocked,
5637
5627
  createStorageObjects,
5638
- createDefaultModelFactory,
5639
5628
  ClientServicesHost
5640
5629
  };
5641
- //# sourceMappingURL=chunk-IBKVU472.mjs.map
5630
+ //# sourceMappingURL=chunk-GPXO7YUM.mjs.map