Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@http4t/bidi
Advanced tools
NB: This is nowhere near production ready at time of writing.
I should be able to define a route at GET /widgets/{id}
and use that route to both:
HttpHandler
By sharing the routes between client and server I avoid bugs with my client sending the wrong shaped requests to my server.
If I have a route GET /widgets/{widgetId}
that returns a json-serialised response body containing a Widget
,
I want to be able to give my server a handler function that knows nothing about http, like:
(args: {widgetId: string}) => Promise<Widget>
...and have the server destructure the request into that shape and then serialise
the function result into an HttpResponse
.
On the client side, I want to be able to generate a function with the same signature
that takes care of serialising to an HttpRequest
, sending to an HttpHandler
, then
deserialising from HttpResponse
.
See client.test.ts for an example of a complete round trip from client to server and back.
FAQs
NB: This is nowhere near production ready at time of writing.
The npm package @http4t/bidi receives a total of 71 weekly downloads. As such, @http4t/bidi popularity was classified as not popular.
We found that @http4t/bidi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.