Conversation
sse.dev no longer resolves (NXDOMAIN), so examples/06-sse.ts fails on the initial GET. Swap it for DexPaprika's free keyless price stream, which emits named token_price events, and filter on the event name to show sseStream's named-event handling. AbortSignal.timeout replaces the manual AbortController per the runtime-baseline rule in AGENTS.md.
Author
|
Small one from July. The patch swaps it for a public keyless SSE stream and skips the keepalive events so the example still exits after three messages. I checked the replacement endpoint again today and it is still emitting events. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The example's own comment says "httpbin doesn't host an SSE endpoint, so this uses sse.dev which echoes a message every 2s", but sse.dev no longer resolves (NXDOMAIN), so the example dies on the initial GET. This swaps in DexPaprika's free, keyless price stream and filters on the named
token_priceevent, which also exercises theSseEvent.eventfield properly; the manual AbortController becameAbortSignal.timeoutper the runtime-baseline rule in AGENTS.md. Verified live withpnpm dlx tsx examples/06-sse.ts(pluspnpm lint,pnpm typecheck, and the full vitest suite, 932 passing), first event off the wire:Disclosure: I do DevRel for DexPaprika. The endpoint is public, no key or signup needed.