{"library":"fastify-sse-v2","type":"library","category":null,"description":"fastify-sse-v2 is a Fastify plugin designed to streamline the implementation of Server-Sent Events (SSE) within a Fastify application. It augments the `FastifyReply` object with a `.sse()` method, enabling developers to send individual events or stream events from `AsyncIterable` or `EventEmitter` sources, thereby abstracting the underlying HTTP streaming complexities. The current stable version is 4.2.2, with releases occurring periodically, typically every few months, to address bug fixes and introduce minor features. A primary differentiator is its seamless integration with Fastify's reply object and robust support for modern async/await patterns in event streaming. It also provides configurable options for `retryDelay` to manage client reconnection logic and `highWaterMark` to control internal stream buffering, offering fine-grained control over SSE behavior.","language":"javascript","status":"active","version":"4.2.2","tags":["javascript","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install fastify-sse-v2","imports":["import { FastifySSEPlugin } from 'fastify-sse-v2';","reply.sse({ data: 'hello' });","import { FastifyInstance, FastifyReply } from 'fastify';\ndeclare module 'fastify' {\n  interface FastifyReply {\n    sse: (payload: { id?: string; event?: string; data: string; retry?: number; comment?: string } | AsyncIterable<{ id?: string; event?: string; data: string; retry?: number; comment?: string }>) => void;\n    sseContext: { source: { end: () => void } };\n  }\n}"]},{"cmd":"yarn add fastify-sse-v2","imports":[]},{"cmd":"pnpm add fastify-sse-v2","imports":[]}],"homepage":null,"github":"https://github.com/nodefactoryio/fastify-sse-v2","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fastify-sse-v2","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/fastify-sse-v2/compatibility"}}