From 02a16e48979a347bb0a1ee8b480c37463d12f47a Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:43 +0000 Subject: [PATCH 01/10] chore: Update zio from 3.10.1 to 3.10.2 --- build.sbt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index e6a593ad..e745cffc 100644 --- a/build.sbt +++ b/build.sbt @@ -86,8 +86,8 @@ lazy val year = java.time.LocalDate.now().getYear val projectLicense = Some( HeaderLicense.Custom( s"""|Copyright © 2021 - $year Swiss National Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. - |SPDX-License-Identifier: Apache-2.0 - |""".stripMargin, + |SPDX-License-Identifier: Apache-2.0 + |""".stripMargin, ), ) @@ -120,7 +120,7 @@ lazy val root = (project in file(".")) "dev.zio" %% "zio-metrics-connectors" % zioMetricsConnectorsVersion, "dev.zio" %% "zio-metrics-connectors-prometheus" % zioMetricsConnectorsVersion, "eu.timepit" %% "refined" % "0.11.2", - "com.softwaremill.sttp.client3" %% "zio" % "3.10.1", + "com.softwaremill.sttp.client3" %% "zio" % "3.10.2", // csv for reports "com.github.tototoshi" %% "scala-csv" % "2.0.0", From 8328c5d225d6e3abc6d338b54db30b87040333a1 Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:45 +0000 Subject: [PATCH 02/10] chore: Update tapir-json-zio from 1.11.10 to 1.11.12 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index e745cffc..a290cc63 100644 --- a/build.sbt +++ b/build.sbt @@ -15,7 +15,7 @@ val hikariVersion = "6.2.1" val quillVersion = "4.8.6" val sipiVersion = "v31.0.0" val sqliteVersion = "3.47.1.0" -val tapirVersion = "1.11.10" +val tapirVersion = "1.11.12" val testContainersVersion = "1.20.4" val zioConfigVersion = "4.0.2" val zioJsonVersion = "0.7.3" From 37da259e03ede03cb40891633937484f74f25195 Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:48 +0000 Subject: [PATCH 03/10] chore: Update zio from 2.1.13 to 2.1.14 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a290cc63..f3a7fe7f 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ val zioMockVersion = "1.0.0-RC12" val zioNioVersion = "2.0.2" val zioPreludeVersion = "1.0.0-RC35" val zioSchemaVersion = "1.5.0" -val zioVersion = "2.1.13" +val zioVersion = "2.1.14" val gitCommit = ("git rev-parse HEAD" !!).trim val gitVersion = ("git describe --tag --dirty --abbrev=7 --always " !!).trim From f075ea18b1fca0479176bed079856477e7cc88d3 Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:51 +0000 Subject: [PATCH 04/10] chore: Update zio-config from 4.0.2 to 4.0.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f3a7fe7f..d6e77561 100644 --- a/build.sbt +++ b/build.sbt @@ -17,7 +17,7 @@ val sipiVersion = "v31.0.0" val sqliteVersion = "3.47.1.0" val tapirVersion = "1.11.12" val testContainersVersion = "1.20.4" -val zioConfigVersion = "4.0.2" +val zioConfigVersion = "4.0.3" val zioJsonVersion = "0.7.3" val zioLoggingVersion = "2.4.0" val zioMetricsConnectorsVersion = "2.3.1" From 8fcc85c2773eb603400260d0897aedd1897b20ce Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:54 +0000 Subject: [PATCH 05/10] chore: Update flyway-core from 11.1.0 to 11.1.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d6e77561..9cfa9bad 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ addCommandAlias("fmtCheck", "scalafmtCheck; Test / scalafmtCheck; integration/Te addCommandAlias("headerCreateAll", "; all root/headerCreate Test/headerCreate; integration/Test/headerCreate") addCommandAlias("headerCheckAll", "; all root/headerCheck Test/headerCheck; integration/Test/headerCheck") -val flywayVersion = "11.1.0" +val flywayVersion = "11.1.1" val hikariVersion = "6.2.1" val quillVersion = "4.8.6" val sipiVersion = "v31.0.0" From 2c5452fb42154159f5523f1ca5830ce53a676606 Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:56 +0000 Subject: [PATCH 06/10] chore: Update sbt from 1.10.6 to 1.10.7 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index e88a0d81..73df629a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.6 +sbt.version=1.10.7 From e30a08f04f68cc157f7f234fd1d35f8fdc491aa0 Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:58 +0000 Subject: [PATCH 07/10] chore: Update sbt-scalafmt from 2.5.2 to 2.5.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index a483943d..d90197bd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,5 +3,5 @@ addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.4") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.3") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2") From da474134668abf875be0b208022a37bfb9675a0f Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:02:59 +0000 Subject: [PATCH 08/10] chore: Update scalafmt-core from 3.8.3 to 3.8.4 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 9b020a3a..f9ae3a4f 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.8.3" +version = "3.8.4" runner.dialect = scala3 maxColumn = 120 align.preset = most From d62360db7af14a923a04f70bc44a175d2a560832 Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:03:05 +0000 Subject: [PATCH 09/10] Reformat with scalafmt 3.8.4 Executed command: scalafmt --non-interactive --- .../dasch/api/ProjectsEndpointsHandler.scala | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/main/scala/swiss/dasch/api/ProjectsEndpointsHandler.scala b/src/main/scala/swiss/dasch/api/ProjectsEndpointsHandler.scala index 66eacfac..a17c00f1 100644 --- a/src/main/scala/swiss/dasch/api/ProjectsEndpointsHandler.scala +++ b/src/main/scala/swiss/dasch/api/ProjectsEndpointsHandler.scala @@ -98,25 +98,23 @@ final case class ProjectsEndpointsHandler( }, ) - private val getProjectsAssetsInfoEndpoint: ZServerEndpoint[Any, Any] = projectEndpoints.getProjectsAssetsInfo - .serverLogic(userSession => - (shortcode, assetId) => { - val ref = AssetRef(assetId, shortcode) - authorizationHandler.ensureProjectReadable(userSession, shortcode) *> - assetInfoService - .findByAssetRef(ref) - .some - .mapBoth( - assetRefNotFoundOrServerError(_, ref), - AssetInfoResponse.from, - ) - }, - ) + private val getProjectsAssetsInfoEndpoint: ZServerEndpoint[Any, Any] = + projectEndpoints.getProjectsAssetsInfo.serverLogic { userSession => (shortcode, assetId) => + val ref = AssetRef(assetId, shortcode) + authorizationHandler.ensureProjectReadable(userSession, shortcode) *> + assetInfoService + .findByAssetRef(ref) + .some + .mapBoth( + assetRefNotFoundOrServerError(_, ref), + AssetInfoResponse.from, + ) + } private val getProjectsAssetsOriginalEndpoint: ZServerEndpoint[Any, ZioStreams] = projectEndpoints.getProjectsAssetsOriginal .serverLogic(userSession => - (shortcode, assetId) => { + (shortcode, assetId) => for { ref <- ZIO.succeed(AssetRef(assetId, shortcode)) assetInfo <- assetInfoService.findByAssetRef(ref).some.mapError(assetRefNotFoundOrServerError(_, ref)) @@ -129,8 +127,7 @@ final case class ProjectsEndpointsHandler( s"attachment; filename*=UTF-8''${filenameEncoded}", // Content-Disposition assetInfo.metadata.originalMimeType.map(m => m.stringValue).getOrElse("application/octet-stream"), ZStream.fromFile(assetInfo.original.file.toFile), - ) - }, + ), ) private val postProjectAssetEndpoint: ZServerEndpoint[Any, ZioStreams] = projectEndpoints.postProjectAsset From bad151c93dd8d9f071de9487f8e1bf76c419d111 Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:03:05 +0000 Subject: [PATCH 10/10] Add 'Reformat with scalafmt 3.8.4' to .git-blame-ignore-revs --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 24849482..71a44b47 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,3 +6,6 @@ c09b8dba648055f0ee47a48ccd5bc203ddf8d424 # Scala Steward: Reformat with scalafmt 3.8.3 64daf9d365128e01beb81c3e578e0c998fc10165 + +# Scala Steward: Reformat with scalafmt 3.8.4 +d62360db7af14a923a04f70bc44a175d2a560832