New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-zod-api

Package Overview
Dependencies
Maintainers
1
Versions
432
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-zod-api - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

### v2.5.1
- Fixed a bug due to which the execution of the code could continue despite the possible closing of the response
stream by one of the middlewares.
- Affected Node versions: below 12.9.0.
### v2.5.0

@@ -7,0 +13,0 @@

8

dist/endpoint.js

@@ -125,2 +125,3 @@ "use strict";

const options = {};
let isStreamClosed = false;
for (const def of this.middlewares) {

@@ -132,7 +133,10 @@ input = { ...input, ...def.input.parse(input) }; // middleware can transform the input types

}));
if (response.writableEnded) {
isStreamClosed = ('writableEnded' in response && response.writableEnded) ||
('finished' in response && response.finished); // Node v10 and below
if (isStreamClosed) {
logger.warn(`The middleware ${def.middleware.name} has closed the stream. Accumulated options:`, options);
break;
}
}
return { input, options, isStreamClosed: response.writableEnded };
return { input, options, isStreamClosed };
}, _Endpoint_parseAndRunHandler = async function _Endpoint_parseAndRunHandler({ input, options, logger }) {

@@ -139,0 +143,0 @@ return await this.handler({

{
"name": "express-zod-api",
"version": "2.5.0",
"version": "2.5.1",
"description": "A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc