@middy/http-event-normalizer
Advanced tools
Comparing version 5.0.0-rc.0 to 5.0.0
13
index.js
@@ -5,10 +5,2 @@ const httpEventNormalizerMiddleware = ()=>{ | ||
const version = pickVersion(event); | ||
const isHttpEvent = isVersionHttpEvent[version]?.(event); | ||
if (!isHttpEvent) { | ||
throw new Error('Unknown http event format', { | ||
cause: { | ||
package: '@middy/http-event-normalizer' | ||
} | ||
}); | ||
} | ||
// VPC Lattice is an http event, however uses a different notation | ||
@@ -35,8 +27,3 @@ // - query_string_parameters | ||
}; | ||
const isVersionHttpEvent = { | ||
'1.0': (event)=>typeof event.httpMethod !== 'undefined', | ||
'2.0': (event)=>typeof event.requestContext.http.method !== 'undefined', | ||
vpc: (event)=>typeof event.method !== 'undefined' | ||
}; | ||
export default httpEventNormalizerMiddleware; | ||
{ | ||
"name": "@middy/http-event-normalizer", | ||
"version": "5.0.0-rc.0", | ||
"version": "5.0.0", | ||
"description": "Http event normalizer middleware for the middy framework", | ||
@@ -62,7 +62,7 @@ "type": "module", | ||
}, | ||
"gitHead": "403c54ba9f05e038d1ee7541f9e4a7a6d46e9916", | ||
"gitHead": "3e7e1c9b5ebb7e9448473a11ab4fb69ef0cc46a1", | ||
"devDependencies": { | ||
"@middy/core": "5.0.0-rc.0", | ||
"@middy/core": "5.0.0", | ||
"@types/aws-lambda": "^8.10.101" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
7253
41