@dxos/client-services 0.3.9-main.ef334cd → 0.3.9-main.f8fc6b9

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.
@@ -1,5 +1,12 @@
1
1
  import "@dxos/node-std/globals";
2
2
 
3
+ // inject-globals:@inject-globals
4
+ import {
5
+ global,
6
+ Buffer,
7
+ process
8
+ } from "@dxos/node-std/inject-globals";
9
+
3
10
  // packages/sdk/client-services/src/packlets/devtools/feeds.ts
4
11
  import { EventSubscriptions } from "@dxos/async";
5
12
  import { Stream } from "@dxos/codec-protobuf";
@@ -2534,7 +2541,7 @@ var getPlatform = () => {
2534
2541
  };
2535
2542
 
2536
2543
  // packages/sdk/client-services/src/version.ts
2537
- var DXOS_VERSION = "0.3.9-main.ef334cd";
2544
+ var DXOS_VERSION = "0.3.9-main.f8fc6b9";
2538
2545
 
2539
2546
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2540
2547
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -3383,7 +3390,7 @@ import { createCredential } from "@dxos/credentials";
3383
3390
  import { failUndefined as failUndefined2 } from "@dxos/debug";
3384
3391
  import { AdmittedFeed as AdmittedFeed4, SpaceMember as SpaceMember2 } from "@dxos/protocols/proto/dxos/halo/credentials";
3385
3392
  import { Timeframe as Timeframe3 } from "@dxos/timeframe";
3386
- var spaceGenesis = async (keyring, signingContext, space) => {
3393
+ var spaceGenesis = async (keyring, signingContext, space, automergeRoot) => {
3387
3394
  const credentials = [
3388
3395
  await createCredential({
3389
3396
  signer: keyring,
@@ -3433,7 +3440,8 @@ var spaceGenesis = async (keyring, signingContext, space) => {
3433
3440
  number: 0,
3434
3441
  previousId: void 0,
3435
3442
  timeframe: new Timeframe3(),
3436
- snapshotCid: void 0
3443
+ snapshotCid: void 0,
3444
+ automergeRoot
3437
3445
  }
3438
3446
  })
3439
3447
  ];
@@ -3483,7 +3491,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3483
3491
  async open() {
3484
3492
  log11("open", void 0, {
3485
3493
  F: __dxlog_file13,
3486
- L: 92,
3494
+ L: 90,
3487
3495
  S: this,
3488
3496
  C: (f, a) => f(...a)
3489
3497
  });
@@ -3491,7 +3499,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3491
3499
  id: this._instanceId
3492
3500
  }), {
3493
3501
  F: __dxlog_file13,
3494
- L: 93,
3502
+ L: 91,
3495
3503
  S: this,
3496
3504
  C: (f, a) => f(...a)
3497
3505
  });
@@ -3499,7 +3507,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3499
3507
  spaces: this._metadataStore.spaces.length
3500
3508
  }, {
3501
3509
  F: __dxlog_file13,
3502
- L: 94,
3510
+ L: 92,
3503
3511
  S: this,
3504
3512
  C: (f, a) => f(...a)
3505
3513
  });
@@ -3509,7 +3517,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3509
3517
  spaceMetadata
3510
3518
  }, {
3511
3519
  F: __dxlog_file13,
3512
- L: 98,
3520
+ L: 96,
3513
3521
  S: this,
3514
3522
  C: (f, a) => f(...a)
3515
3523
  });
@@ -3520,7 +3528,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3520
3528
  err
3521
3529
  }, {
3522
3530
  F: __dxlog_file13,
3523
- L: 101,
3531
+ L: 99,
3524
3532
  S: this,
3525
3533
  C: (f, a) => f(...a)
3526
3534
  });
@@ -3537,7 +3545,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3537
3545
  id: this._instanceId
3538
3546
  }), {
3539
3547
  F: __dxlog_file13,
3540
- L: 114,
3548
+ L: 112,
3541
3549
  S: this,
3542
3550
  C: (f, a) => f(...a)
3543
3551
  });
@@ -3545,7 +3553,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3545
3553
  async close() {
3546
3554
  log11("close", void 0, {
3547
3555
  F: __dxlog_file13,
3548
- L: 119,
3556
+ L: 117,
3549
3557
  S: this,
3550
3558
  C: (f, a) => f(...a)
3551
3559
  });
@@ -3561,7 +3569,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3561
3569
  async createSpace() {
3562
3570
  invariant11(this._isOpen, "Not open.", {
3563
3571
  F: __dxlog_file13,
3564
- L: 132,
3572
+ L: 130,
3565
3573
  S: this,
3566
3574
  A: [
3567
3575
  "this._isOpen",
@@ -3582,12 +3590,13 @@ var DataSpaceManager = class DataSpaceManager2 {
3582
3590
  spaceKey
3583
3591
  }, {
3584
3592
  F: __dxlog_file13,
3585
- L: 144,
3593
+ L: 142,
3586
3594
  S: this,
3587
3595
  C: (f, a) => f(...a)
3588
3596
  });
3589
3597
  const space = await this._constructSpace(metadata);
3590
- const credentials = await spaceGenesis(this._keyring, this._signingContext, space.inner);
3598
+ const automergeRoot = this._automergeHost.repo.create();
3599
+ const credentials = await spaceGenesis(this._keyring, this._signingContext, space.inner, automergeRoot.url);
3591
3600
  await this._metadataStore.addSpace(metadata);
3592
3601
  const memberCredential = credentials[1];
3593
3602
  invariant11(getCredentialAssertion2(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
@@ -5085,7 +5094,9 @@ var ClientServicesHost = class ClientServicesHost2 {
5085
5094
  const identity = await this._serviceContext.createIdentity(params);
5086
5095
  await this._serviceContext.initialized.wait();
5087
5096
  const space = await this._serviceContext.dataSpaceManager.createSpace();
5088
- const obj = new Properties();
5097
+ const obj = new Properties(void 0, {
5098
+ useAutomergeBackend: false
5099
+ });
5089
5100
  obj[defaultKey] = identity.identityKey.toHex();
5090
5101
  await this._serviceRegistry.services.DataService.write({
5091
5102
  spaceKey: space.key,
@@ -5120,6 +5131,7 @@ ClientServicesHost = _ts_decorate8([
5120
5131
  ], ClientServicesHost);
5121
5132
 
5122
5133
  export {
5134
+ Buffer,
5123
5135
  subscribeToFeeds,
5124
5136
  subscribeToFeedBlocks,
5125
5137
  subscribeToNetworkStatus,
@@ -5152,4 +5164,4 @@ export {
5152
5164
  createDefaultModelFactory,
5153
5165
  ClientServicesHost
5154
5166
  };
5155
- //# sourceMappingURL=chunk-5AFGJQGV.mjs.map
5167
+ //# sourceMappingURL=chunk-F2XXOT7U.mjs.map