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

@fastify/aws-lambda

Package Overview
Dependencies
Maintainers
20
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/aws-lambda - npm Package Compare versions

Comparing version 3.5.0 to 4.0.0

4

index.js

@@ -40,3 +40,3 @@ 'use strict'

}
event.body = event.body || ''
// event.body = event.body || '' // do not magically default body to ''

@@ -83,3 +83,3 @@ const method = event.httpMethod || (event.requestContext && event.requestContext.http ? event.requestContext.http.method : undefined)

}
const payload = Buffer.from(event.body, event.isBase64Encoded ? 'base64' : 'utf8')
const payload = event.body !== null && event.body !== undefined ? Buffer.from(event.body, event.isBase64Encoded ? 'base64' : 'utf8') : event.body
// NOTE: API Gateway is not setting Content-Length header on requests even when they have a body

@@ -86,0 +86,0 @@ if (event.body && !headers['Content-Length'] && !headers['content-length']) headers['content-length'] = Buffer.byteLength(payload)

@@ -23,3 +23,3 @@ {

"type": "git",
"url": "git@github.com:fastify/aws-lambda-fastify.git"
"url": "git+ssh://git@github.com/fastify/aws-lambda-fastify.git"
},

@@ -30,3 +30,3 @@ "bugs": {

"license": "MIT",
"version": "3.5.0",
"version": "4.0.0",
"main": "index.js",

@@ -45,23 +45,23 @@ "type": "commonjs",

"devDependencies": {
"@fastify/multipart": "8.0.0",
"@fastify/pre-commit": "^2.0.2",
"@types/aws-lambda": "8.10.126",
"@fastify/multipart": "8.1.0",
"@fastify/pre-commit": "^2.1.0",
"@types/aws-lambda": "8.10.131",
"aws-lambda": "^1.0.7",
"aws-serverless-express": "^3.4.0",
"aws-serverless-fastify": "^3.0.4",
"aws-serverless-fastify": "^3.0.6",
"benchmark": "^2.1.4",
"eslint": "^8.52.0",
"eslint": "^8.56.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",
"fastify": "^4.24.3",
"fastify": "^4.25.2",
"serverless-http": "^3.2.0",
"tap": "^16.3.9",
"tsd": "^0.29.0"
"tsd": "^0.30.4"
},
"overrides": {
"aws-serverless-fastify": {
"fastify": "^4.24.3"
"fastify": "^4.25.2"
}

@@ -68,0 +68,0 @@ },

@@ -7,5 +7,5 @@ # Introduction

Inspired by the AWSLABS [aws-serverless-express](https://github.com/awslabs/aws-serverless-express) library tailor made for the [Fastify](https://www.fastify.io/) web framework.
Inspired by the AWSLABS [aws-serverless-express](https://github.com/awslabs/aws-serverless-express) library tailor made for the [Fastify](https://fastify.dev/) web framework.
**No use of internal sockets, makes use of Fastify's [inject](https://www.fastify.io/docs/latest/Guides/Testing/#testing-with-http-injection) function.**
**No use of internal sockets, makes use of Fastify's [inject](https://fastify.dev/docs/latest/Guides/Testing/#testing-with-http-injection) function.**

@@ -114,3 +114,3 @@ **Seems [faster](https://github.com/fastify/aws-lambda-fastify#some-basic-performance-metrics)** *(as the name implies)* **than [aws-serverless-express](https://github.com/awslabs/aws-serverless-express) and [aws-serverless-fastify](https://github.com/benMain/aws-serverless-fastify) 😉**

We can use this by calling the [`fastify.ready()`](https://www.fastify.io/docs/latest/Reference/Server/#ready) function outside of the Lambda handler function, like this:
We can use this by calling the [`fastify.ready()`](https://fastify.dev/docs/latest/Reference/Server/#ready) function outside of the Lambda handler function, like this:

@@ -117,0 +117,0 @@ ```js

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