@dxos/client-services 0.3.3-main.85c02fd → 0.3.3-main.a79b0bc

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.
@@ -2469,6 +2469,7 @@ var ClientRpcServer = class {
2469
2469
  };
2470
2470
 
2471
2471
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2472
+ import { Trigger as Trigger4 } from "@dxos/async";
2472
2473
  import { getFirstStreamValue } from "@dxos/codec-protobuf";
2473
2474
  import { credentialTypeFilter } from "@dxos/credentials";
2474
2475
  import { DocumentModel } from "@dxos/document-model";
@@ -2507,7 +2508,7 @@ var getPlatform = () => {
2507
2508
  };
2508
2509
 
2509
2510
  // packages/sdk/client-services/src/version.ts
2510
- var DXOS_VERSION = "0.3.3-main.85c02fd";
2511
+ var DXOS_VERSION = "0.3.3-main.a79b0bc";
2511
2512
 
2512
2513
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2513
2514
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -2526,7 +2527,7 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2526
2527
  {
2527
2528
  invariant9(clientServices.LoggingService, "SystemService is not available.", {
2528
2529
  F: __dxlog_file10,
2529
- L: 88,
2530
+ L: 93,
2530
2531
  S: void 0,
2531
2532
  A: [
2532
2533
  "clientServices.LoggingService",
@@ -2559,6 +2560,19 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2559
2560
  bytes,
2560
2561
  length
2561
2562
  }));
2563
+ const status = await getFirstStreamValue(clientServices.NetworkService.queryStatus(), {
2564
+ timeout: DEFAULT_TIMEOUT
2565
+ }).catch(() => void 0);
2566
+ diagnostics.networkStatus = status;
2567
+ const swarmInfoDone = new Trigger4();
2568
+ serviceContext.networkManager.connectionLog?.update.on(async () => {
2569
+ const swarms = serviceContext.networkManager.connectionLog?.swarms;
2570
+ diagnostics.swarms = swarms;
2571
+ await swarmInfoDone.wake();
2572
+ });
2573
+ await swarmInfoDone.wait({
2574
+ timeout: DEFAULT_TIMEOUT
2575
+ });
2562
2576
  }
2563
2577
  diagnostics.config = config.values;
2564
2578
  return diagnostics;
@@ -2572,7 +2586,7 @@ var getProperties = (space) => {
2572
2586
  } catch (err) {
2573
2587
  log8.warn(err.message, void 0, {
2574
2588
  F: __dxlog_file10,
2575
- L: 145,
2589
+ L: 168,
2576
2590
  S: void 0,
2577
2591
  C: (f, a) => f(...a)
2578
2592
  });
@@ -2643,7 +2657,7 @@ import { trace as trace5 } from "@dxos/tracing";
2643
2657
  import { ComplexSet as ComplexSet3 } from "@dxos/util";
2644
2658
 
2645
2659
  // packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
2646
- import { DeferredTask, Event as Event4, scheduleTask as scheduleTask3, sleep, TimeoutError as TimeoutError2, Trigger as Trigger4 } from "@dxos/async";
2660
+ import { DeferredTask, Event as Event4, scheduleTask as scheduleTask3, sleep, TimeoutError as TimeoutError2, Trigger as Trigger5 } from "@dxos/async";
2647
2661
  import { Context as Context6, rejectOnDispose } from "@dxos/context";
2648
2662
  import { invariant as invariant10 } from "@dxos/invariant";
2649
2663
  import { PublicKey as PublicKey7 } from "@dxos/keys";
@@ -2693,7 +2707,7 @@ var NotarizationPlugin = class {
2693
2707
  "'Credentials must have an id'"
2694
2708
  ]
2695
2709
  });
