Repository navigation
Commit 5516979
refactor: serve "sse" from the middleware's own transport
The adapter this branch added, `lib/servers/EventSourceServer.js`, existed to
dress the middleware's hot endpoint up as the transport shape this server was
written against. There is no such shape any more — the middleware owns both
ends of both transports — so naming `sse` is now just choosing one of its
transports, and the adapter and its special case in `normalizeOptions` are
gone with it.
`client.webSocketTransport: "sse"` and `webSocketServer: "sse"` keep working
and keep picking each other, which is what the option values are for. The
published `client/clients/EventSourceClient.js` path is generated alongside
its WebSocket neighbour, so a transport named by module still resolves.
One thing this caught: `"sse"` was being read as an implementation of this
server's own, since the test for that was "not `ws`" — which sent it looking
for a class to construct and failed before a page could connect. Both of the
middleware's transports are named now, and a smoke run over each confirms the
endpoint answers: `426` to a plain GET on the WebSocket one, an event stream
on the other.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UjuMAuk9o6UazjHzcAQCTA1 parent 931ef71 commit 5516979
3 files changed
Lines changed: 8 additions & 12 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2424 | 2424 | | |
2425 | 2425 | | |
2426 | 2426 | | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
2427 | 2431 | | |
2428 | | - | |
| 2432 | + | |
2429 | 2433 | | |
2430 | 2434 | | |
2431 | 2435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments