@dxos/client-services 0.1.45 → 0.1.46-next.c3cc04c

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.
@@ -436,12 +436,12 @@ var TrustedKeySetAuthVerifier = class {
436
436
  // packages/sdk/client-services/src/packlets/identity/identity.ts
437
437
  import assert from "@dxos/node-std/assert";
438
438
  import { Event } from "@dxos/async";
439
+ import { AUTH_TIMEOUT, LOAD_CONTROL_FEEDS_TIMEOUT } from "@dxos/client-protocol";
439
440
  import { DeviceStateMachine, createCredentialSignerWithKey, createCredentialSignerWithChain, ProfileStateMachine } from "@dxos/credentials";
440
441
  import { failUndefined } from "@dxos/debug";
441
442
  import { writeMessages } from "@dxos/feed-store";
442
443
  import { log as log2 } from "@dxos/log";
443
444
  import { AdmittedFeed } from "@dxos/protocols/proto/dxos/halo/credentials";
444
- var AUTH_TIMEOUT = 3e4;
445
445
  var Identity = class {
446
446
  constructor({ space, signer, identityKey, deviceKey }) {
447
447
  this.stateUpdate = new Event();
@@ -482,7 +482,7 @@ var Identity = class {
482
482
  async ready() {
483
483
  await this._deviceStateMachine.processor.deviceChainReady.wait();
484
484
  await this.controlPipeline.state.waitUntilReachedTargetTimeframe({
485
- timeout: 3e3
485
+ timeout: LOAD_CONTROL_FEEDS_TIMEOUT
486
486
  });
487
487
  }
488
488
  get profileDocument() {
@@ -534,7 +534,7 @@ var Identity = class {
534
534
  dataFeedKey
535
535
  }, {
536
536
  file: "identity.ts",
537
- line: 160,
537
+ line: 156,
538
538
  scope: this,
539
539
  callSite: (f, a) => f(...a)
540
540
  });
@@ -2008,6 +2008,7 @@ var SpaceInvitationProtocol = class {
2008
2008
 
2009
2009
  // packages/sdk/client-services/src/packlets/spaces/data-space.ts
2010
2010
  import { Event as Event5, scheduleTask as scheduleTask4, trackLeaks } from "@dxos/async";
2011
+ import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
2011
2012
  import { cancelWithContext as cancelWithContext2, Context as Context6 } from "@dxos/context";
2012
2013
  import { timed } from "@dxos/debug";
2013
2014
  import { createMappedFeedWriter } from "@dxos/echo-pipeline";
@@ -2268,7 +2269,6 @@ var __decorate = function(decorators, target, key, desc) {
2268
2269
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2269
2270
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2270
2271
  };
2271
- var AUTH_TIMEOUT2 = 3e4;
2272
2272
  var DataSpace = class DataSpace2 {
2273
2273
  constructor(params) {
2274
2274
  this._ctx = new Context6();
@@ -2356,7 +2356,7 @@ var DataSpace = class DataSpace2 {
2356
2356
  if (err instanceof CancelledError) {
2357
2357
  log9("Data pipeline initialization cancelled", err, {
2358
2358
  file: "data-space.ts",
2359
- line: 173,
2359
+ line: 172,
2360
2360
  scope: this,
2361
2361
  callSite: (f, a) => f(...a)
2362
2362
  });
@@ -2364,7 +2364,7 @@ var DataSpace = class DataSpace2 {
2364
2364
  }
2365
2365
  log9.error("Error initializing data pipeline", err, {
2366
2366
  file: "data-space.ts",
2367
- line: 177,
2367
+ line: 176,
2368
2368
  scope: this,
2369
2369
  callSite: (f, a) => f(...a)
2370
2370
  });
@@ -2390,7 +2390,7 @@ var DataSpace = class DataSpace2 {
2390
2390
  await this._createWritableFeeds();
2391
2391
  log9("Writable feeds created", {}, {
2392
2392
  file: "data-space.ts",
2393
- line: 202,
2393
+ line: 201,
2394
2394
  scope: this,
2395
2395
  callSite: (f, a) => f(...a)
2396
2396
  });
@@ -2405,7 +2405,7 @@ var DataSpace = class DataSpace2 {
2405
2405
  await cancelWithContext2(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
2406
2406
  log9("waiting for data pipeline to reach target timeframe", {}, {
2407
2407
  file: "data-space.ts",
2408
- line: 221,
2408
+ line: 220,
2409
2409
  scope: this,
2410
2410
  callSite: (f, a) => f(...a)
2411
2411
  });
@@ -2416,7 +2416,7 @@ var DataSpace = class DataSpace2 {
2416
2416
  this.metrics.dataPipelineReady = new Date();
2417
2417
  log9("data pipeline ready", {}, {
2418
2418
  file: "data-space.ts",
2419
- line: 230,
2419
+ line: 229,
2420
2420
  scope: this,
2421
2421
  callSite: (f, a) => f(...a)
2422
2422
  });
@@ -3149,6 +3149,7 @@ var MemoryShellRuntime = class {
3149
3149
 
3150
3150
  // packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts
3151
3151
  import { Trigger as Trigger10 } from "@dxos/async";
3152
+ import { PROXY_CONNECTION_TIMEOUT as PROXY_CONNECTION_TIMEOUT2 } from "@dxos/client-protocol";
3152
3153
  import { log as log19, logInfo as logInfo3 } from "@dxos/log";
3153
3154
  import { MemorySignalManager as MemorySignalManager2, MemorySignalManagerContext as MemorySignalManagerContext2, WebsocketSignalManager as WebsocketSignalManager3 } from "@dxos/messaging";
3154
3155
  import { createWebRTCTransportFactory as createWebRTCTransportFactory2 } from "@dxos/network-manager";
@@ -3425,6 +3426,7 @@ var IFrameProxyRuntime = class {
3425
3426
 
3426
3427
  // packages/sdk/client-services/src/packlets/vault/vault-resource-lock.ts
3427
3428
  import { asyncTimeout, Trigger as Trigger6 } from "@dxos/async";
3429
+ import { RESOURCE_LOCK_TIMEOUT } from "@dxos/client-protocol";
3428
3430
  import { log as log14, logInfo } from "@dxos/log";
3429
3431
  var __decorate3 = function(decorators, target, key, desc) {
3430
3432
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3459,28 +3461,28 @@ var VaultResourceLock = class {
3459
3461
  try {
3460
3462
  log14("aquiring lock...", {}, {
3461
3463
  file: "vault-resource-lock.ts",
3462
- line: 44,
3464
+ line: 45,
3463
3465
  scope: this,
3464
3466
  callSite: (f, a) => f(...a)
3465
3467
  });
3466
- await asyncTimeout(this._requestLock(), 3e3);
3468
+ await asyncTimeout(this._requestLock(), RESOURCE_LOCK_TIMEOUT);
3467
3469
  log14("acquired lock", {}, {
3468
3470
  file: "vault-resource-lock.ts",
3469
- line: 46,
3471
+ line: 47,
3470
3472
  scope: this,
3471
3473
  callSite: (f, a) => f(...a)
3472
3474
  });
3473
3475
  } catch (e) {
3474
3476
  log14("stealing lock...", {}, {
3475
3477
  file: "vault-resource-lock.ts",
3476
- line: 48,
3478
+ line: 49,
3477
3479
  scope: this,
3478
3480
  callSite: (f, a) => f(...a)
3479
3481
  });
3480
3482
  await this._requestLock(true);
3481
3483
  log14("stolen lock", {}, {
3482
3484
  file: "vault-resource-lock.ts",
3483
- line: 50,
3485
+ line: 51,
3484
3486
  scope: this,
3485
3487
  callSite: (f, a) => f(...a)
3486
3488
  });
@@ -3499,7 +3501,7 @@ var VaultResourceLock = class {
3499
3501
  steal
3500
3502
  }, {
3501
3503
  file: "vault-resource-lock.ts",
3502
- line: 65,
3504
+ line: 66,
3503
3505
  scope: this,
3504
3506
  callSite: (f, a) => f(...a)
3505
3507
  });
@@ -3514,14 +3516,14 @@ var VaultResourceLock = class {
3514
3516
  await this._releaseTrigger.wait();
3515
3517
  log14("releasing lock...", {}, {
3516
3518
  file: "vault-resource-lock.ts",
3517
- line: 74,
3519
+ line: 75,
3518
3520
  scope: this,
3519
3521
  callSite: (f, a) => f(...a)
3520
3522
  });
3521
3523
  await ((_b = this._onRelease) == null ? void 0 : _b.call(this));
3522
3524
  log14("released lock", {}, {
3523
3525
  file: "vault-resource-lock.ts",
3524
- line: 76,
3526
+ line: 77,
3525
3527
  scope: this,
3526
3528
  callSite: (f, a) => f(...a)
3527
3529
  });
@@ -3534,7 +3536,7 @@ var VaultResourceLock = class {
3534
3536
  steal
3535
3537
  }, {
3536
3538
  file: "vault-resource-lock.ts",
3537
- line: 83,
3539
+ line: 84,
3538
3540
  scope: this,
3539
3541
  callSite: (f, a) => f(...a)
3540
3542
  });
@@ -3553,7 +3555,7 @@ import { WebRTCTransportProxyFactory } from "@dxos/network-manager";
3553
3555
  // packages/sdk/client-services/src/packlets/vault/worker-session.ts
3554
3556
  import assert12 from "@dxos/node-std/assert";
3555
3557
  import { asyncTimeout as asyncTimeout2, Trigger as Trigger7 } from "@dxos/async";
3556
- import { iframeServiceBundle as iframeServiceBundle2, workerServiceBundle as workerServiceBundle2 } from "@dxos/client-protocol";
3558
+ import { iframeServiceBundle as iframeServiceBundle2, PROXY_CONNECTION_TIMEOUT, workerServiceBundle as workerServiceBundle2 } from "@dxos/client-protocol";
3557
3559
  import { log as log15, logInfo as logInfo2 } from "@dxos/log";
3558
3560
  import { createProtoRpcPeer as createProtoRpcPeer3 } from "@dxos/rpc";
3559
3561
  import { Callback } from "@dxos/util";
@@ -3631,7 +3633,7 @@ var WorkerSession = class {
3631
3633
  const middleware = {
3632
3634
  handleCall: async (method, params, handler) => {
3633
3635
  const error = await readySignal.wait({
3634
- timeout: 3e3
3636
+ timeout: PROXY_CONNECTION_TIMEOUT
3635
3637
  });
3636
3638
  if (error) {
3637
3639
  throw error;
@@ -3640,7 +3642,7 @@ var WorkerSession = class {
3640
3642
  },
3641
3643
  handleStream: async (method, params, handler) => {
3642
3644
  const error = await readySignal.wait({
3643
- timeout: 3e3
3645
+ timeout: PROXY_CONNECTION_TIMEOUT
3644
3646
  });
3645
3647
  if (error) {
3646
3648
  throw error;
@@ -3675,7 +3677,7 @@ var WorkerSession = class {
3675
3677
  } catch (err) {
3676
3678
  log15.catch(err, {}, {
3677
3679
  file: "worker-session.ts",
3678
- line: 95,
3680
+ line: 100,
3679
3681
  scope: this,
3680
3682
  callSite: (f, a) => f(...a)
3681
3683
  });
@@ -3692,7 +3694,7 @@ var WorkerSession = class {
3692
3694
  async open() {
3693
3695
  log15.info("opening..", {}, {
3694
3696
  file: "worker-session.ts",
3695
- line: 109,
3697
+ line: 114,
3696
3698
  scope: this,
3697
3699
  callSite: (f, a) => f(...a)
3698
3700
  });
@@ -3702,7 +3704,7 @@ var WorkerSession = class {
3702
3704
  this._maybeOpenShell()
3703
3705
  ]);
3704
3706
  await this._startTrigger.wait({
3705
- timeout: 3e3
3707
+ timeout: PROXY_CONNECTION_TIMEOUT
3706
3708
  });
3707
3709
  if (this.lockKey) {
3708
3710
  void this._afterLockReleases(this.lockKey, () => this.close());
@@ -3711,7 +3713,7 @@ var WorkerSession = class {
3711
3713
  async close() {
3712
3714
  log15.info("closing..", {}, {
3713
3715
  file: "worker-session.ts",
3714
- line: 119,
3716
+ line: 124,
3715
3717
  scope: this,
3716
3718
  callSite: (f, a) => f(...a)
3717
3719
  });
@@ -3720,7 +3722,7 @@ var WorkerSession = class {
3720
3722
  } catch (err) {
3721
3723
  log15.catch(err, {}, {
3722
3724
  file: "worker-session.ts",
3723
- line: 123,
3725
+ line: 128,
3724
3726
  scope: this,
3725
3727
  callSite: (f, a) => f(...a)
3726
3728
  });
@@ -3736,7 +3738,7 @@ var WorkerSession = class {
3736
3738
  } catch (e) {
3737
3739
  log15.info("No shell connected.", {}, {
3738
3740
  file: "worker-session.ts",
3739
- line: 133,
3741
+ line: 138,
3740
3742
  scope: this,
3741
3743
  callSite: (f, a) => f(...a)
3742
3744
  });
@@ -4370,7 +4372,7 @@ var IFrameHostRuntime = class {
4370
4372
  var _a;
4371
4373
  log19("starting...", {}, {
4372
4374
  file: "iframe-host-runtime.ts",
4373
- line: 69,
4375
+ line: 70,
4374
4376
  scope: this,
4375
4377
  callSite: (f, a) => f(...a)
4376
4378
  });
@@ -4389,7 +4391,7 @@ var IFrameHostRuntime = class {
4389
4391
  const middleware = {
4390
4392
  handleCall: async (method, params, handler) => {
4391
4393
  const error = await this._ready.wait({
4392
- timeout: 3e3
4394
+ timeout: PROXY_CONNECTION_TIMEOUT2
4393
4395
  });
4394
4396
  if (error) {
4395
4397
  throw error;
@@ -4398,7 +4400,7 @@ var IFrameHostRuntime = class {
4398
4400
  },
4399
4401
  handleStream: async (method, params, handler) => {
4400
4402
  const error = await this._ready.wait({
4401
- timeout: 3e3
4403
+ timeout: PROXY_CONNECTION_TIMEOUT2
4402
4404
  });
4403
4405
  if (error) {
4404
4406
  throw error;
@@ -4419,7 +4421,7 @@ var IFrameHostRuntime = class {
4419
4421
  this._ready.wake(void 0);
4420
4422
  log19("started", {}, {
4421
4423
  file: "iframe-host-runtime.ts",
4422
- line: 112,
4424
+ line: 113,
4423
4425
  scope: this,
4424
4426
  callSite: (f, a) => f(...a)
4425
4427
  });
@@ -4427,7 +4429,7 @@ var IFrameHostRuntime = class {
4427
4429
  this._ready.wake(err);
4428
4430
  log19.catch(err, {}, {
4429
4431
  file: "iframe-host-runtime.ts",
4430
- line: 115,
4432
+ line: 116,
4431
4433
  scope: this,
4432
4434
  callSite: (f, a) => f(...a)
4433
4435
  });
@@ -4437,7 +4439,7 @@ var IFrameHostRuntime = class {
4437
4439
  var _a;
4438
4440
  log19("stopping...", {}, {
4439
4441
  file: "iframe-host-runtime.ts",
4440
- line: 120,
4442
+ line: 121,
4441
4443
  scope: this,
4442
4444
  callSite: (f, a) => f(...a)
4443
4445
  });
@@ -4446,7 +4448,7 @@ var IFrameHostRuntime = class {
4446
4448
  await ((_a = this._shellRuntime) == null ? void 0 : _a.close());
4447
4449
  log19("stopped", {}, {
4448
4450
  file: "iframe-host-runtime.ts",
4449
- line: 124,
4451
+ line: 125,
4450
4452
  scope: this,
4451
4453
  callSite: (f, a) => f(...a)
4452
4454
  });
@@ -4492,4 +4494,4 @@ export {
4492
4494
  ClientServicesHost,
4493
4495
  LocalClientServices
4494
4496
  };
4495
- //# sourceMappingURL=chunk-IHSMRQ3L.mjs.map
4497
+ //# sourceMappingURL=chunk-ZHDJQGXL.mjs.map