Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Releases: exoego/aws-lambda-scalajs-facade

v0.12.1 🌈

04 Mar 04:19
0601090
Compare
Choose a tag to compare

Hilight

  • Scala 3 support
  • ***Handlers are now plain js.Function

See v0.12.0 release note for detail
Sorry, v0.12.0 is canceled due to failure of release 😅

🧰 Maintenance

v0.12.0 🌈

18 Jan 07:32
5eef179
Compare
Choose a tag to compare

Release of v0.12.0 FAILED

Please use v0.12.1 or above instead.

Hilight

Scala 3 support

This facade now leverages Scala 3's union type and literal types to encode "enum"s.
E.g.)

type CognitoUserPoolChallengeName =
    "PASSWORD_VERIFIER" | "SMS_MFA" | "DEVICE_SRP_AUTH" | "DEVICE_PASSWORD_VERIFIER" | "ADMIN_NO_SRP_AUTH" | "SRP_A"

~Handlers are now plain js.Function

Previously, all ~Handler types were js.Object which is can not be directly used as AWS Lambda handler.
Now you can use ~Handler straightforward like below)

import scala.concurrent.{ExecutionContext, Future}
import scala.scalajs.js
import scala.scalajs.js.JSConverters._
import scala.scalajs.js.annotation._
import net.exoego.facade.aws_lambda._

object Main {
  @JSExportTopLevel("handler")
  val handler: AsyncAPIGatewayProxyHandler = (event, context) => {
    val json = js.JSON.stringify(event)
    js.Dynamic.global.console.log(json)

    implicit val ec = ExecutionContext.global
    handle(event).toJSPromise
  }

  private def handle(event: APIGatewayProxyEvent)(implicit ec: ExecutionContext): Future[APIGatewayProxyResult] = Future {
    APIGatewayProxyResult(
      statusCode = 200,
      body = "hello " + event.body,
      headers = js.defined(js.Dictionary("Content-Type" -> "text/plain"))
    )
  }
}

🚀 Features

  • [sqs] Allow (Async)SQSHandler returning SQSBatchResponse @exoego (#303)
  • [ses] improve typing @exoego (#214)
  • [ses] Add DmarcPolicy @exoego (#302)
  • [msk] Add MSK event handler @exoego (#193)
  • [lex] Limit number of elements in LexSlotDetail resolutions @exoego (#218)
  • [kinesis] Add sourceKinesisStreamArn & metadata @exoego (#305)
  • [iot] Add IoT PreProvisioningHook @exoego (#221)
  • [cognito] Add custom email sender @exoego (#309)
  • [cloudfront] Add CloudFrontFunctionsEvent @exoego (#311)
  • [appsync] Update AppSyncResolverEvent @exoego (#238)
  • [appsync] Add AppSyncIdentityOIDC, AppSyncIdentityLambda, AppSyncAuthorizerEvent @exoego (#312)
  • [appsync] Add AppSync Resolver event handler @exoego (#198)
  • [apigw] Generalize API GW Proxy Event @exoego (#300)
  • Switch to scalajs-dynamodb-shared @exoego (#322)
  • Remove v0.10.0-deprecated members @exoego (#299)
  • Drop Scala 2.12 @exoego (#296)
  • Change (Async)Handler to js.Function so it can be handler directly @exoego (#313)
  • Add Scala 3.1.0 support @exoego (#301)

🐛 Bug Fixes

  • [ses] Fix SESMailCommonHeaders replyTo @exoego (#217)
  • [connect] Fix connect-contact-flow queue type @exoego (#225)

🧰 Maintenance

v0.11.0 🌈

15 Sep 04:41
447014a
Compare
Choose a tag to compare

Changes

🚀 Features

🐛 Bug Fixes

  • [cloudfront] Corrected CloudFrontRequestEvent and CloudFrontResponseEvent @Asamsig (#184)

🧰 Maintenance

v0.10.0 🌈

19 Aug 23:41
45f1a6b
Compare
Choose a tag to compare

Highlight

  • Scala.js 1.x support only. (v0.9.0 was final release for Scala.js 0.6)
  • Factory methods for JS traits are now generated by macro.
  • Some new Lambda events and bugfixes.

🚀 Features

  • [sqs] Additional SQSRecordAttributes to support FIFO SQS queue @exoego (#174)
  • [cognito] Add granular events for Cognito Userpool handlers @exoego (#177)
  • [codebuild] Add Codebuild Cloudwatch Handler @exoego (#161)
  • [amazon-connect] Add Amazon Connect Contact Flow facade @exoego (#166)
  • [alb] Make some field of ALBResult optional @exoego (#160)

🐛 Bug Fixes

  • [cloudwatch-events] Fix missing version in factory method @exoego (#162)

📚 Docs

🧰 Maintenance

v0.9.0

18 Jun 04:40
82ed72e
Compare
Choose a tag to compare

💥 This release introduces some breaking changes.

🚀 Features

🐛 Bug Fixes

  • FirehoseRecordMetadata.approximateArrivalTimestamp should be number @exoego (#140)

🧰 Maintenance

v0.8.0

11 May 22:29
b5dbb9d
Compare
Choose a tag to compare

🚀 Features

🧰 Maintenance

v0.7.0 🌈

21 Apr 03:08
00c24cb
Compare
Choose a tag to compare

Changes

🚀 Features

  • Add userNotFound @exoego (#116)
  • Add xray trace header to SQS event @exoego (#107)
  • Add clientMetadata to Cognito Request @exoego (#106)
  • Add new API Gateway Authorizer types, deprecating old ones @exoego (#102)
  • Add protocol to APIGatewayEventRequestContext @exoego (#99)

🐛 Bug Fixes

  • Fix APIGatewayRequestAuthorizerEvent: added methodArn, removed domainName and apiId @exoego (#112)

🧰 Maintenance

v0.6.0

23 Feb 21:27
648291f
Compare
Choose a tag to compare

From this version, this facade finally supports Scala.js 1.0.01.0.0-RC2.
Scala.js 0.6.x will be supported until 0.6.x reaches EOL.

This release is almost identical to v0.5.0, except the DynamoDB dependency was updated to
"net.exoego" %%% "aws-sdk-scalajs-facade-dynamodb" % "0.29.0-v2.624.0".

v0.5.0

18 Feb 11:51
780e970
Compare
Choose a tag to compare
libraryDependencies += "net.exoego" %%% "aws-lambda-scalajs-facade" % "0.5.0"

Published for Scala 2.12/2.13 and Scala.js 0.6.32.
Unfortunately Scala.js 1.0.0 support is blocked by scalatest, so will be added later.

  • Bugfix
    • scala.Error was accidentally exposed. Now js.Error #86
    • Corrections #76
      • Context.memoryLimitInMB: Fixed from Int to String
      • S3.Bucket.OwnerIdentity.versionId: Fixed from String to js.UndefOr[String]
      • ABLResult.body: Fixed from String to js.UndefOr[String]
  • Improvement
    • Handler[T,R] and its sub types should be newable/extendable. #84
    • Refine Lex #88
    • Refine CloudFront #87
    • Remove unused type aliases #85
    • New handler: S3BatchHandler #76
    • New property #76
      • principalOrgId added to APIGatewayEventRequestContext.Identity
      • glacierEventData added to S3Event
      • body added to CloudFrontRequest
      • NoEcho added to CloudFormationCustomResourceDeleteEvent

v0.4.1

02 Jan 08:37
Compare
Choose a tag to compare

Updated aws-sdk-scalajs-facade-dynamodb to 0.28.0-v2.596.0.