@middy/ws-router 3.1.1 → 3.2.2
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 +7 -5
- package/package.json +4 -4
package/index.cjs
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
module
|
|
6
|
-
|
|
5
|
+
Object.defineProperty(module, "exports", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>_default
|
|
8
|
+
});
|
|
9
|
+
const _util = require("@middy/util");
|
|
7
10
|
const wsRouteHandler = (routes)=>{
|
|
8
11
|
const routesStatic = {};
|
|
9
12
|
for (const route of routes){
|
|
@@ -19,11 +22,10 @@ const wsRouteHandler = (routes)=>{
|
|
|
19
22
|
if (typeof handler !== 'undefined') {
|
|
20
23
|
return handler(event, context, abort);
|
|
21
24
|
}
|
|
22
|
-
throw (0, _util
|
|
25
|
+
throw (0, _util.createError)(404, 'Route does not exist');
|
|
23
26
|
};
|
|
24
27
|
};
|
|
25
|
-
|
|
26
|
-
module.exports = _default;
|
|
28
|
+
const _default = wsRouteHandler;
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
//# sourceMappingURL=index.cjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/ws-router",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "WebSocket event router for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
"homepage": "https://middy.js.org",
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@middy/util": "3.
|
|
65
|
+
"@middy/util": "3.2.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@middy/core": "3.
|
|
68
|
+
"@middy/core": "3.2.2",
|
|
69
69
|
"@types/aws-lambda": "^8.10.100"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "4c960a361cc8844f7b2e6202d9544c852366fb01"
|
|
72
72
|
}
|