Skip to content

v1.4.1 — the WS score frame is nested; the types now say so

Choose a tag to compare

@bensynapse bensynapse released this 07 Aug 01:43
· 20 commits to main since this release

Fixes for the 1.4.0 WebSocket types, verified against the server's frame builders:

  • ScoreUpdate typed a frame that never existed. The wire nests the payload: {"type": "score", "match_id": N, "score": {sets, games, points, server, is_tiebreak, timestamp, win_probability_p1, danger}} — model fields inside score. The stream passes the raw frame through, so flat reads (frame.sets) compiled and returned undefined. ScoreUpdate is now {type, match_id, score?: Score}, with a regression test replaying the real nested wire shape verbatim.
  • The CLI's watch read the flat fields and printed - for every score — fixed to read frame.score.
  • BreakPoint.set / .game are wire strings ('1-1', '3-4'), not numbers — retyped.
  • The subscribe frame drops the stray action: 'subscribe' key; it is now exactly the documented {topics, signals?}.

No behavioural change for consumers already reading frame.score; flat-field readers get a compile error pointing at the fix. Full details in CHANGELOG.md.