fastify-sse-v2
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -22,2 +22,6 @@ import { Pushable } from "it-pushable"; | ||
retry?: number; | ||
/** | ||
* Message comment | ||
*/ | ||
comment?: string; | ||
} | ||
@@ -48,2 +52,6 @@ interface FastifyReply { | ||
retry?: number; | ||
/** | ||
* Message comment | ||
*/ | ||
comment?: string; | ||
} |
@@ -57,2 +57,5 @@ "use strict"; | ||
} | ||
if (chunk.comment) { | ||
payload += `:${chunk.comment}\n`; | ||
} | ||
if (!payload) { | ||
@@ -59,0 +62,0 @@ return ""; |
{ | ||
"name": "fastify-sse-v2", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Fastify plugin for sending server side events.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -78,3 +78,3 @@ # Fastify SSE Plugin | ||
yield { | ||
type: event.name, | ||
event: event.name, | ||
data: JSON.stringify(event), | ||
@@ -81,0 +81,0 @@ }; |
@@ -33,2 +33,7 @@ import fastifyPlugin from "fastify-plugin"; | ||
retry?: number; | ||
/** | ||
* Message comment | ||
*/ | ||
comment?: string; | ||
} | ||
@@ -63,2 +68,7 @@ | ||
retry?: number; | ||
/** | ||
* Message comment | ||
*/ | ||
comment?: string; | ||
} |
@@ -26,2 +26,5 @@ import { EventMessage } from "fastify"; | ||
} | ||
if (chunk.comment) { | ||
payload += `:${chunk.comment}\n`; | ||
} | ||
if (!payload) { | ||
@@ -28,0 +31,0 @@ return ""; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18751
365