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/index.cjs
CHANGED
|
@@ -1864,6 +1864,20 @@ var CrossTabDataBus = class {
|
|
|
1864
1864
|
getClusterSnapshot() {
|
|
1865
1865
|
return this.cluster.getSnapshot();
|
|
1866
1866
|
}
|
|
1867
|
+
/** Return a single health snapshot combining lifecycle, recovery, dedup, replay, and cluster state. */
|
|
1868
|
+
getDiagnostics() {
|
|
1869
|
+
let messages = 0;
|
|
1870
|
+
if (this.replayBuffers) for (const buffer of this.replayBuffers.values()) messages += buffer.length;
|
|
1871
|
+
return {
|
|
1872
|
+
status: this.status,
|
|
1873
|
+
started: this.started,
|
|
1874
|
+
transportReady: this.transportReady,
|
|
1875
|
+
recovery: this.getRecoveryStats(),
|
|
1876
|
+
dedup: this.getDedupStats(),
|
|
1877
|
+
replay: { enabled: Boolean(this.replayBuffers), topics: this.replayBuffers?.size ?? 0, messages },
|
|
1878
|
+
cluster: this.cluster.getSnapshot()
|
|
1879
|
+
};
|
|
1880
|
+
}
|
|
1867
1881
|
/**
|
|
1868
1882
|
* Gracefully stop the DataBus: unsubscribe all topics, stop the cluster,
|
|
1869
1883
|
* and close the transport. Idempotent.
|