2696
- const errors = new Trigger4();
2710
+ const errors = new Trigger5();
2697
2711
  const ctx = this._ctx.derive({
2698
2712
  onError: (err) => {
2699
2713
  log9.warn("Notarization error", {
@@ -2824,7 +2838,7 @@ var NotarizationPlugin = class {
2824
2838
  if (this._processedCredentials.has(id)) {
2825
2839
  return;
2826
2840
  }
2827
- await entry(this._processCredentialsTriggers, id).orInsert(new Trigger4()).value.wait();
2841
+ await entry(this._processCredentialsTriggers, id).orInsert(new Trigger5()).value.wait();
2828
2842
  }
2829
2843
  /**
2830
2844
  * Requests from other peers to notarize credentials.
@@ -3908,7 +3922,7 @@ var SpacesServiceImpl = class {
3908
3922
  var getChannelId = (channel) => `user-channel/${channel}`;
3909
3923
 
3910
3924
  // packages/sdk/client-services/src/packlets/services/service-context.ts
3911
- import { Trigger as Trigger5 } from "@dxos/async";
3925
+ import { Trigger as Trigger6 } from "@dxos/async";
3912
3926
  import { Context as Context9 } from "@dxos/context";
3913
3927
  import { getCredentialAssertion as getCredentialAssertion3 } from "@dxos/credentials";
3914
3928
  import { failUndefined as failUndefined3 } from "@dxos/debug";
@@ -3940,7 +3954,7 @@ var ServiceContext = class ServiceContext2 {
3940
3954
  this.networkManager = networkManager;
3941
3955
  this.signalManager = signalManager;
3942
3956
  this.modelFactory = modelFactory;
3943
- this.initialized = new Trigger5();
3957
+ this.initialized = new Trigger6();
3944
3958
  this.dataServiceSubscriptions = new DataServiceSubscriptions();
3945
3959
  this._handlerFactories = /* @__PURE__ */ new Map();
3946
3960
  this._instanceId = PublicKey10.random().toHex();
@@ -4193,7 +4207,7 @@ var ServiceRegistry = class {
4193
4207
  };
4194
4208
 
4195
4209
  // packages/sdk/client-services/src/packlets/locks/browser.ts
4196
- import { asyncTimeout, Trigger as Trigger6 } from "@dxos/async";
4210
+ import { asyncTimeout, Trigger as Trigger7 } from "@dxos/async";
4197
4211
  import { RESOURCE_LOCK_TIMEOUT } from "@dxos/client-protocol";
4198
4212
  import { log as log14, logInfo } from "@dxos/log";
4199
4213
  function _ts_decorate6(decorators, target, key, desc) {
@@ -4214,7 +4228,7 @@ var Message;
4214
4228
  var Lock = class {
4215
4229
  constructor({ lockKey, onAcquire, onRelease }) {
4216
4230
  this._broadcastChannel = new BroadcastChannel("vault-resource-lock");
4217
- this._releaseTrigger = new Trigger6();
4231
+ this._releaseTrigger = new Trigger7();
4218
4232
  this._lockKey = lockKey;
4219
4233
  this._onAcquire = onAcquire;
4220
4234
  this._onRelease = onRelease;
@@ -4274,13 +4288,13 @@ var Lock = class {
4274
4288
  S: this,
4275
4289
  C: (f, a) => f(...a)
4276
4290
  });
4277
- const acquired = new Trigger6();
4291
+ const acquired = new Trigger7();
4278
4292
  void navigator.locks.request(this._lockKey, {
4279
4293
  steal
4280
4294
  }, async () => {
4281
4295
  await this._onAcquire?.();
4282
4296
  acquired.wake();
4283
- this._releaseTrigger = new Trigger6();
4297
+ this._releaseTrigger = new Trigger7();
4284
4298
  await this._releaseTrigger.wait();
4285
4299
  log14("releasing lock...", void 0, {
4286
4300
  F: __dxlog_file16,
@@ -5045,4 +5059,4 @@ export {
5045
5059
  createDefaultModelFactory,
5046
5060
  ClientServicesHost
5047
5061
  };
5048
- //# sourceMappingURL=chunk-XR2F5WPX.mjs.map
5062
+ //# sourceMappingURL=chunk-4PI4NMDQ.mjs.map