@middy/http-router 3.6.2 → 4.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -2
- package/index.js +1 -2
- package/package.json +5 -5
package/index.cjs
CHANGED
|
@@ -7,7 +7,6 @@ Object.defineProperty(module, "exports", {
|
|
|
7
7
|
get: ()=>_default
|
|
8
8
|
});
|
|
9
9
|
const _util = require("@middy/util");
|
|
10
|
-
var _event;
|
|
11
10
|
const httpRouteHandler = (routes)=>{
|
|
12
11
|
const routesStatic = {};
|
|
13
12
|
const routesDynamic = {};
|
|
@@ -38,7 +37,7 @@ const httpRouteHandler = (routes)=>{
|
|
|
38
37
|
for (const route of routesDynamic[method] ?? []){
|
|
39
38
|
const match = path.match(route.path);
|
|
40
39
|
if (match) {
|
|
41
|
-
|
|
40
|
+
event.pathParameters ??= match.groups;
|
|
42
41
|
return route.handler(event, context, abort);
|
|
43
42
|
}
|
|
44
43
|
}
|
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _event;
|
|
2
1
|
import { createError } from '@middy/util';
|
|
3
2
|
const httpRouteHandler = (routes)=>{
|
|
4
3
|
const routesStatic = {};
|
|
@@ -30,7 +29,7 @@ const httpRouteHandler = (routes)=>{
|
|
|
30
29
|
for (const route of routesDynamic[method] ?? []){
|
|
31
30
|
const match = path.match(route.path);
|
|
32
31
|
if (match) {
|
|
33
|
-
|
|
32
|
+
event.pathParameters ??= match.groups;
|
|
34
33
|
return route.handler(event, context, abort);
|
|
35
34
|
}
|
|
36
35
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/http-router",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.1",
|
|
4
4
|
"description": "HTTP event router for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=16"
|
|
8
8
|
},
|
|
9
9
|
"engineStrict": true,
|
|
10
10
|
"publishConfig": {
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
"homepage": "https://middy.js.org",
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@middy/util": "
|
|
65
|
+
"@middy/util": "4.0.0-alpha.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@middy/core": "
|
|
68
|
+
"@middy/core": "4.0.0-alpha.1",
|
|
69
69
|
"@types/aws-lambda": "^8.10.97"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "b531f61dac3a5268728a21fc4b2b32054b170f88"
|
|
72
72
|
}
|