@cplieger/sse 1.1.2-dev.1 → 1.2.0-dev.2

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/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplieger/sse",
3
- "version": "1.1.2-dev.1",
3
+ "version": "1.2.0-dev.2",
4
4
  "license": "Apache-2.0",
5
5
  "exports": {
6
6
  ".": "./src/index.ts"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplieger/sse",
3
- "version": "1.1.2-dev.1",
3
+ "version": "1.2.0-dev.2",
4
4
  "description": "Server-Sent Events hub and client that resume from an exact cursor and reconcile after sleep",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/src/digest.ts CHANGED
@@ -94,7 +94,9 @@ function subjectKey(subject: Subject): string {
94
94
  }
95
95
 
96
96
  interface Position {
97
+ // deadset:ignore DS1301 -- check() spreads the position into the DigestResult it returns
97
98
  readonly epoch: string;
99
+ // deadset:ignore DS1301 -- check() spreads the position into the DigestResult it returns
98
100
  readonly head: string;
99
101
  }
100
102
 
package/src/stream.ts CHANGED
@@ -112,7 +112,6 @@ type HeldEntry =
112
112
  readonly kind: "frame";
113
113
  readonly generation: number;
114
114
  readonly frame: Frame;
115
- readonly bytes: number;
116
115
  }
117
116
  | {
118
117
  readonly kind: "adopt";
@@ -201,7 +200,7 @@ export function createStream(opts: StreamOptions): Stream {
201
200
  opts.onLifecycle?.(event);
202
201
  }
203
202
 
204
- bindListener(opts.versions, (epoch, _dropped) => {
203
+ bindListener(opts.versions, (epoch) => {
205
204
  const previous = knownEpoch;
206
205
  knownEpoch = epoch;
207
206
  if (binding || inflight === null || !queued?.full) {
@@ -469,7 +468,7 @@ export function createStream(opts: StreamOptions): Stream {
469
468
  }
470
469
 
471
470
  function hold(frame: Frame, bytes: number): void {
472
- held.push({ kind: "frame", generation: state.generation, frame, bytes });
471
+ held.push({ kind: "frame", generation: state.generation, frame });
473
472
  heldFrames++;
474
473
  heldBytes += bytes;
475
474
  if (heldFrames > cfg.heldMaxFrames || heldBytes > cfg.heldMaxBytes) {