Repository navigation
@effect/platform-deno@4.0.6
Patch Changes
-
#9704
47487bfThanks @tim-smart! - AddBunHttpClient.layerOptionsandDenoHttpClient.layerOptionsfor typed Unix socket and TLS settings using each runtime's native fetch options.DenoHttpClient.makeClientacquires a scopedDeno.HttpClient. The Bun and Deno Kubernetes HTTP client layers now use these helpers instead of casts. -
#9414
ba4e07dThanks @fubhy! - FixDenoHttpServerleaving requests unanswered when the webResponsecan't be built, such as for a rejected status or invalid header value. It now responds with a 500, cancels the unused body and reports the original failure. -
#9702
8d05e28Thanks @effect-bot! - Require Deno 2.9.3 or newer. Deno 2.8.3 to 2.9.2 panic and exit when an HTTP/2 client cancels a request while itsDenoHttpServerhandler is still running (denoland/deno#36053), which browsers do when a tab closes or navigates away mid-request. -
#9597
a301f5dThanks @effect-bot! - KeepDenoRuntime.runMainsignal listeners installed until the main fiber exits, so repeatedSIGINTorSIGTERMsignals no longer skip shutdown finalizers. -
#9557
9ae671aThanks @tim-smart! - Fix request scope leaks when Bun or Deno streaming response bodies are cancelled before their first pull. -
#9575
c29ddd8Thanks @tim-smart! - Add streaming request payloads toHttpApi. An endpoint can declareHttpApiSchema.StreamUint8Arrayor the newHttpApiSchema.StreamNdjson({ schema })as itspayload, and the handler receives a lazyStreamthat reads the body as it pulls. Bad NDJSON lines fail the stream withHttpApiSchemaError(400). The newmaxBytesandmaxElementByteslimits fail it with the newHttpApiPayloadTooLarge(413), and acontent-lengthovermaxBytesis rejected before the handler runs.StreamNdjsonalso works as a success response.HttpApiClientsends aStreampayload without buffering it and infers the stream's requirements.HttpApiTestpasses stream payloads through unbuffered.OpenApi.fromApimarks streaming request bodies withx-effect-stream, andopenapi-generatormaps them, and NDJSON or JSON Lines bodies with anitemSchema, back toStreamUint8ArrayandStreamNdjson.The Node server drains up to 256 KiB of a body the handler left unread, then closes the connection, instead of reading the whole upload or leaving the socket stuck.
-
#9339
9a680d6Thanks @fubhy! - Add raw HTTP/1.1 upgrades throughHttpClientRequest.upgrade,HttpClientResponse.upgrade, the Node HTTP server, andHttpApiSchema.Upgrade. Node clients expose the upgraded connection as aSocket; HttpApi clients return{ headers, socket }and OpenAPI documents the 101 response.Custom
HttpClientResponseimplementations must addupgrade. Fetch and XMLHttpRequest reject upgrade requests with aTransportErrorbefore anything is sent; Bun and Deno servers still support only WebSocket upgrades. -
#9417
7f823c1Thanks @fubhy! - Fix HTTP response framing: omit bodies for 204, 205 and 304, and removecontent-lengthfor 204 and 205. Node now aborts responses whose bodies do not matchcontent-length. Deno and Bun preserve raw WebResponseobjects when merging headers, and Deno preserves their status and headers for HEAD requests. -
#9416
4d003f9Thanks @fubhy! - Return501 Not Implementedfor unsupportedCONNECTrequests inDenoHttpServerandBunHttpServerwithout invoking the application. -
#9375
5a2d19fThanks @fubhy! - Use HTTP/2 authority for the exposedhostheader and request URL, even when Host is missing or conflicting. In Deno, also use the target authority for HTTP/1.1 absolute-form requests. -
#9283
f30db15Thanks @okarin1511! - ClassifyEPERMerrors asPermissionDeniedinstead ofUnknownin Node and Deno platform error handlers. -
#6428
b334ccfThanks @coyaSONG! - AddFileSystem.lstat, which returns theFile.Infoof a path without following symbolic links. CustomFileSystemimplementations, including those passed toFileSystem.make, must now providelstat. -
#9701
e618f10Thanks @effect-bot! - Require an explicit trusted proxy policy before applying forwarded headers.HttpMiddleware.xForwardedHeadersnow takes{ trustedProxies }and only appliesX-Forwarded-*headers when the connecting peer is trusted.X-Forwarded-Foris read from the right, skipping trusted proxies, andX-Forwarded-Host/X-Forwarded-Protoare only used when they line up with it.HttpServerRequest.toURLno longer readsx-forwarded-protodirectly. It uses the newrequest.protocol, set by the trusted proxy middleware, before the transport scheme. The connecting peer stays available asrequest.peerAddress.import { HttpMiddleware } from "effect/http" import { IpNetwork } from "effect/net" // before HttpMiddleware.xForwardedHeaders // after HttpMiddleware.xForwardedHeaders({ trustedProxies: [IpNetwork.fromStringUnsafe("10.0.0.0/8")] })
-
#9280
da91aaeThanks @okarin1511! - Keep the thrown error as the cause when a Browser or Deno worker runner receives anerrorevent, and fix the grammar of themessageerrorfailure message. -
Updated dependencies [
ce13a48,f3bbbb4,5547315,6093cfb,30319d5,74a7596,bfb32a3,f8bf7f4,7f3d3df,db1046d,3c4f88a,916e709,916f843,66ec757,daac06f,c2552ec,b02c1cd,1855f1d,683ed2c,ac68940,22a8401,c53c194,ca6d1cc,47940c5,e8b24ef,2e8aae0,ad7497b,7f504a3,99e365d,954067d,3e1a035,41a1fe7,bcb3a86,739d3d1,ed4da35,3d84e19,cc00906,09ba1f5,9ff1a73,06bc532,97bfd84,25efaef,c10335b,a808972,20e844c,b9f73f3,5739878,28acdf3,59b6396,0bccc9c,fed70de,82648a2,afb5f32,28813f5,0fae934,f260830,19b63eb,14db221,679f956,b72707c,44c8c1d,1e7909b,0611a65,2fadc65,feb6ce5,5a2ed53,c8d26a4,0c8b446,05c3409,b04191b,05c3409,4067e64,e04563d,02d7fc5,561d2a1,8fe2dcc,a8086fa,88a33b4,e77372a,3dd4388,ba2b00c,a049d4a,84aeede,43e5e19,77bbf16,6af3a47,aac8d21,84c8dc4,78d1988,5676a2a,4b437bf,1af11fd,716f8df,ee27718,4d86d1b,5462ed7,658837c,00261cc,7cccb93,7c98228,5a8e248,8037a65,25912db,7f32606,0386f88,403298a,d1201f0,5a3ebc0,fac2191,fdb12dc,97909b8,c3983f4,3a5e65e,8b40fbc,3f3e119,7c7b8ed,d4f71bc,c66241e,f0e941e,5f8a6e5,2800a09,e9749b0,eaef09c,a3c56e5,bb61152,e9c842b,6d8c8e2,1f28187,0b9842b,c29ddd8,84c3405,3934c0c,048e7c8,1121334,9a680d6,85e2aee,34ec440,343a149,915117b,7f823c1,6e614e6,9990b39,22bf781,41f08b7,e8482ca,5ae85fa,c477a0a,8fbb39e,1c70828,8207d1e,7886b84,4839c60,2595d83,f5ae278,7a8ce00,688d302,c7072e4,425cedb,88bc680,268e09c,7e94505,afa5da3,c29ddd8,f30db15,a299341,6250d31,28b2931,ae9628d,48102ac,463eca3,e7162ea,95752db,4577a28,973d599,2f066a5,f0ccbb6,2dda6ce,3da7c0a,5a67e0b,73b3a6e,c6f9e4c,be02676,26de861,9313799,d5c1e5b,11bb31f,8c23e46,9c96011,0d50570,9ed2bf1,76ec912,af2756d,3ec8100,93abf02,1e94993,99a4616,0a7978e,b4a060b,274f4a4,25f29be,9036440,415f005,191308b,4b96570,d84ec3f,392aa1c,99e9bd9,6f6f45f,13fc07e,a4b38dd,8b18580,0c477fe,9a5331d,a706d73,c9a1e72,89eaaf8,8215811,ad69018,a733eba,7282d5f,da33572,d9e2d12,dc923b8,1b74086,8a5507b,23460fa,0dbbea6,70aad3f,0909236,a9e66d8,ee5c0d5,631c5d6,7e60c1a,4cddd3c,8727e5d,2bc97fa,f9a7f05,d978cca,b334ccf,0b50cfc,5b7d2b5,6ee26b1,eab7e6a,e618f10,da14b1f,3314fc3,66db624,41cf29b,4b8a50d,8d52668,1de1055,db130e6,5fa5fa5]:- effect@4.0.6
- @effect/platform-node-shared@4.0.6