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

@middy/warmup

Package Overview
Dependencies
Maintainers
3
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/warmup - npm Package Compare versions

Comparing version 5.0.0-alpha.1 to 5.0.0-alpha.2

34

index.js
const defaults = {
isWarmingUp: (event) => event.source === 'serverless-plugin-warmup'
}
isWarmingUp: (event)=>event.source === 'serverless-plugin-warmup'
};
const warmupMiddleware = (opt)=>{
const options = {
...defaults,
...opt
};
const warmupMiddlewareBefore = (request)=>{
if (options.isWarmingUp(request.event)) {
return 'warmup';
}
};
return {
before: warmupMiddlewareBefore
};
};
export default warmupMiddleware;
const warmupMiddleware = (opt) => {
const options = { ...defaults, ...opt }
const warmupMiddlewareBefore = (request) => {
if (options.isWarmingUp(request.event)) {
return 'warmup'
}
}
return {
before: warmupMiddlewareBefore
}
}
export default warmupMiddleware
{
"name": "@middy/warmup",
"version": "5.0.0-alpha.1",
"version": "5.0.0-alpha.2",
"description": "Warmup (cold start mitigation) middleware for the middy framework",

@@ -63,5 +63,5 @@ "type": "module",

"devDependencies": {
"@middy/core": "5.0.0-alpha.1"
"@middy/core": "5.0.0-alpha.2"
},
"gitHead": "ebce8d5df8783077fa49ba62ee9be20e8486a7f1"
}
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