@effect/rpc-http
Advanced tools
Comparing version 0.38.2 to 0.38.3
@@ -26,3 +26,3 @@ "use strict"; | ||
const request = Context.unsafeGet(context, ServerRequest.HttpServerRequest); | ||
return Effect.map(request.json, _ => ServerResponse.stream(handler(_).pipe(Stream.chunks, Stream.map(_ => JSON.stringify(Chunk.toArray(_))), Stream.intersperse("\n"), Stream.encodeText, Stream.provideContext(context)), { | ||
return Effect.map(request.json, _ => ServerResponse.stream(handler(_).pipe(Stream.chunks, Stream.map(_ => JSON.stringify(Chunk.toReadonlyArray(_)) + "\n"), Stream.encodeText, Stream.provideContext(context)), { | ||
contentType: "application/ndjson" | ||
@@ -29,0 +29,0 @@ })); |
@@ -18,3 +18,3 @@ import * as ServerRequest from "@effect/platform/HttpServerRequest"; | ||
const request = Context.unsafeGet(context, ServerRequest.HttpServerRequest); | ||
return Effect.map(request.json, _ => ServerResponse.stream(handler(_).pipe(Stream.chunks, Stream.map(_ => JSON.stringify(Chunk.toArray(_))), Stream.intersperse("\n"), Stream.encodeText, Stream.provideContext(context)), { | ||
return Effect.map(request.json, _ => ServerResponse.stream(handler(_).pipe(Stream.chunks, Stream.map(_ => JSON.stringify(Chunk.toReadonlyArray(_)) + "\n"), Stream.encodeText, Stream.provideContext(context)), { | ||
contentType: "application/ndjson" | ||
@@ -21,0 +21,0 @@ })); |
{ | ||
"name": "@effect/rpc-http", | ||
"version": "0.38.2", | ||
"version": "0.38.3", | ||
"description": "Functional programming in TypeScript", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -31,4 +31,3 @@ /** | ||
Stream.chunks, | ||
Stream.map((_) => JSON.stringify(Chunk.toArray(_))), | ||
Stream.intersperse("\n"), | ||
Stream.map((_) => JSON.stringify(Chunk.toReadonlyArray(_)) + "\n"), | ||
Stream.encodeText, | ||
@@ -35,0 +34,0 @@ Stream.provideContext(context) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
50197
503