Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sbt-typelevel, ... to 0.7.1 #483

Merged
merged 22 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
fddf011
Update scala-library to 2.12.19
typelevel-steward[bot] Feb 27, 2024
3580475
Add headers to proxy integration
merens Mar 15, 2024
044b68b
Restore apply for backwards compatibility
merens Mar 19, 2024
7f921e9
Tweak deprecation
armanbilge Mar 19, 2024
680ff62
Update sbt-buildinfo to 0.12.0
typelevel-steward[bot] Mar 20, 2024
9cd160e
Update fs2-io to 3.10.2
typelevel-steward[bot] Mar 28, 2024
7bedf83
Update scalafmt-core to 3.8.1
typelevel-steward[bot] Mar 29, 2024
fcd0acf
Update scala-library to 2.13.14
typelevel-steward[bot] May 2, 2024
b386b32
Update sbt to 1.10.0
typelevel-steward[bot] May 6, 2024
ddf9b72
Update sbt-typelevel, ... to 0.7.1
typelevel-steward[bot] May 6, 2024
bde8679
Merge pull request #469 from typelevel/update/sbt-buildinfo-0.12.0
armanbilge May 6, 2024
9dcb19c
Merge pull request #472 from typelevel/update/fs2-io-3.10.2
armanbilge May 6, 2024
4215c81
Merge pull request #482 from typelevel/update/sbt-1.10.0
armanbilge May 6, 2024
f00e923
Merge pull request #473 from typelevel/update/scalafmt-core-3.8.1
armanbilge May 6, 2024
e1ff8c9
Merge pull request #467 from merens/add-headers-to-proxy-integration
armanbilge May 6, 2024
6c0d61b
Update sbt-scalajs, scalajs-compiler, ... to 1.16.0
typelevel-steward[bot] May 7, 2024
1022d18
Merge remote-tracking branch 'origin/update/scala-library-2.12.19'
armanbilge May 9, 2024
efadd36
Merge remote-tracking branch 'origin/update/scala-library-2.13.14'
armanbilge May 9, 2024
f94eaf8
Merge remote-tracking branch 'origin/update/sbt-scalajs-1.16.0'
armanbilge May 9, 2024
5efb99c
Merge remote-tracking branch 'origin/update/sbt-typelevel-0.7.1'
armanbilge May 9, 2024
24a58cb
scalafix
armanbilge May 9, 2024
d720a73
scalafix
armanbilge May 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.0
version = 3.8.1

runner.dialect = Scala213Source3
fileOverride {
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ ThisBuild / githubWorkflowBuildPreamble +=
cond = Some("matrix.project == 'rootJS'")
)

val Scala212 = "2.12.18"
val Scala213 = "2.13.12"
val Scala212 = "2.12.19"
val Scala213 = "2.13.14"
val Scala3 = "3.3.3"
ThisBuild / crossScalaVersions := Seq(Scala212, Scala3, Scala213)

val catsEffectVersion = "3.5.4"
val circeVersion = "0.14.6"
val fs2Version = "3.9.4"
val fs2Version = "3.10.2"
val http4sVersion = "0.23.26"
val natchezVersion = "0.3.5"
val munitVersion = "0.7.29"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ object ApiGatewayProxyHandler {
.compile
.string
} yield {
val headers = response.headers.headers.groupMap(_.name)(_.value)
Some(
ApiGatewayProxyResult(
response.status.code,
headers.map { case (name, values) => name -> values.mkString(",") },
responseBody,
isBase64Encoded
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package http4s
import cats.effect.IO
import cats.syntax.all._
import feral.lambda.events.ApiGatewayProxyEvent
import feral.lambda.events.ApiGatewayProxyEventSuite.*
import feral.lambda.events.ApiGatewayProxyEventSuite._
import munit.CatsEffectSuite
import org.http4s.Headers
import org.http4s.HttpApp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package feral.lambda

import events._
import events.*

type ApiGatewayProxyInvocation[F[_]] = Invocation[F, ApiGatewayProxyEvent]
type ApiGatewayProxyInvocationV2[F[_]] = Invocation[F, ApiGatewayProxyEventV2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,39 @@
package feral.lambda.events

import io.circe.Encoder
import org.typelevel.ci.CIString

sealed abstract class ApiGatewayProxyResult {
def statusCode: Int
def headers: Map[CIString, String]
def body: String
def isBase64Encoded: Boolean
}

object ApiGatewayProxyResult {

def apply(
statusCode: Int,
headers: Map[CIString, String],
body: String,
isBase64Encoded: Boolean): ApiGatewayProxyResult =
new Impl(statusCode, headers, body, isBase64Encoded)

@deprecated("Use apply method which takes headers", "0.3.0")
def apply(statusCode: Int, body: String, isBase64Encoded: Boolean): ApiGatewayProxyResult =
new Impl(statusCode, body, isBase64Encoded)
apply(statusCode, Map.empty, body, isBase64Encoded)

implicit def encoder: Encoder[ApiGatewayProxyResult] = Encoder.forProduct3(
import codecs.encodeKeyCIString
implicit def encoder: Encoder[ApiGatewayProxyResult] = Encoder.forProduct4(
"statusCode",
"headers",
"body",
"isBase64Encoded"
)(r => (r.statusCode, r.body, r.isBase64Encoded))
)(r => (r.statusCode, r.headers, r.body, r.isBase64Encoded))

private final case class Impl(
statusCode: Int,
headers: Map[CIString, String],
body: String,
isBase64Encoded: Boolean
) extends ApiGatewayProxyResult {
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.9
sbt.version=1.10.0
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val sbtlTlV = "0.6.7"
val sbtlTlV = "0.7.1"
addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtlTlV)
addSbtPlugin("org.typelevel" % "sbt-typelevel-scalafix" % sbtlTlV)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scalaVersion := "2.13.12"
scalaVersion := "2.13.14"
enablePlugins(LambdaJSPlugin)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.9
sbt.version=1.10.0