@middy/ws-router 5.0.2 → 5.1.0
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.js +0 -3
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -3,7 +3,6 @@ const wsRouteHandler = (routes)=>{
|
|
|
3
3
|
const routesStatic = {};
|
|
4
4
|
for (const route of routes){
|
|
5
5
|
const { routeKey, handler } = route;
|
|
6
|
-
// Static
|
|
7
6
|
routesStatic[routeKey] = handler;
|
|
8
7
|
}
|
|
9
8
|
return (event, context, abort)=>{
|
|
@@ -15,12 +14,10 @@ const wsRouteHandler = (routes)=>{
|
|
|
15
14
|
}
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
|
-
// Static
|
|
19
17
|
const handler = routesStatic[routeKey];
|
|
20
18
|
if (typeof handler !== 'undefined') {
|
|
21
19
|
return handler(event, context, abort);
|
|
22
20
|
}
|
|
23
|
-
// Not Found
|
|
24
21
|
throw createError(404, 'Route does not exist', {
|
|
25
22
|
cause: {
|
|
26
23
|
package: '@middy/ws-router',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/ws-router",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "WebSocket event router for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"url": "https://github.com/sponsors/willfarrell"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@middy/util": "5.0
|
|
63
|
+
"@middy/util": "5.1.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@middy/core": "5.0
|
|
66
|
+
"@middy/core": "5.1.0",
|
|
67
67
|
"@types/aws-lambda": "^8.10.100"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "bbdaf5843914921804ba085dd58117273febe6b5"
|
|
70
70
|
}
|