Skip to content

Commit

Permalink
Try different streaming strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Wundero committed Dec 4, 2024
1 parent d1540e5 commit c13817d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/jsr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sinkr/core",
"license": "MIT",
"version": "0.3.4",
"version": "0.3.5",
"exports": {
".": "./src/index.ts"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sinkr/core",
"version": "0.3.4",
"version": "0.3.5",
"type": "module",
"main": "src/index.ts",
"exports": {
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ function preludeAndEncodeStream(
) {
const reader = stream.getReader();
const morphedUnencodedStream = new ReadableStream<unknown>({
start(controller) {
async start(controller) {
controller.enqueue(prelude);
},
async pull(controller) {
try {
const { done, value } = await reader.read();
if (done) {
Expand Down

0 comments on commit c13817d

Please sign in to comment.