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.
- package/CHANGELOG.md +6 -0
- package/dist/centrifuge.js +1 -1
- package/dist/{chunk-VB4P6DS6.js → chunk-NYBXYYPM.js} +15 -1
- package/dist/{chunk-VB4P6DS6.js.map → chunk-NYBXYYPM.js.map} +2 -2
- package/dist/cjs/centrifuge.cjs +14 -0
- package/dist/cjs/centrifuge.cjs.map +2 -2
- package/dist/cjs/index.cjs +14 -0
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/core/data-bus.d.ts +26 -2
- package/dist/core/data-bus.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/docs/roadmap.md +5 -1
- package/docs/zh/roadmap.md +5 -1
- package/package.json +1 -1
package/dist/cjs/centrifuge.cjs
CHANGED
|
@@ -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.
|