@middy/http-router
Advanced tools
Comparing version 4.0.8 to 4.0.9
@@ -1,4 +0,5 @@ | ||
import middy from '@middy/core' | ||
import middy, { MiddyfiedHandler } from '@middy/core' | ||
import { | ||
ALBEvent, | ||
ALBResult, | ||
APIGatewayProxyEvent, | ||
@@ -20,6 +21,8 @@ APIGatewayProxyEventV2, | ||
type TResult = ALBResult | APIGatewayProxyResult | ||
export interface Route<TEvent> { | ||
method: Method | ||
path: string | ||
handler: LambdaHandler<TEvent, APIGatewayProxyResult> | ||
handler: LambdaHandler<TEvent, TResult> | MiddyfiedHandler<TEvent, TResult, any, any> | ||
} | ||
@@ -26,0 +29,0 @@ |
@@ -32,4 +32,5 @@ import { createError } from '@middy/util'; | ||
if (match) { | ||
event.pathParameters ??= { | ||
...match.groups | ||
event.pathParameters = { | ||
...match.groups, | ||
...event.pathParameters | ||
}; | ||
@@ -36,0 +37,0 @@ return route.handler(event, context, abort); |
{ | ||
"name": "@middy/http-router", | ||
"version": "4.0.8", | ||
"version": "4.0.9", | ||
"description": "HTTP event router for the middy framework", | ||
@@ -65,9 +65,9 @@ "type": "module", | ||
"dependencies": { | ||
"@middy/util": "4.0.8" | ||
"@middy/util": "4.0.9" | ||
}, | ||
"devDependencies": { | ||
"@middy/core": "4.0.8", | ||
"@middy/core": "4.0.9", | ||
"@types/aws-lambda": "^8.10.97" | ||
}, | ||
"gitHead": "e38d1c27d153f9d9c5bf5627fd1abf425fdf3978" | ||
"gitHead": "02210765f9154584c242e4440d086abcf3321028" | ||
} |
@@ -41,3 +41,3 @@ <div align="center"> | ||
Licensed under [MIT License](LICENSE). Copyright (c) 2017-2022 [Luciano Mammino](https://github.com/lmammino), [will Farrell](https://github.com/willfarrell), and the [Middy team](https://github.com/middyjs/middy/graphs/contributors). | ||
Licensed under [MIT License](LICENSE). Copyright (c) 2017-2023 [Luciano Mammino](https://github.com/lmammino), [will Farrell](https://github.com/willfarrell), and the [Middy team](https://github.com/middyjs/middy/graphs/contributors). | ||
@@ -44,0 +44,0 @@ <a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy?ref=badge_large"> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
12528
223
+ Added@middy/util@4.0.9(transitive)
- Removed@middy/util@4.0.8(transitive)
Updated@middy/util@4.0.9