@middy/ws-router 5.0.2 → 5.0.3

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.
Files changed (2) hide show
  1. package/index.js +0 -3
  2. 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.2",
3
+ "version": "5.0.3",
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.2"
63
+ "@middy/util": "5.0.3"
64
64
  },
65
65
  "devDependencies": {
66
- "@middy/core": "5.0.2",
66
+ "@middy/core": "5.0.3",
67
67
  "@types/aws-lambda": "^8.10.100"
68
68
  },
69
- "gitHead": "6d17e155237022f2a0abd095ac7cd99ebfc7fc71"
69
+ "gitHead": "87660575a7ac2b52e4153c407a4c63c9449dcd0d"
70
70
  }