Releases: Albert-Gao/micro-aws-lambda
Releases · Albert-Gao/micro-aws-lambda
Release list
v5.5.0
What's Changed
- Rebuild dependency baseline by @Albert-Gao in #15
- Modernize tests by @Albert-Gao in #14
- Replace TSDX build by @Albert-Gao in #23
- Fix public type API inconsistencies by @Albert-Gao in #22
- Harden response and error handling by @Albert-Gao in #17
- Clean up trace and logging by @Albert-Gao in #21
- Improve package metadata by @Albert-Gao in #20
- Refresh CI and release flow by @Albert-Gao in #19
- Rewrite and verify documentation by @Albert-Gao in #18
- Add maintenance automation by @Albert-Gao in #13
- Plan versioning and compatibility by @Albert-Gao in #16
- Remove push trigger from CI by @Albert-Gao in #27
New Contributors
- @Albert-Gao made their first contribution in #15
Full Changelog: v5.3.3...v5.5.0
v5.3.3
feat: console.log error to provide error info in CloudWatch
v5.3.2
- Now JS error will be returned as 500 response
v5.2.2
fix: now log config will not throw on HTTP API
tweak: minor tweaked internal implementation
v5.2.0
- Added:
HttpResponse.error()HttpResponse.badRequest()HttpResponse.unauthorized()HttpResponse.forbidden()HttpResponse.notFound()HttpResponse.methodNotAllowed()HttpResponse.notAcceptable()HttpResponse.conflict()HttpResponse.internalError()HttpResponse.notImplemented()HttpResponse.badGateway()HttpResponse.serviceUnavailable()HttpResponse.gatewayTimeout()HttpResponse.networkAuthenticationRequire()
- Removed:
successis not directly exported now, please useHttpResponse. successbadRequestis not directly exported now, please useHttpResponse. badRequesthttpErroris not directly exported now, please useHttpResponse.errorinternalErroris not directly exported now, please useHttpResponse. internalError
v5.1.5
- feat: added
unauthorized()andnotFound() - Either
HttpResponse.unauthorized()or importunauthorizeddirectly
v5.1.2
- feat: make success(), badRequest() and interError() more easier to call
now you can just success({name: 'albert'}), a HTTP 200 with HTTP body {name:'albert'} will be returned
If you want to change the statusCode and headers, you can add an 2nd parameter when invoking like:
success({name:'albert'}, {statusCode: 201, headers: { hidden: 1 }})
v5.1.0
- Swapped the
SharedandResponsein theMiddlewaretype, so if you do not want to type check Response, no need to passany - Updated the Middleware to
APIGatewayProxyHandlerV2from@types/aws-lambda, If you are using the Lambda Proxy mode, please importMiddlewareLegacy, otherwise,
v5.0.1
fixed: Typescript error
tweaked: HttpResponse.httpError is now HttpResponse.error
doc: updated Readme.md
BREAKING CHANGE
passDownObjhas renamed tosharedreturnin a middleware STOPS the execution now, likethrow, makes the flow easier to reason about!- all http helpers can be used under
HttpResponse, just import this one alone