Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@middy/core

Package Overview
Dependencies
Maintainers
3
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/core - npm Package Compare versions

Comparing version 4.0.10 to 4.1.0

7

index.js

@@ -76,2 +76,3 @@ import { setTimeout } from 'node:timers/promises';

const runRequest = async (request, beforeMiddlewares, lambdaHandler, afterMiddlewares, onErrorMiddlewares, plugin)=>{
let timeoutAbort;
const timeoutEarly = plugin.timeoutEarly && request.context.getRemainingTimeInMillis;

@@ -83,3 +84,2 @@ try {

const handlerAbort = new AbortController();
let timeoutAbort;
if (timeoutEarly) timeoutAbort = new AbortController();

@@ -90,3 +90,3 @@ request.response = await Promise.race([

}),
timeoutEarly ? setTimeout(request.context.getRemainingTimeInMillis() - plugin.timeoutEarlyInMillis, {
timeoutEarly ? setTimeout(request.context.getRemainingTimeInMillis() - plugin.timeoutEarlyInMillis, undefined, {
signal: timeoutAbort.signal

@@ -98,3 +98,3 @@ }).then(()=>{

]);
if (timeoutEarly) timeoutAbort.abort();
timeoutAbort?.abort();
plugin.afterHandler?.();

@@ -104,2 +104,3 @@ await runMiddlewares(request, afterMiddlewares, plugin);

} catch (e1) {
timeoutAbort?.abort();
request.response = undefined;

@@ -106,0 +107,0 @@ request.error = e1;

{
"name": "@middy/core",
"version": "4.0.10",
"version": "4.1.0",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)",

@@ -64,3 +64,3 @@ "type": "module",

},
"gitHead": "e2a97d380fc4150781004092ea054f5d0fc7a8c0"
"gitHead": "c5abbac9280c3a2f30758188233a7b27367901d1"
}

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