@mcma/aws-api-gateway
Advanced tools
Comparing version 0.9.0 to 0.9.1
import { McmaApiRouteCollection } from "@mcma/api"; | ||
import { APIGatewayEvent, Context } from "aws-lambda"; | ||
import { LoggerProvider } from "@mcma/core"; | ||
export declare class ApiGatewayApiController { | ||
private loggerProvider?; | ||
private mcmaApiController; | ||
constructor(routes: McmaApiRouteCollection); | ||
constructor(routes: McmaApiRouteCollection, loggerProvider?: LoggerProvider); | ||
handleRequest(event: APIGatewayEvent, context: Context): Promise<{ | ||
@@ -7,0 +9,0 @@ statusCode: number; |
@@ -5,3 +5,4 @@ "use strict"; | ||
class ApiGatewayApiController { | ||
constructor(routes) { | ||
constructor(routes, loggerProvider) { | ||
this.loggerProvider = loggerProvider; | ||
this.mcmaApiController = new api_1.McmaApiController(routes); | ||
@@ -11,2 +12,3 @@ } | ||
const requestContext = new api_1.McmaApiRequestContext(new api_1.McmaApiRequest({ | ||
id: context.awsRequestId, | ||
path: event.path, | ||
@@ -18,3 +20,3 @@ httpMethod: event.httpMethod, | ||
body: event.body | ||
}), event.stageVariables); | ||
}), event.stageVariables, this.loggerProvider); | ||
await this.mcmaApiController.handleRequest(requestContext); | ||
@@ -21,0 +23,0 @@ return { |
{ | ||
"name": "@mcma/aws-api-gateway", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Node module with code for using AWS's API Gateway as an entry point to an MCMA API handler.", | ||
@@ -37,12 +37,12 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/client": "0.9.0", | ||
"@mcma/core": "0.9.0", | ||
"@mcma/data": "0.9.0", | ||
"@mcma/api": "0.9.0" | ||
"@mcma/client": "0.9.1", | ||
"@mcma/core": "0.9.1", | ||
"@mcma/data": "0.9.1", | ||
"@mcma/api": "0.9.1" | ||
}, | ||
"devDependencies": { | ||
"@mcma/api": "0.9.0", | ||
"@mcma/client": "0.9.0", | ||
"@mcma/core": "0.9.0", | ||
"@mcma/data": "0.9.0", | ||
"@mcma/api": "0.9.1", | ||
"@mcma/client": "0.9.1", | ||
"@mcma/core": "0.9.1", | ||
"@mcma/data": "0.9.1", | ||
"@types/aws-lambda": "^8.10.44", | ||
@@ -49,0 +49,0 @@ "@types/node": "^13.7.6", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3552
56