Socket
Socket
Sign inDemoInstall

@middy/http-router

Package Overview
Dependencies
Maintainers
3
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/http-router - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0

9

index.js

@@ -0,1 +1,2 @@

var _event;
import { createError } from '@middy/util';

@@ -30,3 +31,5 @@ const httpRouteHandler = (routes)=>{

for (const route of routesDynamic[method] ?? []){
if (route.path.test(path)) {
const match = path.match(route.path);
if (match) {
(_event = event).pathParameters ?? (_event.pathParameters = match.groups);
return route.handler(event, context, abort);

@@ -39,3 +42,3 @@ }

const regexpDynamicWildcards = /\/\{proxy\+\}$/;
const regexpDynamicParameters = /\/\{[^/]+\}/g;
const regexpDynamicParameters = /\/\{([^/]+)\}/g;
const methods = [

@@ -72,3 +75,3 @@ 'GET',

}
path = path.replace(regexpDynamicWildcards, '/?.*').replace(regexpDynamicParameters, '/[^/]+');
path = path.replace(regexpDynamicWildcards, '/?(.*)').replace(regexpDynamicParameters, '/(?<$1>[^/]+)');
path = new RegExp(`^${path}/?$`);

@@ -75,0 +78,0 @@ routesType[method].push({

{
"name": "@middy/http-router",
"version": "3.5.0",
"version": "3.6.0",
"description": "HTTP event router for the middy framework",

@@ -65,9 +65,9 @@ "type": "module",

"dependencies": {
"@middy/util": "3.5.0"
"@middy/util": "3.6.0"
},
"devDependencies": {
"@middy/core": "3.5.0",
"@middy/core": "3.6.0",
"@types/aws-lambda": "^8.10.97"
},
"gitHead": "61d1bb405d23702dd8ee83b65d8b98bef7acaeeb"
"gitHead": "f45a017c3052f7c238eea88b98fee18a816dd317"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc