cross-tab-worker-databus 0.20.51 → 0.20.53

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.20.53] - 2026-09-04
4
+
5
+ ### Added
6
+
7
+ - Extended `getRecoveryStats()` with a safe `errorMessage` summary for diagnostics without exposing the raw error object.
8
+
9
+ ## [Unreleased]
10
+
11
+ ## [0.20.52] - 2026-09-04
12
+
13
+ ### Added
14
+
15
+ - Extended `getRecoveryStats()` with `hasError`, exposing whether the current transport error is still retained.
16
+
3
17
  ## [0.20.51] - 2026-09-04
4
18
 
5
19
  ### Added
@@ -2,7 +2,7 @@ import {
2
2
  CrossTabDataBus,
3
3
  parseDataBusPublication,
4
4
  selectWorkerBackend
5
- } from "./chunk-LXRYJA3A.js";
5
+ } from "./chunk-MHJNBVEK.js";
6
6
 
7
7
  // src/centrifuge-session.ts
8
8
  import { Centrifuge } from "centrifuge";
@@ -1642,9 +1642,10 @@ var CrossTabDataBus = class {
1642
1642
  getStatus() {
1643
1643
  return this.status;
1644
1644
  }
1645
- /** Return a bounded snapshot of automatic transport recovery state. */
1645
+ /** Return the current automatic transport recovery state. `hasError` means a transport error is currently retained. */
1646
1646
  getRecoveryStats() {
1647
- return { attempt: this.recoveryAttempt, exhausted: this.recoveryExhausted, maxAttempts: this.recoveryMaxAttempts };
1647
+ const errorMessage = this.lastError instanceof Error ? this.lastError.message : this.lastError === null ? null : String(this.lastError);
1648
+ return { attempt: this.recoveryAttempt, exhausted: this.recoveryExhausted, maxAttempts: this.recoveryMaxAttempts, hasError: this.lastError !== null, errorMessage };
1648
1649
  }
1649
1650
  /** Snapshot of the cluster state (workers, routes, assignments).
1650
1651
  * For diagnostics only — the returned object is a shallow copy but
@@ -2120,4 +2121,4 @@ export {
2120
2121
  parseDataBusPublication,
2121
2122
  selectWorkerBackend
2122
2123
  };
2123
- //# sourceMappingURL=chunk-LXRYJA3A.js.map
2124
+ //# sourceMappingURL=chunk-MHJNBVEK.js.map