Skip to content

Releases: Albert-Gao/micro-aws-lambda

v5.3.3

30 Jun 08:42
Compare
Choose a tag to compare

feat: console.log error to provide error info in CloudWatch

v5.3.2

26 Jun 03:37
Compare
Choose a tag to compare
  • Now JS error will be returned as 500 response

v5.2.2

13 Jun 03:37
Compare
Choose a tag to compare

fix: now log config will not throw on HTTP API
tweak: minor tweaked internal implementation

v5.2.0

10 Jun 22:54
Compare
Choose a tag to compare
  • 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:
    • success is not directly exported now, please use HttpResponse. success
    • badRequest is not directly exported now, please use HttpResponse. badRequest
    • httpError is not directly exported now, please use HttpResponse.error
    • internalError is not directly exported now, please use HttpResponse. internalError

v5.1.5

07 Jun 12:25
Compare
Choose a tag to compare
  • feat: added unauthorized() and notFound()
  • Either HttpResponse.unauthorized() or import unauthorized directly

v5.1.2

07 Jun 11:17
Compare
Choose a tag to compare
  • 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

07 Jun 06:34
Compare
Choose a tag to compare
  • Swapped the Shared and Response in the Middleware type, so if you do not want to type check Response, no need to pass any
  • Updated the Middleware to APIGatewayProxyHandlerV2 from @types/aws-lambda, If you are using the Lambda Proxy mode, please import MiddlewareLegacy, otherwise,

v5.0.1

06 Jun 13:20
Compare
Choose a tag to compare

fixed: Typescript error
tweaked: HttpResponse.httpError is now HttpResponse.error
doc: updated Readme.md

BREAKING CHANGE

06 Jun 09:40
Compare
Choose a tag to compare
  • passDownObj has renamed to shared
  • return in a middleware STOPS the execution now, like throw, makes the flow easier to reason about!
  • all http helpers can be used under HttpResponse, just import this one alone

v4.0.3

13 May 00:00
Compare
Choose a tag to compare
  • chore: npm audit 32938fd
  • fix: lack of parameter in the README.md c17436d
  • chore: added test for throwing response 96c8aea
  • chore: updated README.md b2935b5

v4.0.1...v4.0.3