Updated following dependencies as they need changes to the code to work properly:

- Scala
- fs2
- http4s
This commit is contained in:
Rehan Mahmood
2023-10-31 14:24:00 -04:00
parent c9ebd15b23
commit 2a39b2f6a6
64 changed files with 224 additions and 150 deletions

View File

@ -7,6 +7,7 @@
package docspell.backend
import cats.effect._
import fs2.io.file.Files
import docspell.backend.BackendCommands.EventContext
import docspell.backend.auth.Login
@ -65,7 +66,7 @@ trait BackendApp[F[_]] {
object BackendApp {
def create[F[_]: Async](
def create[F[_]: Async: Files](
cfg: Config,
store: Store[F],
javaEmil: Emil[F],

View File

@ -9,6 +9,7 @@ package docspell.backend.joex
import cats.data.OptionT
import cats.effect._
import cats.syntax.all._
import fs2.io.file.Files
import docspell.addons._
import docspell.backend.joex.AddonOps.{AddonRunConfigRef, ExecResult}
@ -98,7 +99,7 @@ object AddonOps {
)
}
def apply[F[_]: Async](
def apply[F[_]: Async: Files](
cfg: AddonEnvConfig,
store: Store[F],
cmdRunner: BackendCommandRunner[F, Unit],
@ -160,7 +161,10 @@ object AddonOps {
execRes = ExecResult(List(result), List(runCfg))
} yield execRes
def createMiddleware(custom: Middleware[F], runCfg: AddonRunConfigRef) = for {
def createMiddleware(
custom: Middleware[F],
runCfg: AddonRunConfigRef
): F[Middleware[F]] = for {
dscMW <- prepare.createDscEnv(runCfg, cfg.executorConfig.runTimeout)
mm = dscMW >> custom >> prepare.logResult(logger, runCfg) >> Middleware
.ephemeralRun[F]

View File

@ -10,7 +10,7 @@ import cats.data.EitherT
import cats.effect._
import cats.syntax.all._
import fs2.Stream
import fs2.io.file.Path
import fs2.io.file.{Files, Path}
import docspell.addons.{AddonMeta, RunnerType}
import docspell.backend.Config
@ -21,7 +21,7 @@ import docspell.joexapi.model.AddonSupport
import docspell.store.Store
import docspell.store.records.RAddonArchive
final class AddonValidate[F[_]: Async](
final class AddonValidate[F[_]: Async: Files](
cfg: Config.Addons,
store: Store[F],
joexOps: OJoex[F]

View File

@ -9,6 +9,7 @@ package docspell.backend.ops
import cats.data.{EitherT, NonEmptyList, OptionT}
import cats.effect._
import cats.syntax.all._
import fs2.io.file.Files
import docspell.addons.{AddonMeta, AddonTriggerType}
import docspell.backend.ops.AddonValidationError._
@ -129,7 +130,7 @@ object OAddons {
def failure[A](error: AddonValidationError): AddonValidationResult[A] = Left(error)
}
def apply[F[_]: Async](
def apply[F[_]: Async: Files](
cfg: Config.Addons,
store: Store[F],
userTasks: UserTaskStore[F],