Z User
phase7: MCP stdio smoke test (handshake + tools/list + get_roots 6:74) — 4/4 tests PASS
54a6341 Download node_modules/eventsource-parser/dist/stream.js from bravesigma/quran-md-plugin: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/datasets/bravesigma/quran-md-plugin/resolve/main/node_modules/eventsource-parser/dist/stream.js
- Command line
-
hf download hf://datasets/bravesigma/quran-md-plugin/node_modules/eventsource-parser/dist/stream.js
-
curl -L -o stream.js https://huggingface.co/datasets/bravesigma/quran-md-plugin/resolve/main/node_modules/eventsource-parser/dist/stream.js
825 Bytes
| import { createParser } from "./index.js"; | |
| import { ParseError } from "./index.js"; | |
| class EventSourceParserStream extends TransformStream { | |
| constructor({ onError, onRetry, onComment, maxBufferSize } = {}) { | |
| let parser; | |
| super({ | |
| start(controller) { | |
| parser = createParser({ | |
| onEvent: (event) => { | |
| controller.enqueue(event); | |
| }, | |
| onError(error) { | |
| typeof onError == "function" && onError(error), (onError === "terminate" || error.type === "max-buffer-size-exceeded") && controller.error(error); | |
| }, | |
| onRetry, | |
| onComment, | |
| maxBufferSize | |
| }); | |
| }, | |
| transform(chunk) { | |
| parser.feed(chunk); | |
| } | |
| }); | |
| } | |
| } | |
| export { | |
| EventSourceParserStream, | |
| ParseError | |
| }; | |
| //# sourceMappingURL=stream.js.map | |