diff --git a/modules/core/src/main/scala/pillars/codec.scala b/modules/core/src/main/scala/pillars/codec.scala index 5874fd062..c41782324 100644 --- a/modules/core/src/main/scala/pillars/codec.scala +++ b/modules/core/src/main/scala/pillars/codec.scala @@ -7,12 +7,17 @@ import io.circe.Codec import io.circe.Decoder import io.circe.Encoder import io.circe.derivation.Configuration +import java.nio.file.Path import org.http4s.Uri import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters.* object codec: + given Decoder[Path] = Decoder.decodeString.emap(t => Right(Path.of(t))) + + given Encoder[Path] = Encoder.encodeString.contramap(_.toString) + given Decoder[Host] = Decoder.decodeString.emap(t => Host.fromString(t).toRight("Failed to parse Host")) given Encoder[Host] = Encoder.encodeString.contramap(_.toString) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index e95a00630..7f0e02f63 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -9,10 +9,6 @@ object Dependencies { "org.typelevel" %% "mouse" % "1.2.2" ) - val module: Seq[ModuleID] = Seq( - "io.github.classgraph" % "classgraph" % "4.8.165", - "com.outr" %% "moduload" % "1.1.7" - ) val model: Seq[ModuleID] = Seq( "com.comcast" %% "ip4s-core" % "3.4.0", "io.github.iltotore" %% "iron" % "2.4.0", @@ -93,5 +89,5 @@ object Dependencies { ) ++ tests val httpClient: Seq[ModuleID] = http4sClient ++ http4s ++ tests val core: Seq[ModuleID] = - effect ++ module ++ json ++ tapir ++ http4sServer ++ model ++ commandLine ++ logging ++ observability ++ tests + effect ++ json ++ tapir ++ http4sServer ++ model ++ commandLine ++ logging ++ observability ++ tests }