cross-tab-worker-databus 0.20.61 → 0.20.62

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.
@@ -1839,6 +1839,20 @@ var CrossTabDataBus = class {
1839
1839
  getClusterSnapshot() {
1840
1840
  return this.cluster.getSnapshot();
1841
1841
  }
1842
+ /** Return a single health snapshot combining lifecycle, recovery, dedup, replay, and cluster state. */
1843
+ getDiagnostics() {
1844
+ let messages = 0;
1845
+ if (this.replayBuffers) for (const buffer of this.replayBuffers.values()) messages += buffer.length;
1846
+ return {
1847
+ status: this.status,
1848
+ started: this.started,
1849
+ transportReady: this.transportReady,
1850
+ recovery: this.getRecoveryStats(),
1851
+ dedup: this.getDedupStats(),
1852
+ replay: { enabled: Boolean(this.replayBuffers), topics: this.replayBuffers?.size ?? 0, messages },
1853
+ cluster: this.cluster.getSnapshot()
1854
+ };
1855
+ }
1842
1856
  /**
1843
1857
  * Gracefully stop the DataBus: unsubscribe all topics, stop the cluster,
1844
1858
  * and close the transport. Idempotent.