@oh-my-pi/pi-utils 15.3.1 → 15.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/stream.ts +4 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-utils",
|
|
4
|
-
"version": "15.3.
|
|
4
|
+
"version": "15.3.2",
|
|
5
5
|
"description": "Shared utilities for pi packages",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"fmt": "biome format --write ."
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@oh-my-pi/pi-natives": "15.3.
|
|
34
|
+
"@oh-my-pi/pi-natives": "15.3.2",
|
|
35
35
|
"beautiful-mermaid": "^1.1.3",
|
|
36
36
|
"handlebars": "^4.7.9",
|
|
37
37
|
"winston": "^3.19.0",
|
package/src/stream.ts
CHANGED
|
@@ -262,7 +262,10 @@ function decodeSseLineBytes(line: Uint8Array, end: number): string {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
function flushSseEvent(state: SseEventState): ServerSentEvent | null {
|
|
265
|
-
if (state.event === null && state.data === null)
|
|
265
|
+
if (state.event === null && state.data === null) {
|
|
266
|
+
state.raw = [];
|
|
267
|
+
return null;
|
|
268
|
+
}
|
|
266
269
|
const event: ServerSentEvent = {
|
|
267
270
|
event: state.event,
|
|
268
271
|
data: state.data ?? "",
|