cross-tab-worker-databus 0.20.25 → 0.20.26

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
@@ -2,6 +2,16 @@
2
2
 
3
3
  本项目遵循 [Semantic Versioning](https://semver.org/);变更记录格式参考 [Keep a Changelog](https://keepachangelog.com/)。
4
4
 
5
+ ## [0.20.26] - 2026-09-04
6
+
7
+ ### Added
8
+
9
+ - Added trace diagnostics contract coverage for privacy-safe fields, events/metrics mode isolation, repeated sink failures, reliability schema timestamps, bounded state, and lifecycle metrics windows.
10
+
11
+ ### Fixed
12
+
13
+ - Stopped trace reporters no longer emit metrics from later manual flushes until explicitly started again.
14
+
5
15
  ## [0.20.25] - 2026-09-03
6
16
 
7
17
  ### Added
@@ -2,7 +2,7 @@ import {
2
2
  CrossTabDataBus,
3
3
  parseDataBusPublication,
4
4
  selectWorkerBackend
5
- } from "./chunk-JOQXQPGI.js";
5
+ } from "./chunk-ONPDJJFK.js";
6
6
 
7
7
  // src/centrifuge-session.ts
8
8
  import { Centrifuge } from "centrifuge";
@@ -1041,6 +1041,9 @@ var DataBusTraceReporter = class {
1041
1041
  now;
1042
1042
  intervalHandle = null;
1043
1043
  intervalStartedAt = 0;
1044
+ // A reporter may be flushed explicitly before start(), but once stop() is
1045
+ // called it must remain inert until a new start() begins another session.
1046
+ stopped = false;
1044
1047
  received = 0;
1045
1048
  dispatched = 0;
1046
1049
  latencySamples = 0;
@@ -1063,6 +1066,7 @@ var DataBusTraceReporter = class {
1063
1066
  * (no metrics to emit), when disabled, or when already running. */
1064
1067
  start() {
1065
1068
  if (!this.enabled || this.intervalHandle || this.mode === "events") return;
1069
+ this.stopped = false;
1066
1070
  this.intervalStartedAt = this.now();
1067
1071
  this.intervalHandle = setInterval(() => this.flush(), this.metricsIntervalMs);
1068
1072
  }
@@ -1074,6 +1078,7 @@ var DataBusTraceReporter = class {
1074
1078
  this.resetMetrics();
1075
1079
  }
1076
1080
  stop() {
1081
+ this.stopped = true;
1077
1082
  this.pause();
1078
1083
  }
1079
1084
  /** Record an instantaneous trace event (lifecycle, status, error, etc.). */
@@ -1142,7 +1147,7 @@ var DataBusTraceReporter = class {
1142
1147
  }
1143
1148
  /** Emit the accumulated metrics snapshot if the interval is active. */
1144
1149
  flush() {
1145
- if (!this.metricsActive) return;
1150
+ if (!this.metricsActive || this.stopped) return;
1146
1151
  this.flushNow();
1147
1152
  }
1148
1153
  flushNow() {
@@ -2111,4 +2116,4 @@ export {
2111
2116
  parseDataBusPublication,
2112
2117
  selectWorkerBackend
2113
2118
  };
2114
- //# sourceMappingURL=chunk-JOQXQPGI.js.map
2119
+ //# sourceMappingURL=chunk-ONPDJJFK.js.map