@codegenie/serverless-express
Advanced tools
Comparing version
{ | ||
"name": "@codegenie/serverless-express", | ||
"version": "4.16.1", | ||
"version": "4.17.0", | ||
"description": "This library enables you to utilize AWS Lambda and Amazon API Gateway to respond to web and API requests using your existing Node.js application framework.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -147,3 +147,3 @@ | ||
1. Promise resolution mode by default. Can specify `resolutionMode` to use `"CONTEXT"` or `"CALLBACK"` | ||
1. Additional event sources - API Gateway V1 (REST API), API Gateway V2 (HTTP API), ALB, Lambda@Edge | ||
1. Additional event sources - API Gateway V1 (REST API), API Gateway V2 (HTTP API), ALB, Lambda@Edge, VPC Lattice | ||
1. Custom event source - If you have another event source you'd like to use that we don't natively support, check out the [DynamoDB Example](examples/custom-mapper-dynamodb) | ||
@@ -205,3 +205,3 @@ 1. Implementation uses mock Request/Response objects instead of running a server listening on a local socket. Thanks to @dougmoscrop from https://github.com/dougmoscrop/serverless-http | ||
serverless-express natively supports API Gateway, ALB, and Lambda@Edge. If you want to use Express with other AWS Services integrated with Lambda you can provide your own custom request/response mappings via `eventSource`. See the [custom-mapper-dynamodb example](examples/custom-mapper-dynamodb). | ||
serverless-express natively supports API Gateway, ALB, Lambda@Edge and VPC Lattice (only V2 events - event source `AWS_VPC_LATTICE_V2`). If you want to use Express with other AWS Services integrated with Lambda you can provide your own custom request/response mappings via `eventSource`. See the [custom-mapper-dynamodb example](examples/custom-mapper-dynamodb). | ||
@@ -208,0 +208,0 @@ ```js |
@@ -15,2 +15,3 @@ const awsApiGatewayV1EventSource = require('./aws/api-gateway-v1') | ||
const awsSelfManagedKafkaEventSource = require('./aws/self-managed-kafka') | ||
const awsLatticeEventSource = require('./aws/lattice') | ||
@@ -47,2 +48,4 @@ function getEventSource ({ eventSourceName }) { | ||
return awsSelfManagedKafkaEventSource | ||
case 'AWS_VPC_LATTICE_V2': | ||
return awsLatticeEventSource | ||
default: | ||
@@ -49,0 +52,0 @@ throw new Error('Couldn\'t detect valid event source.') |
@@ -74,2 +74,6 @@ const url = require('url') | ||
if (event.requestContext && event.requestContext.elb) return 'AWS_ALB' | ||
if (event.headers?.['x-amzn-lattice-network']) { | ||
console.warn('Lattice event v1 is not supported. Please use Lattice event v2.') | ||
} | ||
if (event.requestContext && event.requestContext.serviceNetworkArn && event.requestContext.serviceArn) return 'AWS_VPC_LATTICE_V2' | ||
if (event.eventSource === 'SelfManagedKafka') return 'AWS_SELF_MANAGED_KAFKA' | ||
@@ -76,0 +80,0 @@ if (event.Records) { |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
73571
1.88%44
2.33%1437
2.57%