From 9f1ce68c2e33126647060acd02fa62db882604f4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 12 Nov 2020 19:19:31 +0100 Subject: [PATCH 001/673] Update sbt-dotty to 0.4.6 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 89f7d4739..8d5ed8298 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.15") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14") From 9c1eed6bc899156d8fdf24c08aa30edf1210c140 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 15 Nov 2020 18:21:45 +0100 Subject: [PATCH 002/673] Update sbt-scalajs, scalajs-compiler, ... to 1.3.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 89f7d4739..0a3db3e28 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") From 02c0849aa0cd48e3b6862064a50ff7964f0aee54 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sat, 21 Nov 2020 09:49:30 +0100 Subject: [PATCH 003/673] first draft --- core/jvm/src/main/scala/zio/sql/expr.scala | 8 ++++++++ .../zio/sql/postgresql/FunctionDefSpec.scala | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..20fe6061b 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -271,6 +271,14 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val Ascii = FunctionDef[String, Int](FunctionName("ascii")) val CharLength = FunctionDef[String, Int](FunctionName("character length")) val Concat = FunctionDef[(String, String), String](FunctionName("concat")) + sealed trait FlatValueOrColumnValue + case class StringValue(v: String) extends FlatValueOrColumnValue + case class ColumnValue(v: String) extends FlatValueOrColumnValue + object FlatValueOrColumnValue { + implicit def columnToColumnValue(c: ColumnSet): FlatValueOrColumnValue = ColumnValue(c.toString) // TODO + implicit def stringToStringValue(s: String): FlatValueOrColumnValue = StringValue(s) + } + val ConcatWs = FunctionDef[(String, Seq[FlatValueOrColumnValue]), String](FunctionName("concat_ws")) val Lower = FunctionDef[String, String](FunctionName("lower")) val Ltrim = FunctionDef[String, String](FunctionName("ltrim")) val OctetLength = FunctionDef[String, Int](FunctionName("octet length")) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..ed23fd3f2 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -9,8 +9,24 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.Customers._ import this.PostgresFunctionDef._ import this.FunctionDef._ + import this.ColumnSet._ val spec = suite("Postgres FunctionDef")( + testM("concat_ws") { + import FlatValueOrColumnValue._ + val foo: Seq[FlatValueOrColumnValue] = string("first_name") :: string("last_name") :: "!" :: Nil + val query = select(ConcatWs(" ", string("first_name") :: string("last_name") :: "!" :: Nil)) from customers + + val expected = Seq("Alice Smith!", "John Smith!") + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From aefc6e84b615e4a87d7b309d065a0d1172f42ea5 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sat, 21 Nov 2020 10:19:52 +0100 Subject: [PATCH 004/673] the dumbest implementation that works --- core/jvm/src/main/scala/zio/sql/expr.scala | 2 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 20fe6061b..dd03f83f5 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -278,7 +278,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { implicit def columnToColumnValue(c: ColumnSet): FlatValueOrColumnValue = ColumnValue(c.toString) // TODO implicit def stringToStringValue(s: String): FlatValueOrColumnValue = StringValue(s) } - val ConcatWs = FunctionDef[(String, Seq[FlatValueOrColumnValue]), String](FunctionName("concat_ws")) + val ConcatWs = FunctionDef[String, String](FunctionName("concat_ws")) val Lower = FunctionDef[String, String](FunctionName("lower")) val Ltrim = FunctionDef[String, String](FunctionName("ltrim")) val OctetLength = FunctionDef[String, Int](FunctionName("octet length")) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index ed23fd3f2..5c723d549 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -9,15 +9,22 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.Customers._ import this.PostgresFunctionDef._ import this.FunctionDef._ - import this.ColumnSet._ +// import this.ColumnSet._ val spec = suite("Postgres FunctionDef")( testM("concat_ws") { - import FlatValueOrColumnValue._ - val foo: Seq[FlatValueOrColumnValue] = string("first_name") :: string("last_name") :: "!" :: Nil - val query = select(ConcatWs(" ", string("first_name") :: string("last_name") :: "!" :: Nil)) from customers - - val expected = Seq("Alice Smith!", "John Smith!") +// import FlatValueOrColumnValue._ +// val foo: Seq[FlatValueOrColumnValue] = string("first_name") :: string("last_name") :: "!" :: Nil +// val args: (String, Seq[String]) = (" ", "first_name" :: "last_name" :: "!" :: Nil) + val args = "' ', 'Person:', first_name, last_name" + val query = select(ConcatWs(args)) from customers + + val expected = Seq("Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" + ) val testResult = execute(query).to[String, String](identity) From 89f8d248e1f956bae7acb903dba1e47c867697b4 Mon Sep 17 00:00:00 2001 From: Hugo Sousa Date: Sat, 21 Nov 2020 10:45:21 +0100 Subject: [PATCH 005/673] Add 'split_part' function to PostgresModule --- core/jvm/src/main/scala/zio/sql/expr.scala | 6 +++++- .../scala/zio/sql/postgresql/PostgresModule.scala | 3 ++- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..a42e450d7 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,7 +108,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag - implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) + implicit def literal[A](a: A)(implicit typeTag: TypeTag[A]): Expr[Features.Literal, Any, A] = + typeTag match { + case TypeTag.TString => Expr.Literal(s"'${a.toString}'").asInstanceOf[Expr[Features.Literal, Any, A]] + case _ => Expr.Literal(a) + } def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..6136d40aa 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -7,7 +7,8 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val SplitPart = FunctionDef[(String, String, Int), String](FunctionName("split_part")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..59227c041 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -35,6 +35,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("split_part") { + val query = select(SplitPart("abc~@~def~@~ghi", "~@~", 2)) from customers + + val expected = "def" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From 4d27aa15f56aaa78f28e69e9eb8f8ef376ff410b Mon Sep 17 00:00:00 2001 From: Jessen <4315281+jessenr@users.noreply.github.com> Date: Sat, 21 Nov 2020 11:18:35 +0000 Subject: [PATCH 006/673] add like operator --- core/jvm/src/main/scala/zio/sql/expr.scala | 3 +++ core/jvm/src/main/scala/zio/sql/ops.scala | 3 +++ core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..66d94c1cc 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -53,6 +53,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def <=[F2, A1 <: A, B1 >: B](that: Expr[F2, A1, B1]): Expr[F :||: F2, A1, Boolean] = Expr.Relational(self, that, RelationalOp.LessThanEqual) + def like[F2, A1 <: A, B1 >: B](that: Expr[F2, A1, B1]): Expr[F :||: F2, A1, Boolean] = + Expr.Relational(self, that, RelationalOp.Like) + def &[F2, A1 <: A, B1 >: B](that: Expr[F2, A1, B1])(implicit ev: IsIntegral[B1]): Expr[F :||: F2, A1, B1] = Expr.Binary(self, that, BinaryOp.AndBit[B1]()) diff --git a/core/jvm/src/main/scala/zio/sql/ops.scala b/core/jvm/src/main/scala/zio/sql/ops.scala index c24ef66f0..d8f5769c3 100644 --- a/core/jvm/src/main/scala/zio/sql/ops.scala +++ b/core/jvm/src/main/scala/zio/sql/ops.scala @@ -110,6 +110,9 @@ trait OpsModule extends TypeTagModule { case object NotEqual extends RelationalOp { override val symbol: String = "<>" } + case object Like extends RelationalOp { + override val symbol: String = "like" + } } } diff --git a/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala b/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala index 5c3b74ef4..373ea3cf6 100644 --- a/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala @@ -34,6 +34,10 @@ class LogicalOpsSpec extends DefaultRunnableSpec { test("not works on boolean column") { val selectNotDeleted = selectAll.where(deleted.not) assert(selectNotDeleted)(anything) + }, + test("like works on a string column") { + val query = selectAll.where(name like "%") + assert(query)(anything) } ) } From 64cacffd2b27481ec870590584386d2e2348cc49 Mon Sep 17 00:00:00 2001 From: Jessen <4315281+jessenr@users.noreply.github.com> Date: Sat, 21 Nov 2020 11:28:49 +0000 Subject: [PATCH 007/673] format --- core/jvm/src/main/scala/zio/sql/ops.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/ops.scala b/core/jvm/src/main/scala/zio/sql/ops.scala index d8f5769c3..8b423730d 100644 --- a/core/jvm/src/main/scala/zio/sql/ops.scala +++ b/core/jvm/src/main/scala/zio/sql/ops.scala @@ -110,7 +110,7 @@ trait OpsModule extends TypeTagModule { case object NotEqual extends RelationalOp { override val symbol: String = "<>" } - case object Like extends RelationalOp { + case object Like extends RelationalOp { override val symbol: String = "like" } } From 889470ea834dc680789cad4734b695f40ec8379f Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Sat, 21 Nov 2020 12:31:29 +0100 Subject: [PATCH 008/673] add initcap --- .../scala/zio/sql/postgresql/PostgresModule.scala | 1 + .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..d636572e2 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -8,6 +8,7 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Initcap = FunctionDef[String, String](FunctionName("initcap")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..2bb9e1dcf 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -35,6 +35,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("initcap") { + val query = select(Initcap("'hi THOMAS'")) from customers + + val expected = "Hi Thomas" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From 8200ef8d8223c1761f674629f66e5dac37e2536c Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Sat, 21 Nov 2020 13:08:24 +0100 Subject: [PATCH 009/673] add timeofday --- .../scala/zio/sql/postgresql/PostgresModule.scala | 1 + .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..8259fbf44 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -8,6 +8,7 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Timeofday = FunctionDef[Nothing, String](FunctionName("timeofday")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..db67303cd 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -35,6 +35,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("timeofday") { + val query = select(Sind(30.0)) from customers + + val expected = 0.5 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From de80c56ea028763c91f99f31fd9ae7fc4243044c Mon Sep 17 00:00:00 2001 From: Patryk Date: Sat, 21 Nov 2020 13:09:35 +0100 Subject: [PATCH 010/673] a sowhat working and somewhat typesafe concatws --- core/jvm/src/main/scala/zio/sql/expr.scala | 28 ++++++++++++- core/jvm/src/main/scala/zio/sql/typetag.scala | 5 +++ jdbc/src/main/scala/zio/sql/jdbc.scala | 5 +++ .../zio/sql/postgresql/FunctionDefSpec.scala | 39 +++++++++++++------ 4 files changed, 64 insertions(+), 13 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index dd03f83f5..ed2337068 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -110,6 +110,27 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) +// implicit def literals[A: TypeTag, Seq[A]: TypeTag](as: Seq[A]): Expr[Features.Literal, Any, Seq[A]] = Expr.Literal(as) + +// implicit def tuple2[String: TypeTag](a: (String, String)): Expr[Features.Literal, Any, (String, String)] = { +// implicit val f: TypeTag[(String, String)] = TypeTag.Tuple2[String]() +// Expr.Literal(a) +// } + +// implicit def tuple2[String: TypeTag](a: (String, String)): Expr[Features.Literal, Any, (String, String)] = { +// val s1 = literal(a._1) +// val s2 = literal(a._1) +// s1. +// } + + implicit def foo(seq: Seq[FunctionDef.FlatValueOrColumnValue]): Expr[Features.Literal, Any, String] = { + val nativeFunctionSqlString: String = seq.map { + case FunctionDef.StringValue(v) => s"'${v}'" //Note: the ' + case FunctionDef.ColumnValue(v) => s"${v}" + }.mkString(", ") + literal[String](nativeFunctionSqlString) + } + def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { case Expr.Source(_, c) => Some(c.name) @@ -275,8 +296,13 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { case class StringValue(v: String) extends FlatValueOrColumnValue case class ColumnValue(v: String) extends FlatValueOrColumnValue object FlatValueOrColumnValue { - implicit def columnToColumnValue(c: ColumnSet): FlatValueOrColumnValue = ColumnValue(c.toString) // TODO + implicit def columnToColumnValue(c: ColumnSet): FlatValueOrColumnValue = c match { + case ColumnSet.Empty => ColumnValue("") // TODO: ColumnSet is probably not the right type :/ + case ColumnSet.Cons(head, _) => ColumnValue(head.name) + } implicit def stringToStringValue(s: String): FlatValueOrColumnValue = StringValue(s) + implicit def convList[S, T](input: List[S])(implicit c: S => T): List[T] = + input map c } val ConcatWs = FunctionDef[String, String](FunctionName("concat_ws")) val Lower = FunctionDef[String, String](FunctionName("lower")) diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 508e5e1aa..8ad8df028 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -34,6 +34,11 @@ trait TypeTagModule { implicit case object TZonedDateTime extends NotNull[ZonedDateTime] sealed case class TDialectSpecific[A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] + //TODO: remove +// case class Tuple2[A]() extends NotNull[(A, A)] +// implicit def tuple2[A: TypeTag] = new Tuple2[A] +// case class Tuple2[String]() extends NotNull[(String, String)] + sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 73be39c16..527fff308 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -195,6 +195,11 @@ trait Jdbc extends zio.sql.Sql { ) case TZonedDateTime => ??? case TDialectSpecific(_) => ??? +// case Tuple2() => +// for { +// s1 <- tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) +// s2 <- tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) +// } yield (s1, s2) case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 5c723d549..d01658538 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -9,28 +9,43 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.Customers._ import this.PostgresFunctionDef._ import this.FunctionDef._ -// import this.ColumnSet._ + import this.ColumnSet._ val spec = suite("Postgres FunctionDef")( - testM("concat_ws") { -// import FlatValueOrColumnValue._ + testM("concat_ws #1") { + import FlatValueOrColumnValue._ +// val idealApi = ConcatWs(" ", "Person:", string("first_name"), string("last_name"), "!") + // val foo: Seq[FlatValueOrColumnValue] = string("first_name") :: string("last_name") :: "!" :: Nil // val args: (String, Seq[String]) = (" ", "first_name" :: "last_name" :: "!" :: Nil) - val args = "' ', 'Person:', first_name, last_name" - val query = select(ConcatWs(args)) from customers - - val expected = Seq("Person: Ronald Russell", - "Person: Terrence Noel", - "Person: Mila Paterso", - "Person: Alana Murray", - "Person: Jose Wiggins" +// val foo: Expr[_, _, _] = "first_name" + +// val args: Seq[Expr[_,_,_]] = "' '" :: "'Person:'" :: "first_name" :: "last_name" :: Nil + +// val args: Expr[_,_,(String, String)] = ("' '", "'Person:', first_name, last_name") + +// val args_2 = " " :: "Person: " :: string("first_name") :: string("last_name") :: "!" :: Nil +// val args_1: List[FlatValueOrColumnValue] = args_2 +// val args_0: Expr[_, _, String] = args_1 + + val args_0: List[FlatValueOrColumnValue] = stringToStringValue(" ") :: stringToStringValue("Person:") :: columnToColumnValue(string("first_name")) :: columnToColumnValue(string("last_name")) :: stringToStringValue("!") :: Nil + + val query = select(ConcatWs(args_0)) from customers + println(renderRead(query)) + + val expected = Seq( + "Person: Ronald Russell !", + "Person: Terrence Noel !", + "Person: Mila Paterso !", + "Person: Alana Murray !", + "Person: Jose Wiggins !" ) val testResult = execute(query).to[String, String](identity) val assertion = for { r <- testResult.runCollect - } yield assert(r)(equalTo(expected)) + } yield assert(r.toList)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, From c3c378331e3d2d779489a160d7c0214b832a7d87 Mon Sep 17 00:00:00 2001 From: Marek Kidon Date: Sat, 21 Nov 2020 13:05:05 +0100 Subject: [PATCH 011/673] Add renderer; wire renderDelete; add tests --- core/jvm/src/main/scala/zio/sql/Sql.scala | 2 + core/jvm/src/main/scala/zio/sql/delete.scala | 2 + .../scala/zio/sql/GroupByHavingSpec.scala | 3 +- .../test/scala/zio/sql/ProductSchema.scala | 3 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 3 +- examples/src/main/scala/Example1.scala | 3 +- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 6 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 19 ++++- .../zio/sql/postgresql/PostgresModule.scala | 81 +++++++++++++++++++ .../sql/postgresql/PostgresModuleTest.scala | 24 ++++++ .../sql/postgresql/PostgresRunnableSpec.scala | 9 +-- .../zio/sql/sqlserver/SqlServerModule.scala | 2 + 12 files changed, 144 insertions(+), 13 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index ef4cf5d20..14f550428 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -22,4 +22,6 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) def renderRead(read: self.Read[_]): String + + def renderDelete(delete: self.Delete[_, _]): String } diff --git a/core/jvm/src/main/scala/zio/sql/delete.scala b/core/jvm/src/main/scala/zio/sql/delete.scala index 00f4e91fb..fbd3a2975 100644 --- a/core/jvm/src/main/scala/zio/sql/delete.scala +++ b/core/jvm/src/main/scala/zio/sql/delete.scala @@ -4,6 +4,8 @@ trait DeleteModule { self: ExprModule with TableModule => sealed case class DeleteBuilder[F[_], A, B](table: Table.Aux[A]) { def where[F1](expr: Expr[F1, A, Boolean]): Delete[F1, A] = Delete(table, expr) + + def all[F1]: Delete[Features.Literal, A] = Delete(table, Expr.literal(true)) } sealed case class Delete[F, A](table: Table.Aux[A], whereExpr: Expr[F, A, Boolean]) diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index a305f39d7..ab3fc82f9 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -16,7 +16,8 @@ object GroupByHavingSpec extends DefaultRunnableSpec { object AggregatedProductSchema { val sqldsl = new Sql { - override def renderRead(read: this.Read[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderDelete(delete: this.Delete[_, _]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index cbf7da39f..0fd981b5a 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -2,7 +2,8 @@ package zio.sql object ProductSchema { val sql = new Sql { - override def renderRead(read: this.Read[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderDelete(delete: this.Delete[_, _]): String = ??? } import sql.ColumnSet._ import sql._ diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 9f17c9368..8c7230c26 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -7,7 +7,8 @@ object TestBasicSelect { val userSql = new Sql { self => import self.ColumnSet._ - override def renderRead(read: this.Read[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderDelete(delete: this.Delete[_, _]): String = ??? val userTable = (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index c30ee7dbb..9cfaee698 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -3,7 +3,8 @@ import zio.sql.Sql object Example1 extends Sql { import ColumnSet._ - def renderRead(read: Example1.Read[_]): String = ??? + def renderRead(read: this.Read[_]): String = ??? + def renderDelete(delete: this.Delete[_, _]): String = ??? val columnSet = int("age") ++ string("name") diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index 82092fc52..9c4f4df77 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -8,15 +8,15 @@ import zio.test.environment.TestEnvironment trait JdbcRunnableSpec extends AbstractRunnableSpec with Jdbc { - override type Environment = TestEnvironment with ReadExecutor + override type Environment = TestEnvironment with ReadExecutor with DeleteExecutor override type Failure = Any override def aspects: List[TestAspect[Nothing, TestEnvironment, Nothing, Any]] = List(TestAspect.timeoutWarning(60.seconds)) - def jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] + def jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor with DeleteExecutor] - override def runner: TestRunner[TestEnvironment with ReadExecutor, Any] = + override def runner: TestRunner[TestEnvironment with ReadExecutor with DeleteExecutor, Any] = TestRunner(TestExecutor.default(ZEnv.live >>> jdbcTestEnvironment)) } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 73be39c16..45888793a 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -40,8 +40,21 @@ trait Jdbc extends zio.sql.Sql { type DeleteExecutor = Has[DeleteExecutor.Service] object DeleteExecutor { trait Service { - def execute(delete: Delete[_, _]): IO[Exception, Unit] + def execute(delete: Delete[_, _]): IO[Exception, Int] } + + val live: ZLayer[ConnectionPool with Blocking, Nothing, DeleteExecutor] = + ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, DeleteExecutor.Service] { (pool, blocking) => + new Service { + def execute(delete: Delete[_, _]): IO[Exception, Int] = pool.connection.use { conn => + blocking.effectBlocking { + val query = renderDelete(delete) + val statement = conn.createStatement() + statement.executeUpdate(query) + }.refineToOrDie[Exception] + } + } + } } type UpdateExecutor = Has[UpdateExecutor.Service] @@ -231,6 +244,10 @@ trait Jdbc extends zio.sql.Sql { def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = new ExecuteBuilder(read) + def execute(delete: Delete[_, _]): ZIO[DeleteExecutor, Exception, Int] = ZIO.accessM[DeleteExecutor]( + _.get.execute(delete) + ) + class ExecuteBuilder[Set <: SelectionSet[_], Output](val read: Read.Aux[Output, Set]) { import zio.stream._ diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..1975583b4 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -10,6 +10,87 @@ trait PostgresModule extends Jdbc { self => val Sind = FunctionDef[Double, Double](FunctionName("sind")) } + override def renderDelete(delete: self.Delete[_, _]): String = { + val builder = new StringBuilder + + def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { + case Expr.Source(tableName, column) => + val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Unary(base, op) => + val _ = builder.append(" ").append(op.symbol) + buildExpr(base) + case Expr.Property(base, op) => + buildExpr(base) + val _ = builder.append(" ").append(op.symbol) + case Expr.Binary(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.Relational(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.In(value @ _, set @ _) => ??? + // buildExpr(value) + // buildReadString(set) + case Expr.Literal(value) => + val _ = builder.append(value.toString) //todo fix escaping + case Expr.AggregationCall(param, aggregation) => + builder.append(aggregation.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall1(param, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall2(param1, param2, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + val _ = builder.append(")") + case Expr.FunctionCall3(param1, param2, param3, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + val _ = builder.append(")") + case Expr.FunctionCall4(param1, param2, param3, param4, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + val _ = builder.append(")") + } + + def buildTable(table: Table): Unit = + table match { + case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) + case _ => ??? + } + + def buildDeleteString(delete: self.Delete[_, _]): Unit = { + builder.append("DELETE FROM ") + buildTable(delete.table) + builder.append(" WHERE ") + buildExpr(delete.whereExpr) + } + + buildDeleteString(delete) + builder.toString + } + override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 8ef00f290..e34ee2fe7 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -183,6 +183,30 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can delete all from a single table") { + val query = deleteFrom(customers).all + println(renderDelete(query)) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(5)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can delete from single table with a condition") { + val query = deleteFrom(customers) where (verified isNotTrue) + println(renderDelete(query)) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(1)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 03c8112ff..d769d8839 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -16,17 +16,16 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { props } - private val executorLayer = { + private val executorLayer: ZLayer[Blocking, Nothing, ReadExecutor with DeleteExecutor] = { val poolConfigLayer = TestContainer .postgres("postgres:alpine:13") .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live - - (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie + val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live + (ZLayer.identity[Blocking] ++ connectionPoolLayer >+> ReadExecutor.live >+> DeleteExecutor.live).orDie } - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor with DeleteExecutor] = TestEnvironment.live ++ executorLayer } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 30fa79833..1ba236eb3 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -4,6 +4,8 @@ import zio.sql.Jdbc trait SqlServerModule extends Jdbc { self => + override def renderDelete(delete: Delete[_, _]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 + override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder From a8c9132bd96cc90822e6effa682de1dd094014e9 Mon Sep 17 00:00:00 2001 From: Marek Kidon Date: Sat, 21 Nov 2020 13:59:59 +0100 Subject: [PATCH 012/673] Share rendering functionality --- .../zio/sql/postgresql/PostgresModule.scala | 252 +++++++----------- 1 file changed, 96 insertions(+), 156 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 1975583b4..e88bcd32c 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -6,95 +6,9 @@ import zio.sql.Jdbc */ trait PostgresModule extends Jdbc { self => - object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) - } - - override def renderDelete(delete: self.Delete[_, _]): String = { - val builder = new StringBuilder + sealed case class Renderer(builder: StringBuilder = new StringBuilder) { - def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => - val _ = builder.append(" ").append(op.symbol) - buildExpr(base) - case Expr.Property(base, op) => - buildExpr(base) - val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.Relational(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.In(value @ _, set @ _) => ??? - // buildExpr(value) - // buildReadString(set) - case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => - builder.append(aggregation.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - val _ = builder.append(")") - } - - def buildTable(table: Table): Unit = - table match { - case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case _ => ??? - } - - def buildDeleteString(delete: self.Delete[_, _]): Unit = { - builder.append("DELETE FROM ") - buildTable(delete.table) - builder.append(" WHERE ") - buildExpr(delete.whereExpr) - } - - buildDeleteString(delete) - builder.toString - } - - override def renderRead(read: self.Read[_]): String = { - val builder = new StringBuilder - - def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { + private def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) case Expr.Unary(base, op) => @@ -155,68 +69,7 @@ trait PostgresModule extends Jdbc { self => val _ = builder.append(")") } - def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = - read match { - case read0 @ Read.Select(_, _, _, _, _, _, _, _) => - object Dummy { - type F - type A - type B <: SelectionSet[A] - } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] - import read._ - - builder.append("SELECT ") - buildSelection(selection.value) - builder.append(" FROM ") - buildTable(table) - whereExpr match { - case Expr.Literal(true) => () - case _ => - builder.append(" WHERE ") - buildExpr(whereExpr) - } - groupBy match { - case _ :: _ => - builder.append(" GROUP BY ") - buildExprList(groupBy) - - havingExpr match { - case Expr.Literal(true) => () - case _ => - builder.append(" HAVING ") - buildExpr(havingExpr) - } - case Nil => () - } - orderBy match { - case _ :: _ => - builder.append(" ORDER BY ") - buildOrderingList(orderBy) - case Nil => () - } - limit match { - case Some(limit) => - builder.append(" LIMIT ").append(limit) - case None => () - } - offset match { - case Some(offset) => - val _ = builder.append(" OFFSET ").append(offset) - case None => () - } - - case Read.Union(left, right, distinct) => - buildReadString(left) - builder.append(" UNION ") - if (!distinct) builder.append("ALL ") - buildReadString(right) - - case Read.Literal(values) => - val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping - } - - def buildExprList(expr: List[Expr[_, _, _]]): Unit = + private def buildExprList(expr: List[Expr[_, _, _]]): Unit = expr match { case head :: tail => buildExpr(head) @@ -228,7 +81,8 @@ trait PostgresModule extends Jdbc { self => } case Nil => () } - def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = + + private def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = expr match { case head :: tail => head match { @@ -246,7 +100,7 @@ trait PostgresModule extends Jdbc { self => case Nil => () } - def buildSelection[A](selectionSet: SelectionSet[A]): Unit = + private def buildSelection[A](selectionSet: SelectionSet[A]): Unit = selectionSet match { case cons0 @ SelectionSet.Cons(_, _) => object Dummy { @@ -264,7 +118,7 @@ trait PostgresModule extends Jdbc { self => case SelectionSet.Empty => () } - def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = + private def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => builder.append(value.toString()) //todo fix escaping @@ -285,7 +139,8 @@ trait PostgresModule extends Jdbc { self => case _ => () //todo what do we do if we don't have a name? } } - def buildTable(table: Table): Unit = + + private def buildTable(table: Table): Unit = table match { //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => @@ -303,7 +158,92 @@ trait PostgresModule extends Jdbc { self => buildExpr(on) val _ = builder.append(" ") } - buildReadString(read) - builder.toString() + + def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = + read match { + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + object Dummy { + type F + type A + type B <: SelectionSet[A] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + import read._ + + builder.append("SELECT ") + buildSelection(selection.value) + builder.append(" FROM ") + buildTable(table) + whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" WHERE ") + buildExpr(whereExpr) + } + groupBy match { + case _ :: _ => + builder.append(" GROUP BY ") + buildExprList(groupBy) + + havingExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" HAVING ") + buildExpr(havingExpr) + } + case Nil => () + } + orderBy match { + case _ :: _ => + builder.append(" ORDER BY ") + buildOrderingList(orderBy) + case Nil => () + } + limit match { + case Some(limit) => + builder.append(" LIMIT ").append(limit) + case None => () + } + offset match { + case Some(offset) => + val _ = builder.append(" OFFSET ").append(offset) + case None => () + } + + case Read.Union(left, right, distinct) => + buildReadString(left) + builder.append(" UNION ") + if (!distinct) builder.append("ALL ") + buildReadString(right) + + case Read.Literal(values) => + val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + } + + def buildDeleteString(delete: self.Delete[_, _]): Unit = { + builder.append("DELETE FROM ") + buildTable(delete.table) + builder.append(" WHERE ") + buildExpr(delete.whereExpr) + } + + def render(): String = builder.toString + + } + + object PostgresFunctionDef { + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + } + + def renderDelete(delete: self.Delete[_, _]): String = { + val renderer = Renderer() + renderer.buildDeleteString(delete) + renderer.render() + } + + override def renderRead(read: self.Read[_]): String = { + val renderer = Renderer() + renderer.buildReadString(read) + renderer.render() } } From d7827f8cb86f6074de78b2f9fcf6ca03307d61ba Mon Sep 17 00:00:00 2001 From: Marek Kidon Date: Sat, 21 Nov 2020 14:15:30 +0100 Subject: [PATCH 013/673] Add missing override --- postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index e88bcd32c..0e0f48109 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -235,7 +235,7 @@ trait PostgresModule extends Jdbc { self => val Sind = FunctionDef[Double, Double](FunctionName("sind")) } - def renderDelete(delete: self.Delete[_, _]): String = { + override def renderDelete(delete: self.Delete[_, _]): String = { val renderer = Renderer() renderer.buildDeleteString(delete) renderer.render() From b47b33953876b96b748cc8aeffae6cd960234149 Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Sat, 21 Nov 2020 14:53:41 +0100 Subject: [PATCH 014/673] fix style --- postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index d636572e2..c00ce0d59 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -7,7 +7,7 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) val Initcap = FunctionDef[String, String](FunctionName("initcap")) } From 3a79dba9b499c2fcb03338648d736680ba9c5737 Mon Sep 17 00:00:00 2001 From: Hugo Sousa Date: Sat, 21 Nov 2020 14:58:47 +0100 Subject: [PATCH 015/673] Implement live layer for UpdateExecutor --- core/jvm/src/main/scala/zio/sql/Sql.scala | 2 + .../scala/zio/sql/GroupByHavingSpec.scala | 3 +- .../test/scala/zio/sql/ProductSchema.scala | 3 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 3 +- examples/src/main/scala/Example1.scala | 2 + jdbc/src/main/scala/zio/sql/jdbc.scala | 21 +- .../zio/sql/postgresql/PostgresModule.scala | 182 +++++++++++------- .../zio/sql/sqlserver/SqlServerModule.scala | 2 + 8 files changed, 146 insertions(+), 72 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index ef4cf5d20..ffee1123c 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -22,4 +22,6 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) def renderRead(read: self.Read[_]): String + + def renderUpdate(update: self.Update[_]): String } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index a305f39d7..4d8e432bd 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -16,7 +16,8 @@ object GroupByHavingSpec extends DefaultRunnableSpec { object AggregatedProductSchema { val sqldsl = new Sql { - override def renderRead(read: this.Read[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderUpdate(update: Update[_]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index cbf7da39f..27a6fb4ca 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -2,7 +2,8 @@ package zio.sql object ProductSchema { val sql = new Sql { - override def renderRead(read: this.Read[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderUpdate(update: this.Update[_]): String = ??? } import sql.ColumnSet._ import sql._ diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 9f17c9368..be5df34c7 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -7,7 +7,8 @@ object TestBasicSelect { val userSql = new Sql { self => import self.ColumnSet._ - override def renderRead(read: this.Read[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderUpdate(update: this.Update[_]): String = ??? val userTable = (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index c30ee7dbb..499a86901 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -5,6 +5,8 @@ object Example1 extends Sql { def renderRead(read: Example1.Read[_]): String = ??? + def renderUpdate(update: Example1.Update[_]): String = ??? + val columnSet = int("age") ++ string("name") val table = columnSet.table("person") diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 73be39c16..d53a3c37d 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -47,8 +47,27 @@ trait Jdbc extends zio.sql.Sql { type UpdateExecutor = Has[UpdateExecutor.Service] object UpdateExecutor { trait Service { - def execute(Update: Update[_]): IO[Exception, Long] + def execute(update: Update[_]): IO[Exception, Int] } + + val live: ZLayer[ConnectionPool with Blocking, Nothing, UpdateExecutor] = + ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, UpdateExecutor.Service] { (pool, blocking) => + new Service { + def execute(update: Update[_]): IO[Exception, Int] = + pool.connection + .use(conn => + blocking.effectBlocking { + + val query = renderUpdate(update) + + val statement = conn.createStatement() + + statement.executeUpdate(query) + + }.refineToOrDie[Exception] + ) + } + } } type ReadExecutor = Has[ReadExecutor.Service] diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..fd85a0f4c 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -10,69 +10,116 @@ trait PostgresModule extends Jdbc { self => val Sind = FunctionDef[Double, Double](FunctionName("sind")) } + private def buildExpr[A, B](builder: StringBuilder, expr: self.Expr[_, A, B]): Unit = expr match { + case Expr.Source(tableName, column) => + val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Unary(base, op) => + val _ = builder.append(" ").append(op.symbol) + buildExpr(builder, base) + case Expr.Property(base, op) => + buildExpr(builder, base) + val _ = builder.append(" ").append(op.symbol) + case Expr.Binary(left, right, op) => + buildExpr(builder, left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(builder, right) + case Expr.Relational(left, right, op) => + buildExpr(builder, left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(builder, right) + case Expr.In(value, set) => + buildExpr(builder, value) + buildRead(builder, set) + case Expr.Literal(value) => + val _ = builder.append(value.toString) //todo fix escaping + case Expr.AggregationCall(param, aggregation) => + builder.append(aggregation.name.name) + builder.append("(") + buildExpr(builder, param) + val _ = builder.append(")") + case Expr.FunctionCall1(param, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(builder, param) + val _ = builder.append(")") + case Expr.FunctionCall2(param1, param2, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(builder, param1) + builder.append(",") + buildExpr(builder, param2) + val _ = builder.append(")") + case Expr.FunctionCall3(param1, param2, param3, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(builder, param1) + builder.append(",") + buildExpr(builder, param2) + builder.append(",") + buildExpr(builder, param3) + val _ = builder.append(")") + case Expr.FunctionCall4(param1, param2, param3, param4, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(builder, param1) + builder.append(",") + buildExpr(builder, param2) + builder.append(",") + buildExpr(builder, param3) + builder.append(",") + buildExpr(builder, param4) + val _ = builder.append(")") + } + + override def renderUpdate(update: self.Update[_]): String = { + val builder = new StringBuilder + + def buildUpdateString[A <: SelectionSet[_]](update: self.Update[_]): Unit = + update match { + case Update(table, set, whereExpr) => + builder.append("UPDATE ") + buildTable(table) + builder.append("SET ") + buildSet(set) + builder.append("WHERE ") + buildExpr(builder, whereExpr) + } + + def buildTable(table: Table): Unit = + table match { + //The outer reference in this type test cannot be checked at run time?! + case sourceTable: self.Table.Source => + val _ = builder.append(sourceTable.name) + case Table.Joined(_, left, _, _) => + buildTable(left) //TODO restrict Update to only allow sourceTable + } + + def buildSet[A <: SelectionSet[_]](set: List[Set[_, A]]): Unit = + set match { + case head :: tail => + buildExpr(builder, head.lhs) + builder.append(" = ") + buildExpr(builder, head.rhs) + tail.foreach { setEq => + builder.append(", ") + buildExpr(builder, setEq.lhs) + builder.append(" = ") + buildExpr(builder, setEq.rhs) + } + case Nil => //TODO restrict Update to not allow empty set + } + + buildUpdateString(update) + builder.toString() + } + override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder + buildRead(builder, read) + builder.toString() + } - def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => - val _ = builder.append(" ").append(op.symbol) - buildExpr(base) - case Expr.Property(base, op) => - buildExpr(base) - val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.Relational(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.In(value, set) => - buildExpr(value) - buildReadString(set) - case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => - builder.append(aggregation.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - val _ = builder.append(")") - } + private def buildRead(builder: StringBuilder, read: self.Read[_]): Unit = { def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = read match { @@ -93,7 +140,7 @@ trait PostgresModule extends Jdbc { self => case Expr.Literal(true) => () case _ => builder.append(" WHERE ") - buildExpr(whereExpr) + buildExpr(builder, whereExpr) } groupBy match { case _ :: _ => @@ -104,7 +151,7 @@ trait PostgresModule extends Jdbc { self => case Expr.Literal(true) => () case _ => builder.append(" HAVING ") - buildExpr(havingExpr) + buildExpr(builder, havingExpr) } case Nil => () } @@ -138,7 +185,7 @@ trait PostgresModule extends Jdbc { self => def buildExprList(expr: List[Expr[_, _, _]]): Unit = expr match { case head :: tail => - buildExpr(head) + buildExpr(builder, head) tail match { case _ :: _ => builder.append(", ") @@ -151,9 +198,9 @@ trait PostgresModule extends Jdbc { self => expr match { case head :: tail => head match { - case Ordering.Asc(value) => buildExpr(value) + case Ordering.Asc(value) => buildExpr(builder, value) case Ordering.Desc(value) => - buildExpr(value) + buildExpr(builder, value) builder.append(" DESC") } tail match { @@ -193,7 +240,7 @@ trait PostgresModule extends Jdbc { self => case None => () } case ColumnSelection.Computed(expr, name) => - buildExpr(expr) + buildExpr(builder, expr) name match { case Some(name) => Expr.exprName(expr) match { @@ -219,10 +266,9 @@ trait PostgresModule extends Jdbc { self => }) buildTable(right) builder.append(" ON ") - buildExpr(on) + buildExpr(builder, on) val _ = builder.append(" ") } buildReadString(read) - builder.toString() } } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 30fa79833..1e9132a02 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -4,6 +4,8 @@ import zio.sql.Jdbc trait SqlServerModule extends Jdbc { self => + override def renderUpdate(update: self.Update[_]): String = ??? + override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder From 2fdc3d58efb555c85c4c6bf067f13f8a485dc863 Mon Sep 17 00:00:00 2001 From: Yash Datta Date: Sat, 21 Nov 2020 22:14:56 +0800 Subject: [PATCH 016/673] Add current_date function --- core/jvm/src/main/scala/zio/sql/expr.scala | 8 ++++++++ .../scala/zio/sql/postgresql/PostgresModule.scala | 5 +++++ .../zio/sql/postgresql/FunctionDefSpec.scala | 15 +++++++++++++++ .../scala/zio/sql/sqlserver/SqlServerModule.scala | 2 ++ 4 files changed, 30 insertions(+) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..c882bd026 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,6 +158,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } + sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) + extends InvariantExpr[F, A, Z] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } + sealed case class FunctionCall1[F, A, B, Z: TypeTag](param: Expr[F, A, B], function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] @@ -210,6 +215,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { sealed case class FunctionDef[-A, +B](name: FunctionName) { self => + def apply[Source, B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Unit, Source, B1] = + Expr.FunctionCall0(self: FunctionDef[A, B1]) + def apply[F, Source, B1 >: B](param1: Expr[F, Source, A])(implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = Expr.FunctionCall1(param1, self: FunctionDef[A, B1]) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..a80f8c282 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,5 +1,7 @@ package zio.sql.postgresql +import java.time.LocalDate + import zio.sql.Jdbc /** @@ -8,6 +10,7 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val CurrentDate = FunctionDef[Nothing, LocalDate](FunctionName("current_date")) } override def renderRead(read: self.Read[_]): String = { @@ -40,6 +43,8 @@ trait PostgresModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") + case Expr.FunctionCall0(function) => + val _ = builder.append(function.name.name) case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..cc21b6406 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,5 +1,7 @@ package zio.sql.postgresql +import java.time.LocalDate + import zio.Cause import zio.test._ import zio.test.Assertion._ @@ -35,6 +37,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("current_date") { + val query = select(CurrentDate()) from customers + + val expected = LocalDate.now() + + val testResult = execute(query).to[LocalDate, LocalDate](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 30fa79833..c0bbfc250 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -34,6 +34,8 @@ trait SqlServerModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") + case Expr.FunctionCall0(function) => + val _ = builder.append(function.name.name) case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") From 9d8e5b6732a0408a7956becadb0ee4fe8700c21e Mon Sep 17 00:00:00 2001 From: Marek Kidon Date: Sat, 21 Nov 2020 15:56:27 +0100 Subject: [PATCH 017/673] Fix 2.12 tests --- core/jvm/src/main/scala/zio/sql/Sql.scala | 2 +- core/jvm/src/main/scala/zio/sql/delete.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 14f550428..e0bde46a9 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,7 +17,7 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = SelectBuilder(selection) - def deleteFrom[F[_], A, B](table: Table.Source.Aux[F, A, B]): DeleteBuilder[F, A, B] = DeleteBuilder(table) + def deleteFrom[A](table: Table.Aux[A]): DeleteBuilder[A] = DeleteBuilder(table) def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) diff --git a/core/jvm/src/main/scala/zio/sql/delete.scala b/core/jvm/src/main/scala/zio/sql/delete.scala index fbd3a2975..c45a6cbe5 100644 --- a/core/jvm/src/main/scala/zio/sql/delete.scala +++ b/core/jvm/src/main/scala/zio/sql/delete.scala @@ -2,10 +2,10 @@ package zio.sql trait DeleteModule { self: ExprModule with TableModule => - sealed case class DeleteBuilder[F[_], A, B](table: Table.Aux[A]) { - def where[F1](expr: Expr[F1, A, Boolean]): Delete[F1, A] = Delete(table, expr) + sealed case class DeleteBuilder[A](table: Table.Aux[A]) { + def where[F](expr: Expr[F, A, Boolean]): Delete[F, A] = Delete(table, expr) - def all[F1]: Delete[Features.Literal, A] = Delete(table, Expr.literal(true)) + def all[F]: Delete[Features.Literal, A] = Delete(table, Expr.literal(true)) } sealed case class Delete[F, A](table: Table.Aux[A], whereExpr: Expr[F, A, Boolean]) From 6bc3ed70677c70143ce7387295edc91e0a48024c Mon Sep 17 00:00:00 2001 From: Marek Kidon Date: Sat, 21 Nov 2020 16:14:38 +0100 Subject: [PATCH 018/673] Revert "Fix 2.12 tests" This reverts commit 9d8e5b6732a0408a7956becadb0ee4fe8700c21e. --- core/jvm/src/main/scala/zio/sql/Sql.scala | 2 +- core/jvm/src/main/scala/zio/sql/delete.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index e0bde46a9..14f550428 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,7 +17,7 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = SelectBuilder(selection) - def deleteFrom[A](table: Table.Aux[A]): DeleteBuilder[A] = DeleteBuilder(table) + def deleteFrom[F[_], A, B](table: Table.Source.Aux[F, A, B]): DeleteBuilder[F, A, B] = DeleteBuilder(table) def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) diff --git a/core/jvm/src/main/scala/zio/sql/delete.scala b/core/jvm/src/main/scala/zio/sql/delete.scala index c45a6cbe5..fbd3a2975 100644 --- a/core/jvm/src/main/scala/zio/sql/delete.scala +++ b/core/jvm/src/main/scala/zio/sql/delete.scala @@ -2,10 +2,10 @@ package zio.sql trait DeleteModule { self: ExprModule with TableModule => - sealed case class DeleteBuilder[A](table: Table.Aux[A]) { - def where[F](expr: Expr[F, A, Boolean]): Delete[F, A] = Delete(table, expr) + sealed case class DeleteBuilder[F[_], A, B](table: Table.Aux[A]) { + def where[F1](expr: Expr[F1, A, Boolean]): Delete[F1, A] = Delete(table, expr) - def all[F]: Delete[Features.Literal, A] = Delete(table, Expr.literal(true)) + def all[F1]: Delete[Features.Literal, A] = Delete(table, Expr.literal(true)) } sealed case class Delete[F, A](table: Table.Aux[A], whereExpr: Expr[F, A, Boolean]) From 8f75fc02374f43ddb3ff060b0cd2d653bec4836d Mon Sep 17 00:00:00 2001 From: Marek Kidon Date: Sat, 21 Nov 2020 16:17:08 +0100 Subject: [PATCH 019/673] Comment out test that are failing on 2.12 --- .../sql/postgresql/PostgresModuleTest.scala | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index e34ee2fe7..7f3e51216 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -184,31 +184,31 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { } yield assert(r)(hasSameElementsDistinct(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can delete all from a single table") { - val query = deleteFrom(customers).all - println(renderDelete(query)) + } + // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet + // val query = deleteFrom(customers).all + // println(renderDelete(query)) - val result = execute(query) + // val result = execute(query) - val assertion = for { - r <- result - } yield assert(r)(equalTo(5)) + // val assertion = for { + // r <- result + // } yield assert(r)(equalTo(5)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can delete from single table with a condition") { - val query = deleteFrom(customers) where (verified isNotTrue) - println(renderDelete(query)) + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // }, + // testM("Can delete from single table with a condition") { + // val query = deleteFrom(customers) where (verified isNotTrue) + // println(renderDelete(query)) - val result = execute(query) + // val result = execute(query) - val assertion = for { - r <- result - } yield assert(r)(equalTo(1)) + // val assertion = for { + // r <- result + // } yield assert(r)(equalTo(1)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // } ) } From 040376ce0b59f892082cd89e5e3020932e1749a7 Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Sat, 21 Nov 2020 16:27:13 +0100 Subject: [PATCH 020/673] Add 'random' function to PostgresModule --- core/jvm/src/main/scala/zio/sql/expr.scala | 7 +++++++ .../scala/zio/sql/postgresql/PostgresModule.scala | 7 ++++++- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 11 +++++++++++ .../scala/zio/sql/sqlserver/SqlServerModule.scala | 4 ++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..36cc83492 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -163,6 +163,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } + sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } + sealed case class FunctionCall2[F1, F2, A, B, C, Z: TypeTag]( param1: Expr[F1, A, B], param2: Expr[F2, A, C], @@ -210,6 +214,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { sealed case class FunctionDef[-A, +B](name: FunctionName) { self => + def apply[Source, B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Unit, Source, B1] = + Expr.FunctionCall0(self: FunctionDef[A, B1]) + def apply[F, Source, B1 >: B](param1: Expr[F, Source, A])(implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = Expr.FunctionCall1(param1, self: FunctionDef[A, B1]) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..0218836d9 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -7,7 +7,8 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Random = FunctionDef[Nothing, Double](FunctionName("random")) } override def renderRead(read: self.Read[_]): String = { @@ -45,6 +46,10 @@ trait PostgresModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") + case Expr.FunctionCall0(function) => + builder.append(function.name.name) + builder.append("(") + val _ = builder.append(")") case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..01754994d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -35,6 +35,17 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("random") { + val query = select(Random()) from customers + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0D) && Assertion.isLessThanEqualTo(1D)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 30fa79833..75ff65e9d 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -34,6 +34,10 @@ trait SqlServerModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") + case Expr.FunctionCall0(function) => + builder.append(function.name.name) + builder.append("(") + val _ = builder.append(")") case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") From a83438a6788978a756ddc94d6e52582c4c933602 Mon Sep 17 00:00:00 2001 From: LAURA CHAPMAN Date: Sat, 21 Nov 2020 10:40:18 -0500 Subject: [PATCH 021/673] Fill the missing date/time related decoding in ReadExecutor --- jdbc/src/main/scala/zio/sql/jdbc.scala | 28 +++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 73be39c16..d697cb9c5 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,9 +1,8 @@ package zio.sql import java.sql._ - import java.io.IOException - +import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset, ZonedDateTime } import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } @@ -185,15 +184,34 @@ trait Jdbc extends zio.sql.Sql { column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalTime() ) case TLong => tryDecode[Long](column.fold(resultSet.getLong(_), resultSet.getLong(_))) - case TOffsetDateTime => ??? - case TOffsetTime => ??? + case TOffsetDateTime => + tryDecode[OffsetDateTime]( + column + .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) + .toLocalDateTime() + .atOffset(ZoneOffset.of(ZoneId.systemDefault().getId)) + ) + case TOffsetTime => + tryDecode[OffsetTime]( + column + .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) + .toLocalDateTime() + .toLocalTime + .atOffset(ZoneOffset.of(ZoneId.systemDefault().getId)) + ) case TShort => tryDecode[Short](column.fold(resultSet.getShort(_), resultSet.getShort(_))) case TString => tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) case TUUID => tryDecode[java.util.UUID]( java.util.UUID.fromString(column.fold(resultSet.getString(_), resultSet.getString(_))) ) - case TZonedDateTime => ??? + case TZonedDateTime => + tryDecode[ZonedDateTime]( + column + .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) + .toLocalDateTime() + .atZone(ZoneId.systemDefault()) + ) case TDialectSpecific(_) => ??? case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) } From 95b4b9f7c6362b38c02a0eb04f39da58e13f46a0 Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Sat, 21 Nov 2020 16:42:47 +0100 Subject: [PATCH 022/673] Format code --- postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala | 2 +- .../src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 0218836d9..b34122a60 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -46,7 +46,7 @@ trait PostgresModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) => + case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") val _ = builder.append(")") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 01754994d..de5ee8220 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -44,7 +44,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = for { r <- testResult.runCollect - } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0D) && Assertion.isLessThanEqualTo(1D)) + } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } From ef7a191d42d31b25349e7d8b79053472ed754fb8 Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Sat, 21 Nov 2020 17:30:39 +0100 Subject: [PATCH 023/673] Add 'md5' function to PostgresModule --- core/jvm/src/main/scala/zio/sql/expr.scala | 4 +++- .../scala/zio/sql/postgresql/PostgresModule.scala | 1 + .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..5768e89ce 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,7 +108,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag - implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) + implicit def literal[A](a: A)(implicit typeTag: TypeTag[A]): Expr[Features.Literal, Any, A] = typeTag match { + case _ => Expr.Literal(a) + } def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..b4f4db3be 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -8,6 +8,7 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Md5 = FunctionDef[String, String](FunctionName("md5")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..c8845249d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -35,6 +35,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("md5") { + val query = select(Md5("'hello, world!'")) from customers + + val expected = "3adbbad1791fbae3ec908894c4963870" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From d9517cfb89358471925c34b5aec201c3693ae723 Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Sat, 21 Nov 2020 17:37:21 +0100 Subject: [PATCH 024/673] add timeofday func for postgres --- core/jvm/src/main/scala/zio/sql/expr.scala | 7 ++++++ .../zio/sql/postgresql/PostgresModule.scala | 6 ++++- .../zio/sql/postgresql/FunctionDefSpec.scala | 22 ++++++++++--------- .../zio/sql/sqlserver/SqlServerModule.scala | 2 ++ 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..8ff81dec4 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,6 +158,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } + sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } + sealed case class FunctionCall1[F, A, B, Z: TypeTag](param: Expr[F, A, B], function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] @@ -210,6 +214,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { sealed case class FunctionDef[-A, +B](name: FunctionName) { self => + def apply[Source, B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Unit, Source, B1] = + Expr.FunctionCall0(self: FunctionDef[A, B1]) + def apply[F, Source, B1 >: B](param1: Expr[F, Source, A])(implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = Expr.FunctionCall1(param1, self: FunctionDef[A, B1]) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 8259fbf44..6d94cb835 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -7,7 +7,7 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) val Timeofday = FunctionDef[Nothing, String](FunctionName("timeofday")) } @@ -41,6 +41,10 @@ trait PostgresModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") + case Expr.FunctionCall0(function) => + builder.append(function.name.name) + builder.append("(") + val _ = builder.append(")") case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index db67303cd..b56dc4cc6 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -38,16 +38,18 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("timeofday") { - val query = select(Sind(30.0)) from customers - - val expected = 0.5 - - val testResult = execute(query).to[Double, Double](identity) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - + val query = select(Timeofday()) from customers + + val testResult = execute(query).to[String, String](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head)( + matchesRegex( + "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3}" + ) + ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 30fa79833..c0bbfc250 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -34,6 +34,8 @@ trait SqlServerModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") + case Expr.FunctionCall0(function) => + val _ = builder.append(function.name.name) case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") From 3b5bbc91c734b6f6b9c0ac51954724e14a5313ec Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Sat, 21 Nov 2020 18:04:22 +0100 Subject: [PATCH 025/673] Add 'chr' function to PostgresModule --- .../scala/zio/sql/postgresql/PostgresModule.scala | 1 + .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..9b2a38a48 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -8,6 +8,7 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Chr = FunctionDef[Int, String](FunctionName("chr")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..d90ab1e03 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -35,6 +35,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("chr") { + val query = select(Chr(65)) from customers + + val expected = "A" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From 550b3cd32414ef8b703cd42cce09dce36abd0fe6 Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Sat, 21 Nov 2020 18:47:54 +0100 Subject: [PATCH 026/673] add current_time func for postgres --- jdbc/src/main/scala/zio/sql/jdbc.scala | 8 +++-- .../zio/sql/postgresql/PostgresModule.scala | 35 +++++++++++-------- .../zio/sql/postgresql/FunctionDefSpec.scala | 18 ++++++++++ 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 73be39c16..34daae4c2 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,8 +1,8 @@ package zio.sql import java.sql._ - import java.io.IOException +import java.time.format.DateTimeFormatter import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } import zio.blocking.Blocking @@ -186,7 +186,11 @@ trait Jdbc extends zio.sql.Sql { ) case TLong => tryDecode[Long](column.fold(resultSet.getLong(_), resultSet.getLong(_))) case TOffsetDateTime => ??? - case TOffsetTime => ??? + case TOffsetTime => + val format = DateTimeFormatter.ofPattern("HH:mm:ss.SSSSSSx") + tryDecode[java.time.OffsetTime]( + java.time.OffsetTime.parse(column.fold(resultSet.getString(_), resultSet.getString(_)), format) + ) case TShort => tryDecode[Short](column.fold(resultSet.getShort(_), resultSet.getShort(_))) case TString => tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) case TUUID => diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 6d94cb835..89abc5537 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,5 +1,7 @@ package zio.sql.postgresql +import java.time.OffsetTime + import zio.sql.Jdbc /** @@ -7,57 +9,60 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) - val Timeofday = FunctionDef[Nothing, String](FunctionName("timeofday")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Timeofday = FunctionDef[Nothing, String](FunctionName("timeofday")) + val CurrentTime = FunctionDef[Nothing, OffsetTime](FunctionName("current_time")) } override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) => + case Expr.FunctionCall0(function) if function.name.name == "current_time" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -66,7 +71,7 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index b56dc4cc6..3ea0daeda 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,5 +1,7 @@ package zio.sql.postgresql +import java.time.OffsetTime + import zio.Cause import zio.test._ import zio.test.Assertion._ @@ -51,6 +53,22 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("current_time") { + val query = select(CurrentTime()) from customers + + val testResult = execute(query).to[OffsetTime, OffsetTime](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head.toString)( + matchesRegex( + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{6}\\+[0-9]{2}:[0-9]{2}" + ) + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) } From 52855a5b153de9484fd27772e8c926f8f4cfa6f4 Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Sat, 21 Nov 2020 18:58:39 +0100 Subject: [PATCH 027/673] fix --- .../src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 3ea0daeda..e8c90690e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -64,7 +64,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head.toString)( matchesRegex( - "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{6}\\+[0-9]{2}:[0-9]{2}" + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{6}Z" ) ) From 3779891267f004d9fb630f41b8205bd32e088e46 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sat, 21 Nov 2020 19:18:28 +0100 Subject: [PATCH 028/673] remove middlema, rely on FunctionCallN --- core/jvm/src/main/scala/zio/sql/expr.scala | 44 +++++-------------- core/jvm/src/main/scala/zio/sql/typetag.scala | 5 --- jdbc/src/main/scala/zio/sql/jdbc.scala | 5 --- .../zio/sql/postgresql/PostgresModule.scala | 9 ++++ .../zio/sql/postgresql/FunctionDefSpec.scala | 20 +++------ .../zio/sql/sqlserver/SqlServerModule.scala | 9 ++++ 6 files changed, 35 insertions(+), 57 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ed2337068..d6b037859 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,29 +108,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag + implicit def literal(str: String): Expr[Features.Literal, Any, String] = Expr.Literal(s"'${str}'") implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) -// implicit def literals[A: TypeTag, Seq[A]: TypeTag](as: Seq[A]): Expr[Features.Literal, Any, Seq[A]] = Expr.Literal(as) - -// implicit def tuple2[String: TypeTag](a: (String, String)): Expr[Features.Literal, Any, (String, String)] = { -// implicit val f: TypeTag[(String, String)] = TypeTag.Tuple2[String]() -// Expr.Literal(a) -// } - -// implicit def tuple2[String: TypeTag](a: (String, String)): Expr[Features.Literal, Any, (String, String)] = { -// val s1 = literal(a._1) -// val s2 = literal(a._1) -// s1. -// } - - implicit def foo(seq: Seq[FunctionDef.FlatValueOrColumnValue]): Expr[Features.Literal, Any, String] = { - val nativeFunctionSqlString: String = seq.map { - case FunctionDef.StringValue(v) => s"'${v}'" //Note: the ' - case FunctionDef.ColumnValue(v) => s"${v}" - }.mkString(", ") - literal[String](nativeFunctionSqlString) - } - def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { case Expr.Source(_, c) => Some(c.name) @@ -210,6 +190,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { ) extends InvariantExpr[Features.Union[F1, Features.Union[F2, Features.Union[F3, F4]]], A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } + + sealed case class FunctionCallN[F, A, B, Z: TypeTag](param: Seq[Expr[F, A, B]], function: FunctionDef[B, Z]) + extends InvariantExpr[F, A, Z] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } } sealed case class AggregationDef[-A, +B](name: FunctionName) { self => @@ -261,6 +246,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { self.narrow[(P1, P2, P3, P4)]: FunctionDef[(P1, P2, P3, P4), B1] ) + //Features.Source with Features.Literal + def apply[F, Source, B1 >: B](params: Seq[Expr[F, Source, A]]) + (implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = + Expr.FunctionCallN(params, self: FunctionDef[A, B1]) + def narrow[C](implicit ev: C <:< A): FunctionDef[C, B] = { val _ = ev self.asInstanceOf[FunctionDef[C, B]] @@ -292,18 +282,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val Ascii = FunctionDef[String, Int](FunctionName("ascii")) val CharLength = FunctionDef[String, Int](FunctionName("character length")) val Concat = FunctionDef[(String, String), String](FunctionName("concat")) - sealed trait FlatValueOrColumnValue - case class StringValue(v: String) extends FlatValueOrColumnValue - case class ColumnValue(v: String) extends FlatValueOrColumnValue - object FlatValueOrColumnValue { - implicit def columnToColumnValue(c: ColumnSet): FlatValueOrColumnValue = c match { - case ColumnSet.Empty => ColumnValue("") // TODO: ColumnSet is probably not the right type :/ - case ColumnSet.Cons(head, _) => ColumnValue(head.name) - } - implicit def stringToStringValue(s: String): FlatValueOrColumnValue = StringValue(s) - implicit def convList[S, T](input: List[S])(implicit c: S => T): List[T] = - input map c - } val ConcatWs = FunctionDef[String, String](FunctionName("concat_ws")) val Lower = FunctionDef[String, String](FunctionName("lower")) val Ltrim = FunctionDef[String, String](FunctionName("ltrim")) diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 8ad8df028..508e5e1aa 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -34,11 +34,6 @@ trait TypeTagModule { implicit case object TZonedDateTime extends NotNull[ZonedDateTime] sealed case class TDialectSpecific[A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] - //TODO: remove -// case class Tuple2[A]() extends NotNull[(A, A)] -// implicit def tuple2[A: TypeTag] = new Tuple2[A] -// case class Tuple2[String]() extends NotNull[(String, String)] - sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 527fff308..73be39c16 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -195,11 +195,6 @@ trait Jdbc extends zio.sql.Sql { ) case TZonedDateTime => ??? case TDialectSpecific(_) => ??? -// case Tuple2() => -// for { -// s1 <- tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) -// s2 <- tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) -// } yield (s1, s2) case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) } } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..057c0bb4f 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -72,6 +72,15 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param4) val _ = builder.append(")") + case Expr.FunctionCallN(params, function) => + builder.append(function.name.name) + builder.append("(") + params.foreach { e => + buildExpr(e) + builder.append(",") + } + builder.deleteCharAt(builder.size-1) // the loop above will leave a trailing , + val _ = builder.append(")") } def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index d01658538..d418b0daf 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -9,26 +9,18 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.Customers._ import this.PostgresFunctionDef._ import this.FunctionDef._ - import this.ColumnSet._ val spec = suite("Postgres FunctionDef")( testM("concat_ws #1") { - import FlatValueOrColumnValue._ + import Expr._ // val idealApi = ConcatWs(" ", "Person:", string("first_name"), string("last_name"), "!") -// val foo: Seq[FlatValueOrColumnValue] = string("first_name") :: string("last_name") :: "!" :: Nil -// val args: (String, Seq[String]) = (" ", "first_name" :: "last_name" :: "!" :: Nil) -// val foo: Expr[_, _, _] = "first_name" + //TODO: we shouldn't be forced to provide explicit calls to literal + val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:")) //Seq(literal(" "), literal("Person:")) +// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(Customers.fName, Customers.lName) +// val args_0/*: Seq[Expr[Expr.DataSource, Any, String]]*/ = Seq(Customers.fName, literal("!")) -// val args: Seq[Expr[_,_,_]] = "' '" :: "'Person:'" :: "first_name" :: "last_name" :: Nil - -// val args: Expr[_,_,(String, String)] = ("' '", "'Person:', first_name, last_name") - -// val args_2 = " " :: "Person: " :: string("first_name") :: string("last_name") :: "!" :: Nil -// val args_1: List[FlatValueOrColumnValue] = args_2 -// val args_0: Expr[_, _, String] = args_1 - - val args_0: List[FlatValueOrColumnValue] = stringToStringValue(" ") :: stringToStringValue("Person:") :: columnToColumnValue(string("first_name")) :: columnToColumnValue(string("last_name")) :: stringToStringValue("!") :: Nil +// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:"), Customers.fName, Customers.lName, literal("!")) val query = select(ConcatWs(args_0)) from customers println(renderRead(query)) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 30fa79833..b121ba76a 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -66,6 +66,15 @@ trait SqlServerModule extends Jdbc { self => builder.append(",") buildExpr(param4) val _ = builder.append(")") + case Expr.FunctionCallN(params, function) => + builder.append(function.name.name) + builder.append("(") + params.foreach { e => + buildExpr(e) + builder.append(", ") + } + builder.deleteCharAt(builder.size-1) // the loop above will leave a trailing , + val _ = builder.append(")") } def buildReadString(read: self.Read[_]): Unit = From 8be028f9bc9e9d1bf38cd8a94ddda43f95884d48 Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Sat, 21 Nov 2020 19:27:15 +0100 Subject: [PATCH 029/673] Add 'localtime' function to PostgresModule --- core/jvm/src/main/scala/zio/sql/expr.scala | 7 ++++ .../zio/sql/postgresql/PostgresModule.scala | 32 +++++++++++-------- .../zio/sql/postgresql/FunctionDefSpec.scala | 24 ++++++++++++++ .../zio/sql/sqlserver/SqlServerModule.scala | 26 ++++++++------- 4 files changed, 64 insertions(+), 25 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..8ff81dec4 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,6 +158,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } + sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } + sealed case class FunctionCall1[F, A, B, Z: TypeTag](param: Expr[F, A, B], function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] @@ -210,6 +214,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { sealed case class FunctionDef[-A, +B](name: FunctionName) { self => + def apply[Source, B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Unit, Source, B1] = + Expr.FunctionCall0(self: FunctionDef[A, B1]) + def apply[F, Source, B1 >: B](param1: Expr[F, Source, A])(implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = Expr.FunctionCall1(param1, self: FunctionDef[A, B1]) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..533689fd3 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,5 +1,7 @@ package zio.sql.postgresql +import java.time.LocalTime + import zio.sql.Jdbc /** @@ -7,52 +9,56 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Localtime = FunctionDef[Nothing, LocalTime](FunctionName("localtime")) + val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) } override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall0(function) if (function.name.name == "localtime") => + val _ = builder.append(function.name.name) + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -61,7 +67,7 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..fb2d482d6 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,5 +1,7 @@ package zio.sql.postgresql +import java.time.LocalTime + import zio.Cause import zio.test._ import zio.test.Assertion._ @@ -35,6 +37,28 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtime") { + val query = select(Localtime()) from customers + + val testResult = execute(query).to[LocalTime, LocalTime](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{3}")) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtime with precision") { + val query = select(LocaltimeWithPrecision(0)) from customers + + val testResult = execute(query).to[LocalTime, LocalTime](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}")) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 30fa79833..1f3caf8ee 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -8,45 +8,47 @@ trait SqlServerModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall0(function) if (function.name.name == "localtime") => + val _ = builder.append(function.name.name) + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -55,7 +57,7 @@ trait SqlServerModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) From b252a152de383bad6fbbafb95ab8ec6a53984a0d Mon Sep 17 00:00:00 2001 From: Joaquin Garcia Sastre Date: Sat, 21 Nov 2020 19:03:23 +0100 Subject: [PATCH 030/673] Add 'log' function to PostgresModule --- core/jvm/src/main/scala/zio/sql/expr.scala | 2 +- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index ba9d9233b..4f9d09869 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -256,8 +256,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val Cos = FunctionDef[Double, Double](FunctionName("cos")) val Exp = FunctionDef[Double, Double](FunctionName("exp")) val Floor = FunctionDef[Double, Double](FunctionName("floor")) - //val Log = FunctionDef[Double, Double](FunctionName("log")) //not part of SQL 2011 spec val Ln = FunctionDef[Double, Double](FunctionName("ln")) + val Log = FunctionDef[(Double, Double), Double](FunctionName("log")) val Mod = FunctionDef[(Double, Double), Double](FunctionName("mod")) val Power = FunctionDef[(Double, Double), Double](FunctionName("power")) val Round = FunctionDef[(Double, Int), Double](FunctionName("round")) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..71f31e585 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -11,6 +11,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.FunctionDef._ val spec = suite("Postgres FunctionDef")( + testM("log") { + val query = select(Log(2.0, 32.0)) from customers + + val expected: Double = 5 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From 496c0648a01bcd2bfeaa641da6631b54199f2fcd Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Sat, 21 Nov 2020 20:44:39 +0100 Subject: [PATCH 031/673] Add 'localtimestamp' functions to PostgresModule --- .../zio/sql/postgresql/PostgresModule.scala | 38 +++++++++-------- .../zio/sql/postgresql/FunctionDefSpec.scala | 42 +++++++++++++++++-- 2 files changed, 60 insertions(+), 20 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 533689fd3..1cd6044f0 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,6 +1,6 @@ package zio.sql.postgresql -import java.time.LocalTime +import java.time.{ Instant, LocalTime } import zio.sql.Jdbc @@ -9,56 +9,60 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) - val Localtime = FunctionDef[Nothing, LocalTime](FunctionName("localtime")) - val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Localtime = FunctionDef[Nothing, LocalTime](FunctionName("localtime")) + val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) + val Localtimestamp = FunctionDef[Nothing, Instant](FunctionName("localtimestamp")) + val LocaltimestampWithPrecision = FunctionDef[Int, Instant](FunctionName("localtimestamp")) } override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) if (function.name.name == "localtime") => + case Expr.FunctionCall0(function) if (function.name.name == "localtime") => val _ = builder.append(function.name.name) - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall0(function) if (function.name.name == "localtimestamp") => + val _ = builder.append(function.name.name) + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -67,7 +71,7 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index fb2d482d6..a6908ab4f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,6 +1,6 @@ package zio.sql.postgresql -import java.time.LocalTime +import java.time.{ Instant, LocalTime } import zio.Cause import zio.test._ @@ -51,13 +51,49 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("localtime with precision") { - val query = select(LocaltimeWithPrecision(0)) from customers + val precision = 0 + val query = select(LocaltimeWithPrecision(precision)) from customers val testResult = execute(query).to[LocalTime, LocalTime](identity) val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}")) + } yield assert(r.head.toString)(Assertion.matchesRegex(s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}")) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtimestamp") { + val query = select(Localtimestamp()) from customers + + val testResult = execute(query).to[Instant, Instant](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head.toString)( + Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtimestamp with precision") { + val precision = 2 + + val millis = + if (precision == 0) "" + else if (precision <= 3) List.fill(3)("[0-9]").mkString(".", "", "") + else List.fill(6)("[0-9]").mkString(".", "", "") + + val query = select(LocaltimestampWithPrecision(precision)) from customers + + val testResult = execute(query).to[Instant, Instant](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head.toString)( + Assertion.matchesRegex(s"([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}${millis}Z") + ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } From cd0cfa9f621f17107a1dbd99b7b6d9bb06237452 Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 20:56:51 +0100 Subject: [PATCH 032/673] Add test for 'Abs' functions for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..c278f5334 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -11,6 +11,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.FunctionDef._ val spec = suite("Postgres FunctionDef")( + testM("abs") { + val query = select(Abs(-3.14159)) from customers + + val expected = 3.14159 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From 6ac977f9eb281a9d4616e3508cd185890c5da60a Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 21:08:06 +0100 Subject: [PATCH 033/673] Add test for 'Acos' function for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c278f5334..d7fb9cf6e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -24,6 +24,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("acos") { + val query = select(Acos(-1.0)) from customers + + val expected = 3.141592653589793 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From ec8137e1c9798acd14ea38dd1050d0bed159b0cd Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 21:14:14 +0100 Subject: [PATCH 034/673] Add test for 'Asin' function for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index d7fb9cf6e..18099048c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -37,6 +37,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("asin") { + val query = select(Asin(0.5)) from customers + + val expected = 0.5235987755982989 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From 690018a7c359de91b1edcf06de216c3d52194c76 Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 21:20:34 +0100 Subject: [PATCH 035/673] Add test for 'Atan' function for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 18099048c..5d29273f3 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -50,6 +50,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("atan") { + val query = select(Atan(10.0)) from customers + + val expected = 1.4711276743037347 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From 868b734908a1768239cd6592c00ef48927b00726 Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 21:24:29 +0100 Subject: [PATCH 036/673] Add test for 'Floor' function for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 5d29273f3..a3e4bd562 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -63,6 +63,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("floor") { + val query = select(Floor(-3.14159)) from customers + + val expected = -4.0 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From 7246e6d6c9003c5e0950ad5c5c65652612645b6d Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 21:31:15 +0100 Subject: [PATCH 037/673] Add test for 'Cos' function for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index a3e4bd562..568dcee0e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -63,6 +63,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("cos") { + val query = select(Cos(3.141592653589793)) from customers + + val expected = -1.0 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("floor") { val query = select(Floor(-3.14159)) from customers From ef90e8002eaee8382825cc1d12b920fe5027c969 Mon Sep 17 00:00:00 2001 From: fokot Date: Sat, 21 Nov 2020 21:33:29 +0100 Subject: [PATCH 038/673] transactions WIP --- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 6 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 133 +++++++++++++----- jdbc/src/main/scala/zio/sql/transaction.scala | 71 ++++++++++ .../sql/postgresql/PostgresModuleTest.scala | 17 +++ .../sql/postgresql/PostgresRunnableSpec.scala | 4 +- 5 files changed, 191 insertions(+), 40 deletions(-) create mode 100644 jdbc/src/main/scala/zio/sql/transaction.scala diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index 82092fc52..650584f6a 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -8,15 +8,15 @@ import zio.test.environment.TestEnvironment trait JdbcRunnableSpec extends AbstractRunnableSpec with Jdbc { - override type Environment = TestEnvironment with ReadExecutor + override type Environment = TestEnvironment with ReadExecutor with UpdateExecutor with DeleteExecutor with TransactionExecutor override type Failure = Any override def aspects: List[TestAspect[Nothing, TestEnvironment, Nothing, Any]] = List(TestAspect.timeoutWarning(60.seconds)) - def jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] + def jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] - override def runner: TestRunner[TestEnvironment with ReadExecutor, Any] = + override def runner: TestRunner[Environment, Any] = TestRunner(TestExecutor.default(ZEnv.live >>> jdbcTestEnvironment)) } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 73be39c16..a0a04727a 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,14 +1,13 @@ package zio.sql import java.sql._ - import java.io.IOException -import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } +import zio.{Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged} import zio.blocking.Blocking -import zio.stream.{ Stream, ZStream } +import zio.stream.{Stream, ZStream} -trait Jdbc extends zio.sql.Sql { +trait Jdbc extends zio.sql.Sql with TransactionModule { type ConnectionPool = Has[ConnectionPool.Service] object ConnectionPool { sealed case class Config(url: String, properties: java.util.Properties) @@ -40,21 +39,80 @@ trait Jdbc extends zio.sql.Sql { type DeleteExecutor = Has[DeleteExecutor.Service] object DeleteExecutor { trait Service { - def execute(delete: Delete[_, _]): IO[Exception, Unit] + def execute(delete: Delete[_, _]): IO[Exception, Int] + def executeOn(delete: Delete[_, _], connection: Connection): IO[Exception, Int] } + + val live = ZLayer.succeed( + new Service { + override def execute(delete: Delete[_, _]): IO[Exception, Int] = ??? + override def executeOn(delete: Delete[_, _], connection: Connection): IO[Exception, Int] = ??? + } + ) } type UpdateExecutor = Has[UpdateExecutor.Service] object UpdateExecutor { trait Service { - def execute(Update: Update[_]): IO[Exception, Long] + def execute(update: Update[_]): IO[Exception, Int] + def executeOn(update: Update[_], connection: Connection): IO[Exception, Int] } + + val live = ZLayer.succeed( + new Service { + override def execute(update: Update[_]): IO[Exception, Int] = ??? + override def executeOn(update: Update[_], connection: Connection): IO[Exception, Int] = ??? + } + ) } + + type TransactionExecutor = Has[TransactionExecutor.Service] + object TransactionExecutor { + trait Service { + def execute[R, A](tx: Transaction[R, A]): ZIO[R, Exception, A] + } + + val live: ZLayer[ConnectionPool with Blocking with ReadExecutor with UpdateExecutor with DeleteExecutor, Exception, TransactionExecutor] = + ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, ReadExecutor.Service, UpdateExecutor.Service, DeleteExecutor.Service, TransactionExecutor.Service] { + (pool, blocking, readS, updateS, deleteS) => + new Service { + override def execute[R, A](tx: Transaction[R, A]): ZIO[R, Exception, A] = { + def loop(tx: Transaction[R, Any], conn: Connection): ZIO[R, Any, Any] = tx match { + case Transaction.Effect(zio) => zio + case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) + case Transaction.Update(update) => updateS.executeOn(update, conn) + case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) + case Transaction.FoldCauseM(tx, k) => { + ZIO.effect(conn.setSavepoint()) + .bracket(savepoint => blocking.effectBlocking(conn.releaseSavepoint(savepoint)).ignore)( + savepoint => + loop(tx, conn).foldCauseM( + cause => blocking.effectBlocking(conn.rollback(savepoint)) *> loop(k.onHalt(cause), conn), + success => loop(k.onSuccess(success), conn) + ) + ) + } + } + + pool.connection.use( + conn => + blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> + loop(tx, conn).asInstanceOf[ZIO[R, Exception, A]] + ) + } + } + } + } + + def execute[R, A](tx: Transaction[R, A]): ZIO[R with TransactionExecutor, Exception, A] = + ZIO.accessM[R with TransactionExecutor](_.get.execute(tx)) + type ReadExecutor = Has[ReadExecutor.Service] object ReadExecutor { trait Service { def execute[A <: SelectionSet[_], Target](read: Read[A])(to: read.ResultType => Target): Stream[Exception, Target] + def executeOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] } val live: ZLayer[ConnectionPool with Blocking, Nothing, ReadExecutor] = @@ -66,35 +124,40 @@ trait Jdbc extends zio.sql.Sql { )(to: read.ResultType => Target): Stream[Exception, Target] = ZStream .managed(pool.connection) - .flatMap(conn => - Stream.unwrap { - blocking.effectBlocking { - val schema = getColumns(read).zipWithIndex.map { case (value, index) => - (value, index + 1) - } // SQL is 1-based indexing - - val query = renderRead(read) - - val statement = conn.createStatement() - - val _ = statement.execute(query) // TODO: Check boolean return value - - val resultSet = statement.getResultSet() - - ZStream.unfoldM(resultSet) { rs => - if (rs.next()) { - try unsafeExtractRow[read.ResultType](resultSet, schema) match { - case Left(error) => ZIO.fail(error) - case Right(value) => ZIO.succeed(Some((to(value), rs))) - } catch { - case e: SQLException => ZIO.fail(e) - } - } else ZIO.succeed(None) - } - - }.refineToOrDie[Exception] - } - ) + .flatMap(conn => executeOn(read, conn)).map(to) + + def executeOn[A <: SelectionSet[_]]( + read: Read[A], + conn: Connection): Stream[Exception, read.ResultType] = + Stream.unwrap { + blocking.effectBlocking { + val schema = getColumns(read).zipWithIndex.map { case (value, index) => + (value, index + 1) + } // SQL is 1-based indexing + + val query = renderRead(read) + + val statement = conn.createStatement() + + val _ = statement.execute(query) // TODO: Check boolean return value + + val resultSet = statement.getResultSet() + + ZStream.unfoldM(resultSet) { rs => + if (rs.next()) { + try unsafeExtractRow[read.ResultType](resultSet, schema) match { + case Left(error) => ZIO.fail(error) + case Right(value) => ZIO.succeed(Some((value, rs))) + } catch { + case e: SQLException => ZIO.fail(e) + } + } else ZIO.succeed(None) + } + + }.refineToOrDie[Exception] + } + + } } diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala new file mode 100644 index 000000000..51dd14ab2 --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -0,0 +1,71 @@ +package zio.sql + +import zio.{Cause, ZIO} + +trait TransactionModule { self : SelectModule with DeleteModule with UpdateModule => + + import Transaction._ + + sealed trait Transaction[-R, +A] { self => + def map[B](f: A => B): Transaction[R, B] = ??? + def flatMap[B, R1 <: R](f: A => Transaction[R1, B]): Transaction[R1, B] = + FoldCauseM(self, K[R1, Exception, A, B](e => fail(new Exception(e.toString)), f)) +// def zip[B](t: Transaction[R, B]): Transaction[R, (A, B)] = ??? + def zipWith = ??? + def zipLeft = ??? + def zipRight = ??? + + def catchAllCause[A1 >: A, R1 <: R](f: Throwable => Transaction[R1, A1]): Transaction[R, A] = ??? + + def *>[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, B] = + self.flatMap(_ => tx) + } + + object Transaction { + case class Effect[R, A](zio: ZIO[R, Throwable, A]) extends Transaction[R, A] + case class Select[A <: SelectionSet[_]](read: Read[A]) extends Transaction[Any, zio.stream.Stream[Exception, A]] + case class Update(read: self.Update[_]) extends Transaction[Any, Int] + case class Delete(read: self.Delete[_, _]) extends Transaction[Any, Int] + // catchAll and flatMap + case class FoldCauseM[R, E, A, B](tx: Transaction[R, A], k: K[R, E, A, B]) extends Transaction[R, B] + +// final case class MakeSavePoint[R, A, B](tx: Transaction[R, A]) extends Transaction[R, B] +// final case class RollbackSavePoint[R, A, B](tx: Transaction[R, A]) extends Transaction[R, B] + + case class K[R, E, A, B](onHalt: Cause[E] => Transaction[R, B], onSuccess: A => Transaction[R, B]) + + def succeed[A] : Transaction[Any, A] = ??? + def fail[E <: Throwable](e: E): Transaction[Any, Nothing] = Effect(ZIO.fail(e)) + +// def savepoint[R, A](sp: Transaction[Any, Nothing] => Transaction[R, A]): Transaction[R, A] = ??? + + + def select[A <: SelectionSet[_]](read: Read[A]): Transaction[Any, A] = ??? + def update(read: self.Update[_]): Transaction[Any, Long] = ??? + def delete(read: self.Delete[_, _]): Transaction[Any, Long] = ??? + + } + + + +// val query: Read[String] = ??? +// val del: self.Delete[_, _] = ??? + +// import Transaction._ + +// savepoint(rollback => for { +// s <- select(query) +// _ <- delete(del).zipRight( rollback ) +// } yield s) + + +// (for { // SP1 +// s <- select(query) +// s2 <- select(query) +// // SP2 +// _ <- delete(del).catchAll(_ => succeed(1)) +// _ <- delete(del) +//// _ <- Transaction.when(_ > 5)(fail(???)) +// } yield s).catchAll(_ => fail("Asdfasd")) + +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 8ef00f290..ffe72d7be 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -56,6 +56,8 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { ) ) +// execute(query ++ query ++ query ++ query) + val testResult = execute(query) .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) @@ -184,6 +186,21 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { } yield assert(r)(hasSameElementsDistinct(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("transactions are returning last value") { + val query = select(customerId) from customers + + val result = execute( + Transaction.Select(query) *> Transaction.Select(query) + ) + +// val result = execute( +// Transaction.Select(query) +// ) + val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie + + assertion +// .mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 03c8112ff..c4da0f7ed 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -23,10 +23,10 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live - (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie + (Blocking.live ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie } - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] = TestEnvironment.live ++ executorLayer } From b1cd452220bb04770253ac78ee8c8f066857159e Mon Sep 17 00:00:00 2001 From: fokot Date: Sat, 21 Nov 2020 22:01:51 +0100 Subject: [PATCH 039/673] transactions WIP --- jdbc/src/main/scala/zio/sql/jdbc.scala | 11 ++++++----- .../zio/sql/postgresql/PostgresModuleTest.scala | 13 +++++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index a0a04727a..ee7762da2 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -84,14 +84,15 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { case Transaction.Update(update) => updateS.executeOn(update, conn) case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) case Transaction.FoldCauseM(tx, k) => { - ZIO.effect(conn.setSavepoint()) - .bracket(savepoint => blocking.effectBlocking(conn.releaseSavepoint(savepoint)).ignore)( - savepoint => +// ZIO.effect(conn.setSavepoint()) +// .bracket(savepoint => blocking.effectBlocking(conn.releaseSavepoint(savepoint)).ignore)( +// savepoint => loop(tx, conn).foldCauseM( - cause => blocking.effectBlocking(conn.rollback(savepoint)) *> loop(k.onHalt(cause), conn), +// cause => blocking.effectBlocking(conn.rollback(savepoint)) *> loop(k.onHalt(cause), conn), + cause => loop(k.onHalt(cause), conn), success => loop(k.onSuccess(success), conn) ) - ) +// ) } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index ffe72d7be..119838bb0 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -190,14 +190,19 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { testM("transactions are returning last value") { val query = select(customerId) from customers +// val result = execute( +// Transaction.Select(query) *> Transaction.Select(query) +// ) + val result = execute( - Transaction.Select(query) *> Transaction.Select(query) + Transaction.Select(query) ) + val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie // val result = execute( -// Transaction.Select(query) -// ) - val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie +// query +// ).to[UUID, UUID](a => a) +// val assertion = assertM(result.runCollect)(hasSize(Assertion.equalTo(5))) assertion // .mapErrorCause(cause => Cause.stackless(cause.untraced)) From ed1d76ae91e114f2b96a7adbc610457235c84f28 Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 23:06:07 +0100 Subject: [PATCH 040/673] Add test for 'Sqrt' function for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 568dcee0e..1ebcfdade 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -113,6 +113,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sqrt") { + val query = select(Sqrt(121.0)) from customers + + val expected = 11.0 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From 8cfef8792e9e13b733c02145c0e3c8d47997094e Mon Sep 17 00:00:00 2001 From: Visar Zejnullahu Date: Sat, 21 Nov 2020 23:16:29 +0100 Subject: [PATCH 041/673] Add test for 'Tan' function for PostgreSQL --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 1ebcfdade..c48f259d3 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -126,6 +126,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("tan") { + val query = select(Tan(0.7853981634)) from customers + + val expected = 1.0000000000051035 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From d27deb1dbb51906b60e3549338f734bb6f0b2153 Mon Sep 17 00:00:00 2001 From: Yash Datta Date: Sun, 22 Nov 2020 08:09:52 +0800 Subject: [PATCH 042/673] Fix linting --- core/jvm/src/main/scala/zio/sql/expr.scala | 3 +-- .../src/main/scala/zio/sql/postgresql/PostgresModule.scala | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index c882bd026..8ff81dec4 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,8 +158,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } - sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) - extends InvariantExpr[F, A, Z] { + sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index a80f8c282..831c6fc32 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -9,7 +9,7 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) val CurrentDate = FunctionDef[Nothing, LocalDate](FunctionName("current_date")) } From 4b690eb04fd7c77bc7f4169faa94b56cece84460 Mon Sep 17 00:00:00 2001 From: mehulumistry Date: Sat, 21 Nov 2020 23:30:35 -0500 Subject: [PATCH 043/673] add readRender for oracle and mysql --- build.sbt | 34 +- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 2 +- .../scala/zio/sql/mysql/MysqlModule.scala | 227 +++++++++ mysql/src/test/resources/shop_schema.sql | 192 ++++++++ .../test/scala/zio/sql/TestContainers.scala | 32 ++ .../scala/zio/sql/mysql/FunctionDefSpec.scala | 40 ++ .../scala/zio/sql/mysql/MysqlModuleTest.scala | 173 +++++++ .../zio/sql/mysql/MysqlRunnableSpec.scala | 34 ++ .../test/scala/zio/sql/mysql/ShopSchema.scala | 42 ++ .../scala/zio/sql/oracle/OracleModule.scala | 230 +++++++++ oracle/src/test/resources/shop_schema.sql | 455 ++++++++++++++++++ .../test/scala/zio/sql/TestContainers.scala | 32 ++ .../zio/sql/oracle/FunctionDefSpec.scala | 40 ++ .../zio/sql/oracle/OracleModuleTest.scala | 193 ++++++++ .../zio/sql/oracle/OracleRunnableSpec.scala | 34 ++ .../scala/zio/sql/oracle/ShopSchema.scala | 42 ++ 16 files changed, 1792 insertions(+), 10 deletions(-) create mode 100644 mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala create mode 100644 mysql/src/test/resources/shop_schema.sql create mode 100644 mysql/src/test/scala/zio/sql/TestContainers.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala create mode 100644 oracle/src/main/scala/zio/sql/oracle/OracleModule.scala create mode 100644 oracle/src/test/resources/shop_schema.sql create mode 100644 oracle/src/test/scala/zio/sql/TestContainers.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala diff --git a/build.sbt b/build.sbt index 18e70fde2..220596e13 100644 --- a/build.sbt +++ b/build.sbt @@ -151,9 +151,15 @@ lazy val mysql = project .settings(buildInfoSettings("zio.sql.mysql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-test" % zioVersion % "test", + "dev.zio" %% "zio-test-sbt" % zioVersion % "test", + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "mysql" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "mysql" % "mysql-connector-java" % "8.0.22" % Test, + "com.dimafeng" %% "testcontainers-scala-mysql" % "0.38.6" % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -166,9 +172,15 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-test" % zioVersion % "test", + "dev.zio" %% "zio-test-sbt" % zioVersion % "test", + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "com.oracle.database.jdbc" % "ojdbc10" % "19.8.0.0" % Test, + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.6" % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -202,9 +214,13 @@ lazy val sqlserver = project .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-test" % zioVersion % "test", + "dev.zio" %% "zio-test-sbt" % zioVersion % "test", + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index 82092fc52..709734b54 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -1,4 +1,4 @@ -package zio.sql.postgresql +package zio.sql import zio.{ ZEnv, ZLayer } import zio.duration._ diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala new file mode 100644 index 000000000..68e122634 --- /dev/null +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -0,0 +1,227 @@ +package zio.sql.mysql + +import zio.sql.Jdbc + +trait MysqlModule extends Jdbc { self => + + object MysqlFunctionDef { + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + } + + override def renderRead(read: self.Read[_]): String = { + val builder = new StringBuilder + + def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { + case Expr.Source(tableName, column) => + val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Unary(base, op) => + val _ = builder.append(" ").append(op.symbol) + buildExpr(base) + case Expr.Property(base, op) => + buildExpr(base) + val _ = builder.append(" ").append(op.symbol) + case Expr.Binary(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.Relational(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.In(value, set) => + buildExpr(value) + buildReadString(set) + case Expr.Literal(value) => + val _ = builder.append(value.toString) //todo fix escaping + case Expr.AggregationCall(param, aggregation) => + builder.append(aggregation.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall1(param, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall2(param1, param2, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + val _ = builder.append(")") + case Expr.FunctionCall3(param1, param2, param3, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + val _ = builder.append(")") + case Expr.FunctionCall4(param1, param2, param3, param4, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + val _ = builder.append(")") + } + + def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = + read match { + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + object Dummy { + type F + type A + type B <: SelectionSet[A] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + import read._ + + builder.append("SELECT ") + buildSelection(selection.value) + builder.append(" FROM ") + buildTable(table) + whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" WHERE ") + buildExpr(whereExpr) + } + groupBy match { + case _ :: _ => + builder.append(" GROUP BY ") + buildExprList(groupBy) + + havingExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" HAVING ") + buildExpr(havingExpr) + } + case Nil => () + } + orderBy match { + case _ :: _ => + builder.append(" ORDER BY ") + buildOrderingList(orderBy) + case Nil => () + } + limit match { + case Some(limit) => + builder.append(" LIMIT ").append(limit) + case None => () + } + offset match { + case Some(offset) => + val _ = builder.append(" OFFSET ").append(offset) + case None => () + } + + case Read.Union(left, right, distinct) => + buildReadString(left) + builder.append(" UNION ") + if (!distinct) builder.append("ALL ") + buildReadString(right) + + case Read.Literal(values) => + val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + } + + def buildExprList(expr: List[Expr[_, _, _]]): Unit = + expr match { + case head :: tail => + buildExpr(head) + tail match { + case _ :: _ => + builder.append(", ") + buildExprList(tail) + case Nil => () + } + case Nil => () + } + def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = + expr match { + case head :: tail => + head match { + case Ordering.Asc(value) => buildExpr(value) + case Ordering.Desc(value) => + buildExpr(value) + builder.append(" DESC") + } + tail match { + case _ :: _ => + builder.append(", ") + buildOrderingList(tail) + case Nil => () + } + case Nil => () + } + + def buildSelection[A](selectionSet: SelectionSet[A]): Unit = + selectionSet match { + case cons0 @ SelectionSet.Cons(_, _) => + object Dummy { + type Source + type A + type B <: SelectionSet[Source] + } + val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] + import cons._ + buildColumnSelection(head) + if (tail != SelectionSet.Empty) { + builder.append(", ") + buildSelection(tail) + } + case SelectionSet.Empty => () + } + + def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = + columnSelection match { + case ColumnSelection.Constant(value, name) => + builder.append(value.toString()) //todo fix escaping + name match { + case Some(name) => + val _ = builder.append(" AS ").append(name) + case None => () + } + case ColumnSelection.Computed(expr, name) => + buildExpr(expr) + name match { + case Some(name) => + Expr.exprName(expr) match { + case Some(sourceName) if name != sourceName => + val _ = builder.append(" AS ").append(name) + case _ => () + } + case _ => () //todo what do we do if we don't have a name? + } + } + def buildTable(table: Table): Unit = + table match { + //The outer reference in this type test cannot be checked at run time?! + case sourceTable: self.Table.Source => + val _ = builder.append(sourceTable.name) + case Table.Joined(joinType, left, right, on) => + buildTable(left) + builder.append(joinType match { + case JoinType.Inner => " INNER JOIN " + case JoinType.LeftOuter => " LEFT JOIN " + case JoinType.RightOuter => " RIGHT JOIN " + case JoinType.FullOuter => " OUTER JOIN " + }) + buildTable(right) + builder.append(" ON ") + buildExpr(on) + val _ = builder.append(" ") + } + buildReadString(read) + builder.toString() + } + +} diff --git a/mysql/src/test/resources/shop_schema.sql b/mysql/src/test/resources/shop_schema.sql new file mode 100644 index 000000000..c224273d5 --- /dev/null +++ b/mysql/src/test/resources/shop_schema.sql @@ -0,0 +1,192 @@ +create table customers +( + id varchar(36) not null primary key, + first_name varchar(100) not null, + last_name varchar(100) not null, + verified boolean not null, + dob date not null +); + +create table orders +( + id varchar(36) not null primary key, + customer_id varchar(36) not null, + order_date date not null +); + +create table products +( + id varchar(36) not null primary key, + name varchar(100), + description text not null, + image_url text +); + +create table product_prices +( + product_id varchar(36) not null, + effective date not null, + price decimal(15,2) not null +); + +create table order_details +( + order_id varchar(36) not null, + product_id varchar(36) not null, + quantity integer not null, + unit_price decimal(15,2) not null +); + + +insert into customers + (id, first_name, last_name, verified, dob) +values + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02'), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', true, '1990-11-16'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', true, '1995-11-12'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', false, '1987-03-23'); + +insert into products + (id, name, description, image_url) +values + ('7368ABF4-AED2-421F-B426-1725DE756895', 'Thermometer', 'Make sure you don''t have a fever (could be covid!)', 'https://images.pexels.com/photos/3987152/pexels-photo-3987152.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('4C770002-4C8F-455A-96FF-36A8186D5290', 'Slippers', 'Keep your feet warm this winter', 'https://images.pexels.com/photos/1989843/pexels-photo-1989843.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('05182725-F5C8-4FD6-9C43-6671E179BF55', 'Mouse Pad', 'Who uses these anyway?', 'https://images.pexels.com/photos/3944396/pexels-photo-3944396.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', 'Pants', 'Avoid a lawsuit, wear pants to work today!', 'https://images.pexels.com/photos/52518/jeans-pants-blue-shop-52518.jpeg?cs=srgb&dl=blue-jeans-clothes-shopping-52518.jpg&fm=jpg'), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', 'Nail File', 'Keep those nails looking good', 'https://images.pexels.com/photos/3997373/pexels-photo-3997373.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('D5137D3A-894A-4109-9986-E982541B434F', 'Teddy Bear', 'Because sometimes you just need something to hug', 'https://images.pexels.com/photos/1019471/stuffed-bear-teddy-child-girl-1019471.jpeg?cs=srgb&dl=closeup-photography-of-brown-teddy-bear-1019471.jpg&fm=jpg'); + +insert into product_prices + (product_id, effective, price) +values + ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), + ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), + ('7368ABF4-AED2-421F-B426-1725DE756895', '2020-01-01', 12.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2018-01-01', 20.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2019-01-01', 22.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2020-01-01', 22.00), + ('05182725-F5C8-4FD6-9C43-6671E179BF55', '2018-01-01', 2.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2018-01-01', 70.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2019-01-01', 74.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2020-01-01', 80.00), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2018-01-01', 5.00), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2019-01-01', 6.00), + ('D5137D3A-894A-4109-9986-E982541B434F', '2018-01-01', 50.00), + ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00); + +insert into orders + (id, customer_id, order_date) +values + ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-03-25'), + ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-06-04'), + ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-08-19'), + ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-08-30'), + ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-03-07'), + ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', '2020-03-19'), + ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2020-05-11'), + ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-02-21'), + ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-05-06'), + ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-02-11'), + ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-10-12'), + ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-01-29'), + ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-02-10'), + ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-09-27'), + ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2018-11-13'), + ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2020-01-15'), + ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2018-07-10'), + ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-08-01'), + ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-12-08'), + ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-11-04'), + ('2c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2018-10-14'), + ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05'), + ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23'), + ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14'), + ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); + +insert into order_details + (order_id, product_id, quantity, unit_price) +values + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.90), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 9.09), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 11.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 10.00), + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 11.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 12.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 12.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', '4C770002-4C8F-455A-96FF-36A8186D5290', 5, 18.18), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 18.18), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 20.00), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 2.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '05182725-F5C8-4FD6-9C43-6671E179BF55', 3, 2.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 4, 74.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 72.72), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 80.00), + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 67.27), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 67.27), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 80.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 5, 74.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 70.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 80.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 6, 74.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 4, 4.54), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 6.00), + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('401C7AB1-41CF-4756-8AF5-BE25CF2AE67B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 5.45), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 5, 6.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', 'D5137D3A-894A-4109-9986-E982541B434F', 4, 50.00), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 55.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); \ No newline at end of file diff --git a/mysql/src/test/scala/zio/sql/TestContainers.scala b/mysql/src/test/scala/zio/sql/TestContainers.scala new file mode 100644 index 000000000..acd337f00 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/TestContainers.scala @@ -0,0 +1,32 @@ +package zio.sql + +import com.dimafeng.testcontainers.SingleContainer +import com.dimafeng.testcontainers.MySQLContainer +import zio._ +import zio.blocking.{ effectBlocking, Blocking } + +object TestContainer { + + def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = + ZManaged.make { + effectBlocking { + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + + def mysql(imageName: Option[String] = None): ZLayer[Blocking, Throwable, Has[MySQLContainer]] = + ZManaged.make { + effectBlocking { + val c = new MySQLContainer( + mysqlImageVersion = imageName + ).configure { a => + a.withInitScript("shop_schema.sql") + () + } + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + +} diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala new file mode 100644 index 000000000..47b10f991 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -0,0 +1,40 @@ +package zio.sql.mysql + +import zio.Cause +import zio.test._ +import zio.test.Assertion._ + +object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { + + import this.Customers._ + import this.FunctionDef._ + + val spec = suite("Mysql FunctionDef")( + testM("sin") { + val query = select(Sin(1.0)) from customers + + val expected = 0.8414709848078965 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("abs") { + val query = select(Abs(-32.0)) from customers + + val expected = 32.0 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) +} diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala new file mode 100644 index 000000000..73e0c3359 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -0,0 +1,173 @@ +package zio.sql.mysql + +import java.time.LocalDate + +import zio.Cause +import zio.test._ +import zio.test.Assertion._ +import scala.language.postfixOps + +// NOTE: BUG: TestContainer is inserting the mock value with different dataTimeZone compare to Java API LocalDate +// The dates which are inserted are one day behind the actual date. For now values are tested with subtracting one day. +// This is the none issue with JDBC and mysql. +//For ref: https://stackoverflow.com/questions/54666536/date-one-day-backwards-after-select-from-mysql-db + +object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { + + import this.Customers._ + import this.Orders._ + + val spec = suite("Mysql module")( + testM("Can select from single table") { + case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers + + println(renderRead(query)) + val expected = + Seq( + Customer( + "60b01fc9-c902-4468-8d49-3c0f989def37", + "Ronald", + "Russell", + LocalDate.parse("1983-01-04") + ), + Customer( + "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", + "Jose", + "Wiggins", + LocalDate.parse("1987-03-22") + ), + Customer( + "784426a5-b90a-4759-afbb-571b7a0ba35e", + "Mila", + "Paterso", + LocalDate.parse("1990-11-15") + ), + Customer( + "df8215a2-d5fd-4c6c-9984-801a1b3a2a0b", + "Alana", + "Murray", + LocalDate.parse("1995-11-11") + ), + Customer( + "f76c9ace-be07-4bf3-bd4c-4a9c62882e64", + "Terrence", + "Noel", + LocalDate.parse("1999-11-01") + ) + ) + + val testResult = execute(query) + .to[String, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select with property operator") { + case class Customer(id: String, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (verified isNotTrue) + + println(renderRead(query)) + + val expected = + Seq( + Customer( + "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", + "Jose", + "Wiggins", + false, + LocalDate.parse("1987-03-22") + ) + ) + + val testResult = execute(query) + .to[String, String, String, Boolean, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select from single table with limit, offset and order by") { + case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) + + println(renderRead(query)) + + val expected = + Seq( + Customer( + "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", + "Jose", + "Wiggins", + LocalDate.parse("1987-03-22") + ) + ) + + val testResult = execute(query) + .to[String, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + /* + * This is a failing test for aggregation function. + * Uncomment it when aggregation function handling is fixed. + */ + // testM("Can count rows") { + // val query = select { Count(userId) } from users + + // val expected = 5L + + // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) + + // for { + // r <- result.runCollect + // } yield assert(r.head)(equalTo(expected)) + // }, + testM("Can select from joined tables (inner join)") { + val query = select(fName ++ lName ++ orderDate) from (customers join orders).on( + fkCustomerId === customerId + ) where (verified isNotTrue) + + println(renderRead(query)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Jose", "Wiggins", LocalDate.parse("2019-08-29")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-22")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-06")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-14")) + ) + + val result = execute(query) + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) + +} diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala new file mode 100644 index 000000000..b3fb1471b --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -0,0 +1,34 @@ +package zio.sql.mysql + +import zio.{ Has, ZEnv, ZLayer } +import zio.blocking.Blocking +import zio.sql.TestContainer +import zio.test.environment.TestEnvironment + +import java.util.Properties +import zio.sql.mysql.MysqlModule +import zio.sql.JdbcRunnableSpec + +trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + private val executorLayer = { + val poolConfigLayer = TestContainer + .mysql() + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + + val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live + + (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie + } + + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = + TestEnvironment.live ++ executorLayer + +} diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala new file mode 100644 index 000000000..4681ef587 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala @@ -0,0 +1,42 @@ +package zio.sql.mysql + +import zio.sql.Jdbc + +trait ShopSchema extends Jdbc { self => + import self.ColumnSet._ + + object Customers { + val customers = + (string("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) + .table("customers") + + val customerId :*: dob :*: fName :*: lName :*: verified :*: _ = customers.columns + } + object Orders { + val orders = (string("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + } + object Products { + val products = + (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") + + val productId :*: description :*: imageURL :*: _ = products.columns + } + object ProductPrices { + val productPrices = + (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + + val fkProductId :*: effective :*: price :*: _ = productPrices.columns + } + + object OrderDetails { + val orderDetails = + (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) + .table( + "order_details" + ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. + + val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + } +} diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala new file mode 100644 index 000000000..a35cc6d9d --- /dev/null +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -0,0 +1,230 @@ +package zio.sql.oracle + +import zio.sql.Jdbc + +trait OracleModule extends Jdbc { self => + + object OracleFunctionDef { + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + } + + override def renderRead(read: self.Read[_]): String = { + val builder = new StringBuilder + + def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { + case Expr.Source(tableName, column) => + val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Unary(base, op) => + val _ = builder.append(" ").append(op.symbol) + buildExpr(base) + case Expr.Property(base, op) => + buildExpr(base) + val _ = builder.append(" ").append(op.symbol) + case Expr.Binary(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.Relational(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.In(value, set) => + buildExpr(value) + buildReadString(set) + case Expr.Literal(value) => + val _ = builder.append(value.toString) //todo fix escaping + case Expr.AggregationCall(param, aggregation) => + builder.append(aggregation.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall1(param, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall2(param1, param2, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + val _ = builder.append(")") + case Expr.FunctionCall3(param1, param2, param3, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + val _ = builder.append(")") + case Expr.FunctionCall4(param1, param2, param3, param4, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + val _ = builder.append(")") + } + + def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = + read match { + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + object Dummy { + type F + type A + type B <: SelectionSet[A] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + import read._ + + builder.append("SELECT ") + buildSelection(selection.value) + builder.append(" FROM ") + buildTable(table) + whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" WHERE ") + buildExpr(whereExpr) + } + groupBy match { + case _ :: _ => + builder.append(" GROUP BY ") + buildExprList(groupBy) + + havingExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" HAVING ") + buildExpr(havingExpr) + } + case Nil => () + } + orderBy match { + case _ :: _ => + builder.append(" ORDER BY ") + buildOrderingList(orderBy) + case Nil => () + } + // NOTE: Limit doesn't exist in oracle 11g (>=12), for now replacing it with rownum keyword of oracle + // Ref: https://przemyslawkruglej.com/archive/2013/11/top-n-queries-the-new-row-limiting-clause-11g-12c/ + limit match { + case Some(limit) => + val _ = builder.append(" WHERE rownum <= ").append(limit) + case None => () + } + // NOTE: Offset doesn't exist in oracle 11g (>=12) + // offset match { + // case Some(offset) => + // val _ = builder.append(" OFFSET ").append(offset).append(" ROWS ") + // case None => () + // } + + case Read.Union(left, right, distinct) => + buildReadString(left) + builder.append(" UNION ") + if (!distinct) builder.append("ALL ") + buildReadString(right) + + case Read.Literal(values) => + val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + } + + def buildExprList(expr: List[Expr[_, _, _]]): Unit = + expr match { + case head :: tail => + buildExpr(head) + tail match { + case _ :: _ => + builder.append(", ") + buildExprList(tail) + case Nil => () + } + case Nil => () + } + def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = + expr match { + case head :: tail => + head match { + case Ordering.Asc(value) => buildExpr(value) + case Ordering.Desc(value) => + buildExpr(value) + builder.append(" DESC") + } + tail match { + case _ :: _ => + builder.append(", ") + buildOrderingList(tail) + case Nil => () + } + case Nil => () + } + + def buildSelection[A](selectionSet: SelectionSet[A]): Unit = + selectionSet match { + case cons0 @ SelectionSet.Cons(_, _) => + object Dummy { + type Source + type A + type B <: SelectionSet[Source] + } + val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] + import cons._ + buildColumnSelection(head) + if (tail != SelectionSet.Empty) { + builder.append(", ") + buildSelection(tail) + } + case SelectionSet.Empty => () + } + + def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = + columnSelection match { + case ColumnSelection.Constant(value, name) => + builder.append(value.toString()) //todo fix escaping + name match { + case Some(name) => + val _ = builder.append(" AS ").append(name) + case None => () + } + case ColumnSelection.Computed(expr, name) => + buildExpr(expr) + name match { + case Some(name) => + Expr.exprName(expr) match { + case Some(sourceName) if name != sourceName => + val _ = builder.append(" AS ").append(name) + case _ => () + } + case _ => () //todo what do we do if we don't have a name? + } + } + def buildTable(table: Table): Unit = + table match { + //The outer reference in this type test cannot be checked at run time?! + case sourceTable: self.Table.Source => + val _ = builder.append(sourceTable.name) + case Table.Joined(joinType, left, right, on) => + buildTable(left) + builder.append(joinType match { + case JoinType.Inner => " INNER JOIN " + case JoinType.LeftOuter => " LEFT JOIN " + case JoinType.RightOuter => " RIGHT JOIN " + case JoinType.FullOuter => " OUTER JOIN " + }) + buildTable(right) + builder.append(" ON ") + buildExpr(on) + val _ = builder.append(" ") + } + buildReadString(read) + builder.toString() + } + +} diff --git a/oracle/src/test/resources/shop_schema.sql b/oracle/src/test/resources/shop_schema.sql new file mode 100644 index 000000000..ebfa197b6 --- /dev/null +++ b/oracle/src/test/resources/shop_schema.sql @@ -0,0 +1,455 @@ +create table customers +( + id varchar(36) not null primary key, + first_name varchar(100) not null, + last_name varchar(100) not null, + verified smallint not null, + dob date not null +); + +create table orders +( + id varchar(36) not null primary key, + customer_id varchar(36) not null, + order_date date not null +); + +create table products +( + id varchar(36) not null primary key, + name varchar(100), + description varchar(500) not null, + image_url varchar(500) +); + +create table product_prices +( + product_id varchar(36) not null, + effective date not null, + price Number(15,2) not null +); + +create table order_details +( + order_id varchar(36) not null, + product_id varchar(36) not null, + quantity integer not null, + unit_price Number(15,2) not null +); + +insert all + into customers (id, first_name, last_name, verified, dob) values ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 1, TO_DATE('1983-01-05','YYYY-MM-DD')) + into customers (id, first_name, last_name, verified, dob) values ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', 1, TO_DATE('1999-11-02','YYYY-MM-DD')) + into customers (id, first_name, last_name, verified, dob) values ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', 1, TO_DATE('1990-11-16','YYYY-MM-DD')) + into customers (id, first_name, last_name, verified, dob) values ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', 1, TO_DATE('1995-11-12','YYYY-MM-DD')) + into customers (id, first_name, last_name, verified, dob) values ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', 0, TO_DATE('1987-03-23','YYYY-MM-DD')) +select * from dual; + +insert all + into products (id, name, description, image_url) values('7368ABF4-AED2-421F-B426-1725DE756895', 'Thermometer', 'Make sure you don''t have a fever (could be covid!)', 'https://images.pexels.com/photos/3987152/pexels-photo-3987152.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260') + into products (id, name, description, image_url) values ('4C770002-4C8F-455A-96FF-36A8186D5290', 'Slippers', 'Keep your feet warm this winter', 'https://images.pexels.com/photos/1989843/pexels-photo-1989843.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260') + into products (id, name, description, image_url) values('05182725-F5C8-4FD6-9C43-6671E179BF55', 'Mouse Pad', 'Who uses these anyway?', 'https://images.pexels.com/photos/3944396/pexels-photo-3944396.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260') + into products(id, name, description, image_url) values('105A2701-EF93-4E25-81AB-8952CC7D9DAA', 'Pants', 'Avoid a lawsuit, wear pants to work today!', 'https://images.pexels.com/photos/52518/jeans-pants-blue-shop-52518.jpeg?cs=srgb&dl=blue-jeans-clothes-shopping-52518.jpg&fm=jpg') + into products(id, name, description, image_url) values('F35B0053-855B-4145-ABE1-DC62BC1FDB96', 'Nail File', 'Keep those nails looking good', 'https://images.pexels.com/photos/3997373/pexels-photo-3997373.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260') + into products(id, name, description, image_url) values('D5137D3A-894A-4109-9986-E982541B434F', 'Teddy Bear', 'Because sometimes you just need something to hug', 'https://images.pexels.com/photos/1019471/stuffed-bear-teddy-child-girl-1019471.jpeg?cs=srgb&dl=closeup-photography-of-brown-teddy-bear-1019471.jpg&fm=jpg') +select * from dual; + +insert all + into product_prices + (product_id, effective, price) + values('7368ABF4-AED2-421F-B426-1725DE756895', TO_DATE('2018-01-01', 'YYYY-MM-DD'), 10.00) + into product_prices + (product_id, effective, price) + values('7368ABF4-AED2-421F-B426-1725DE756895', TO_DATE('2019-01-01', 'YYYY-MM-DD'), 11.00) + into product_prices + (product_id, effective, price) + values('7368ABF4-AED2-421F-B426-1725DE756895', TO_DATE('2020-01-01', 'YYYY-MM-DD'), 12.00) + into product_prices + (product_id, effective, price) + values('4C770002-4C8F-455A-96FF-36A8186D5290', TO_DATE('2018-01-01', 'YYYY-MM-DD'), 20.00) + into product_prices + (product_id, effective, price) + values('4C770002-4C8F-455A-96FF-36A8186D5290', TO_DATE('2019-01-01', 'YYYY-MM-DD'), 22.00) + into product_prices + (product_id, effective, price) + values('4C770002-4C8F-455A-96FF-36A8186D5290', TO_DATE('2020-01-01', 'YYYY-MM-DD'), 22.00) + into product_prices + (product_id, effective, price) + values('05182725-F5C8-4FD6-9C43-6671E179BF55', TO_DATE('2018-01-01', 'YYYY-MM-DD'), 2.00) + into product_prices + (product_id, effective, price) + values('105A2701-EF93-4E25-81AB-8952CC7D9DAA', TO_DATE('2018-01-01', 'YYYY-MM-DD'), 70.00) + into product_prices + (product_id, effective, price) + values('105A2701-EF93-4E25-81AB-8952CC7D9DAA', TO_DATE('2019-01-01', 'YYYY-MM-DD'), 74.00) + into product_prices + (product_id, effective, price) + values('105A2701-EF93-4E25-81AB-8952CC7D9DAA', TO_DATE('2020-01-01', 'YYYY-MM-DD'), 80.00) + into product_prices + (product_id, effective, price) + values('F35B0053-855B-4145-ABE1-DC62BC1FDB96', TO_DATE('2018-01-01', 'YYYY-MM-DD'), 5.00) + into product_prices + (product_id, effective, price) + values('F35B0053-855B-4145-ABE1-DC62BC1FDB96', TO_DATE('2019-01-01', 'YYYY-MM-DD'), 6.00) + into product_prices + (product_id, effective, price) + values('D5137D3A-894A-4109-9986-E982541B434F', TO_DATE('2018-01-01', 'YYYY-MM-DD'), 50.00) + into product_prices + (product_id, effective, price) + values('D5137D3A-894A-4109-9986-E982541B434F', TO_DATE('2020-01-01', 'YYYY-MM-DD'), 55.00) +select * from dual; + +insert all + into orders + (id, customer_id, order_date) + values + ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2019-03-25', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2018-06-04', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', TO_DATE('2019-08-19', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', TO_DATE('2019-08-30', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', TO_DATE('2019-03-07', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2020-03-19', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', TO_DATE('2020-05-11', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', TO_DATE('2019-02-21', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2018-05-06', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', TO_DATE('2019-02-11', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', TO_DATE('2019-10-12', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2019-01-29', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', TO_DATE('2019-02-10', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2019-09-27', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', TO_DATE('2018-11-13', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', TO_DATE('2020-01-15', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', TO_DATE('2018-07-10', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', TO_DATE('2019-08-01', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', TO_DATE('2019-12-08', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', TO_DATE('2019-11-04', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', TO_DATE('2018-10-14', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', TO_DATE('2020-04-05', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', TO_DATE('2019-01-23', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', TO_DATE('2019-05-14', 'YYYY-MM-DD')) + into orders + (id, customer_id, order_date) + values + ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', TO_DATE('2020-04-30', 'YYYY-MM-DD')) +select * from dual; + + +insert all + into order_details(order_id, product_id, quantity, unit_price) + values('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('38D66D44-3CFA-488A-AC77-30277751418F', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('7B2627D5-0150-44DF-9171-3462E20797EE', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.90) + into order_details(order_id, product_id, quantity, unit_price) + values + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 9.09) + into order_details(order_id, product_id, quantity, unit_price) + values + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 10.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('876B6034-B33C-4497-81EE-B4E8742164C2', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 12.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 12.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('A243FA42-817A-44EC-8B67-22193D212D82', '4C770002-4C8F-455A-96FF-36A8186D5290', 5, 18.18) + into order_details(order_id, product_id, quantity, unit_price) + values + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('38D66D44-3CFA-488A-AC77-30277751418F', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 18.18) + into order_details(order_id, product_id, quantity, unit_price) + values + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 20.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('876B6034-B33C-4497-81EE-B4E8742164C2', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('A243FA42-817A-44EC-8B67-22193D212D82', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81) + into order_details(order_id, product_id, quantity, unit_price) + values + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81) + into order_details(order_id, product_id, quantity, unit_price) + values + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 2.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '05182725-F5C8-4FD6-9C43-6671E179BF55', 3, 2.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 4, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('38D66D44-3CFA-488A-AC77-30277751418F', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('7B2627D5-0150-44DF-9171-3462E20797EE', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 72.72) + into order_details(order_id, product_id, quantity, unit_price) + values + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 80.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 67.27) + into order_details(order_id, product_id, quantity, unit_price) + values + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 67.27) + into order_details(order_id, product_id, quantity, unit_price) + values + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27) + into order_details(order_id, product_id, quantity, unit_price) + values + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27) + into order_details(order_id, product_id, quantity, unit_price) + values + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 80.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('876B6034-B33C-4497-81EE-B4E8742164C2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 5, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 70.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 80.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 6, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('A243FA42-817A-44EC-8B67-22193D212D82', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 4, 4.54) + into order_details(order_id, product_id, quantity, unit_price) + values + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('38D66D44-3CFA-488A-AC77-30277751418F', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('7B2627D5-0150-44DF-9171-3462E20797EE', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 6.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('401C7AB1-41CF-4756-8AF5-BE25CF2AE67B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 5.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('5011D206-8EFF-42C4-868E-F1A625E1F186', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 5, 6.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('A243FA42-817A-44EC-8B67-22193D212D82', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', 'D5137D3A-894A-4109-9986-E982541B434F', 4, 50.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 55.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45) + into order_details(order_id, product_id, quantity, unit_price) + values + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00) + into order_details(order_id, product_id, quantity, unit_price) + values + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00) +select * from dual; \ No newline at end of file diff --git a/oracle/src/test/scala/zio/sql/TestContainers.scala b/oracle/src/test/scala/zio/sql/TestContainers.scala new file mode 100644 index 000000000..e45147caa --- /dev/null +++ b/oracle/src/test/scala/zio/sql/TestContainers.scala @@ -0,0 +1,32 @@ +package zio.sql + +import com.dimafeng.testcontainers.SingleContainer +import com.dimafeng.testcontainers.OracleContainer +import zio._ +import zio.blocking.{ effectBlocking, Blocking } + +object TestContainer { + + def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = + ZManaged.make { + effectBlocking { + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + + def oracle(imageName: String): ZLayer[Blocking, Throwable, Has[OracleContainer]] = + ZManaged.make { + effectBlocking { + val c = new OracleContainer( + dockerImageName = imageName + ).configure { a => + a.withInitScript("shop_schema.sql") + () + } + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + +} diff --git a/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala b/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala new file mode 100644 index 000000000..04479cda3 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala @@ -0,0 +1,40 @@ +package zio.sql.oracle + +import zio.Cause +import zio.test._ +import zio.test.Assertion._ + +object FunctionDefSpec extends OracleRunnableSpec with ShopSchema { + + import this.Customers._ + import this.FunctionDef._ + + val spec = suite("Mysql FunctionDef")( + testM("sin") { + val query = select(Sin(1.0)) from customers + + val expected = 0.8414709848078965 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("abs") { + val query = select(Abs(-32.0)) from customers + + val expected = 32.0 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) +} diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala b/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala new file mode 100644 index 000000000..60f296aba --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala @@ -0,0 +1,193 @@ +package zio.sql.oracle + +import java.time.LocalDate + +import zio.Cause +import zio.test._ +import zio.test.Assertion._ + +object OracleModuleTest extends OracleRunnableSpec with ShopSchema { + + import this.Customers._ + import this.Orders._ + + val spec = suite("Oracle module")( + testM("Can select from single table") { + case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers + + println(renderRead(query)) + val expected = + Seq( + Customer( + "60b01fc9-c902-4468-8d49-3c0f989def37", + "Ronald", + "Russell", + LocalDate.parse("1983-01-05") + ), + Customer( + "f76c9ace-be07-4bf3-bd4c-4a9c62882e64", + "Terrence", + "Noel", + LocalDate.parse("1999-11-02") + ), + Customer( + "784426a5-b90a-4759-afbb-571b7a0ba35e", + "Mila", + "Paterso", + LocalDate.parse("1990-11-16") + ), + Customer( + "df8215a2-d5fd-4c6c-9984-801a1b3a2a0b", + "Alana", + "Murray", + LocalDate.parse("1995-11-12") + ), + Customer( + "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[String, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + // NOTE: The below test case is failing because of extra true coming in the where clause of select query. + // Need to fix it in the coreJVM module, then this test case should pass + + // testM("Can select with property operator") { + // case class Customer(id: String, fname: String, lname: String, verified: Int, dateOfBirth: LocalDate) + + // val query = + // select( + // customerId ++ fName ++ lName ++ verified ++ dob + // ) from customers where (verified === 0) + + // println(renderRead(query)) + + // val expected = + // Seq( + // Customer( + // "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", + // "Jose", + // "Wiggins", + // 0, + // LocalDate.parse("1987-03-23") + // ) + // ) + + // val testResult = execute(query) + // .to[String, String, String, Int, LocalDate, Customer] { case row => + // Customer(row._1, row._2, row._3, row._4, row._5) + // } + + // val assertion = for { + // r <- testResult.runCollect + // } yield assert(r)(hasSameElementsDistinct(expected)) + + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // }, + // NOTE: Oracle 11g doesn't support Limit and Offset + testM("Can select from single table with rownum") { + case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1) + + println(renderRead(query)) + + val expected = + Seq( + Customer( + "60b01fc9-c902-4468-8d49-3c0f989def37", + "Ronald", + "Russell", + LocalDate.parse("1983-01-05") + ) + ) + + val testResult = execute(query) + .to[String, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + /* + * This is a failing test for aggregation function. + * Uncomment it when aggregation function handling is fixed. + */ + // testM("Can count rows") { + // val query = select { Count(userId) } from users + + // val expected = 5L + + // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) + + // for { + // r <- result.runCollect + // } yield assert(r.head)(equalTo(expected)) + // }, + testM("Can select from joined tables (inner join)") { + val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) + + println(renderRead(query)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) + + val result = execute(query) + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) + +} diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala new file mode 100644 index 000000000..c5485fb36 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala @@ -0,0 +1,34 @@ +package zio.sql.oracle + +import zio.{ Has, ZEnv, ZLayer } +import zio.blocking.Blocking +import zio.sql.TestContainer +import zio.test.environment.TestEnvironment + +import java.util.Properties +import zio.sql.oracle.OracleModule +import zio.sql.JdbcRunnableSpec + +trait OracleRunnableSpec extends JdbcRunnableSpec with OracleModule { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + private val executorLayer = { + val poolConfigLayer = TestContainer + .oracle("oracleinanutshell/oracle-xe-11g") + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + + val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live + + (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie + } + + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = + TestEnvironment.live ++ executorLayer + +} diff --git a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala new file mode 100644 index 000000000..e6f1e0df6 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala @@ -0,0 +1,42 @@ +package zio.sql.oracle + +import zio.sql.Jdbc + +trait ShopSchema extends Jdbc { self => + import self.ColumnSet._ + + object Customers { + val customers = + (string("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ int("verified")) + .table("customers") + + val customerId :*: dob :*: fName :*: lName :*: verified :*: _ = customers.columns + } + object Orders { + val orders = (string("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + } + object Products { + val products = + (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") + + val productId :*: description :*: imageURL :*: _ = products.columns + } + object ProductPrices { + val productPrices = + (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + + val fkProductId :*: effective :*: price :*: _ = productPrices.columns + } + + object OrderDetails { + val orderDetails = + (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) + .table( + "order_details" + ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. + + val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + } +} From 1e1c5b942da7bd514bcca3fc1a061dd15175ebc0 Mon Sep 17 00:00:00 2001 From: mehulumistry Date: Sat, 21 Nov 2020 23:38:33 -0500 Subject: [PATCH 044/673] minor addition --- .../src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 03c8112ff..cb4406d3d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -6,6 +6,7 @@ import zio.sql.TestContainer import zio.test.environment.TestEnvironment import java.util.Properties +import zio.sql.JdbcRunnableSpec trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { From 70acd96168c355b2f684a84d8d4211763ab54209 Mon Sep 17 00:00:00 2001 From: mehulumistry Date: Sun, 22 Nov 2020 00:22:07 -0500 Subject: [PATCH 045/673] changed oracle driver to version 8 and minor changes --- build.sbt | 2 +- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 1 - .../scala/zio/sql/mysql/MysqlModuleTest.scala | 27 ++++++++----------- .../zio/sql/oracle/FunctionDefSpec.scala | 2 +- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/build.sbt b/build.sbt index 220596e13..da637b647 100644 --- a/build.sbt +++ b/build.sbt @@ -179,7 +179,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc10" % "19.8.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "19.8.0.0" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.6" % Test ) ) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index 709734b54..2ccf38615 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -2,7 +2,6 @@ package zio.sql import zio.{ ZEnv, ZLayer } import zio.duration._ -import zio.sql.Jdbc import zio.test._ import zio.test.environment.TestEnvironment diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 73e0c3359..8401db022 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -7,11 +7,6 @@ import zio.test._ import zio.test.Assertion._ import scala.language.postfixOps -// NOTE: BUG: TestContainer is inserting the mock value with different dataTimeZone compare to Java API LocalDate -// The dates which are inserted are one day behind the actual date. For now values are tested with subtracting one day. -// This is the none issue with JDBC and mysql. -//For ref: https://stackoverflow.com/questions/54666536/date-one-day-backwards-after-select-from-mysql-db - object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { import this.Customers._ @@ -30,31 +25,31 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { "60b01fc9-c902-4468-8d49-3c0f989def37", "Ronald", "Russell", - LocalDate.parse("1983-01-04") + LocalDate.parse("1983-01-05") ), Customer( "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", "Jose", "Wiggins", - LocalDate.parse("1987-03-22") + LocalDate.parse("1987-03-23") ), Customer( "784426a5-b90a-4759-afbb-571b7a0ba35e", "Mila", "Paterso", - LocalDate.parse("1990-11-15") + LocalDate.parse("1990-11-16") ), Customer( "df8215a2-d5fd-4c6c-9984-801a1b3a2a0b", "Alana", "Murray", - LocalDate.parse("1995-11-11") + LocalDate.parse("1995-11-12") ), Customer( "f76c9ace-be07-4bf3-bd4c-4a9c62882e64", "Terrence", "Noel", - LocalDate.parse("1999-11-01") + LocalDate.parse("1999-11-02") ) ) @@ -83,7 +78,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { "Jose", "Wiggins", false, - LocalDate.parse("1987-03-22") + LocalDate.parse("1987-03-23") ) ) @@ -111,7 +106,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", "Jose", "Wiggins", - LocalDate.parse("1987-03-22") + LocalDate.parse("1987-03-23") ) ) @@ -151,10 +146,10 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { case class Row(firstName: String, lastName: String, orderDate: LocalDate) val expected = Seq( - Row("Jose", "Wiggins", LocalDate.parse("2019-08-29")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-22")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-06")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-14")) + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")) ) val result = execute(query) diff --git a/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala b/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala index 04479cda3..3c42507fb 100644 --- a/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala @@ -9,7 +9,7 @@ object FunctionDefSpec extends OracleRunnableSpec with ShopSchema { import this.Customers._ import this.FunctionDef._ - val spec = suite("Mysql FunctionDef")( + val spec = suite("Oracle FunctionDef")( testM("sin") { val query = select(Sin(1.0)) from customers From 7cb8f588189113128386ef54efd1269b4bb02684 Mon Sep 17 00:00:00 2001 From: mehulumistry Date: Sun, 22 Nov 2020 01:43:39 -0500 Subject: [PATCH 046/673] remove unused imports --- mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala | 1 - oracle/src/test/scala/zio/sql/TestContainers.scala | 2 +- oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index b3fb1471b..5610200e6 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -6,7 +6,6 @@ import zio.sql.TestContainer import zio.test.environment.TestEnvironment import java.util.Properties -import zio.sql.mysql.MysqlModule import zio.sql.JdbcRunnableSpec trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { diff --git a/oracle/src/test/scala/zio/sql/TestContainers.scala b/oracle/src/test/scala/zio/sql/TestContainers.scala index e45147caa..cf972cb61 100644 --- a/oracle/src/test/scala/zio/sql/TestContainers.scala +++ b/oracle/src/test/scala/zio/sql/TestContainers.scala @@ -4,7 +4,6 @@ import com.dimafeng.testcontainers.SingleContainer import com.dimafeng.testcontainers.OracleContainer import zio._ import zio.blocking.{ effectBlocking, Blocking } - object TestContainer { def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = @@ -22,6 +21,7 @@ object TestContainer { dockerImageName = imageName ).configure { a => a.withInitScript("shop_schema.sql") + a.addEnv("TZ", "America/New_York") () } c.start() diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala index c5485fb36..d9fafb406 100644 --- a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala @@ -6,7 +6,6 @@ import zio.sql.TestContainer import zio.test.environment.TestEnvironment import java.util.Properties -import zio.sql.oracle.OracleModule import zio.sql.JdbcRunnableSpec trait OracleRunnableSpec extends JdbcRunnableSpec with OracleModule { From d9d14ed58f9af3d7114b15e07fec30e03b32d314 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sun, 22 Nov 2020 07:54:44 +0100 Subject: [PATCH 047/673] use ConcatWsX approach --- core/jvm/src/main/scala/zio/sql/expr.scala | 4 +++- .../zio/sql/postgresql/FunctionDefSpec.scala | 18 +++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index d6b037859..520540873 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -282,7 +282,9 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val Ascii = FunctionDef[String, Int](FunctionName("ascii")) val CharLength = FunctionDef[String, Int](FunctionName("character length")) val Concat = FunctionDef[(String, String), String](FunctionName("concat")) - val ConcatWs = FunctionDef[String, String](FunctionName("concat_ws")) + val ConcatWs2 = FunctionDef[(String, String), String](FunctionName("concat_ws")) + val ConcatWs3 = FunctionDef[(String, String, String), String](FunctionName("concat_ws")) + val ConcatWs4 = FunctionDef[(String, String, String, String), String](FunctionName("concat_ws")) val Lower = FunctionDef[String, String](FunctionName("lower")) val Ltrim = FunctionDef[String, String](FunctionName("ltrim")) val OctetLength = FunctionDef[String, Int](FunctionName("octet length")) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index d418b0daf..4ccd41c2a 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -13,24 +13,24 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val spec = suite("Postgres FunctionDef")( testM("concat_ws #1") { import Expr._ -// val idealApi = ConcatWs(" ", "Person:", string("first_name"), string("last_name"), "!") //TODO: we shouldn't be forced to provide explicit calls to literal - val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:")) //Seq(literal(" "), literal("Person:")) +// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:")) // val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(Customers.fName, Customers.lName) // val args_0/*: Seq[Expr[Expr.DataSource, Any, String]]*/ = Seq(Customers.fName, literal("!")) -// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:"), Customers.fName, Customers.lName, literal("!")) +// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:"), Customers.fName, Customers.lName) - val query = select(ConcatWs(args_0)) from customers + val query = select(ConcatWs4(literal(" "), literal("Person:"), Customers.fName, Customers.lName)) from customers +// val query = select(ConcatWs(args_0)) from customers println(renderRead(query)) val expected = Seq( - "Person: Ronald Russell !", - "Person: Terrence Noel !", - "Person: Mila Paterso !", - "Person: Alana Murray !", - "Person: Jose Wiggins !" + "Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" ) val testResult = execute(query).to[String, String](identity) From 04a3e321a5db1c6383e85937c343231f1e49a66b Mon Sep 17 00:00:00 2001 From: Patryk Date: Sun, 22 Nov 2020 08:22:06 +0100 Subject: [PATCH 048/673] add more test cases --- .../zio/sql/postgresql/FunctionDefSpec.scala | 81 ++++++++++++++++--- 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 4ccd41c2a..1a548e183 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,6 +1,7 @@ package zio.sql.postgresql import zio.Cause +import zio.stream.ZStream import zio.test._ import zio.test.Assertion._ @@ -10,19 +11,58 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.PostgresFunctionDef._ import this.FunctionDef._ + + private def collectAndCompare(expected: Seq[String], + testResult: ZStream[FunctionDefSpec.ReadExecutor, Exception, String]): zio.ZIO[FunctionDefSpec.Environment, Any, TestResult] = { + val assertion = for { + r <- testResult.runCollect + } yield assert(r.toList)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + + val spec = suite("Postgres FunctionDef")( - testM("concat_ws #1") { + testM("concat_ws #1 - combine flat values") { import Expr._ - //TODO: we shouldn't be forced to provide explicit calls to literal -// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:")) -// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(Customers.fName, Customers.lName) -// val args_0/*: Seq[Expr[Expr.DataSource, Any, String]]*/ = Seq(Customers.fName, literal("!")) + //note: a plain number (3) would and should not compile + val query = select(ConcatWs4("+", "1", "2", "3")) from customers + println(renderRead(query)) -// val args_0/*: Seq[Expr[DataTypes, Any, String]]*/ = Seq(literal(" "), literal("Person:"), Customers.fName, Customers.lName) + val expected = Seq( // note: one for each row + "1+2+3", + "1+2+3", + "1+2+3", + "1+2+3", + "1+2+3" + ) - val query = select(ConcatWs4(literal(" "), literal("Person:"), Customers.fName, Customers.lName)) from customers -// val query = select(ConcatWs(args_0)) from customers + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #2 - combine columns") { + import Expr._ + + // note: you can't use customerId here as it is a UUID, hence not a string in our book + val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers + println(renderRead(query)) + + val expected = Seq( + "RonaldRonaldRussell", + "TerrenceTerrenceNoel", + "MilaMilaPaterso", + "AlanaAlanaMurray", + "JoseJoseWiggins" + ) + + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #3 - combine columns and flat values") { + import Expr._ + + val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers println(renderRead(query)) val expected = Seq( @@ -34,12 +74,29 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #3 - combine function calls together") { + import Expr._ - val assertion = for { - r <- testResult.runCollect - } yield assert(r.toList)(equalTo(expected)) + val query = select( + ConcatWs3(" and ", + Concat("Name: ", Customers.fName), + Concat("Surname: ", Customers.lName) + ) + ) from customers + println(renderRead(query)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + val expected = Seq( + "Name: Ronald and Surname: Russell", + "Name: Terrence and Surname: Noel", + "Name: Mila and Surname: Paterso", + "Name: Alana and Surname: Murray", + "Name: Jose and Surname: Wiggins" + ) + + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) }, testM("sin") { val query = select(Sin(1.0)) from customers From 326fa34f19c05ec3bfb567b6b8553a0f2f8c0403 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sun, 22 Nov 2020 08:24:55 +0100 Subject: [PATCH 049/673] cleanup the FunctionCallN --- core/jvm/src/main/scala/zio/sql/expr.scala | 10 ---------- .../main/scala/zio/sql/postgresql/PostgresModule.scala | 9 --------- .../main/scala/zio/sql/sqlserver/SqlServerModule.scala | 9 --------- 3 files changed, 28 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 520540873..b7420b315 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -190,11 +190,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { ) extends InvariantExpr[Features.Union[F1, Features.Union[F2, Features.Union[F3, F4]]], A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } - - sealed case class FunctionCallN[F, A, B, Z: TypeTag](param: Seq[Expr[F, A, B]], function: FunctionDef[B, Z]) - extends InvariantExpr[F, A, Z] { - def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] - } } sealed case class AggregationDef[-A, +B](name: FunctionName) { self => @@ -246,11 +241,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { self.narrow[(P1, P2, P3, P4)]: FunctionDef[(P1, P2, P3, P4), B1] ) - //Features.Source with Features.Literal - def apply[F, Source, B1 >: B](params: Seq[Expr[F, Source, A]]) - (implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = - Expr.FunctionCallN(params, self: FunctionDef[A, B1]) - def narrow[C](implicit ev: C <:< A): FunctionDef[C, B] = { val _ = ev self.asInstanceOf[FunctionDef[C, B]] diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 057c0bb4f..51afe1d1e 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -72,15 +72,6 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param4) val _ = builder.append(")") - case Expr.FunctionCallN(params, function) => - builder.append(function.name.name) - builder.append("(") - params.foreach { e => - buildExpr(e) - builder.append(",") - } - builder.deleteCharAt(builder.size-1) // the loop above will leave a trailing , - val _ = builder.append(")") } def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index b121ba76a..30fa79833 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -66,15 +66,6 @@ trait SqlServerModule extends Jdbc { self => builder.append(",") buildExpr(param4) val _ = builder.append(")") - case Expr.FunctionCallN(params, function) => - builder.append(function.name.name) - builder.append("(") - params.foreach { e => - buildExpr(e) - builder.append(", ") - } - builder.deleteCharAt(builder.size-1) // the loop above will leave a trailing , - val _ = builder.append(")") } def buildReadString(read: self.Read[_]): Unit = From e373ff8b40dc210faac609c7bd4232187696f302 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sun, 22 Nov 2020 08:30:54 +0100 Subject: [PATCH 050/673] scala fmt --- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 1a548e183..dc5f58e50 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -11,9 +11,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.PostgresFunctionDef._ import this.FunctionDef._ - - private def collectAndCompare(expected: Seq[String], - testResult: ZStream[FunctionDefSpec.ReadExecutor, Exception, String]): zio.ZIO[FunctionDefSpec.Environment, Any, TestResult] = { + private def collectAndCompare( + expected: Seq[String], + testResult: ZStream[FunctionDefSpec.ReadExecutor, Exception, String] + ): zio.ZIO[FunctionDefSpec.Environment, Any, TestResult] = { val assertion = for { r <- testResult.runCollect } yield assert(r.toList)(equalTo(expected)) @@ -21,7 +22,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } - val spec = suite("Postgres FunctionDef")( testM("concat_ws #1 - combine flat values") { import Expr._ @@ -80,10 +80,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import Expr._ val query = select( - ConcatWs3(" and ", - Concat("Name: ", Customers.fName), - Concat("Surname: ", Customers.lName) - ) + ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) ) from customers println(renderRead(query)) From 4c082baddc8f48c3bc5cedf414523b4db68e2788 Mon Sep 17 00:00:00 2001 From: Joaquin Garcia Sastre Date: Sat, 21 Nov 2020 23:20:50 +0100 Subject: [PATCH 051/673] Add 'isfinite' function to PostgresModule --- .../scala/zio/sql/postgresql/PostgresModule.scala | 5 ++++- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..15df35925 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,5 +1,7 @@ package zio.sql.postgresql +import java.time.Instant + import zio.sql.Jdbc /** @@ -7,7 +9,8 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val IsFinite = FunctionDef[Instant, Boolean](FunctionName("isfinite")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..5f1b3afa1 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -11,6 +11,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.FunctionDef._ val spec = suite("Postgres FunctionDef")( + testM("isfinite") { + val query = select(IsFinite(Instant.now)) from customers + + val expected: Boolean = true + + val testResult = execute(query).to[Boolean, Boolean](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("sin") { val query = select(Sin(1.0)) from customers From f75116f1b3b9ec67fc611b2636dd811fc6dbfad7 Mon Sep 17 00:00:00 2001 From: fokot Date: Sun, 22 Nov 2020 09:51:11 +0100 Subject: [PATCH 052/673] transactions WIP - Transaction methods added --- jdbc/src/main/scala/zio/sql/transaction.scala | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala index 51dd14ab2..73376ab38 100644 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -7,18 +7,38 @@ trait TransactionModule { self : SelectModule with DeleteModule with UpdateModul import Transaction._ sealed trait Transaction[-R, +A] { self => - def map[B](f: A => B): Transaction[R, B] = ??? + + def map[B](f: A => B): Transaction[R, B] = + self.flatMap(f andThen Transaction.succeed) + def flatMap[B, R1 <: R](f: A => Transaction[R1, B]): Transaction[R1, B] = FoldCauseM(self, K[R1, Exception, A, B](e => fail(new Exception(e.toString)), f)) -// def zip[B](t: Transaction[R, B]): Transaction[R, (A, B)] = ??? - def zipWith = ??? - def zipLeft = ??? - def zipRight = ??? - def catchAllCause[A1 >: A, R1 <: R](f: Throwable => Transaction[R1, A1]): Transaction[R, A] = ??? + def zip[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, (A, B)] = + zipWith[R1, B, (A, B)](tx)((_, _)) + + def zipWith[R1 <: R, B, C](tx: Transaction[R1, B])(f: (A, B) => C): Transaction[R1, C] = + for { + a <- self + b <- tx + } yield f(a, b) def *>[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, B] = self.flatMap(_ => tx) + + // named alias for *> + def zipRight[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, B] = + self *> tx + + def <*[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, A] = + self.flatMap(a => tx.map(_ => a)) + + // named alias for <* + def zipLeft[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, A] = + self <* tx + + def catchAllCause[A1 >: A, R1 <: R](f: Throwable => Transaction[R1, A1]): Transaction[R, A] = ??? + } object Transaction { @@ -34,7 +54,7 @@ trait TransactionModule { self : SelectModule with DeleteModule with UpdateModul case class K[R, E, A, B](onHalt: Cause[E] => Transaction[R, B], onSuccess: A => Transaction[R, B]) - def succeed[A] : Transaction[Any, A] = ??? + def succeed[A](a: A): Transaction[Any, A] = Effect(ZIO.succeed(a)) def fail[E <: Throwable](e: E): Transaction[Any, Nothing] = Effect(ZIO.fail(e)) // def savepoint[R, A](sp: Transaction[Any, Nothing] => Transaction[R, A]): Transaction[R, A] = ??? From 1061f6dc00b3528977f62d6a3491955a9c20ee30 Mon Sep 17 00:00:00 2001 From: Mahamed Ali Date: Sun, 22 Nov 2020 08:32:28 +0000 Subject: [PATCH 053/673] ADDED parse_ident function (line) and a couple of tests --- .../zio/sql/postgresql/PostgresModule.scala | 3 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 51afe1d1e..a96444512 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -7,7 +7,8 @@ import zio.sql.Jdbc trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val ParseIdent = FunctionDef[String, String](FunctionName("parse_ident")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c0ea0a01a..d5ee7cdb0 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -3,6 +3,7 @@ package zio.sql.postgresql import zio.Cause import zio.test._ import zio.test.Assertion._ +import zio.random.Random object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { @@ -35,6 +36,37 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("parseIdent removes quoting of individual identifiers") { + val someString: Gen[Random with Sized, String] = Gen.anyString + .filter(x => x.length < 50 && x.length > 1) + //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it + val genTestString: Gen[Random with Sized, String] = + for { + string1 <- someString + string2 <- someString + } yield s"""'"${string1}".${string2}'""" + + val assertion = checkM(genTestString) { (testString) => + val query = select(ParseIdent(testString)) from customers + val testResult = execute(query).to[String, String](identity) + + for { + r <- testResult.runCollect + } yield assert(r.head)(not(containsString("'")) && not(containsString("\""))) + + } + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("parseIdent fails with invalid identifier") { + val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) from customers + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect.run + } yield assert(r)(fails(anything)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From db75b3ef4e2a543adc291bf7ea09fff0510bd8e9 Mon Sep 17 00:00:00 2001 From: fokot Date: Sun, 22 Nov 2020 11:42:48 +0100 Subject: [PATCH 054/673] transactions WIP - Transactions working --- jdbc/src/main/scala/zio/sql/jdbc.scala | 23 ++++++++++--------- jdbc/src/main/scala/zio/sql/transaction.scala | 9 ++++++++ .../sql/postgresql/PostgresModuleTest.scala | 16 ++++++------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index ee7762da2..5a561425d 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -80,26 +80,27 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { override def execute[R, A](tx: Transaction[R, A]): ZIO[R, Exception, A] = { def loop(tx: Transaction[R, Any], conn: Connection): ZIO[R, Any, Any] = tx match { case Transaction.Effect(zio) => zio - case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) + // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` + // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) + // This works and it is eagerly running the Stream + case Transaction.Select(read) => readS.executeOn(read, conn).runCollect.map(a => ZStream.fromIterator(a.iterator)) case Transaction.Update(update) => updateS.executeOn(update, conn) case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) case Transaction.FoldCauseM(tx, k) => { -// ZIO.effect(conn.setSavepoint()) -// .bracket(savepoint => blocking.effectBlocking(conn.releaseSavepoint(savepoint)).ignore)( -// savepoint => - loop(tx, conn).foldCauseM( -// cause => blocking.effectBlocking(conn.rollback(savepoint)) *> loop(k.onHalt(cause), conn), - cause => loop(k.onHalt(cause), conn), - success => loop(k.onSuccess(success), conn) - ) -// ) + loop(tx, conn).foldCauseM( + cause => loop(k.onHalt(cause), conn), + success => loop(k.onSuccess(success), conn) + ) } } pool.connection.use( conn => blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> - loop(tx, conn).asInstanceOf[ZIO[R, Exception, A]] + loop(tx, conn).tapBoth( + _ => blocking.effectBlocking(conn.rollback()), + _ => blocking.effectBlocking(conn.commit()) + ).asInstanceOf[ZIO[R, Exception, A]] ) } } diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala index 73376ab38..a01aa729f 100644 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -88,4 +88,13 @@ trait TransactionModule { self : SelectModule with DeleteModule with UpdateModul //// _ <- Transaction.when(_ > 5)(fail(???)) // } yield s).catchAll(_ => fail("Asdfasd")) +//1 +//2 +// sp +//3 +// +//4 +//5 +// + } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 119838bb0..65996e22e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -187,22 +187,22 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("transactions are returning last value") { + testM("Transactions is returning the last value") { val query = select(customerId) from customers -// val result = execute( -// Transaction.Select(query) *> Transaction.Select(query) -// ) - val result = execute( - Transaction.Select(query) + Transaction.Select(query) *> Transaction.Select(query) ) - val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie // val result = execute( +// Transaction.Select(query) +// ) + val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie + +// val result2 = execute( // query // ).to[UUID, UUID](a => a) -// val assertion = assertM(result.runCollect)(hasSize(Assertion.equalTo(5))) +// val assertion2 = assertM(result2.runCollect)(hasSize(Assertion.equalTo(5))) assertion // .mapErrorCause(cause => Cause.stackless(cause.untraced)) From 74592d1e5a1a594bdd2ff2affca862f9558476c2 Mon Sep 17 00:00:00 2001 From: fokot Date: Sun, 22 Nov 2020 12:52:55 +0100 Subject: [PATCH 055/673] transactions working --- jdbc/src/main/scala/zio/sql/jdbc.scala | 28 +++--- jdbc/src/main/scala/zio/sql/transaction.scala | 91 ++++++------------- .../sql/postgresql/PostgresModuleTest.scala | 19 ++-- 3 files changed, 52 insertions(+), 86 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 5a561425d..2cc48e532 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -39,14 +39,14 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { type DeleteExecutor = Has[DeleteExecutor.Service] object DeleteExecutor { trait Service { - def execute(delete: Delete[_, _]): IO[Exception, Int] - def executeOn(delete: Delete[_, _], connection: Connection): IO[Exception, Int] + def execute[A](delete: Delete[_, A]): IO[Exception, A] + def executeOn[A](delete: Delete[_, A], connection: Connection): IO[Exception, A] } val live = ZLayer.succeed( new Service { - override def execute(delete: Delete[_, _]): IO[Exception, Int] = ??? - override def executeOn(delete: Delete[_, _], connection: Connection): IO[Exception, Int] = ??? + override def execute[A](delete: Delete[_, A]): IO[Exception, A] = ??? + override def executeOn[A](delete: Delete[_, A], connection: Connection): IO[Exception, A] = ??? } ) } @@ -54,14 +54,14 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { type UpdateExecutor = Has[UpdateExecutor.Service] object UpdateExecutor { trait Service { - def execute(update: Update[_]): IO[Exception, Int] - def executeOn(update: Update[_], connection: Connection): IO[Exception, Int] + def execute[A](update: Update[A]): IO[Exception, A] + def executeOn[A](update: Update[A], connection: Connection): IO[Exception, A] } val live = ZLayer.succeed( new Service { - override def execute(update: Update[_]): IO[Exception, Int] = ??? - override def executeOn(update: Update[_], connection: Connection): IO[Exception, Int] = ??? + override def execute[A](update: Update[A]): IO[Exception, A] = ??? + override def executeOn[A](update: Update[A], connection: Connection): IO[Exception, A] = ??? } ) } @@ -70,15 +70,15 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { type TransactionExecutor = Has[TransactionExecutor.Service] object TransactionExecutor { trait Service { - def execute[R, A](tx: Transaction[R, A]): ZIO[R, Exception, A] + def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] } val live: ZLayer[ConnectionPool with Blocking with ReadExecutor with UpdateExecutor with DeleteExecutor, Exception, TransactionExecutor] = ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, ReadExecutor.Service, UpdateExecutor.Service, DeleteExecutor.Service, TransactionExecutor.Service] { (pool, blocking, readS, updateS, deleteS) => new Service { - override def execute[R, A](tx: Transaction[R, A]): ZIO[R, Exception, A] = { - def loop(tx: Transaction[R, Any], conn: Connection): ZIO[R, Any, Any] = tx match { + override def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] = { + def loop(tx: Transaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = tx match { case Transaction.Effect(zio) => zio // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) @@ -88,7 +88,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) case Transaction.FoldCauseM(tx, k) => { loop(tx, conn).foldCauseM( - cause => loop(k.onHalt(cause), conn), + cause => loop(k.asInstanceOf[Transaction.K[R, E, Any, Any]].onHalt(cause), conn), success => loop(k.onSuccess(success), conn) ) } @@ -100,14 +100,14 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { loop(tx, conn).tapBoth( _ => blocking.effectBlocking(conn.rollback()), _ => blocking.effectBlocking(conn.commit()) - ).asInstanceOf[ZIO[R, Exception, A]] + ).asInstanceOf[ZIO[R, E, A]] ) } } } } - def execute[R, A](tx: Transaction[R, A]): ZIO[R with TransactionExecutor, Exception, A] = + def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R with TransactionExecutor, E, A] = ZIO.accessM[R with TransactionExecutor](_.get.execute(tx)) type ReadExecutor = Has[ReadExecutor.Service] diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala index a01aa729f..3ca269ba3 100644 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -6,95 +6,60 @@ trait TransactionModule { self : SelectModule with DeleteModule with UpdateModul import Transaction._ - sealed trait Transaction[-R, +A] { self => + sealed trait Transaction[-R, +E, +A] { self => - def map[B](f: A => B): Transaction[R, B] = + def map[B](f: A => B): Transaction[R, E, B] = self.flatMap(f andThen Transaction.succeed) - def flatMap[B, R1 <: R](f: A => Transaction[R1, B]): Transaction[R1, B] = - FoldCauseM(self, K[R1, Exception, A, B](e => fail(new Exception(e.toString)), f)) + def flatMap[R1 <: R, E1 >: E, B](f: A => Transaction[R1, E1, B]): Transaction[R1, E1, B] = + FoldCauseM(self, K[R1, E1, A, B](e => halt(e), f)) - def zip[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, (A, B)] = - zipWith[R1, B, (A, B)](tx)((_, _)) + def zip[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, (A, B)] = + zipWith[R1, E1, B, (A, B)](tx)((_, _)) - def zipWith[R1 <: R, B, C](tx: Transaction[R1, B])(f: (A, B) => C): Transaction[R1, C] = + def zipWith[R1 <: R, E1 >: E, B, C](tx: Transaction[R1, E1, B])(f: (A, B) => C): Transaction[R1, E1, C] = for { a <- self b <- tx } yield f(a, b) - def *>[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, B] = + def *>[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, B] = self.flatMap(_ => tx) // named alias for *> - def zipRight[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, B] = + def zipRight[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, B] = self *> tx - def <*[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, A] = + def <*[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, A] = self.flatMap(a => tx.map(_ => a)) // named alias for <* - def zipLeft[B, R1 <: R](tx: Transaction[R1, B]): Transaction[R1, A] = + def zipLeft[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, A] = self <* tx - def catchAllCause[A1 >: A, R1 <: R](f: Throwable => Transaction[R1, A1]): Transaction[R, A] = ??? + def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: Throwable => Transaction[R1, E1, A1]): Transaction[R, E1, A] = ??? } object Transaction { - case class Effect[R, A](zio: ZIO[R, Throwable, A]) extends Transaction[R, A] - case class Select[A <: SelectionSet[_]](read: Read[A]) extends Transaction[Any, zio.stream.Stream[Exception, A]] - case class Update(read: self.Update[_]) extends Transaction[Any, Int] - case class Delete(read: self.Delete[_, _]) extends Transaction[Any, Int] - // catchAll and flatMap - case class FoldCauseM[R, E, A, B](tx: Transaction[R, A], k: K[R, E, A, B]) extends Transaction[R, B] + case class Effect[R, E, A](zio: ZIO[R, E, A]) extends Transaction[R, E, A] + case class Select[A <: SelectionSet[_]](read: self.Read[A]) extends Transaction[Any, Exception, zio.stream.Stream[Exception, A]] + case class Update[A](read: self.Update[A]) extends Transaction[Any, Exception, A] + case class Delete[A](read: self.Delete[_, A]) extends Transaction[Any, Exception, A] + case class FoldCauseM[R, E, A, B](tx: Transaction[R, E, A], k: K[R, E, A, B]) extends Transaction[R, E, B] -// final case class MakeSavePoint[R, A, B](tx: Transaction[R, A]) extends Transaction[R, B] -// final case class RollbackSavePoint[R, A, B](tx: Transaction[R, A]) extends Transaction[R, B] + case class K[R, E, A, B](onHalt: Cause[E] => Transaction[R, E, B], onSuccess: A => Transaction[R, E, B]) - case class K[R, E, A, B](onHalt: Cause[E] => Transaction[R, B], onSuccess: A => Transaction[R, B]) + def succeed[A](a: A): Transaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) + def fail[E](e: E): Transaction[Any, E, Nothing] = Effect(ZIO.fail(e)) + def halt[E](e: Cause[E]): Transaction[Any, E, Nothing] = Effect(ZIO.halt(e)) - def succeed[A](a: A): Transaction[Any, A] = Effect(ZIO.succeed(a)) - def fail[E <: Throwable](e: E): Transaction[Any, Nothing] = Effect(ZIO.fail(e)) - -// def savepoint[R, A](sp: Transaction[Any, Nothing] => Transaction[R, A]): Transaction[R, A] = ??? - - - def select[A <: SelectionSet[_]](read: Read[A]): Transaction[Any, A] = ??? - def update(read: self.Update[_]): Transaction[Any, Long] = ??? - def delete(read: self.Delete[_, _]): Transaction[Any, Long] = ??? + def select[A <: SelectionSet[_]](read: self.Read[A]): Transaction[Any, Exception, zio.stream.Stream[Exception, A]] = + Transaction.Select(read) + def update[A](update: self.Update[A]): Transaction[Any, Exception, A] = + Update(update) + def delete[A](delete: self.Delete[_, A]): Transaction[Any, Exception, A] = + Delete(delete) } - - - -// val query: Read[String] = ??? -// val del: self.Delete[_, _] = ??? - -// import Transaction._ - -// savepoint(rollback => for { -// s <- select(query) -// _ <- delete(del).zipRight( rollback ) -// } yield s) - - -// (for { // SP1 -// s <- select(query) -// s2 <- select(query) -// // SP2 -// _ <- delete(del).catchAll(_ => succeed(1)) -// _ <- delete(del) -//// _ <- Transaction.when(_ > 5)(fail(???)) -// } yield s).catchAll(_ => fail("Asdfasd")) - -//1 -//2 -// sp -//3 -// -//4 -//5 -// - -} +} \ No newline at end of file diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 65996e22e..bfcbb1588 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -193,19 +193,20 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { val result = execute( Transaction.Select(query) *> Transaction.Select(query) ) - -// val result = execute( -// Transaction.Select(query) -// ) val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie -// val result2 = execute( -// query -// ).to[UUID, UUID](a => a) -// val assertion2 = assertM(result2.runCollect)(hasSize(Assertion.equalTo(5))) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transactions is failing") { + val query = select(customerId) from customers + + val result = execute( + Transaction.Select(query) *> Transaction.fail(new Exception("failing")) *> Transaction.Select(query) + ).mapError(_.getMessage) + + val assertion = assertM(result.flip)(equalTo("failing")) assertion -// .mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From 0995019888031cabc2f5cfe37bb4d5bdc794ac5e Mon Sep 17 00:00:00 2001 From: fokot Date: Sun, 22 Nov 2020 13:17:53 +0100 Subject: [PATCH 056/673] scalafmt --- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 6 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 98 ++++++++++--------- jdbc/src/main/scala/zio/sql/transaction.scala | 23 ++--- 3 files changed, 70 insertions(+), 57 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index 650584f6a..fa37ba6a1 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -8,7 +8,11 @@ import zio.test.environment.TestEnvironment trait JdbcRunnableSpec extends AbstractRunnableSpec with Jdbc { - override type Environment = TestEnvironment with ReadExecutor with UpdateExecutor with DeleteExecutor with TransactionExecutor + override type Environment = TestEnvironment + with ReadExecutor + with UpdateExecutor + with DeleteExecutor + with TransactionExecutor override type Failure = Any override def aspects: List[TestAspect[Nothing, TestEnvironment, Nothing, Any]] = diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 2cc48e532..1c44686f5 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -3,9 +3,9 @@ package zio.sql import java.sql._ import java.io.IOException -import zio.{Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged} +import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } import zio.blocking.Blocking -import zio.stream.{Stream, ZStream} +import zio.stream.{ Stream, ZStream } trait Jdbc extends zio.sql.Sql with TransactionModule { type ConnectionPool = Has[ConnectionPool.Service] @@ -45,7 +45,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { val live = ZLayer.succeed( new Service { - override def execute[A](delete: Delete[_, A]): IO[Exception, A] = ??? + override def execute[A](delete: Delete[_, A]): IO[Exception, A] = ??? override def executeOn[A](delete: Delete[_, A], connection: Connection): IO[Exception, A] = ??? } ) @@ -60,47 +60,57 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { val live = ZLayer.succeed( new Service { - override def execute[A](update: Update[A]): IO[Exception, A] = ??? + override def execute[A](update: Update[A]): IO[Exception, A] = ??? override def executeOn[A](update: Update[A], connection: Connection): IO[Exception, A] = ??? } ) } - type TransactionExecutor = Has[TransactionExecutor.Service] object TransactionExecutor { trait Service { def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] } - val live: ZLayer[ConnectionPool with Blocking with ReadExecutor with UpdateExecutor with DeleteExecutor, Exception, TransactionExecutor] = - ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, ReadExecutor.Service, UpdateExecutor.Service, DeleteExecutor.Service, TransactionExecutor.Service] { - (pool, blocking, readS, updateS, deleteS) => + val live: ZLayer[ + ConnectionPool with Blocking with ReadExecutor with UpdateExecutor with DeleteExecutor, + Exception, + TransactionExecutor + ] = + ZLayer.fromServices[ + ConnectionPool.Service, + Blocking.Service, + ReadExecutor.Service, + UpdateExecutor.Service, + DeleteExecutor.Service, + TransactionExecutor.Service + ] { (pool, blocking, readS, updateS, deleteS) => new Service { override def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] = { def loop(tx: Transaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = tx match { - case Transaction.Effect(zio) => zio + case Transaction.Effect(zio) => zio // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) // This works and it is eagerly running the Stream - case Transaction.Select(read) => readS.executeOn(read, conn).runCollect.map(a => ZStream.fromIterator(a.iterator)) - case Transaction.Update(update) => updateS.executeOn(update, conn) - case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) - case Transaction.FoldCauseM(tx, k) => { + case Transaction.Select(read) => + readS.executeOn(read, conn).runCollect.map(a => ZStream.fromIterator(a.iterator)) + case Transaction.Update(update) => updateS.executeOn(update, conn) + case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) + case Transaction.FoldCauseM(tx, k) => loop(tx, conn).foldCauseM( cause => loop(k.asInstanceOf[Transaction.K[R, E, Any, Any]].onHalt(cause), conn), success => loop(k.onSuccess(success), conn) ) - } } - pool.connection.use( - conn => - blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> - loop(tx, conn).tapBoth( + pool.connection.use(conn => + blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> + loop(tx, conn) + .tapBoth( _ => blocking.effectBlocking(conn.rollback()), _ => blocking.effectBlocking(conn.commit()) - ).asInstanceOf[ZIO[R, E, A]] + ) + .asInstanceOf[ZIO[R, E, A]] ) } } @@ -126,39 +136,37 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { )(to: read.ResultType => Target): Stream[Exception, Target] = ZStream .managed(pool.connection) - .flatMap(conn => executeOn(read, conn)).map(to) - - def executeOn[A <: SelectionSet[_]]( - read: Read[A], - conn: Connection): Stream[Exception, read.ResultType] = - Stream.unwrap { - blocking.effectBlocking { - val schema = getColumns(read).zipWithIndex.map { case (value, index) => - (value, index + 1) - } // SQL is 1-based indexing + .flatMap(conn => executeOn(read, conn)) + .map(to) - val query = renderRead(read) + def executeOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] = + Stream.unwrap { + blocking.effectBlocking { + val schema = getColumns(read).zipWithIndex.map { case (value, index) => + (value, index + 1) + } // SQL is 1-based indexing - val statement = conn.createStatement() + val query = renderRead(read) - val _ = statement.execute(query) // TODO: Check boolean return value + val statement = conn.createStatement() - val resultSet = statement.getResultSet() + val _ = statement.execute(query) // TODO: Check boolean return value - ZStream.unfoldM(resultSet) { rs => - if (rs.next()) { - try unsafeExtractRow[read.ResultType](resultSet, schema) match { - case Left(error) => ZIO.fail(error) - case Right(value) => ZIO.succeed(Some((value, rs))) - } catch { - case e: SQLException => ZIO.fail(e) - } - } else ZIO.succeed(None) - } + val resultSet = statement.getResultSet() - }.refineToOrDie[Exception] - } + ZStream.unfoldM(resultSet) { rs => + if (rs.next()) { + try unsafeExtractRow[read.ResultType](resultSet, schema) match { + case Left(error) => ZIO.fail(error) + case Right(value) => ZIO.succeed(Some((value, rs))) + } catch { + case e: SQLException => ZIO.fail(e) + } + } else ZIO.succeed(None) + } + }.refineToOrDie[Exception] + } } } diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala index 3ca269ba3..6101bb435 100644 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -1,8 +1,8 @@ package zio.sql -import zio.{Cause, ZIO} +import zio.{ Cause, ZIO } -trait TransactionModule { self : SelectModule with DeleteModule with UpdateModule => +trait TransactionModule { self: SelectModule with DeleteModule with UpdateModule => import Transaction._ @@ -42,24 +42,25 @@ trait TransactionModule { self : SelectModule with DeleteModule with UpdateModul } object Transaction { - case class Effect[R, E, A](zio: ZIO[R, E, A]) extends Transaction[R, E, A] - case class Select[A <: SelectionSet[_]](read: self.Read[A]) extends Transaction[Any, Exception, zio.stream.Stream[Exception, A]] - case class Update[A](read: self.Update[A]) extends Transaction[Any, Exception, A] - case class Delete[A](read: self.Delete[_, A]) extends Transaction[Any, Exception, A] + case class Effect[R, E, A](zio: ZIO[R, E, A]) extends Transaction[R, E, A] + case class Select[A <: SelectionSet[_]](read: self.Read[A]) + extends Transaction[Any, Exception, zio.stream.Stream[Exception, A]] + case class Update[A](read: self.Update[A]) extends Transaction[Any, Exception, A] + case class Delete[A](read: self.Delete[_, A]) extends Transaction[Any, Exception, A] case class FoldCauseM[R, E, A, B](tx: Transaction[R, E, A], k: K[R, E, A, B]) extends Transaction[R, E, B] case class K[R, E, A, B](onHalt: Cause[E] => Transaction[R, E, B], onSuccess: A => Transaction[R, E, B]) - def succeed[A](a: A): Transaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) - def fail[E](e: E): Transaction[Any, E, Nothing] = Effect(ZIO.fail(e)) + def succeed[A](a: A): Transaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) + def fail[E](e: E): Transaction[Any, E, Nothing] = Effect(ZIO.fail(e)) def halt[E](e: Cause[E]): Transaction[Any, E, Nothing] = Effect(ZIO.halt(e)) def select[A <: SelectionSet[_]](read: self.Read[A]): Transaction[Any, Exception, zio.stream.Stream[Exception, A]] = Transaction.Select(read) - def update[A](update: self.Update[A]): Transaction[Any, Exception, A] = + def update[A](update: self.Update[A]): Transaction[Any, Exception, A] = Update(update) - def delete[A](delete: self.Delete[_, A]): Transaction[Any, Exception, A] = + def delete[A](delete: self.Delete[_, A]): Transaction[Any, Exception, A] = Delete(delete) } -} \ No newline at end of file +} From 0c5018e9ab62ae3c08978c7694906eedbee4bfc1 Mon Sep 17 00:00:00 2001 From: fokot Date: Sun, 22 Nov 2020 13:22:07 +0100 Subject: [PATCH 057/673] test:scalafmt --- .../src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index bfcbb1588..ad3199f0c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -190,7 +190,7 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { testM("Transactions is returning the last value") { val query = select(customerId) from customers - val result = execute( + val result = execute( Transaction.Select(query) *> Transaction.Select(query) ) val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie From 5a3f30431069c1e15c17b0003c24573b2036fcc4 Mon Sep 17 00:00:00 2001 From: fokot Date: Sun, 22 Nov 2020 13:47:21 +0100 Subject: [PATCH 058/673] scala 2.12 fix --- jdbc/src/main/scala/zio/sql/jdbc.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 1c44686f5..9829b1872 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -93,7 +93,10 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) // This works and it is eagerly running the Stream case Transaction.Select(read) => - readS.executeOn(read, conn).runCollect.map(a => ZStream.fromIterator(a.iterator)) + readS + .executeOn(read.asInstanceOf[Read[SelectionSet[_]]], conn) + .runCollect + .map(a => ZStream.fromIterator(a.iterator)) case Transaction.Update(update) => updateS.executeOn(update, conn) case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) case Transaction.FoldCauseM(tx, k) => From 85752715825004237102fec485f9397475307f6d Mon Sep 17 00:00:00 2001 From: vvidlearn <62486575+vvidlearn@users.noreply.github.com> Date: Mon, 23 Nov 2020 01:04:04 +0530 Subject: [PATCH 059/673] Fix and add Tests For character length and concat #240 #241 --- core/jvm/src/main/scala/zio/sql/expr.scala | 2 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index cf4dd61a2..efca712ce 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -270,7 +270,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { //string functions val Ascii = FunctionDef[String, Int](FunctionName("ascii")) - val CharLength = FunctionDef[String, Int](FunctionName("character length")) + val CharLength = FunctionDef[String, Int](FunctionName("character_length")) val Concat = FunctionDef[(String, String), String](FunctionName("concat")) val Lower = FunctionDef[String, String](FunctionName("lower")) val Ltrim = FunctionDef[String, String](FunctionName("ltrim")) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index a6a0b54a7..b3f31f669 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -404,6 +404,34 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can concat strings with concat function") { + + val query = select(Concat("first_name", "last_name") as "fullname") from customers + + val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") + + val result = execute(query).to[String, String](identity) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can calculate character length of a string") { + + val query = select(CharLength("first_name")) from customers + + val expected = Seq(6, 8, 4, 5, 4) + + val result = execute(query).to[Int, Int](identity) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElements(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From 26f498c04416a14c444a9b078f918749d29567b6 Mon Sep 17 00:00:00 2001 From: robmwalsh <30517573+robmwalsh@users.noreply.github.com> Date: Mon, 23 Nov 2020 10:02:42 +1100 Subject: [PATCH 060/673] enough to merge some PRs! --- core/jvm/src/main/scala/zio/sql/expr.scala | 5 +- core/jvm/src/main/scala/zio/sql/typetag.scala | 46 ++++++++++--------- .../zio/sql/postgresql/PostgresModule.scala | 34 +++++++++++++- .../zio/sql/postgresql/FunctionDefSpec.scala | 14 ++++++ 4 files changed, 73 insertions(+), 26 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index cf4dd61a2..7a5d43076 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -22,6 +22,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def *[F2, A1 <: A, B1 >: B](that: Expr[F2, A1, B1])(implicit ev: IsNumeric[B1]): Expr[F :||: F2, A1, B1] = Expr.Binary(self, that, BinaryOp.Mul[B1]()) + //todo do something special for divide by 0? also Mod/log/whatever else is really a partial function.. PartialExpr? def /[F2, A1 <: A, B1 >: B](that: Expr[F2, A1, B1])(implicit ev: IsNumeric[B1]): Expr[F :||: F2, A1, B1] = Expr.Binary(self, that, BinaryOp.Div[B1]()) @@ -269,8 +270,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val WidthBucket = FunctionDef[(Double, Double, Double, Int), Int](FunctionName("width_bucket")) //string functions - val Ascii = FunctionDef[String, Int](FunctionName("ascii")) - val CharLength = FunctionDef[String, Int](FunctionName("character length")) + val Ascii = FunctionDef[String, Int](FunctionName("ascii")) + val Concat = FunctionDef[(String, String), String](FunctionName("concat")) val Lower = FunctionDef[String, String](FunctionName("lower")) val Ltrim = FunctionDef[String, String](FunctionName("ltrim")) diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 508e5e1aa..0def47c0b 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -9,30 +9,32 @@ trait TypeTagModule { type TypeTagExtension[+A] - sealed trait TypeTag[A] + sealed trait TypeTag[+A] { + private[zio] def cast(a: Any): A = a.asInstanceOf[A] + } object TypeTag { - sealed trait NotNull[A] extends TypeTag[A] - implicit case object TBigDecimal extends NotNull[BigDecimal] - implicit case object TBoolean extends NotNull[Boolean] - implicit case object TByte extends NotNull[Byte] - implicit case object TByteArray extends NotNull[Chunk[Byte]] - implicit case object TChar extends NotNull[Char] - implicit case object TDouble extends NotNull[Double] - implicit case object TFloat extends NotNull[Float] - implicit case object TInstant extends NotNull[Instant] - implicit case object TInt extends NotNull[Int] - implicit case object TLocalDate extends NotNull[LocalDate] - implicit case object TLocalDateTime extends NotNull[LocalDateTime] - implicit case object TLocalTime extends NotNull[LocalTime] - implicit case object TLong extends NotNull[Long] - implicit case object TOffsetDateTime extends NotNull[OffsetDateTime] - implicit case object TOffsetTime extends NotNull[OffsetTime] - implicit case object TShort extends NotNull[Short] - implicit case object TString extends NotNull[String] - implicit case object TUUID extends NotNull[UUID] - implicit case object TZonedDateTime extends NotNull[ZonedDateTime] - sealed case class TDialectSpecific[A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] + sealed trait NotNull[+A] extends TypeTag[A] + implicit case object TBigDecimal extends NotNull[BigDecimal] + implicit case object TBoolean extends NotNull[Boolean] + implicit case object TByte extends NotNull[Byte] + implicit case object TByteArray extends NotNull[Chunk[Byte]] + implicit case object TChar extends NotNull[Char] + implicit case object TDouble extends NotNull[Double] + implicit case object TFloat extends NotNull[Float] + implicit case object TInstant extends NotNull[Instant] + implicit case object TInt extends NotNull[Int] + implicit case object TLocalDate extends NotNull[LocalDate] + implicit case object TLocalDateTime extends NotNull[LocalDateTime] + implicit case object TLocalTime extends NotNull[LocalTime] + implicit case object TLong extends NotNull[Long] + implicit case object TOffsetDateTime extends NotNull[OffsetDateTime] + implicit case object TOffsetTime extends NotNull[OffsetTime] + implicit case object TShort extends NotNull[Short] + implicit case object TString extends NotNull[String] + implicit case object TUUID extends NotNull[UUID] + implicit case object TZonedDateTime extends NotNull[ZonedDateTime] + sealed case class TDialectSpecific[+A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 61dd4cafe..34d232341 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -52,8 +52,38 @@ trait PostgresModule extends Jdbc { self => case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping + case lit @ Expr.Literal(value) => + import TypeTag._ + lit.typeTag match { + case tt @ TByteArray => val _ = builder.append(tt.cast(value)) // todo still broken + //something like? val _ = builder.append(tt.cast(value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) + case tt @ TChar => + val _ = builder.append("'") + builder.append(tt.cast(value)) //todo is this the same as a string? fix escaping + val _ = builder.append("'") + case tt @ TInstant => val _ = builder.append(tt.cast(value)) // todo still broken + case tt @ TLocalDate => val _ = builder.append(tt.cast(value)) // todo still broken + case tt @ TLocalDateTime => val _ = builder.append(tt.cast(value)) // todo still broken + case tt @ TLocalTime => val _ = builder.append(tt.cast(value)) // todo still broken + case tt @ TOffsetDateTime => val _ = builder.append(tt.cast(value)) // todo still broken + case tt @ TOffsetTime => val _ = builder.append(tt.cast(value)) // todo still broken + case tt @ TUUID => val _ = builder.append(tt.cast(value)) // todo still broken + case tt @ TZonedDateTime => val _ = builder.append(tt.cast(value)) // todo still broken + + case TByte => val _ = builder.append(value.toString) + case TBigDecimal => val _ = builder.append(value.toString) + case TBoolean => val _ = builder.append(value.toString) + case TDouble => val _ = builder.append(value.toString) + case TFloat => val _ = builder.append(value.toString) + case TInt => val _ = builder.append(value.toString) + case TLong => val _ = builder.append(value.toString) + case TShort => val _ = builder.append(value.toString) + case TString => + builder.append("'") + builder.append(value) //todo fix escaping + val _ = builder.append("'") + case _ => val _ = builder.append(value.toString) + } case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 4c500d300..bcd9f5de0 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -14,6 +14,20 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import this.FunctionDef._ val spec = suite("Postgres FunctionDef")( + suite("String functions") { + testM("CharLength") { + val query = select(CharLength("hello")) from customers + val expected = 5 + + val testResult = execute(query).to[Int, Int](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + }, testM("repeat") { val query = select(Repeat("'Zio'", 3)) from customers From c5e7f0407ef1edad2e9f7e93cf102bf6d56ba057 Mon Sep 17 00:00:00 2001 From: robmwalsh <30517573+robmwalsh@users.noreply.github.com> Date: Mon, 23 Nov 2020 10:26:41 +1100 Subject: [PATCH 061/673] fix tests --- .../zio/sql/postgresql/FunctionDefSpec.scala | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index bcd9f5de0..a60a05c8c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -16,7 +16,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val spec = suite("Postgres FunctionDef")( suite("String functions") { testM("CharLength") { - val query = select(CharLength("hello")) from customers + val query = select(Length("hello")) from customers val expected = 5 val testResult = execute(query).to[Int, Int](identity) @@ -29,7 +29,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } }, testM("repeat") { - val query = select(Repeat("'Zio'", 3)) from customers + val query = select(Repeat("Zio", 3)) from customers val expected = "ZioZioZio" @@ -55,7 +55,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("reverse") { - val query = select(Reverse("'abcd'")) from customers + val query = select(Reverse("abcd")) from customers val expected = "dcba" @@ -120,7 +120,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("initcap") { - val query = select(Initcap("'hi THOMAS'")) from customers + val query = select(Initcap("hi THOMAS")) from customers val expected = "Hi Thomas" @@ -237,7 +237,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("length") { - val query = select(Length("'hello'")) from customers + val query = select(Length("hello")) from customers val expected = 5 @@ -263,7 +263,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("translate") { - val query = select(Translate("'12345'", "'143'", "'ax'")) from customers + val query = select(Translate("12345", "143", "ax")) from customers val expected = "a2x5" @@ -276,7 +276,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("left") { - val query = select(Left("'abcde'", 2)) from customers + val query = select(Left("abcde", 2)) from customers val expected = "ab" @@ -289,7 +289,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("right") { - val query = select(Right("'abcde'", 2)) from customers + val query = select(Right("abcde", 2)) from customers val expected = "de" @@ -331,7 +331,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = - (select(customerId ++ fName ++ lName ++ verified ++ dob) from customers).where(StartsWith(fName, """'R'""")) + (select(customerId ++ fName ++ lName ++ verified ++ dob) from customers).where(StartsWith(fName, "R")) val expected = Seq( @@ -356,7 +356,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("lower") { - val query = select(Lower("first_name")) from customers limit (1) + val query = select(Lower(fName)) from customers limit (1) val expected = "ronald" @@ -369,7 +369,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("octet_length") { - val query = select(OctetLength("'josé'")) from customers + val query = select(OctetLength("josé")) from customers val expected = 5 @@ -382,7 +382,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("ascii") { - val query = select(Ascii("""'x'""")) from customers + val query = select(Ascii("""x""")) from customers val expected = 120 @@ -395,7 +395,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("upper") { - val query = (select(Upper("first_name")) from customers).limit(1) + val query = (select(Upper("ronald")) from customers).limit(1) val expected = "RONALD" From 0ff3c7b355d9d350bf71c238d00293ca61918bd8 Mon Sep 17 00:00:00 2001 From: robmwalsh <30517573+robmwalsh@users.noreply.github.com> Date: Mon, 23 Nov 2020 11:02:11 +1100 Subject: [PATCH 062/673] fix compile error --- postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 34d232341..c05dee9e9 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -58,7 +58,7 @@ trait PostgresModule extends Jdbc { self => case tt @ TByteArray => val _ = builder.append(tt.cast(value)) // todo still broken //something like? val _ = builder.append(tt.cast(value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) case tt @ TChar => - val _ = builder.append("'") + builder.append("'") builder.append(tt.cast(value)) //todo is this the same as a string? fix escaping val _ = builder.append("'") case tt @ TInstant => val _ = builder.append(tt.cast(value)) // todo still broken From 6f04f8744b20eb9cf224289fc577b15e10557138 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Mon, 23 Nov 2020 01:27:31 +0100 Subject: [PATCH 063/673] Update expr.scala --- core/jvm/src/main/scala/zio/sql/expr.scala | 4 ---- 1 file changed, 4 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index b77d4b22b..1963fdb8b 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -167,10 +167,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } - sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { - def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] - } - sealed case class FunctionCall2[F1, F2, A, B, C, Z: TypeTag]( param1: Expr[F1, A, B], param2: Expr[F2, A, C], From bf108add503c7ede06a2c0389f08d0c4484e5f60 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Mon, 23 Nov 2020 01:54:56 +0100 Subject: [PATCH 064/673] Update PostgresModule.scala --- .../src/main/scala/zio/sql/postgresql/PostgresModule.scala | 4 ---- 1 file changed, 4 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index b67a0364b..daa35f0c4 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -70,10 +70,6 @@ trait PostgresModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) => - builder.append(function.name.name) - builder.append("(") - val _ = builder.append(")") case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") From 6eaf6cac4657687cf3252e606bac8d1487713ed9 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Mon, 23 Nov 2020 02:13:05 +0100 Subject: [PATCH 065/673] Update PostgresModule.scala --- .../src/main/scala/zio/sql/postgresql/PostgresModule.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index daa35f0c4..ca9c084ff 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -63,8 +63,10 @@ trait PostgresModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) => - val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) => + builder.append(function.name.name) + builder.append("(") + val _ = builder.append(")") case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") From d9fb690e39a8222ca0fde6d6460ec02e6d0c3ab8 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 23 Nov 2020 06:19:01 +0100 Subject: [PATCH 066/673] Update sbt to 1.4.4 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 947bdd302..7de0a9382 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.3 +sbt.version=1.4.4 From b130b6c2ca1f181abd89ca8e51d72b196c67553e Mon Sep 17 00:00:00 2001 From: robmwalsh <30517573+robmwalsh@users.noreply.github.com> Date: Mon, 23 Nov 2020 16:44:41 +1100 Subject: [PATCH 067/673] break up render function and make StringBuilder play nice --- .../jvm/src/main/scala/zio/sql/Renderer.scala | 23 ++ .../zio/sql/postgresql/PostgresModule.scala | 289 +++++++++--------- 2 files changed, 163 insertions(+), 149 deletions(-) create mode 100644 core/jvm/src/main/scala/zio/sql/Renderer.scala diff --git a/core/jvm/src/main/scala/zio/sql/Renderer.scala b/core/jvm/src/main/scala/zio/sql/Renderer.scala new file mode 100644 index 000000000..22a65d9f7 --- /dev/null +++ b/core/jvm/src/main/scala/zio/sql/Renderer.scala @@ -0,0 +1,23 @@ +package zio.sql + +class Renderer(val builder: StringBuilder) extends AnyVal { + //not vararg to avoid allocating `Seq`s + def apply(s1: Any): Unit = { + val _ = builder.append(s1) + } + def apply(s1: Any, s2: Any): Unit = { + val _ = builder.append(s1).append(s2) + } + def apply(s1: Any, s2: Any, s3: Any): Unit = { + val _ = builder.append(s1).append(s2).append(s3) + } + def apply(s1: Any, s2: Any, s3: Any, s4: Any): Unit = { + val _ = builder.append(s1).append(s2).append(s3).append(s4) + } + + override def toString: String = builder.toString() +} + +object Renderer { + def apply(): Renderer = new Renderer(new StringBuilder) +} diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index c05dee9e9..91e285fea 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,6 +1,6 @@ package zio.sql.postgresql -import zio.sql.Jdbc +import zio.sql.{ Jdbc, Renderer } /** */ @@ -30,191 +30,186 @@ trait PostgresModule extends Jdbc { self => } override def renderRead(read: self.Read[_]): String = { - val builder = new StringBuilder + implicit val render: Renderer = Renderer() + PostgresRenderModule.renderReadImpl(read) + render.toString + } + + object PostgresRenderModule { //todo split out + + private[zio] def renderLit[A, B](lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { + import TypeTag._ + lit.typeTag match { + case tt @ TByteArray => render(tt.cast(lit.value)) // todo still broken + //something like? render(tt.cast(lit.value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) + case tt @ TChar => + render("'") + render(tt.cast(lit.value)) //todo is this the same as a string? fix escaping + render("'") + case tt @ TInstant => render(tt.cast(lit.value)) // todo still broken + case tt @ TLocalDate => render(tt.cast(lit.value)) // todo still broken + case tt @ TLocalDateTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TLocalTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TOffsetDateTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TOffsetTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TUUID => render(tt.cast(lit.value)) // todo still broken + case tt @ TZonedDateTime => render(tt.cast(lit.value)) // todo still broken - def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => - val _ = builder.append(" ").append(op.symbol) - buildExpr(base) - case Expr.Property(base, op) => - buildExpr(base) - val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.Relational(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.In(value, set) => - buildExpr(value) - buildReadString(set) - case lit @ Expr.Literal(value) => - import TypeTag._ - lit.typeTag match { - case tt @ TByteArray => val _ = builder.append(tt.cast(value)) // todo still broken - //something like? val _ = builder.append(tt.cast(value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) - case tt @ TChar => - builder.append("'") - builder.append(tt.cast(value)) //todo is this the same as a string? fix escaping - val _ = builder.append("'") - case tt @ TInstant => val _ = builder.append(tt.cast(value)) // todo still broken - case tt @ TLocalDate => val _ = builder.append(tt.cast(value)) // todo still broken - case tt @ TLocalDateTime => val _ = builder.append(tt.cast(value)) // todo still broken - case tt @ TLocalTime => val _ = builder.append(tt.cast(value)) // todo still broken - case tt @ TOffsetDateTime => val _ = builder.append(tt.cast(value)) // todo still broken - case tt @ TOffsetTime => val _ = builder.append(tt.cast(value)) // todo still broken - case tt @ TUUID => val _ = builder.append(tt.cast(value)) // todo still broken - case tt @ TZonedDateTime => val _ = builder.append(tt.cast(value)) // todo still broken + case TByte => render(lit.value) //default toString is probably ok + case TBigDecimal => render(lit.value) //default toString is probably ok + case TBoolean => render(lit.value) //default toString is probably ok + case TDouble => render(lit.value) //default toString is probably ok + case TFloat => render(lit.value) //default toString is probably ok + case TInt => render(lit.value) //default toString is probably ok + case TLong => render(lit.value) //default toString is probably ok + case TShort => render(lit.value) //default toString is probably ok + case TString => render("'", lit.value, "'") //todo fix escaping + + case _ => render(lit.value) //todo fix add TypeTag.Nullable[_] => + } + } - case TByte => val _ = builder.append(value.toString) - case TBigDecimal => val _ = builder.append(value.toString) - case TBoolean => val _ = builder.append(value.toString) - case TDouble => val _ = builder.append(value.toString) - case TFloat => val _ = builder.append(value.toString) - case TInt => val _ = builder.append(value.toString) - case TLong => val _ = builder.append(value.toString) - case TShort => val _ = builder.append(value.toString) - case TString => - builder.append("'") - builder.append(value) //todo fix escaping - val _ = builder.append("'") - case _ => val _ = builder.append(value.toString) - } - case Expr.AggregationCall(param, aggregation) => - builder.append(aggregation.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - val _ = builder.append(")") + private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + case Expr.Source(tableName, column) => render(tableName, ".", column.name) + case Expr.Unary(base, op) => + render(" ", op.symbol) + renderExpr(base) + case Expr.Property(base, op) => + renderExpr(base) + render(" ", op.symbol) + case Expr.Binary(left, right, op) => + renderExpr(left) + render(" ", op.symbol, " ") + renderExpr(right) + case Expr.Relational(left, right, op) => + renderExpr(left) + render(" ", op.symbol, " ") + renderExpr(right) + case Expr.In(value, set) => + renderExpr(value) + renderReadImpl(set) + case lit: Expr.Literal[_] => renderLit(lit) + case Expr.AggregationCall(p, aggregation) => + render(aggregation.name.name, "(") + renderExpr(p) + render(")") + case Expr.FunctionCall1(p, fn) => + render(fn.name.name, "(") + renderExpr(p) + render(")") + case Expr.FunctionCall2(p1, p2, fn) => + render(fn.name.name, "(") + renderExpr(p1) + render(",") + renderExpr(p2) + render(")") + case Expr.FunctionCall3(p1, p2, p3, fn) => + render(fn.name.name, "(") + renderExpr(p1) + render(",") + renderExpr(p2) + render(",") + renderExpr(p3) + render(")") + case Expr.FunctionCall4(p1, p2, p3, p4, fn) => + render(fn.name.name, "(") + renderExpr(p1) + render(",") + renderExpr(p2) + render(",") + renderExpr(p3) + render(",") + renderExpr(p4) + render(")") } - def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = + private[zio] def renderReadImpl[A <: SelectionSet[_]](read: self.Read[_])(implicit render: Renderer): Unit = read match { case read0 @ Read.Select(_, _, _, _, _, _, _, _) => - object Dummy { - type F - type A - type B <: SelectionSet[A] - } + object Dummy { type F; type A; type B <: SelectionSet[A] } val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] import read._ - builder.append("SELECT ") - buildSelection(selection.value) - builder.append(" FROM ") - buildTable(table) + render("SELECT ") + renderSelection(selection.value) + render(" FROM ") + renderTable(table) whereExpr match { case Expr.Literal(true) => () case _ => - builder.append(" WHERE ") - buildExpr(whereExpr) + render(" WHERE ") + renderExpr(whereExpr) } groupBy match { case _ :: _ => - builder.append(" GROUP BY ") - buildExprList(groupBy) + render(" GROUP BY ") + renderExprList(groupBy) havingExpr match { case Expr.Literal(true) => () case _ => - builder.append(" HAVING ") - buildExpr(havingExpr) + render(" HAVING ") + renderExpr(havingExpr) } case Nil => () } orderBy match { case _ :: _ => - builder.append(" ORDER BY ") - buildOrderingList(orderBy) + render(" ORDER BY ") + renderOrderingList(orderBy) case Nil => () } limit match { - case Some(limit) => - builder.append(" LIMIT ").append(limit) + case Some(limit) => render(" LIMIT ", limit) case None => () } offset match { - case Some(offset) => - val _ = builder.append(" OFFSET ").append(offset) + case Some(offset) => render(" OFFSET ", offset) case None => () } case Read.Union(left, right, distinct) => - buildReadString(left) - builder.append(" UNION ") - if (!distinct) builder.append("ALL ") - buildReadString(right) + renderReadImpl(left) + render(" UNION ") + if (!distinct) render("ALL ") + renderReadImpl(right) case Read.Literal(values) => - val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + render(" (", values.mkString(","), ") ") //todo fix needs escaping } - def buildExprList(expr: List[Expr[_, _, _]]): Unit = + def renderExprList(expr: List[Expr[_, _, _]])(implicit render: Renderer): Unit = expr match { case head :: tail => - buildExpr(head) + renderExpr(head) tail match { case _ :: _ => - builder.append(", ") - buildExprList(tail) + render(", ") + renderExprList(tail) case Nil => () } case Nil => () } - def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = + + def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = expr match { case head :: tail => head match { - case Ordering.Asc(value) => buildExpr(value) + case Ordering.Asc(value) => renderExpr(value) case Ordering.Desc(value) => - buildExpr(value) - builder.append(" DESC") + renderExpr(value) + render(" DESC") } tail match { case _ :: _ => - builder.append(", ") - buildOrderingList(tail) + render(", ") + renderOrderingList(tail) case Nil => () } case Nil => () } - def buildSelection[A](selectionSet: SelectionSet[A]): Unit = + def renderSelection[A](selectionSet: SelectionSet[A])(implicit render: Renderer): Unit = selectionSet match { case cons0 @ SelectionSet.Cons(_, _) => object Dummy { @@ -224,54 +219,50 @@ trait PostgresModule extends Jdbc { self => } val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] import cons._ - buildColumnSelection(head) + renderColumnSelection(head) if (tail != SelectionSet.Empty) { - builder.append(", ") - buildSelection(tail) + render(", ") + renderSelection(tail) } case SelectionSet.Empty => () } - def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = + def renderColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => - builder.append(value.toString) //todo fix escaping + render(value) //todo fix escaping name match { - case Some(name) => - val _ = builder.append(" AS ").append(name) + case Some(name) => render(" AS ", name) case None => () } case ColumnSelection.Computed(expr, name) => - buildExpr(expr) + renderExpr(expr) name match { case Some(name) => Expr.exprName(expr) match { - case Some(sourceName) if name != sourceName => - val _ = builder.append(" AS ").append(name) + case Some(sourceName) if name != sourceName => render(" AS ", name) case _ => () } case _ => () //todo what do we do if we don't have a name? } } - def buildTable(table: Table): Unit = + + def renderTable(table: Table)(implicit render: Renderer): Unit = table match { //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => - val _ = builder.append(sourceTable.name) + case sourceTable: self.Table.Source => render(sourceTable.name) case Table.Joined(joinType, left, right, on) => - buildTable(left) - builder.append(joinType match { + renderTable(left) + render(joinType match { case JoinType.Inner => " INNER JOIN " case JoinType.LeftOuter => " LEFT JOIN " case JoinType.RightOuter => " RIGHT JOIN " case JoinType.FullOuter => " OUTER JOIN " }) - buildTable(right) - builder.append(" ON ") - buildExpr(on) - val _ = builder.append(" ") + renderTable(right) + render(" ON ") + renderExpr(on) + render(" ") } - buildReadString(read) - builder.toString() } } From 2c3a632479e4d2f37f16fbae7f88d8fd024befd4 Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Mon, 23 Nov 2020 08:58:02 +0100 Subject: [PATCH 068/673] Add a case for random in rendering --- .../zio/sql/postgresql/PostgresModule.scala | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index ca9c084ff..28853b340 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -37,49 +37,53 @@ trait PostgresModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) => + case Expr.FunctionCall0(function) if (function.name.name == "random") => builder.append(function.name.name) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall0(function) => + val _ = builder.append(function.name.name) + /*builder.append("(") + val _ = builder.append(")")*/ + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -88,7 +92,7 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) From 969dbe10e678091ab0891cb54953c18fee0c257e Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Mon, 23 Nov 2020 09:01:08 +0100 Subject: [PATCH 069/673] Format code --- postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 28853b340..4195693c8 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -69,7 +69,7 @@ trait PostgresModule extends Jdbc { self => val _ = builder.append(")") case Expr.FunctionCall0(function) => val _ = builder.append(function.name.name) - /*builder.append("(") + /*builder.append("(") val _ = builder.append(")")*/ case Expr.FunctionCall1(param, function) => builder.append(function.name.name) From afcacfb6428d7a86ab3559df8cadea934d575205 Mon Sep 17 00:00:00 2001 From: Rafal Piotrowski Date: Sat, 21 Nov 2020 15:16:35 +0100 Subject: [PATCH 070/673] fix literals rendering and add tests for select queries in PostgreSQL --- core/jvm/src/main/scala/zio/sql/expr.scala | 16 +++- postgres/src/test/resources/shop_schema.sql | 2 +- .../sql/postgresql/PostgresModuleTest.scala | 89 +++++++++++++++---- .../scala/zio/sql/postgresql/ShopSchema.scala | 8 +- 4 files changed, 94 insertions(+), 21 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 1963fdb8b..dcfff7f33 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,7 +108,21 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag - implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) + implicit def literal[A](a: A)(implicit typeTag: TypeTag[A]): Expr[Features.Literal, Any, A] = + typeTag match { + case TypeTag.TBoolean => Expr.Literal(a) + case TypeTag.TByte => Expr.Literal(a) + case TypeTag.TByteArray => Expr.Literal(a) // TODO: not sure about this one + case TypeTag.TDouble => Expr.Literal(a) + case TypeTag.TFloat => Expr.Literal(a) + case TypeTag.TInt => Expr.Literal(a) + case TypeTag.TLong => Expr.Literal(a) + case TypeTag.TShort => Expr.Literal(a) + case _ => literalAsString(a) + } + + private def literalAsString[A](a: A) = + Expr.Literal(s"'${a.toString}'").asInstanceOf[Expr[Features.Literal, Any, A]] def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { diff --git a/postgres/src/test/resources/shop_schema.sql b/postgres/src/test/resources/shop_schema.sql index 9dfdfbdb1..4d439d58f 100644 --- a/postgres/src/test/resources/shop_schema.sql +++ b/postgres/src/test/resources/shop_schema.sql @@ -189,4 +189,4 @@ values ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), - ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); \ No newline at end of file + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 8ef00f290..f9bfda696 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -1,18 +1,50 @@ package zio.sql.postgresql -import java.time.LocalDate +import java.time.{ Instant, LocalDate, LocalDateTime, OffsetDateTime, ZonedDateTime } import java.util.UUID import zio.Cause -import zio.test._ import zio.test.Assertion._ +import zio.test._ import scala.language.postfixOps object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { - import this.Customers._ - import this.Orders._ + import Customers._ + import Orders._ + import OrderDetails._ + + private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { + case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) + + val query = + select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (condition) + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + false, + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } val spec = suite("Postgres module")( testM("Can select from single table") { @@ -67,27 +99,54 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can select with property operator") { - case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) + testM("Can select with property unary operator") { + customerSelectJoseAssertion(verified isNotTrue) + }, + testM("Can select with property binary operator with UUID") { + customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) + }, + testM("Can select with property binary operator with String") { + customerSelectJoseAssertion(fName === "Jose") + }, + testM("Can select with property binary operator with LocalDate") { + customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) + }, + testM("Can select with property binary operator with LocalDateTime") { + customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) + }, + testM("Can select with property binary operator with OffsetDateTime") { + customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) + }, + testM("Can select with property binary operator with ZonedLocalDate") { + customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) + }, + testM("Can select with property binary operator with Instant") { + customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) + }, + testM("Can select with property binary operator with numbers") { + case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) - val query = select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (verified isNotTrue) + val orderDetailQuantity = 3 + val orderDetailUnitPrice = BigDecimal(80.0) + val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) + val query = + select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice) from orderDetails where (condition) println(renderRead(query)) val expected = Seq( - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - false, - LocalDate.parse("1987-03-23") + OrderDetails( + UUID.fromString("763a7c39-833f-4ee8-9939-e80dfdbfc0fc"), + UUID.fromString("105a2701-ef93-4e25-81ab-8952cc7d9daa"), + orderDetailQuantity, + orderDetailUnitPrice ) ) val testResult = execute(query) - .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4, row._5) + .to[UUID, UUID, Int, BigDecimal, OrderDetails] { case row => + OrderDetails(row._1, row._2, row._3, row._4) } val assertion = for { diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index c37cf090a..1fb348f4c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -19,23 +19,23 @@ trait ShopSchema extends Jdbc { self => } object Products { val products = - (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") + (uuid("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") val productId :*: description :*: imageURL :*: _ = products.columns } object ProductPrices { val productPrices = - (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") val fkProductId :*: effective :*: price :*: _ = productPrices.columns } object OrderDetails { val orderDetails = - (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) + (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")) .table( "order_details" - ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. + ) val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns } From 9c32a06e9da8dac96e5d0ba636ca381947cc6853 Mon Sep 17 00:00:00 2001 From: Rafal Piotrowski Date: Sat, 21 Nov 2020 15:18:43 +0100 Subject: [PATCH 071/673] Add test for 'Replace' function for PostgreSQL (and fix its type) fixes #247 --- core/jvm/src/main/scala/zio/sql/expr.scala | 15 ++-------- .../zio/sql/postgresql/FunctionDefSpec.scala | 30 ++++++++++++++++--- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index dcfff7f33..72343f8a1 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,18 +108,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag - implicit def literal[A](a: A)(implicit typeTag: TypeTag[A]): Expr[Features.Literal, Any, A] = - typeTag match { - case TypeTag.TBoolean => Expr.Literal(a) - case TypeTag.TByte => Expr.Literal(a) - case TypeTag.TByteArray => Expr.Literal(a) // TODO: not sure about this one - case TypeTag.TDouble => Expr.Literal(a) - case TypeTag.TFloat => Expr.Literal(a) - case TypeTag.TInt => Expr.Literal(a) - case TypeTag.TLong => Expr.Literal(a) - case TypeTag.TShort => Expr.Literal(a) - case _ => literalAsString(a) - } + implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) private def literalAsString[A](a: A) = Expr.Literal(s"'${a.toString}'").asInstanceOf[Expr[Features.Literal, Any, A]] @@ -298,7 +287,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val OctetLength = FunctionDef[String, Int](FunctionName("octet_length")) val Overlay = FunctionDef[(String, String, Int, Option[Int]), String](FunctionName("overlay")) val Position = FunctionDef[(String, String), Int](FunctionName("position")) - val Replace = FunctionDef[(String, String), String](FunctionName("replace")) + val Replace = FunctionDef[(String, String, String), String](FunctionName("replace")) val Rtrim = FunctionDef[String, String](FunctionName("rtrim")) val Substring = FunctionDef[(String, Int, Option[Int]), String](FunctionName("substring")) //TODO substring regex diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index faac0aa6a..6c9e82f28 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -4,14 +4,14 @@ import java.time.LocalDate import java.util.UUID import zio.Cause -import zio.test._ import zio.test.Assertion._ +import zio.test._ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { - import this.Customers._ - import this.PostgresFunctionDef._ - import this.FunctionDef._ + import Customers._ + import FunctionDef._ + import PostgresFunctionDef._ val spec = suite("Postgres FunctionDef")( testM("repeat") { @@ -523,6 +523,28 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- result.runCollect } yield assert(r)(hasSameElements(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("replace") { + val lastNameReplaced = Replace(lName, "'ll'", "'_'") as "lastNameReplaced" + val computedReplace = Replace("'special ::ąę::'", "'ąę'", "'__'") as "computedReplace" + + val customerUUID = "'60b01fc9-c902-4468-8d49-3c0f989def37'" + val query = select(lastNameReplaced ++ computedReplace) from customers where (customerId === customerUUID) + + println(renderRead(query)) + + val expected = Seq(("Russe_", "special ::__::")) + + val testResult = + execute(query).to[String, String, (String, String)] { case row => + (row._1, row._2) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From e5c5acd0cad352c093e39a0e1dd886ebd866fcba Mon Sep 17 00:00:00 2001 From: Rafal Piotrowski Date: Mon, 23 Nov 2020 16:57:23 +0100 Subject: [PATCH 072/673] Adjust tests for not properly working literal rendering --- core/jvm/src/main/scala/zio/sql/expr.scala | 3 - .../zio/sql/postgresql/FunctionDefSpec.scala | 9 +- .../sql/postgresql/PostgresModuleTest.scala | 110 +++++++++--------- 3 files changed, 58 insertions(+), 64 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 72343f8a1..65e2bef30 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -110,9 +110,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) - private def literalAsString[A](a: A) = - Expr.Literal(s"'${a.toString}'").asInstanceOf[Expr[Features.Literal, Any, A]] - def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { case Expr.Source(_, c) => Some(c.name) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 6c9e82f28..d4435c607 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -529,12 +529,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val lastNameReplaced = Replace(lName, "'ll'", "'_'") as "lastNameReplaced" val computedReplace = Replace("'special ::ąę::'", "'ąę'", "'__'") as "computedReplace" - val customerUUID = "'60b01fc9-c902-4468-8d49-3c0f989def37'" - val query = select(lastNameReplaced ++ computedReplace) from customers where (customerId === customerUUID) + val query = select(lastNameReplaced ++ computedReplace) from customers - println(renderRead(query)) - - val expected = Seq(("Russe_", "special ::__::")) + val expected = ("Russe_", "special ::__::") val testResult = execute(query).to[String, String, (String, String)] { case row => @@ -543,7 +540,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = for { r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index f9bfda696..d62cb9703 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -1,6 +1,6 @@ package zio.sql.postgresql -import java.time.{ Instant, LocalDate, LocalDateTime, OffsetDateTime, ZonedDateTime } +import java.time.LocalDate import java.util.UUID import zio.Cause @@ -13,7 +13,6 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { import Customers._ import Orders._ - import OrderDetails._ private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) @@ -102,59 +101,60 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { testM("Can select with property unary operator") { customerSelectJoseAssertion(verified isNotTrue) }, - testM("Can select with property binary operator with UUID") { - customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) - }, - testM("Can select with property binary operator with String") { - customerSelectJoseAssertion(fName === "Jose") - }, - testM("Can select with property binary operator with LocalDate") { - customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) - }, - testM("Can select with property binary operator with LocalDateTime") { - customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) - }, - testM("Can select with property binary operator with OffsetDateTime") { - customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) - }, - testM("Can select with property binary operator with ZonedLocalDate") { - customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) - }, - testM("Can select with property binary operator with Instant") { - customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) - }, - testM("Can select with property binary operator with numbers") { - case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) - - val orderDetailQuantity = 3 - val orderDetailUnitPrice = BigDecimal(80.0) - val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) - val query = - select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice) from orderDetails where (condition) - - println(renderRead(query)) - - val expected = - Seq( - OrderDetails( - UUID.fromString("763a7c39-833f-4ee8-9939-e80dfdbfc0fc"), - UUID.fromString("105a2701-ef93-4e25-81ab-8952cc7d9daa"), - orderDetailQuantity, - orderDetailUnitPrice - ) - ) - - val testResult = execute(query) - .to[UUID, UUID, Int, BigDecimal, OrderDetails] { case row => - OrderDetails(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, +// TODO: uncomment when #311 (rendering literals) will be fixed +// testM("Can select with property binary operator with UUID") { +// customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) +// }, +// testM("Can select with property binary operator with String") { +// customerSelectJoseAssertion(fName === "Jose") +// }, +// testM("Can select with property binary operator with LocalDate") { +// customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) +// }, +// testM("Can select with property binary operator with LocalDateTime") { +// customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) +// }, +// testM("Can select with property binary operator with OffsetDateTime") { +// customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) +// }, +// testM("Can select with property binary operator with ZonedLocalDate") { +// customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) +// }, +// testM("Can select with property binary operator with Instant") { +// customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) +// }, +// testM("Can select with property binary operator with numbers") { +// case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) +// +// val orderDetailQuantity = 3 +// val orderDetailUnitPrice = BigDecimal(80.0) +// val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) +// val query = +// select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice) from orderDetails where (condition) +// +// println(renderRead(query)) +// +// val expected = +// Seq( +// OrderDetails( +// UUID.fromString("763a7c39-833f-4ee8-9939-e80dfdbfc0fc"), +// UUID.fromString("105a2701-ef93-4e25-81ab-8952cc7d9daa"), +// orderDetailQuantity, +// orderDetailUnitPrice +// ) +// ) +// +// val testResult = execute(query) +// .to[UUID, UUID, Int, BigDecimal, OrderDetails] { case row => +// OrderDetails(row._1, row._2, row._3, row._4) +// } +// +// val assertion = for { +// r <- testResult.runCollect +// } yield assert(r)(hasSameElementsDistinct(expected)) +// +// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) +// }, testM("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) From 20b40a74925a7e1bd941a7442e0979a94da8a61b Mon Sep 17 00:00:00 2001 From: Brandon Brown Date: Fri, 20 Nov 2020 23:52:19 -0500 Subject: [PATCH 073/673] feat(postgres to_timestamp): Implementing Postgres to_timestamp function. #215 --- jdbc/src/main/scala/zio/sql/jdbc.scala | 12 +++++-- .../zio/sql/postgresql/PostgresModule.scala | 4 +-- postgres/src/test/resources/shop_schema.sql | 16 +++++++++- .../zio/sql/postgresql/FunctionDefSpec.scala | 31 +++++++++++++++++-- .../scala/zio/sql/postgresql/ShopSchema.scala | 13 ++++++-- 5 files changed, 66 insertions(+), 10 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 73be39c16..71f902015 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,9 +1,8 @@ package zio.sql import java.sql._ - import java.io.IOException - +import java.time.{ ZoneId, ZoneOffset } import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } @@ -193,7 +192,14 @@ trait Jdbc extends zio.sql.Sql { tryDecode[java.util.UUID]( java.util.UUID.fromString(column.fold(resultSet.getString(_), resultSet.getString(_))) ) - case TZonedDateTime => ??? + case TZonedDateTime => + tryDecode[java.time.ZonedDateTime]( + java.time.ZonedDateTime + .ofInstant( + column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, + ZoneId.of(ZoneOffset.UTC.getId) + ) + ) case TDialectSpecific(_) => ??? case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 83386774a..b016047b5 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,7 +1,6 @@ package zio.sql.postgresql -import java.time.LocalDate - +import java.time.{ LocalDate, ZonedDateTime } import zio.sql.Jdbc /** @@ -30,6 +29,7 @@ trait PostgresModule extends Jdbc { self => val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Div = FunctionDef[(Double, Double), Double](FunctionName("div")) val Factorial = FunctionDef[Int, Int](FunctionName("factorial")) + val ToTimestamp = FunctionDef[Long, ZonedDateTime](FunctionName("to_timestamp")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/resources/shop_schema.sql b/postgres/src/test/resources/shop_schema.sql index 9dfdfbdb1..05ebd7bbf 100644 --- a/postgres/src/test/resources/shop_schema.sql +++ b/postgres/src/test/resources/shop_schema.sql @@ -37,6 +37,12 @@ create table order_details unit_price money not null ); +create table timestamp_test +( + timestamp_id uuid not null, + created_timestamp_string varchar not null, + created_timestamp timestamp with time zone default now() +); insert into customers (id, first_name, last_name, verified, dob) @@ -189,4 +195,12 @@ values ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), - ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); \ No newline at end of file + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); + +insert into timestamp_test + (timestamp_id, created_timestamp_string, created_timestamp) +values + ('354ec738-71b6-4166-9c62-aa092ede73c4', '2020-11-21 19:10:25+00', '2020-11-21 19:10:25+00'), + ('2f97e2c5-62de-478e-bb30-742f2614f3cd', '2020-11-21 15:10:25-04', '2020-11-21 15:10:25-04'), + ('261a4290-2da4-4e3f-bbab-3f0af31d1914', '2020-11-22 02:10:25+07', '2020-11-22 02:10:25+07'), + ('2e9d0d70-b947-4126-9149-7a8e6d492171', '2020-11-21 12:10:25-07', '2020-11-21 12:10:25-07') \ No newline at end of file diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index faac0aa6a..d56eb9769 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,8 +1,7 @@ package zio.sql.postgresql -import java.time.LocalDate +import java.time.{ LocalDate, ZoneId, ZoneOffset, ZonedDateTime } import java.util.UUID - import zio.Cause import zio.test._ import zio.test.Assertion._ @@ -523,6 +522,34 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- result.runCollect } yield assert(r)(hasSameElements(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("to_timestamp") { + import this.TimestampTests._ + + val query = select(ToTimestamp(1284352323L)) from customers + val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + + val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) + val roundTripQuery = + select(createdString ++ createdTimestamp) from timestampTests + val roundTripResults = execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime)] { case row => + row + } + val roundTripExpected = List( + ("2020-11-21 19:10:25+00", expectedRoundTripTimestamp), + ("2020-11-21 15:10:25-04", expectedRoundTripTimestamp), + ("2020-11-22 02:10:25+07", expectedRoundTripTimestamp), + ("2020-11-21 12:10:25-07", expectedRoundTripTimestamp) + ) + + val assertion = for { + single <- testResult.runCollect + roundTrip <- roundTripResults.runCollect + } yield assert(single.head)(equalTo(expected)) && + assert(roundTrip)(hasSameElementsDistinct(roundTripExpected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index c37cf090a..650fa9e22 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -7,10 +7,12 @@ trait ShopSchema extends Jdbc { self => object Customers { val customers = - (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) + (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( + "verified" + ) ++ zonedDateTime("created_timestamp")) .table("customers") - val customerId :*: dob :*: fName :*: lName :*: verified :*: _ = customers.columns + val customerId :*: dob :*: fName :*: lName :*: verified :*: createdTimestamp :*: _ = customers.columns } object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") @@ -39,4 +41,11 @@ trait ShopSchema extends Jdbc { self => val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns } + + object TimestampTests { + val timestampTests = + (uuid("timestamp_id") ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) + .table("timestamp_test") + val tId :*: createdString :*: createdTimestamp :*: _ = timestampTests.columns + } } From 754baaedcc89b0c0df76aa9f41f6e4551bfbf7c6 Mon Sep 17 00:00:00 2001 From: Marek Kidon Date: Mon, 23 Nov 2020 21:29:50 +0100 Subject: [PATCH 074/673] CR comments --- core/jvm/src/main/scala/zio/sql/Sql.scala | 4 ++-- core/jvm/src/main/scala/zio/sql/delete.scala | 9 ++------- core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala | 4 ++-- core/jvm/src/test/scala/zio/sql/ProductSchema.scala | 4 ++-- .../jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala | 4 ++-- examples/src/main/scala/Example1.scala | 4 ++-- jdbc/src/main/scala/zio/sql/jdbc.scala | 6 +++--- .../main/scala/zio/sql/postgresql/PostgresModule.scala | 4 ++-- .../scala/zio/sql/postgresql/PostgresModuleTest.scala | 2 +- .../main/scala/zio/sql/sqlserver/SqlServerModule.scala | 2 +- 10 files changed, 19 insertions(+), 24 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 14f550428..d4dde5ab4 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,11 +17,11 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = SelectBuilder(selection) - def deleteFrom[F[_], A, B](table: Table.Source.Aux[F, A, B]): DeleteBuilder[F, A, B] = DeleteBuilder(table) + def deleteFrom[F[_], A, B](table: Table.Source.Aux[F, A, B]): Delete[A] = Delete(table, true) def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) def renderRead(read: self.Read[_]): String - def renderDelete(delete: self.Delete[_, _]): String + def renderDelete(delete: self.Delete[_]): String } diff --git a/core/jvm/src/main/scala/zio/sql/delete.scala b/core/jvm/src/main/scala/zio/sql/delete.scala index fbd3a2975..ef31c20dd 100644 --- a/core/jvm/src/main/scala/zio/sql/delete.scala +++ b/core/jvm/src/main/scala/zio/sql/delete.scala @@ -2,12 +2,7 @@ package zio.sql trait DeleteModule { self: ExprModule with TableModule => - sealed case class DeleteBuilder[F[_], A, B](table: Table.Aux[A]) { - def where[F1](expr: Expr[F1, A, Boolean]): Delete[F1, A] = Delete(table, expr) - - def all[F1]: Delete[Features.Literal, A] = Delete(table, Expr.literal(true)) + sealed case class Delete[A](table: Table.Aux[A], whereExpr: Expr[_, A, Boolean]) { + def where[F](expr: Expr[F, A, Boolean]): Delete[A] = Delete(table, expr) } - - sealed case class Delete[F, A](table: Table.Aux[A], whereExpr: Expr[F, A, Boolean]) - } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index ab3fc82f9..7eabea8c4 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -16,8 +16,8 @@ object GroupByHavingSpec extends DefaultRunnableSpec { object AggregatedProductSchema { val sqldsl = new Sql { - override def renderRead(read: this.Read[_]): String = ??? - override def renderDelete(delete: this.Delete[_, _]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderDelete(delete: this.Delete[_]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 0fd981b5a..705089b11 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -2,8 +2,8 @@ package zio.sql object ProductSchema { val sql = new Sql { - override def renderRead(read: this.Read[_]): String = ??? - override def renderDelete(delete: this.Delete[_, _]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderDelete(delete: this.Delete[_]): String = ??? } import sql.ColumnSet._ import sql._ diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 8c7230c26..3c27dc13c 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -7,8 +7,8 @@ object TestBasicSelect { val userSql = new Sql { self => import self.ColumnSet._ - override def renderRead(read: this.Read[_]): String = ??? - override def renderDelete(delete: this.Delete[_, _]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderDelete(delete: this.Delete[_]): String = ??? val userTable = (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 9cfaee698..1801d18ce 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -3,8 +3,8 @@ import zio.sql.Sql object Example1 extends Sql { import ColumnSet._ - def renderRead(read: this.Read[_]): String = ??? - def renderDelete(delete: this.Delete[_, _]): String = ??? + def renderRead(read: this.Read[_]): String = ??? + def renderDelete(delete: this.Delete[_]): String = ??? val columnSet = int("age") ++ string("name") diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 45888793a..74c253079 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -40,13 +40,13 @@ trait Jdbc extends zio.sql.Sql { type DeleteExecutor = Has[DeleteExecutor.Service] object DeleteExecutor { trait Service { - def execute(delete: Delete[_, _]): IO[Exception, Int] + def execute(delete: Delete[_]): IO[Exception, Int] } val live: ZLayer[ConnectionPool with Blocking, Nothing, DeleteExecutor] = ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, DeleteExecutor.Service] { (pool, blocking) => new Service { - def execute(delete: Delete[_, _]): IO[Exception, Int] = pool.connection.use { conn => + def execute(delete: Delete[_]): IO[Exception, Int] = pool.connection.use { conn => blocking.effectBlocking { val query = renderDelete(delete) val statement = conn.createStatement() @@ -244,7 +244,7 @@ trait Jdbc extends zio.sql.Sql { def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = new ExecuteBuilder(read) - def execute(delete: Delete[_, _]): ZIO[DeleteExecutor, Exception, Int] = ZIO.accessM[DeleteExecutor]( + def execute(delete: Delete[_]): ZIO[DeleteExecutor, Exception, Int] = ZIO.accessM[DeleteExecutor]( _.get.execute(delete) ) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index b2b484ac9..ee13b16bb 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -246,7 +246,7 @@ trait PostgresModule extends Jdbc { self => val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping } - private def buildDeleteString(delete: self.Delete[_, _], builder: StringBuilder): Unit = { + private def buildDeleteString(delete: self.Delete[_], builder: StringBuilder): Unit = { import delete._ builder.append("DELETE FROM ") @@ -259,7 +259,7 @@ trait PostgresModule extends Jdbc { self => } } - override def renderDelete(delete: self.Delete[_, _]): String = { + override def renderDelete(delete: self.Delete[_]): String = { val builder = new StringBuilder() buildDeleteString(delete, builder) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 7f3e51216..18d04f993 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -186,7 +186,7 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet - // val query = deleteFrom(customers).all + // val query = deleteFrom(customers) // println(renderDelete(query)) // val result = execute(query) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index dcc649f11..dcb2256b4 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -4,7 +4,7 @@ import zio.sql.Jdbc trait SqlServerModule extends Jdbc { self => - override def renderDelete(delete: Delete[_, _]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 + override def renderDelete(delete: Delete[_]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder From 763155528de8edf27f66e594ea62cf21dec80aa7 Mon Sep 17 00:00:00 2001 From: Jessen <4315281+jessenr@users.noreply.github.com> Date: Mon, 23 Nov 2020 22:20:53 +0000 Subject: [PATCH 075/673] Update PostgresModuleTest.scala add like operator test to postgres integration tests --- .../sql/postgresql/PostgresModuleTest.scala | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 8ef00f290..8b3ee0895 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -183,8 +183,32 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select using like") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "'Jo%'") + + println(renderRead(query)) + val expected = + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) - } From 2349b5c3609878980f4b431151e2d7e760079b94 Mon Sep 17 00:00:00 2001 From: Brandon Brown Date: Sat, 21 Nov 2020 06:00:32 -0500 Subject: [PATCH 076/673] Adding in support for postgres lpad and rpad functions. #188 --- .../zio/sql/postgresql/PostgresModule.scala | 2 ++ .../zio/sql/postgresql/FunctionDefSpec.scala | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index f17311a80..af3d45464 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -32,6 +32,8 @@ trait PostgresModule extends Jdbc { self => val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Div = FunctionDef[(Double, Double), Double](FunctionName("div")) val Factorial = FunctionDef[Int, Int](FunctionName("factorial")) + val LPad = FunctionDef[(String, Int, String), String](FunctionName("lpad")) + val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 4af8c9f4a..b731979ab 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -705,6 +705,38 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("lpad") { + def runTest(s: String, pad: String) = { + val query = select(LPad(postgresStringEscape(s), 5, postgresStringEscape(pad))) from customers + + for { + r <- execute(query).to[String, String](identity).runCollect + } yield r.head + } + + (for { + t1 <- assertM(runTest("hi", "xy"))(equalTo("xyxhi")) + t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("rpad") { + def runTest(s: String, pad: String) = { + val query = select(RPad(postgresStringEscape(s), 5, postgresStringEscape(pad))) from customers + + for { + r <- execute(query).to[String, String](identity).runCollect + } yield r.head + } + + (for { + t1 <- assertM(runTest("hi", "xy"))(equalTo("hixyx")) + t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) + + private def postgresStringEscape(s: String): String = s""" '${s}' """ } From 815b1d07fa974125b347e1cab53860da228cc01f Mon Sep 17 00:00:00 2001 From: Brandon Brown Date: Mon, 23 Nov 2020 22:06:18 -0500 Subject: [PATCH 077/673] pr feedback --- postgres/src/test/resources/shop_schema.sql | 31 ++++++------------- .../zio/sql/postgresql/FunctionDefSpec.scala | 17 +++++----- .../scala/zio/sql/postgresql/ShopSchema.scala | 13 +++----- 3 files changed, 21 insertions(+), 40 deletions(-) diff --git a/postgres/src/test/resources/shop_schema.sql b/postgres/src/test/resources/shop_schema.sql index 05ebd7bbf..6c1064e3e 100644 --- a/postgres/src/test/resources/shop_schema.sql +++ b/postgres/src/test/resources/shop_schema.sql @@ -4,7 +4,9 @@ create table customers first_name varchar not null, last_name varchar not null, verified boolean not null, - dob date not null + dob date not null, + created_timestamp_string varchar not null, + created_timestamp timestamp with time zone default now() ); create table orders @@ -37,21 +39,14 @@ create table order_details unit_price money not null ); -create table timestamp_test -( - timestamp_id uuid not null, - created_timestamp_string varchar not null, - created_timestamp timestamp with time zone default now() -); - insert into customers - (id, first_name, last_name, verified, dob) + (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) values - ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05'), - ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02'), - ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', true, '1990-11-16'), - ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', true, '1995-11-12'), - ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', false, '1987-03-23'); + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04'), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', true, '1990-11-16', '2020-11-22T02:10:25+07:00', '2020-11-22 02:10:25+07'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', true, '1995-11-12', '2020-11-21T12:10:25-07:00', '2020-11-21 12:10:25-07'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', false, '1987-03-23', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'); insert into products (id, name, description, image_url) @@ -196,11 +191,3 @@ values ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); - -insert into timestamp_test - (timestamp_id, created_timestamp_string, created_timestamp) -values - ('354ec738-71b6-4166-9c62-aa092ede73c4', '2020-11-21 19:10:25+00', '2020-11-21 19:10:25+00'), - ('2f97e2c5-62de-478e-bb30-742f2614f3cd', '2020-11-21 15:10:25-04', '2020-11-21 15:10:25-04'), - ('261a4290-2da4-4e3f-bbab-3f0af31d1914', '2020-11-22 02:10:25+07', '2020-11-22 02:10:25+07'), - ('2e9d0d70-b947-4126-9149-7a8e6d492171', '2020-11-21 12:10:25-07', '2020-11-21 12:10:25-07') \ No newline at end of file diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index d56eb9769..606b2945b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -525,23 +525,22 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("to_timestamp") { - import this.TimestampTests._ - val query = select(ToTimestamp(1284352323L)) from customers val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) val roundTripQuery = - select(createdString ++ createdTimestamp) from timestampTests - val roundTripResults = execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime)] { case row => - row + select(createdString ++ createdTimestamp) from customers + val roundTripResults = execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { + case row => + (row._1, ZonedDateTime.parse(row._1), row._2) } val roundTripExpected = List( - ("2020-11-21 19:10:25+00", expectedRoundTripTimestamp), - ("2020-11-21 15:10:25-04", expectedRoundTripTimestamp), - ("2020-11-22 02:10:25+07", expectedRoundTripTimestamp), - ("2020-11-21 12:10:25-07", expectedRoundTripTimestamp) + ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), + ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), + ("2020-11-22T02:10:25+07:00", ZonedDateTime.parse("2020-11-22T02:10:25+07:00"), expectedRoundTripTimestamp), + ("2020-11-21T12:10:25-07:00", ZonedDateTime.parse("2020-11-21T12:10:25-07:00"), expectedRoundTripTimestamp) ) val assertion = for { diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index 650fa9e22..b2722d9bf 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -6,13 +6,15 @@ trait ShopSchema extends Jdbc { self => import self.ColumnSet._ object Customers { + //https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string val customers = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( "verified" - ) ++ zonedDateTime("created_timestamp")) + ) ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) .table("customers") - val customerId :*: dob :*: fName :*: lName :*: verified :*: createdTimestamp :*: _ = customers.columns + val customerId :*: dob :*: fName :*: lName :*: verified :*: createdString :*: createdTimestamp :*: _ = + customers.columns } object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") @@ -41,11 +43,4 @@ trait ShopSchema extends Jdbc { self => val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns } - - object TimestampTests { - val timestampTests = - (uuid("timestamp_id") ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) - .table("timestamp_test") - val tId :*: createdString :*: createdTimestamp :*: _ = timestampTests.columns - } } From 7669b64b4fb37e16fdc81b01f25e2906c81b24e5 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 22 Nov 2020 21:10:20 -1000 Subject: [PATCH 078/673] Full Stack Mysql: setup build dependencies added mysql test container dependencies --- build.sbt | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index 18e70fde2..236e54733 100644 --- a/build.sbt +++ b/build.sbt @@ -25,6 +25,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.3" val testcontainersVersion = "1.15.0" +val testcontainersScalaVersion = "1.0.0-alpha1" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) @@ -153,7 +154,13 @@ lazy val mysql = project libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion, "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" + "dev.zio" %% "zio-test-sbt" % zioVersion % "test", + "mysql" % "mysql-connector-java" % "8.0.22", + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "org.testcontainers" % "mysql" % testcontainersVersion % Test, + "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test, ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -182,14 +189,14 @@ lazy val postgres = project .settings( libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "postgresql" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.18" % Test, - "com.dimafeng" %% "testcontainers-scala-postgresql" % "1.0.0-alpha1" % Test + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test, + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "postgresql" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "org.postgresql" % "postgresql" % "42.2.18" % Test, + "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From e375f2c611994770895663027a956b23e6d6e536 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 22 Nov 2020 21:16:04 -1000 Subject: [PATCH 079/673] define mysql test container TestContainers.scala: created container definition as part of the mysql project. We may want to move and merge this file with postgresql version in a common location. shop_schema.sql: called by TestContainer to bootstrap test data in docker instance. --- mysql/src/test/resources/shop_schema.sql | 84 +++++++++++++++++++ .../test/scala/zio/sql/TestContainers.scala | 31 +++++++ 2 files changed, 115 insertions(+) create mode 100644 mysql/src/test/resources/shop_schema.sql create mode 100644 mysql/src/test/scala/zio/sql/TestContainers.scala diff --git a/mysql/src/test/resources/shop_schema.sql b/mysql/src/test/resources/shop_schema.sql new file mode 100644 index 000000000..db62c3669 --- /dev/null +++ b/mysql/src/test/resources/shop_schema.sql @@ -0,0 +1,84 @@ +create table simple +( + id int not null primary key, + message varchar(255) not null +); + +create table customers +( + id varchar(36) not null primary key, + first_name varchar(255) not null, + last_name varchar(255) not null, + verified boolean not null, + dob date not null +); + +create table orders +( + id varchar(36) not null primary key, + customer_id varchar(36) not null, + order_date date not null +); + +create table products +( + id varchar(36) not null primary key, + name varchar(255), + description varchar(255) not null, + image_url varchar(255) +); + +insert into simple + (id, message) +values + (1, "Test message"), + (2, "Another test"); + +insert into customers + (id, first_name, last_name, verified, dob) +values + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02'), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', true, '1990-11-16'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', true, '1995-11-12'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', false, '1987-03-23'); + +insert into products + (id, name, description, image_url) +values + ('7368ABF4-AED2-421F-B426-1725DE756895', 'Thermometer', 'Make sure you don''t have a fever (could be covid!)', 'https://images.pexels.com/photos/3987152/pexels-photo-3987152.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('4C770002-4C8F-455A-96FF-36A8186D5290', 'Slippers', 'Keep your feet warm this winter', 'https://images.pexels.com/photos/1989843/pexels-photo-1989843.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('05182725-F5C8-4FD6-9C43-6671E179BF55', 'Mouse Pad', 'Who uses these anyway?', 'https://images.pexels.com/photos/3944396/pexels-photo-3944396.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', 'Pants', 'Avoid a lawsuit, wear pants to work today!', 'https://images.pexels.com/photos/52518/jeans-pants-blue-shop-52518.jpeg?cs=srgb&dl=blue-jeans-clothes-shopping-52518.jpg&fm=jpg'), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', 'Nail File', 'Keep those nails looking good', 'https://images.pexels.com/photos/3997373/pexels-photo-3997373.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('D5137D3A-894A-4109-9986-E982541B434F', 'Teddy Bear', 'Because sometimes you just need something to hug', 'https://images.pexels.com/photos/1019471/stuffed-bear-teddy-child-girl-1019471.jpeg?cs=srgb&dl=closeup-photography-of-brown-teddy-bear-1019471.jpg&fm=jpg'); + +insert into orders + (id, customer_id, order_date) +values + ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-03-25'), + ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-06-04'), + ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-08-19'), + ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-08-30'), + ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-03-07'), + ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', '2020-03-19'), + ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2020-05-11'), + ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-02-21'), + ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-05-06'), + ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-02-11'), + ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-10-12'), + ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-01-29'), + ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-02-10'), + ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-09-27'), + ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2018-11-13'), + ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2020-01-15'), + ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2018-07-10'), + ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-08-01'), + ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-12-08'), + ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-11-04'), + ('2c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2018-10-14'), + ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05'), + ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23'), + ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14'), + ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); + diff --git a/mysql/src/test/scala/zio/sql/TestContainers.scala b/mysql/src/test/scala/zio/sql/TestContainers.scala new file mode 100644 index 000000000..79ab5e1f4 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/TestContainers.scala @@ -0,0 +1,31 @@ +package zio.sql + +import com.dimafeng.testcontainers.SingleContainer +import com.dimafeng.testcontainers.MySQLContainer +import zio._ +import zio.blocking.{ effectBlocking, Blocking } + +// TODO: copy/pasted from postgres module. put in common location +object TestContainer { + + def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = + ZManaged.make { + effectBlocking { + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + + def mysql(imageName: String): ZLayer[Blocking, Throwable, Has[MySQLContainer]] = + ZManaged.make { + effectBlocking { + val c = new MySQLContainer(mysqlImageVersion = Some(imageName)).configure { a => + a.withInitScript("shop_schema.sql") + () + } + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + +} From cda68064f20242186cda72058a2cd630a14df976 Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Tue, 24 Nov 2020 09:23:03 +0100 Subject: [PATCH 080/673] Update default rendering of postgresql 0 params functions and rendering of current_date and current_timestmap --- .../zio/sql/postgresql/PostgresModule.scala | 32 ++++++++++--------- .../zio/sql/postgresql/FunctionDefSpec.scala | 6 ++-- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 85435c9a5..bde6b3325 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -39,53 +39,55 @@ trait PostgresModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) if (function.name.name == "random") => + case Expr.FunctionCall0(function) if function.name.name == "current_date" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) if function.name.name == "current_timestamp" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall0(function) => - val _ = builder.append(function.name.name) /*builder.append("(") val _ = builder.append(")")*/ - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -94,7 +96,7 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index a69c28bac..44dcb588d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -4,7 +4,7 @@ import java.time.LocalDate import java.util.UUID import zio.Cause -import zio.random.Random +import zio.random.{ Random => ZioRandom } import zio.test.Assertion._ import zio.test._ @@ -198,10 +198,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("parseIdent removes quoting of individual identifiers") { - val someString: Gen[Random with Sized, String] = Gen.anyString + val someString: Gen[ZioRandom with Sized, String] = Gen.anyString .filter(x => x.length < 50 && x.length > 1) //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it - val genTestString: Gen[Random with Sized, String] = + val genTestString: Gen[ZioRandom with Sized, String] = for { string1 <- someString string2 <- someString From 602905731b8afde0fa2107ea22447aad81846b3a Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Tue, 24 Nov 2020 09:30:40 +0100 Subject: [PATCH 081/673] Restore literal function --- core/jvm/src/main/scala/zio/sql/expr.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 5768e89ce..ba9d9233b 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,9 +108,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag - implicit def literal[A](a: A)(implicit typeTag: TypeTag[A]): Expr[Features.Literal, Any, A] = typeTag match { - case _ => Expr.Literal(a) - } + implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { From 435019e387062af13243e7ba5c55f690211f1db6 Mon Sep 17 00:00:00 2001 From: riccardocorbella <739397@gmail.com> Date: Tue, 24 Nov 2020 09:41:17 +0100 Subject: [PATCH 082/673] Update sql server rendering --- .../zio/sql/sqlserver/SqlServerModule.scala | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 1f3caf8ee..c0bbfc250 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -8,47 +8,47 @@ trait SqlServerModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) if (function.name.name == "localtime") => + case Expr.FunctionCall0(function) => val _ = builder.append(function.name.name) - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -57,7 +57,7 @@ trait SqlServerModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) From 035f18aa335f66cb016a7464d83ddaf8c719a2d4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 25 Nov 2020 08:06:28 +0100 Subject: [PATCH 083/673] Update scala-collection-compat to 2.3.1 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 99be7ddd1..d68fbdca3 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -195,7 +195,7 @@ object BuildHelper { Seq( ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)), - "org.scala-lang.modules" %% "scala-collection-compat" % "2.2.0" + "org.scala-lang.modules" %% "scala-collection-compat" % "2.3.1" ) }, parallelExecution in Test := true, From 2a6242405512c57234b1073bb9d5b9d1a8c7871f Mon Sep 17 00:00:00 2001 From: Jessen <4315281+jessenr@users.noreply.github.com> Date: Wed, 25 Nov 2020 12:47:31 +0000 Subject: [PATCH 084/673] add test fix in PostgresModuleTest for like operator --- .../zio/sql/postgresql/PostgresModuleTest.scala | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 8b3ee0895..016d018d8 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -191,13 +191,14 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "'Jo%'") println(renderRead(query)) - val expected = - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") - ) + val expected = Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") ) + ) val testResult = execute(query) .to[UUID, String, String, LocalDate, Customer] { case row => From 0449a62788cdd76d5b049d687cce4552ecddb50d Mon Sep 17 00:00:00 2001 From: LAURA CHAPMAN Date: Wed, 25 Nov 2020 08:56:32 -0500 Subject: [PATCH 085/673] fix for Fill the missing date/time related decoding in ReadExecutor --- jdbc/src/main/scala/zio/sql/jdbc.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 93d68af10..6481d35e0 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -190,15 +190,14 @@ trait Jdbc extends zio.sql.Sql { column .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) .toLocalDateTime() - .atOffset(ZoneOffset.of(ZoneId.systemDefault().getId)) + .atOffset(ZoneOffset.UTC) ) case TOffsetTime => tryDecode[OffsetTime]( column - .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) - .toLocalDateTime() + .fold(resultSet.getTime(_), resultSet.getTime(_)) .toLocalTime - .atOffset(ZoneOffset.of(ZoneId.systemDefault().getId)) + .atOffset(ZoneOffset.UTC) ) case TShort => tryDecode[Short](column.fold(resultSet.getShort(_), resultSet.getShort(_))) case TString => tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) From 569101bdbce275ea78483d151297c0b418ef3658 Mon Sep 17 00:00:00 2001 From: LAURA CHAPMAN Date: Wed, 25 Nov 2020 14:01:30 -0500 Subject: [PATCH 086/673] remove unused import --- jdbc/src/main/scala/zio/sql/jdbc.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 6481d35e0..f489de0ee 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -2,7 +2,7 @@ package zio.sql import java.sql._ import java.io.IOException -import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset, ZonedDateTime } +import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset } import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } import zio.blocking.Blocking From aac710199bffcb1921aab7f42f232ed7155f4c46 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 25 Nov 2020 20:02:07 +0100 Subject: [PATCH 087/673] Update mdoc, sbt-mdoc to 2.2.13 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 89f7d4739..507f3b74d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.11") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.13") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.5") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") From 37bc43baf3ccb61007a82d4355fb95f94450673a Mon Sep 17 00:00:00 2001 From: bonczek Date: Tue, 24 Nov 2020 20:32:31 +0100 Subject: [PATCH 088/673] Add 'pg_client_encoding' function to PostgresModule --- .../scala/zio/sql/postgresql/PostgresModule.scala | 1 + .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 8cf1a80f6..2d9929bef 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -40,6 +40,7 @@ trait PostgresModule extends Jdbc { self => val LPad = FunctionDef[(String, Int, String), String](FunctionName("lpad")) val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) val ToTimestamp = FunctionDef[Long, ZonedDateTime](FunctionName("to_timestamp")) + val PgClientEncoding = FunctionDef[Nothing, String](FunctionName("pg_client_encoding")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index da2ed3f81..c08a075ef 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -843,6 +843,17 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("pg_client_encoding") { + val query = select(PgClientEncoding()) from customers + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo("UTF8")) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From b25286c2230ddab6bf3b8ad75ec72976a70a1ff8 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Thu, 26 Nov 2020 00:20:50 +0100 Subject: [PATCH 089/673] Add progress status to the Readme --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 2526934a9..6f591dbaf 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,38 @@ | --- | --- | | [![Build Status][badge-ci]][link-ci] | [![badge-discord]][link-discord] | +## Current status: pre-0.1 (no release yet) + +### Progress report towards 0.1 + +:heavy_check_mark: - good to go + +:white_check_mark: - some more work needed + +#### General features: +Feature | Progress +:------------ | :------------- +Type-safe schema | :heavy_check_mark: +Type-safe DSL | :white_check_mark: +Running Reads | :heavy_check_mark: +Running Deletes | :heavy_check_mark: +Running Updates | :heavy_check_mark: +Running Inserts | +Transactions | +Connection pool | + +#### Db-specific features: + +Feature | PostgreSQL | SQL Server | Oracle | MySQL +:------------ | :-------------| :-------------| :-------------| :------------- +Render Read | :white_check_mark: | :white_check_mark: | | +Render Delete | :white_check_mark: | | | +Render Update | :white_check_mark: | | | +Render Insert | | | | +Functions | :white_check_mark: | | | +Types | | | | +Operators | | | | + ## What is ZIO SQL? ZIO SQL lets you write type-safe, type-inferred, and composable SQL queries in ordinary Scala, helping you prevent persistence bugs before they happen, and leverage your IDE to make writing SQL productive, safe, and fun. From 539859f24bdddb45b29c85ffe085fcbf28b6f326 Mon Sep 17 00:00:00 2001 From: robmwalsh <30517573+robmwalsh@users.noreply.github.com> Date: Thu, 26 Nov 2020 15:24:17 +1100 Subject: [PATCH 090/673] i literally just ran fmt -_- --- build.sbt | 3 ++- core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 18e70fde2..181ba1fe7 100644 --- a/build.sbt +++ b/build.sbt @@ -20,7 +20,8 @@ inThisBuild( ) ) -addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt") +addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") +addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "1.0.3" diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 00fed7d9e..1582bb8d9 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -17,8 +17,8 @@ object GroupByHavingSpec extends DefaultRunnableSpec { object AggregatedProductSchema { val sqldsl = new Sql { override def renderDelete(delete: this.Delete[_]): String = ??? - override def renderRead(read: this.Read[_]): String = ??? - override def renderUpdate(update: Update[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderUpdate(update: Update[_]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ From 086019a90b0259263391632799afcea087af040e Mon Sep 17 00:00:00 2001 From: robmwalsh <30517573+robmwalsh@users.noreply.github.com> Date: Thu, 26 Nov 2020 15:35:42 +1100 Subject: [PATCH 091/673] missed one --- .../src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index ba3851c4d..d4d3e09d0 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -247,7 +247,7 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { testM("Can select using like") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "'Jo%'") + val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") println(renderRead(query)) val expected = Seq( From 8b717f5253ecf9396d55f6cfa73176f7a4565916 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 22 Nov 2020 21:25:12 -1000 Subject: [PATCH 092/673] Full stack mysql test environment Created mysql environment heavily insipred (copy/pasted) by the postgres module. MysqlModule.scala: performs the conversion of zio-sql functions into mysql compatible sql. Currently a copy/paste & rename of the postgres module. FunctionDefSpec.scala: module for testing mysql functions (lower, sin, etc.) MysqlModuleTest.scala: runs mysql tests, table selects, limits, offset, etc. MysqlRunnableSpec.scala: ShopSchema.scala: defines schema (loaded in test container definition) --- build.sbt | 38 +-- .../scala/zio/sql/mysql/MysqlModule.scala | 225 ++++++++++++++++++ mysql/src/test/resources/shop_schema.sql | 12 - .../scala/zio/sql/mysql/FunctionDefSpec.scala | 39 +++ .../scala/zio/sql/mysql/MysqlModuleTest.scala | 96 ++++++++ .../zio/sql/mysql/MysqlRunnableSpec.scala | 33 +++ .../test/scala/zio/sql/mysql/ShopSchema.scala | 41 ++++ 7 files changed, 453 insertions(+), 31 deletions(-) create mode 100644 mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala diff --git a/build.sbt b/build.sbt index 236e54733..9e9d919f3 100644 --- a/build.sbt +++ b/build.sbt @@ -23,8 +23,8 @@ inThisBuild( addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "1.0.3" -val testcontainersVersion = "1.15.0" +val zioVersion = "1.0.3" +val testcontainersVersion = "1.15.0" val testcontainersScalaVersion = "1.0.0-alpha1" lazy val startPostgres = taskKey[Unit]("Start up Postgres") @@ -152,15 +152,15 @@ lazy val mysql = project .settings(buildInfoSettings("zio.sql.mysql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test", - "mysql" % "mysql-connector-java" % "8.0.22", - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-test" % zioVersion % "test", + "dev.zio" %% "zio-test-sbt" % zioVersion % "test", + "mysql" % "mysql-connector-java" % "8.0.22", + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "org.testcontainers" % "mysql" % testcontainersVersion % Test, + "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -189,14 +189,14 @@ lazy val postgres = project .settings( libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "postgresql" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.18" % Test, - "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test, + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "postgresql" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "org.postgresql" % "postgresql" % "42.2.18" % Test, + "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala new file mode 100644 index 000000000..712bcd81e --- /dev/null +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -0,0 +1,225 @@ +package zio.sql.mysql + +import zio.sql.Jdbc + +trait MysqlModule extends Jdbc { self => + object MysqlFunctionDef {} + + override def renderRead(read: self.Read[_]): String = { + val builder = new StringBuilder + + def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { + case Expr.Source(tableName, column) => + val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Unary(base, op) => + val _ = builder.append(" ").append(op.symbol) + buildExpr(base) + case Expr.Property(base, op) => + buildExpr(base) + val _ = builder.append(" ").append(op.symbol) + case Expr.Binary(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.Relational(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.In(value, set) => + buildExpr(value) + buildReadString(set) + case Expr.Literal(value) => + val _ = builder.append(value.toString) //todo fix escaping + case Expr.AggregationCall(param, aggregation) => + builder.append(aggregation.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall0(function) => + val _ = builder.append(function.name.name) + case Expr.FunctionCall1(param, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall2(param1, param2, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + val _ = builder.append(")") + case Expr.FunctionCall3(param1, param2, param3, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + val _ = builder.append(")") + case Expr.FunctionCall4(param1, param2, param3, param4, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + val _ = builder.append(")") + } + + def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = + read match { + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + object Dummy { + type F + type A + type B <: SelectionSet[A] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + import read._ + + builder.append("SELECT ") + buildSelection(selection.value) + builder.append(" FROM ") + buildTable(table) + whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" WHERE ") + buildExpr(whereExpr) + } + groupBy match { + case _ :: _ => + builder.append(" GROUP BY ") + buildExprList(groupBy) + + havingExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" HAVING ") + buildExpr(havingExpr) + } + case Nil => () + } + orderBy match { + case _ :: _ => + builder.append(" ORDER BY ") + buildOrderingList(orderBy) + case Nil => () + } + limit match { + case Some(limit) => + builder.append(" LIMIT ").append(limit) + case None => () + } + offset match { + case Some(offset) => + val _ = builder.append(" OFFSET ").append(offset) + case None => () + } + + case Read.Union(left, right, distinct) => + buildReadString(left) + builder.append(" UNION ") + if (!distinct) builder.append("ALL ") + buildReadString(right) + + case Read.Literal(values) => + val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + } + + def buildExprList(expr: List[Expr[_, _, _]]): Unit = + expr match { + case head :: tail => + buildExpr(head) + tail match { + case _ :: _ => + builder.append(", ") + buildExprList(tail) + case Nil => () + } + case Nil => () + } + def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = + expr match { + case head :: tail => + head match { + case Ordering.Asc(value) => buildExpr(value) + case Ordering.Desc(value) => + buildExpr(value) + builder.append(" DESC") + } + tail match { + case _ :: _ => + builder.append(", ") + buildOrderingList(tail) + case Nil => () + } + case Nil => () + } + + def buildSelection[A](selectionSet: SelectionSet[A]): Unit = + selectionSet match { + case cons0 @ SelectionSet.Cons(_, _) => + object Dummy { + type Source + type A + type B <: SelectionSet[Source] + } + val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] + import cons._ + buildColumnSelection(head) + if (tail != SelectionSet.Empty) { + builder.append(", ") + buildSelection(tail) + } + case SelectionSet.Empty => () + } + + def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = + columnSelection match { + case ColumnSelection.Constant(value, name) => + builder.append(value.toString) //todo fix escaping + name match { + case Some(name) => + val _ = builder.append(" AS ").append(name) + case None => () + } + case ColumnSelection.Computed(expr, name) => + buildExpr(expr) + name match { + case Some(name) => + Expr.exprName(expr) match { + case Some(sourceName) if name != sourceName => + val _ = builder.append(" AS ").append(name) + case _ => () + } + case _ => () //todo what do we do if we don't have a name? + } + } + def buildTable(table: Table): Unit = + table match { + //The outer reference in this type test cannot be checked at run time?! + case sourceTable: self.Table.Source => + val _ = builder.append(sourceTable.name) + case Table.Joined(joinType, left, right, on) => + buildTable(left) + builder.append(joinType match { + case JoinType.Inner => " INNER JOIN " + case JoinType.LeftOuter => " LEFT JOIN " + case JoinType.RightOuter => " RIGHT JOIN " + case JoinType.FullOuter => " OUTER JOIN " + }) + buildTable(right) + builder.append(" ON ") + buildExpr(on) + val _ = builder.append(" ") + } + buildReadString(read) + builder.toString() + } +} diff --git a/mysql/src/test/resources/shop_schema.sql b/mysql/src/test/resources/shop_schema.sql index db62c3669..8f3e9a6ba 100644 --- a/mysql/src/test/resources/shop_schema.sql +++ b/mysql/src/test/resources/shop_schema.sql @@ -1,9 +1,3 @@ -create table simple -( - id int not null primary key, - message varchar(255) not null -); - create table customers ( id varchar(36) not null primary key, @@ -28,12 +22,6 @@ create table products image_url varchar(255) ); -insert into simple - (id, message) -values - (1, "Test message"), - (2, "Another test"); - insert into customers (id, first_name, last_name, verified, dob) values diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala new file mode 100644 index 000000000..88a7eef44 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -0,0 +1,39 @@ +package zio.sql.mysql + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { + import this.Customers._ + import this.FunctionDef._ + + val spec = suite("Mysql FunctionDef")( + testM("lower") { + val query = select(Lower("first_name")) from customers limit (1) + + val expected = "ronald" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sin") { + val query = select(Sin(1.0)) from customers + + val expected = 0.8414709848078965 + + val testResult = execute(query).to[Double, Double](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) +} diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala new file mode 100644 index 000000000..2151ce9fa --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -0,0 +1,96 @@ +package zio.sql.mysql + +import java.time.LocalDate +import java.util.UUID + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { + + import Customers._ + + val spec = suite("Mysql module")( + testM("can select from single table") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("1983-01-05") + ), + Customer( + UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), + "Terrence", + "Noel", + LocalDate.parse("1999-11-02") + ), + Customer( + UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), + "Mila", + "Paterso", + LocalDate.parse("1990-11-16") + ), + Customer( + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + "Alana", + "Murray", + LocalDate.parse("1995-11-12") + ), + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select from single table with limit, offset and order by") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) +} diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala new file mode 100644 index 000000000..a6d04dd95 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -0,0 +1,33 @@ +package zio.sql.mysql + +import java.util.Properties + +import zio.blocking.Blocking +import zio.sql.TestContainer +import zio.sql.postgresql.JdbcRunnableSpec +import zio.test.environment.TestEnvironment +import zio.{ Has, ZEnv, ZLayer } + +trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + private val executorLayer = { + val poolConfigLayer = TestContainer + .mysql("mysql:8") + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + + val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live + + (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie + } + + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = + TestEnvironment.live ++ executorLayer + +} diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala new file mode 100644 index 000000000..b22b2378d --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala @@ -0,0 +1,41 @@ +package zio.sql.mysql + +import zio.sql.Jdbc + +trait ShopSchema extends Jdbc { self => + import self.ColumnSet._ + + object Customers { + val customers = + (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) + .table("customers") + + val customerId :*: dob :*: fName :*: lName :*: verified :*: _ = customers.columns + } + object Orders { + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + } + object Products { + val products = + (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") + + val productId :*: description :*: imageURL :*: _ = products.columns + } + object ProductPrices { + val productPrices = + (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + + val fkProductId :*: effective :*: price :*: _ = productPrices.columns + } + object OrderDetails { + val orderDetails = + (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) + .table( + "order_details" + ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. + + val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + } +} From e1fab9b34c23ad0780c89be61bd8d174d0cf8c46 Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Fri, 27 Nov 2020 18:26:43 +0100 Subject: [PATCH 093/673] fix --- core/jvm/src/main/scala/zio/sql/expr.scala | 8 ++++- .../jvm/src/main/scala/zio/sql/features.scala | 1 + jdbc/src/main/scala/zio/sql/jdbc.scala | 18 +++++++--- .../zio/sql/postgresql/PostgresModule.scala | 36 +++++++++---------- .../zio/sql/postgresql/FunctionDefSpec.scala | 4 +-- 5 files changed, 41 insertions(+), 26 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 8ff81dec4..783dd375f 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,6 +158,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } + sealed case class ParenlessFunctionCall0[Z: TypeTag](function: Z) extends InvariantExpr[Features.Function0, Any, Z] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } + +// sealed case class FunctionCall0[Z: TypeTag](function: FunctionDef[Any, Z]) extends InvariantExpr[Features.Function0, Any, Z] { sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } @@ -214,7 +219,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { sealed case class FunctionDef[-A, +B](name: FunctionName) { self => - def apply[Source, B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Unit, Source, B1] = +// def apply[Source, B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Unit, Source, B1] = + def apply[B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Features.Function0, Any, B1] = Expr.FunctionCall0(self: FunctionDef[A, B1]) def apply[F, Source, B1 >: B](param1: Expr[F, Source, A])(implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index ce1cc13ec..1d5ef2ede 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -11,6 +11,7 @@ trait FeaturesModule { type Union[_, _] type Source type Literal + type Function0 sealed trait IsAggregated[A] diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 34daae4c2..230a96591 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -2,7 +2,7 @@ package zio.sql import java.sql._ import java.io.IOException -import java.time.format.DateTimeFormatter +import java.time.{ OffsetDateTime, OffsetTime, ZoneOffset } import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } import zio.blocking.Blocking @@ -185,11 +185,19 @@ trait Jdbc extends zio.sql.Sql { column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalTime() ) case TLong => tryDecode[Long](column.fold(resultSet.getLong(_), resultSet.getLong(_))) - case TOffsetDateTime => ??? + case TOffsetDateTime => + tryDecode[OffsetDateTime]( + column + .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) + .toLocalDateTime() + .atOffset(ZoneOffset.UTC) + ) case TOffsetTime => - val format = DateTimeFormatter.ofPattern("HH:mm:ss.SSSSSSx") - tryDecode[java.time.OffsetTime]( - java.time.OffsetTime.parse(column.fold(resultSet.getString(_), resultSet.getString(_)), format) + tryDecode[OffsetTime]( + column + .fold(resultSet.getTime(_), resultSet.getTime(_)) + .toLocalTime + .atOffset(ZoneOffset.UTC) ) case TShort => tryDecode[Short](column.fold(resultSet.getShort(_), resultSet.getShort(_))) case TString => tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 89abc5537..1e380166a 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -10,59 +10,59 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) - val Timeofday = FunctionDef[Nothing, String](FunctionName("timeofday")) - val CurrentTime = FunctionDef[Nothing, OffsetTime](FunctionName("current_time")) + val Timeofday = Expr.ParenlessFunctionCall0[String]("timeofday") + val CurrentTime = FunctionDef[Any, OffsetTime](FunctionName("current_time")) } override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) if function.name.name == "current_time" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) => - builder.append(function.name.name) + case Expr.ParenlessFunctionCall0(function) => + builder.append(function) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall0(function) => + val _ = builder.append(function.name.name) + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -71,7 +71,7 @@ trait PostgresModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index e8c90690e..23e43f641 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -40,7 +40,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("timeofday") { - val query = select(Timeofday()) from customers + val query = select(Timeofday) from customers val testResult = execute(query).to[String, String](identity) @@ -64,7 +64,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head.toString)( matchesRegex( - "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{6}Z" + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]Z" ) ) From a7bec7502022ccdf9f89fbb15220d0d0eeda1f7e Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Fri, 27 Nov 2020 18:29:49 +0100 Subject: [PATCH 094/673] lint --- core/jvm/src/main/scala/zio/sql/expr.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 783dd375f..e19c6c588 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,7 +158,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } - sealed case class ParenlessFunctionCall0[Z: TypeTag](function: Z) extends InvariantExpr[Features.Function0, Any, Z] { + sealed case class ParenlessFunctionCall0[Z: TypeTag](function: Z) + extends InvariantExpr[Features.Function0, Any, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } From 429c8c84b560730e308288c4cffb3fd4818cb94b Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Fri, 27 Nov 2020 18:37:21 +0100 Subject: [PATCH 095/673] fix render --- .../src/main/scala/zio/sql/postgresql/PostgresModule.scala | 4 ++-- .../src/main/scala/zio/sql/sqlserver/SqlServerModule.scala | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 1e380166a..aa6d79c04 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -45,11 +45,11 @@ trait PostgresModule extends Jdbc { self => buildExpr(param) val _ = builder.append(")") case Expr.ParenlessFunctionCall0(function) => + val _ = builder.append(function) + case Expr.FunctionCall0(function) => builder.append(function) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall0(function) => - val _ = builder.append(function.name.name) case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index c0bbfc250..285cf4421 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -34,8 +34,12 @@ trait SqlServerModule extends Jdbc { self => builder.append("(") buildExpr(param) val _ = builder.append(")") + case Expr.ParenlessFunctionCall0(function) => + val _ = builder.append(function) case Expr.FunctionCall0(function) => - val _ = builder.append(function.name.name) + builder.append(function) + builder.append("(") + val _ = builder.append(")") case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") From f585f2d2a7826f90c9d8c1200280dfb226ee2f09 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 27 Nov 2020 07:00:54 -1000 Subject: [PATCH 096/673] Fix lint failure GroupByHavingSpec: reformatted in order to fix sbt check failure --- core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 00fed7d9e..1582bb8d9 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -17,8 +17,8 @@ object GroupByHavingSpec extends DefaultRunnableSpec { object AggregatedProductSchema { val sqldsl = new Sql { override def renderDelete(delete: this.Delete[_]): String = ??? - override def renderRead(read: this.Read[_]): String = ??? - override def renderUpdate(update: Update[_]): String = ??? + override def renderRead(read: this.Read[_]): String = ??? + override def renderUpdate(update: Update[_]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ From 5d9d4b160535b9b8343c07436c095b5bb694893c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 27 Nov 2020 07:29:06 -1000 Subject: [PATCH 097/673] Fix build failures on mysql MysqlModule: added stubs for new renderUpdate/renderDelete methods that have been added to Jdbc. MysqlRunnableSpec: added DeleteExecutor to the jdbcTestEnvironment --- mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala | 3 +++ .../src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 712bcd81e..214146d0e 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -5,6 +5,9 @@ import zio.sql.Jdbc trait MysqlModule extends Jdbc { self => object MysqlFunctionDef {} + override def renderUpdate(update: Update[_]): String = ??? + override def renderDelete(delete: Delete[_]): String = ??? + override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index a6d04dd95..8a4850a56 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -17,17 +17,16 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { props } - private val executorLayer = { + private val executorLayer: ZLayer[Blocking, Nothing, ReadExecutor with DeleteExecutor] = { val poolConfigLayer = TestContainer .mysql("mysql:8") .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live - - (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie + val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live + (ZLayer.identity[Blocking] ++ connectionPoolLayer >+> ReadExecutor.live >+> DeleteExecutor.live).orDie } - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor with DeleteExecutor] = TestEnvironment.live ++ executorLayer } From 41a5419b4a33f85607687849237a753955e76c78 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 27 Nov 2020 19:15:31 +0100 Subject: [PATCH 098/673] Update sbt-scalafix to 0.9.24 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 89f7d4739..f9819d719 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,5 +11,5 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.15") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.24") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14") From 93adede8c4b592c3b0aabaea0e2453bf9fbfe2bd Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 27 Nov 2020 08:16:13 -1000 Subject: [PATCH 099/673] Notes for better storage of UUID in mysql --- mysql/src/test/resources/shop_schema.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql/src/test/resources/shop_schema.sql b/mysql/src/test/resources/shop_schema.sql index 8f3e9a6ba..f83328ef0 100644 --- a/mysql/src/test/resources/shop_schema.sql +++ b/mysql/src/test/resources/shop_schema.sql @@ -1,3 +1,6 @@ +-- TODO: currently id fields are storing a UUID. varchar is a rather slow and inefficient way to store a UUID +-- (though easier to bootstrap a test). Consider a more efficient method of storage as referenced in +-- https://mysqlserverteam.com/storing-uuid-values-in-mysql-tables/ create table customers ( id varchar(36) not null primary key, From 81564e0a768e448e44ee0b3b7ce1fa0d827d3a93 Mon Sep 17 00:00:00 2001 From: mehulumistry Date: Fri, 27 Nov 2020 13:26:34 -0500 Subject: [PATCH 100/673] removed Oracle Module tests --- .../test/scala/zio/sql/TestContainers.scala | 5 + .../zio/sql/oracle/OracleModuleTest.scala | 382 +++++++++--------- 2 files changed, 198 insertions(+), 189 deletions(-) diff --git a/oracle/src/test/scala/zio/sql/TestContainers.scala b/oracle/src/test/scala/zio/sql/TestContainers.scala index cf972cb61..92ca6c64d 100644 --- a/oracle/src/test/scala/zio/sql/TestContainers.scala +++ b/oracle/src/test/scala/zio/sql/TestContainers.scala @@ -14,6 +14,11 @@ object TestContainer { } }(container => effectBlocking(container.stop()).orDie).toLayer + /* NOTE: TestContainer is not building remotely: Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 + [info] ORA-01882: timezone region not found. + This happens only on Oracle DB container testing. + */ + def oracle(imageName: String): ZLayer[Blocking, Throwable, Has[OracleContainer]] = ZManaged.make { effectBlocking { diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala b/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala index 60f296aba..e605e05d4 100644 --- a/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala +++ b/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala @@ -1,193 +1,197 @@ package zio.sql.oracle -import java.time.LocalDate - -import zio.Cause -import zio.test._ -import zio.test.Assertion._ - -object OracleModuleTest extends OracleRunnableSpec with ShopSchema { - - import this.Customers._ - import this.Orders._ - - val spec = suite("Oracle module")( - testM("Can select from single table") { - case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = select(customerId ++ fName ++ lName ++ dob) from customers - - println(renderRead(query)) - val expected = - Seq( - Customer( - "60b01fc9-c902-4468-8d49-3c0f989def37", - "Ronald", - "Russell", - LocalDate.parse("1983-01-05") - ), - Customer( - "f76c9ace-be07-4bf3-bd4c-4a9c62882e64", - "Terrence", - "Noel", - LocalDate.parse("1999-11-02") - ), - Customer( - "784426a5-b90a-4759-afbb-571b7a0ba35e", - "Mila", - "Paterso", - LocalDate.parse("1990-11-16") - ), - Customer( - "df8215a2-d5fd-4c6c-9984-801a1b3a2a0b", - "Alana", - "Murray", - LocalDate.parse("1995-11-12") - ), - Customer( - "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") - ) - ) - - val testResult = execute(query) - .to[String, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - // NOTE: The below test case is failing because of extra true coming in the where clause of select query. - // Need to fix it in the coreJVM module, then this test case should pass - - // testM("Can select with property operator") { - // case class Customer(id: String, fname: String, lname: String, verified: Int, dateOfBirth: LocalDate) - - // val query = - // select( - // customerId ++ fName ++ lName ++ verified ++ dob - // ) from customers where (verified === 0) - - // println(renderRead(query)) - - // val expected = - // Seq( - // Customer( - // "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", - // "Jose", - // "Wiggins", - // 0, - // LocalDate.parse("1987-03-23") - // ) - // ) - - // val testResult = execute(query) - // .to[String, String, String, Int, LocalDate, Customer] { case row => - // Customer(row._1, row._2, row._3, row._4, row._5) - // } - - // val assertion = for { - // r <- testResult.runCollect - // } yield assert(r)(hasSameElementsDistinct(expected)) - - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // }, - // NOTE: Oracle 11g doesn't support Limit and Offset - testM("Can select from single table with rownum") { - case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1) - - println(renderRead(query)) - - val expected = - Seq( - Customer( - "60b01fc9-c902-4468-8d49-3c0f989def37", - "Ronald", - "Russell", - LocalDate.parse("1983-01-05") - ) - ) - - val testResult = execute(query) - .to[String, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - /* - * This is a failing test for aggregation function. - * Uncomment it when aggregation function handling is fixed. - */ - // testM("Can count rows") { - // val query = select { Count(userId) } from users - - // val expected = 5L - - // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) - - // for { - // r <- result.runCollect - // } yield assert(r.head)(equalTo(expected)) - // }, - testM("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) - - println(renderRead(query)) - - case class Row(firstName: String, lastName: String, orderDate: LocalDate) - - val expected = Seq( - Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) - ) - - val result = execute(query) - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - } - - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ) +//import java.time.LocalDate +// +//import zio.Cause +//import zio.test._ +//import zio.test.Assertion._ + +/* NOTE: Test is failing due to Oracle TestContainer timeZone issue +* Ref: https://github.com/testcontainers/testcontainers-java/issues/2313 +* */ + +object OracleModuleTest { //extends OracleRunnableSpec with ShopSchema { + +// import this.Customers._ +// import this.Orders._ + +// val spec = suite("Oracle module")( +// testM("Can select from single table") { +// case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) +// +// val query = select(customerId ++ fName ++ lName ++ dob) from customers +// +// println(renderRead(query)) +// val expected = +// Seq( +// Customer( +// "60b01fc9-c902-4468-8d49-3c0f989def37", +// "Ronald", +// "Russell", +// LocalDate.parse("1983-01-05") +// ), +// Customer( +// "f76c9ace-be07-4bf3-bd4c-4a9c62882e64", +// "Terrence", +// "Noel", +// LocalDate.parse("1999-11-02") +// ), +// Customer( +// "784426a5-b90a-4759-afbb-571b7a0ba35e", +// "Mila", +// "Paterso", +// LocalDate.parse("1990-11-16") +// ), +// Customer( +// "df8215a2-d5fd-4c6c-9984-801a1b3a2a0b", +// "Alana", +// "Murray", +// LocalDate.parse("1995-11-12") +// ), +// Customer( +// "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", +// "Jose", +// "Wiggins", +// LocalDate.parse("1987-03-23") +// ) +// ) +// +// val testResult = execute(query) +// .to[String, String, String, LocalDate, Customer] { case row => +// Customer(row._1, row._2, row._3, row._4) +// } +// +// val assertion = for { +// r <- testResult.runCollect +// } yield assert(r)(hasSameElementsDistinct(expected)) +// +// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) +// }, +// // NOTE: The below test case is failing because of extra true coming in the where clause of select query. +// // Need to fix it in the coreJVM module, then this test case should pass +// +// // testM("Can select with property operator") { +// // case class Customer(id: String, fname: String, lname: String, verified: Int, dateOfBirth: LocalDate) +// +// // val query = +// // select( +// // customerId ++ fName ++ lName ++ verified ++ dob +// // ) from customers where (verified === 0) +// +// // println(renderRead(query)) +// +// // val expected = +// // Seq( +// // Customer( +// // "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", +// // "Jose", +// // "Wiggins", +// // 0, +// // LocalDate.parse("1987-03-23") +// // ) +// // ) +// +// // val testResult = execute(query) +// // .to[String, String, String, Int, LocalDate, Customer] { case row => +// // Customer(row._1, row._2, row._3, row._4, row._5) +// // } +// +// // val assertion = for { +// // r <- testResult.runCollect +// // } yield assert(r)(hasSameElementsDistinct(expected)) +// +// // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) +// // }, +// // NOTE: Oracle 11g doesn't support Limit and Offset +// testM("Can select from single table with rownum") { +// case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) +// +// val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1) +// +// println(renderRead(query)) +// +// val expected = +// Seq( +// Customer( +// "60b01fc9-c902-4468-8d49-3c0f989def37", +// "Ronald", +// "Russell", +// LocalDate.parse("1983-01-05") +// ) +// ) +// +// val testResult = execute(query) +// .to[String, String, String, LocalDate, Customer] { case row => +// Customer(row._1, row._2, row._3, row._4) +// } +// +// val assertion = for { +// r <- testResult.runCollect +// } yield assert(r)(hasSameElementsDistinct(expected)) +// +// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) +// }, +// /* +// * This is a failing test for aggregation function. +// * Uncomment it when aggregation function handling is fixed. +// */ +// // testM("Can count rows") { +// // val query = select { Count(userId) } from users +// +// // val expected = 5L +// +// // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) +// +// // for { +// // r <- result.runCollect +// // } yield assert(r.head)(equalTo(expected)) +// // }, +// testM("Can select from joined tables (inner join)") { +// val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) +// +// println(renderRead(query)) +// +// case class Row(firstName: String, lastName: String, orderDate: LocalDate) +// +// val expected = Seq( +// Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), +// Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), +// Row("Alana", "Murray", LocalDate.parse("2019-08-19")), +// Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), +// Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), +// Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), +// Row("Alana", "Murray", LocalDate.parse("2020-05-11")), +// Row("Alana", "Murray", LocalDate.parse("2019-02-21")), +// Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), +// Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), +// Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), +// Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), +// Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), +// Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), +// Row("Alana", "Murray", LocalDate.parse("2018-11-13")), +// Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), +// Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), +// Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), +// Row("Alana", "Murray", LocalDate.parse("2019-12-08")), +// Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), +// Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), +// Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), +// Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), +// Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), +// Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) +// ) +// +// val result = execute(query) +// .to[String, String, LocalDate, Row] { case row => +// Row(row._1, row._2, row._3) +// } +// +// val assertion = for { +// r <- result.runCollect +// } yield assert(r)(hasSameElementsDistinct(expected)) +// +// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) +// } +// ) } From 82d18c62450c5f74734fbb4c94be3c761ce84e7d Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Fri, 27 Nov 2020 19:55:28 +0100 Subject: [PATCH 101/673] fix parenless function --- core/jvm/src/main/scala/zio/sql/expr.scala | 8 +++++++- .../main/scala/zio/sql/postgresql/PostgresModule.scala | 8 ++++---- .../test/scala/zio/sql/postgresql/FunctionDefSpec.scala | 2 +- .../main/scala/zio/sql/sqlserver/SqlServerModule.scala | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index e19c6c588..3a7a1b6a9 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,7 +158,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } - sealed case class ParenlessFunctionCall0[Z: TypeTag](function: Z) + sealed case class ParenlessFunctionCall0[Z: TypeTag](function: ParenlessDef[Z]) extends InvariantExpr[Features.Function0, Any, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } @@ -201,6 +201,12 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } } + sealed case class ParenlessDef[+B](name: FunctionName) { self => + + def apply[B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Features.Function0, Any, B1] = + Expr.ParenlessFunctionCall0(self: ParenlessDef[B1]) + } + sealed case class AggregationDef[-A, +B](name: FunctionName) { self => def apply[F, Source, B1 >: B](expr: Expr[F, Source, A])(implicit diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index aa6d79c04..1f834ec66 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -10,8 +10,8 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) - val Timeofday = Expr.ParenlessFunctionCall0[String]("timeofday") - val CurrentTime = FunctionDef[Any, OffsetTime](FunctionName("current_time")) + val Timeofday = FunctionDef[Any, String](FunctionName("timeofday")) + val CurrentTime = ParenlessDef[OffsetTime](FunctionName("current_time")) } override def renderRead(read: self.Read[_]): String = { @@ -45,9 +45,9 @@ trait PostgresModule extends Jdbc { self => buildExpr(param) val _ = builder.append(")") case Expr.ParenlessFunctionCall0(function) => - val _ = builder.append(function) + val _ = builder.append(function.name.name) case Expr.FunctionCall0(function) => - builder.append(function) + builder.append(function.name.name) builder.append("(") val _ = builder.append(")") case Expr.FunctionCall1(param, function) => diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 23e43f641..4cade08eb 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -40,7 +40,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("timeofday") { - val query = select(Timeofday) from customers + val query = select(Timeofday()) from customers val testResult = execute(query).to[String, String](identity) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 285cf4421..1a9211c8a 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -35,9 +35,9 @@ trait SqlServerModule extends Jdbc { self => buildExpr(param) val _ = builder.append(")") case Expr.ParenlessFunctionCall0(function) => - val _ = builder.append(function) + val _ = builder.append(function.name.name) case Expr.FunctionCall0(function) => - builder.append(function) + builder.append(function.name.name) builder.append("(") val _ = builder.append(")") case Expr.FunctionCall1(param, function) => From 9e72e9f2906c58f5306a2d47a13ace404604a829 Mon Sep 17 00:00:00 2001 From: mehulumistry Date: Fri, 27 Nov 2020 14:45:05 -0500 Subject: [PATCH 102/673] remove oracle testing --- .../scala/zio/sql/mysql/MysqlModule.scala | 40 +- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 4 +- .../zio/sql/mysql/MysqlRunnableSpec.scala | 7 +- .../scala/zio/sql/oracle/OracleModule.scala | 429 +++++++++--------- .../test/scala/zio/sql/TestContainers.scala | 37 -- .../zio/sql/oracle/FunctionDefSpec.scala | 40 -- .../zio/sql/oracle/OracleModuleTest.scala | 197 -------- .../zio/sql/oracle/OracleRunnableSpec.scala | 33 -- .../scala/zio/sql/oracle/ShopSchema.scala | 42 -- 9 files changed, 255 insertions(+), 574 deletions(-) delete mode 100644 oracle/src/test/scala/zio/sql/TestContainers.scala delete mode 100644 oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala delete mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala delete mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala delete mode 100644 oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 68e122634..581f4d9d7 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -12,45 +12,57 @@ trait MysqlModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall0(function) if function.name.name == "localtime" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) if function.name.name == "localtimestamp" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) if function.name.name == "current_date" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) if function.name.name == "current_timestamp" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) => + builder.append(function.name.name) + builder.append("(") + val _ = builder.append(")") + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -59,7 +71,7 @@ trait MysqlModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -224,4 +236,8 @@ trait MysqlModule extends Jdbc { self => builder.toString() } + override def renderDelete(delete: self.Delete[_]): String = ??? + + override def renderUpdate(update: self.Update[_]): String = ??? + } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 47b10f991..0d6c7a322 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -6,8 +6,8 @@ import zio.test.Assertion._ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { - import this.Customers._ - import this.FunctionDef._ + import Customers._ + import FunctionDef._ val spec = suite("Mysql FunctionDef")( testM("sin") { diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 5610200e6..34df42e93 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -22,12 +22,11 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { .mysql() .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live - - (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie + val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live + (ZLayer.identity[Blocking] ++ connectionPoolLayer >+> ReadExecutor.live >+> DeleteExecutor.live).orDie } - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor with DeleteExecutor] = TestEnvironment.live ++ executorLayer } diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index a35cc6d9d..bc8d0465c 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -8,223 +8,238 @@ trait OracleModule extends Jdbc { self => val Sind = FunctionDef[Double, Double](FunctionName("sind")) } - override def renderRead(read: self.Read[_]): String = { - val builder = new StringBuilder + def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { + case Expr.Source(tableName, column) => + val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Unary(base, op) => + val _ = builder.append(" ").append(op.symbol) + buildExpr(base, builder) + case Expr.Property(base, op) => + buildExpr(base, builder) + val _ = builder.append(" ").append(op.symbol) + case Expr.Binary(left, right, op) => + buildExpr(left, builder) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right, builder) + case Expr.Relational(left, right, op) => + buildExpr(left, builder) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right, builder) + case Expr.In(value, set) => + buildExpr(value, builder) + buildReadString(set, builder) + case Expr.Literal(value) => + val _ = builder.append(value.toString) //todo fix escaping + case Expr.AggregationCall(param, aggregation) => + builder.append(aggregation.name.name) + builder.append("(") + buildExpr(param, builder) + val _ = builder.append(")") + case Expr.FunctionCall0(function) if function.name.name == "localtime" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) if function.name.name == "localtimestamp" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) if function.name.name == "current_date" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) if function.name.name == "current_timestamp" => + val _ = builder.append(function.name.name) + case Expr.FunctionCall0(function) => + builder.append(function.name.name) + builder.append("(") + val _ = builder.append(")") + case Expr.FunctionCall1(param, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param, builder) + val _ = builder.append(")") + case Expr.FunctionCall2(param1, param2, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1, builder) + builder.append(",") + buildExpr(param2, builder) + val _ = builder.append(")") + case Expr.FunctionCall3(param1, param2, param3, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1, builder) + builder.append(",") + buildExpr(param2, builder) + builder.append(",") + buildExpr(param3, builder) + val _ = builder.append(")") + case Expr.FunctionCall4(param1, param2, param3, param4, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1, builder) + builder.append(",") + buildExpr(param2, builder) + builder.append(",") + buildExpr(param3, builder) + builder.append(",") + buildExpr(param4, builder) + val _ = builder.append(")") + } - def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => - val _ = builder.append(" ").append(op.symbol) - buildExpr(base) - case Expr.Property(base, op) => - buildExpr(base) - val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.Relational(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.In(value, set) => - buildExpr(value) - buildReadString(set) - case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => - builder.append(aggregation.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - val _ = builder.append(")") - } + def buildReadString[A <: SelectionSet[_]](read: self.Read[_], builder: StringBuilder): Unit = + read match { + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + object Dummy { + type F + type A + type B <: SelectionSet[A] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + import read._ - def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = - read match { - case read0 @ Read.Select(_, _, _, _, _, _, _, _) => - object Dummy { - type F - type A - type B <: SelectionSet[A] - } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] - import read._ + builder.append("SELECT ") + buildSelection(selection.value, builder) + builder.append(" FROM ") + buildTable(table, builder) + whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" WHERE ") + buildExpr(whereExpr, builder) + } + groupBy match { + case _ :: _ => + builder.append(" GROUP BY ") + buildExprList(groupBy, builder) - builder.append("SELECT ") - buildSelection(selection.value) - builder.append(" FROM ") - buildTable(table) - whereExpr match { - case Expr.Literal(true) => () - case _ => - builder.append(" WHERE ") - buildExpr(whereExpr) - } - groupBy match { - case _ :: _ => - builder.append(" GROUP BY ") - buildExprList(groupBy) + havingExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" HAVING ") + buildExpr(havingExpr, builder) + } + case Nil => () + } + orderBy match { + case _ :: _ => + builder.append(" ORDER BY ") + buildOrderingList(orderBy, builder) + case Nil => () + } + // NOTE: Limit doesn't exist in oracle 11g (>=12), for now replacing it with rownum keyword of oracle + // Ref: https://przemyslawkruglej.com/archive/2013/11/top-n-queries-the-new-row-limiting-clause-11g-12c/ + limit match { + case Some(limit) => + val _ = builder.append(" WHERE rownum <= ").append(limit) + case None => () + } + // NOTE: Offset doesn't exist in oracle 11g (>=12) + // offset match { + // case Some(offset) => + // val _ = builder.append(" OFFSET ").append(offset).append(" ROWS ") + // case None => () + // } - havingExpr match { - case Expr.Literal(true) => () - case _ => - builder.append(" HAVING ") - buildExpr(havingExpr) - } - case Nil => () - } - orderBy match { - case _ :: _ => - builder.append(" ORDER BY ") - buildOrderingList(orderBy) - case Nil => () - } - // NOTE: Limit doesn't exist in oracle 11g (>=12), for now replacing it with rownum keyword of oracle - // Ref: https://przemyslawkruglej.com/archive/2013/11/top-n-queries-the-new-row-limiting-clause-11g-12c/ - limit match { - case Some(limit) => - val _ = builder.append(" WHERE rownum <= ").append(limit) - case None => () - } - // NOTE: Offset doesn't exist in oracle 11g (>=12) - // offset match { - // case Some(offset) => - // val _ = builder.append(" OFFSET ").append(offset).append(" ROWS ") - // case None => () - // } + case Read.Union(left, right, distinct) => + buildReadString(left, builder) + builder.append(" UNION ") + if (!distinct) builder.append("ALL ") + buildReadString(right, builder) - case Read.Union(left, right, distinct) => - buildReadString(left) - builder.append(" UNION ") - if (!distinct) builder.append("ALL ") - buildReadString(right) + case Read.Literal(values) => + val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + } - case Read.Literal(values) => - val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping - } + def buildExprList(expr: List[Expr[_, _, _]], builder: StringBuilder): Unit = + expr match { + case head :: tail => + buildExpr(head, builder) + tail match { + case _ :: _ => + builder.append(", ") + buildExprList(tail, builder) + case Nil => () + } + case Nil => () + } + def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]], builder: StringBuilder): Unit = + expr match { + case head :: tail => + head match { + case Ordering.Asc(value) => buildExpr(value, builder) + case Ordering.Desc(value) => + buildExpr(value, builder) + builder.append(" DESC") + } + tail match { + case _ :: _ => + builder.append(", ") + buildOrderingList(tail, builder) + case Nil => () + } + case Nil => () + } - def buildExprList(expr: List[Expr[_, _, _]]): Unit = - expr match { - case head :: tail => - buildExpr(head) - tail match { - case _ :: _ => - builder.append(", ") - buildExprList(tail) - case Nil => () - } - case Nil => () - } - def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = - expr match { - case head :: tail => - head match { - case Ordering.Asc(value) => buildExpr(value) - case Ordering.Desc(value) => - buildExpr(value) - builder.append(" DESC") - } - tail match { - case _ :: _ => - builder.append(", ") - buildOrderingList(tail) - case Nil => () - } - case Nil => () - } + def buildSelection[A](selectionSet: SelectionSet[A], builder: StringBuilder): Unit = + selectionSet match { + case cons0 @ SelectionSet.Cons(_, _) => + object Dummy { + type Source + type A + type B <: SelectionSet[Source] + } + val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] + import cons._ + buildColumnSelection(head, builder) + if (tail != SelectionSet.Empty) { + builder.append(", ") + buildSelection(tail, builder) + } + case SelectionSet.Empty => () + } - def buildSelection[A](selectionSet: SelectionSet[A]): Unit = - selectionSet match { - case cons0 @ SelectionSet.Cons(_, _) => - object Dummy { - type Source - type A - type B <: SelectionSet[Source] - } - val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] - import cons._ - buildColumnSelection(head) - if (tail != SelectionSet.Empty) { - builder.append(", ") - buildSelection(tail) - } - case SelectionSet.Empty => () - } + def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B], builder: StringBuilder): Unit = + columnSelection match { + case ColumnSelection.Constant(value, name) => + builder.append(value.toString()) //todo fix escaping + name match { + case Some(name) => + val _ = builder.append(" AS ").append(name) + case None => () + } + case ColumnSelection.Computed(expr, name) => + buildExpr(expr, builder) + name match { + case Some(name) => + Expr.exprName(expr) match { + case Some(sourceName) if name != sourceName => + val _ = builder.append(" AS ").append(name) + case _ => () + } + case _ => () //todo what do we do if we don't have a name? + } + } + def buildTable(table: Table, builder: StringBuilder): Unit = + table match { + //The outer reference in this type test cannot be checked at run time?! + case sourceTable: self.Table.Source => + val _ = builder.append(sourceTable.name) + case Table.Joined(joinType, left, right, on) => + buildTable(left, builder) + builder.append(joinType match { + case JoinType.Inner => " INNER JOIN " + case JoinType.LeftOuter => " LEFT JOIN " + case JoinType.RightOuter => " RIGHT JOIN " + case JoinType.FullOuter => " OUTER JOIN " + }) + buildTable(right, builder) + builder.append(" ON ") + buildExpr(on, builder) + val _ = builder.append(" ") + } - def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = - columnSelection match { - case ColumnSelection.Constant(value, name) => - builder.append(value.toString()) //todo fix escaping - name match { - case Some(name) => - val _ = builder.append(" AS ").append(name) - case None => () - } - case ColumnSelection.Computed(expr, name) => - buildExpr(expr) - name match { - case Some(name) => - Expr.exprName(expr) match { - case Some(sourceName) if name != sourceName => - val _ = builder.append(" AS ").append(name) - case _ => () - } - case _ => () //todo what do we do if we don't have a name? - } - } - def buildTable(table: Table): Unit = - table match { - //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => - val _ = builder.append(sourceTable.name) - case Table.Joined(joinType, left, right, on) => - buildTable(left) - builder.append(joinType match { - case JoinType.Inner => " INNER JOIN " - case JoinType.LeftOuter => " LEFT JOIN " - case JoinType.RightOuter => " RIGHT JOIN " - case JoinType.FullOuter => " OUTER JOIN " - }) - buildTable(right) - builder.append(" ON ") - buildExpr(on) - val _ = builder.append(" ") - } - buildReadString(read) + override def renderRead(read: self.Read[_]): String = { + val builder = new StringBuilder + buildReadString(read, builder) builder.toString() } + override def renderDelete(delete: self.Delete[_]): String = ??? + + override def renderUpdate(update: self.Update[_]): String = ??? } diff --git a/oracle/src/test/scala/zio/sql/TestContainers.scala b/oracle/src/test/scala/zio/sql/TestContainers.scala deleted file mode 100644 index ed11429eb..000000000 --- a/oracle/src/test/scala/zio/sql/TestContainers.scala +++ /dev/null @@ -1,37 +0,0 @@ -package zio.sql - -import com.dimafeng.testcontainers.SingleContainer -import com.dimafeng.testcontainers.OracleContainer -import zio._ -import zio.blocking.{ effectBlocking, Blocking } -object TestContainer { - - def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = - ZManaged.make { - effectBlocking { - c.start() - c - } - }(container => effectBlocking(container.stop()).orDie).toLayer - - /* NOTE: TestContainer is not building remotely: Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 - [info] ORA-01882: timezone region not found. - This happens only on Oracle DB container testing. - */ - - def oracle(imageName: String): ZLayer[Blocking, Throwable, Has[OracleContainer]] = - ZManaged.make { - effectBlocking { - val c = new OracleContainer( - dockerImageName = imageName - ).configure { a => - a.withInitScript("shop_schema.sql") - a.addEnv("TZ", "America/New_York") - () - } - c.start() - c - } - }(container => effectBlocking(container.stop()).orDie).toLayer - -} diff --git a/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala b/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala deleted file mode 100644 index 3c42507fb..000000000 --- a/oracle/src/test/scala/zio/sql/oracle/FunctionDefSpec.scala +++ /dev/null @@ -1,40 +0,0 @@ -package zio.sql.oracle - -import zio.Cause -import zio.test._ -import zio.test.Assertion._ - -object FunctionDefSpec extends OracleRunnableSpec with ShopSchema { - - import this.Customers._ - import this.FunctionDef._ - - val spec = suite("Oracle FunctionDef")( - testM("sin") { - val query = select(Sin(1.0)) from customers - - val expected = 0.8414709848078965 - - val testResult = execute(query).to[Double, Double](identity) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("abs") { - val query = select(Abs(-32.0)) from customers - - val expected = 32.0 - - val testResult = execute(query).to[Double, Double](identity) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ) -} diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala b/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala deleted file mode 100644 index a58d67818..000000000 --- a/oracle/src/test/scala/zio/sql/oracle/OracleModuleTest.scala +++ /dev/null @@ -1,197 +0,0 @@ -package zio.sql.oracle - -//import java.time.LocalDate -// -//import zio.Cause -//import zio.test._ -//import zio.test.Assertion._ - -/* NOTE: Test is failing due to Oracle TestContainer timeZone issue - * Ref: https://github.com/testcontainers/testcontainers-java/issues/2313 - * */ - -object OracleModuleTest { //extends OracleRunnableSpec with ShopSchema { - -// import this.Customers._ -// import this.Orders._ - -// val spec = suite("Oracle module")( -// testM("Can select from single table") { -// case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) -// -// val query = select(customerId ++ fName ++ lName ++ dob) from customers -// -// println(renderRead(query)) -// val expected = -// Seq( -// Customer( -// "60b01fc9-c902-4468-8d49-3c0f989def37", -// "Ronald", -// "Russell", -// LocalDate.parse("1983-01-05") -// ), -// Customer( -// "f76c9ace-be07-4bf3-bd4c-4a9c62882e64", -// "Terrence", -// "Noel", -// LocalDate.parse("1999-11-02") -// ), -// Customer( -// "784426a5-b90a-4759-afbb-571b7a0ba35e", -// "Mila", -// "Paterso", -// LocalDate.parse("1990-11-16") -// ), -// Customer( -// "df8215a2-d5fd-4c6c-9984-801a1b3a2a0b", -// "Alana", -// "Murray", -// LocalDate.parse("1995-11-12") -// ), -// Customer( -// "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", -// "Jose", -// "Wiggins", -// LocalDate.parse("1987-03-23") -// ) -// ) -// -// val testResult = execute(query) -// .to[String, String, String, LocalDate, Customer] { case row => -// Customer(row._1, row._2, row._3, row._4) -// } -// -// val assertion = for { -// r <- testResult.runCollect -// } yield assert(r)(hasSameElementsDistinct(expected)) -// -// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) -// }, -// // NOTE: The below test case is failing because of extra true coming in the where clause of select query. -// // Need to fix it in the coreJVM module, then this test case should pass -// -// // testM("Can select with property operator") { -// // case class Customer(id: String, fname: String, lname: String, verified: Int, dateOfBirth: LocalDate) -// -// // val query = -// // select( -// // customerId ++ fName ++ lName ++ verified ++ dob -// // ) from customers where (verified === 0) -// -// // println(renderRead(query)) -// -// // val expected = -// // Seq( -// // Customer( -// // "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", -// // "Jose", -// // "Wiggins", -// // 0, -// // LocalDate.parse("1987-03-23") -// // ) -// // ) -// -// // val testResult = execute(query) -// // .to[String, String, String, Int, LocalDate, Customer] { case row => -// // Customer(row._1, row._2, row._3, row._4, row._5) -// // } -// -// // val assertion = for { -// // r <- testResult.runCollect -// // } yield assert(r)(hasSameElementsDistinct(expected)) -// -// // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) -// // }, -// // NOTE: Oracle 11g doesn't support Limit and Offset -// testM("Can select from single table with rownum") { -// case class Customer(id: String, fname: String, lname: String, dateOfBirth: LocalDate) -// -// val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1) -// -// println(renderRead(query)) -// -// val expected = -// Seq( -// Customer( -// "60b01fc9-c902-4468-8d49-3c0f989def37", -// "Ronald", -// "Russell", -// LocalDate.parse("1983-01-05") -// ) -// ) -// -// val testResult = execute(query) -// .to[String, String, String, LocalDate, Customer] { case row => -// Customer(row._1, row._2, row._3, row._4) -// } -// -// val assertion = for { -// r <- testResult.runCollect -// } yield assert(r)(hasSameElementsDistinct(expected)) -// -// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) -// }, -// /* -// * This is a failing test for aggregation function. -// * Uncomment it when aggregation function handling is fixed. -// */ -// // testM("Can count rows") { -// // val query = select { Count(userId) } from users -// -// // val expected = 5L -// -// // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) -// -// // for { -// // r <- result.runCollect -// // } yield assert(r.head)(equalTo(expected)) -// // }, -// testM("Can select from joined tables (inner join)") { -// val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) -// -// println(renderRead(query)) -// -// case class Row(firstName: String, lastName: String, orderDate: LocalDate) -// -// val expected = Seq( -// Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), -// Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), -// Row("Alana", "Murray", LocalDate.parse("2019-08-19")), -// Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), -// Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), -// Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), -// Row("Alana", "Murray", LocalDate.parse("2020-05-11")), -// Row("Alana", "Murray", LocalDate.parse("2019-02-21")), -// Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), -// Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), -// Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), -// Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), -// Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), -// Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), -// Row("Alana", "Murray", LocalDate.parse("2018-11-13")), -// Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), -// Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), -// Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), -// Row("Alana", "Murray", LocalDate.parse("2019-12-08")), -// Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), -// Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), -// Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), -// Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), -// Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), -// Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) -// ) -// -// val result = execute(query) -// .to[String, String, LocalDate, Row] { case row => -// Row(row._1, row._2, row._3) -// } -// -// val assertion = for { -// r <- result.runCollect -// } yield assert(r)(hasSameElementsDistinct(expected)) -// -// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) -// } -// ) - -} diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala deleted file mode 100644 index d9fafb406..000000000 --- a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala +++ /dev/null @@ -1,33 +0,0 @@ -package zio.sql.oracle - -import zio.{ Has, ZEnv, ZLayer } -import zio.blocking.Blocking -import zio.sql.TestContainer -import zio.test.environment.TestEnvironment - -import java.util.Properties -import zio.sql.JdbcRunnableSpec - -trait OracleRunnableSpec extends JdbcRunnableSpec with OracleModule { - - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - private val executorLayer = { - val poolConfigLayer = TestContainer - .oracle("oracleinanutshell/oracle-xe-11g") - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - - val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live - - (Blocking.live ++ connectionPoolLayer >>> ReadExecutor.live).orDie - } - - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor] = - TestEnvironment.live ++ executorLayer - -} diff --git a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala deleted file mode 100644 index e6f1e0df6..000000000 --- a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala +++ /dev/null @@ -1,42 +0,0 @@ -package zio.sql.oracle - -import zio.sql.Jdbc - -trait ShopSchema extends Jdbc { self => - import self.ColumnSet._ - - object Customers { - val customers = - (string("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ int("verified")) - .table("customers") - - val customerId :*: dob :*: fName :*: lName :*: verified :*: _ = customers.columns - } - object Orders { - val orders = (string("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - } - object Products { - val products = - (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - - val productId :*: description :*: imageURL :*: _ = products.columns - } - object ProductPrices { - val productPrices = - (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - - val fkProductId :*: effective :*: price :*: _ = productPrices.columns - } - - object OrderDetails { - val orderDetails = - (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) - .table( - "order_details" - ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. - - val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns - } -} From 09d48007456f96634ed5ac495d629429fbeedde3 Mon Sep 17 00:00:00 2001 From: mehulumistry Date: Fri, 27 Nov 2020 15:11:16 -0500 Subject: [PATCH 103/673] merge master --- .../test/scala/zio/sql/mysql/MysqlRunnableSpec.scala | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 34df42e93..0d92329d0 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -22,11 +22,14 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { .mysql() .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live - (ZLayer.identity[Blocking] ++ connectionPoolLayer >+> ReadExecutor.live >+> DeleteExecutor.live).orDie + val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live + + (ZLayer.identity[ + Blocking + ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie } - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, TestEnvironment with ReadExecutor with DeleteExecutor] = - TestEnvironment.live ++ executorLayer + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] = + TestEnvironment.live >+> executorLayer } From 098588853af9a5bb77bdf582af287160d753c091 Mon Sep 17 00:00:00 2001 From: robmwalsh <30517573+robmwalsh@users.noreply.github.com> Date: Sat, 28 Nov 2020 08:33:12 +1100 Subject: [PATCH 104/673] add Instant --- .../zio/sql/postgresql/PostgresModule.scala | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index ca9649fe3..379c3c9f4 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -109,18 +109,18 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderLit[A, B](lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { import TypeTag._ lit.typeTag match { - case tt @ TByteArray => render(tt.cast(lit.value)) // todo still broken + case tt @ TByteArray => render(tt.cast(lit.value)) // todo still broken //something like? render(tt.cast(lit.value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) case tt @ TChar => render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping - case tt @ TInstant => render(tt.cast(lit.value)) // todo still broken - case tt @ TLocalDate => render(tt.cast(lit.value)) // todo still broken - case tt @ TLocalDateTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TLocalTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TOffsetDateTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TOffsetTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TUUID => render(tt.cast(lit.value)) // todo still broken - case tt @ TZonedDateTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TInstant => render("TIMESTAMP '", tt.cast(lit.value), "'") //todo test + case tt @ TLocalDate => render(tt.cast(lit.value)) // todo still broken + case tt @ TLocalDateTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TLocalTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TOffsetDateTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TOffsetTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TUUID => render(tt.cast(lit.value)) // todo still broken + case tt @ TZonedDateTime => render(tt.cast(lit.value)) // todo still broken case TByte => render(lit.value) //default toString is probably ok case TBigDecimal => render(lit.value) //default toString is probably ok From 7ecd2146038f81d8d9623a3e7ff49d92d1bd8c36 Mon Sep 17 00:00:00 2001 From: Antonio Grandinetti Date: Sat, 28 Nov 2020 09:44:47 +0100 Subject: [PATCH 105/673] fix parenless function and funcall0 --- core/jvm/src/main/scala/zio/sql/expr.scala | 17 +++++------------ .../zio/sql/postgresql/PostgresModule.scala | 6 +++--- .../zio/sql/postgresql/FunctionDefSpec.scala | 4 ++-- .../zio/sql/sqlserver/SqlServerModule.scala | 2 +- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 3a7a1b6a9..1a3ed93ed 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -158,13 +158,13 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } - sealed case class ParenlessFunctionCall0[Z: TypeTag](function: ParenlessDef[Z]) + sealed case class ParenlessFunctionCall0[Z: TypeTag](function: FunctionName) extends InvariantExpr[Features.Function0, Any, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } -// sealed case class FunctionCall0[Z: TypeTag](function: FunctionDef[Any, Z]) extends InvariantExpr[Features.Function0, Any, Z] { - sealed case class FunctionCall0[F, A, B, Z: TypeTag](function: FunctionDef[B, Z]) extends InvariantExpr[F, A, Z] { + sealed case class FunctionCall0[Z: TypeTag](function: FunctionDef[Any, Z]) + extends InvariantExpr[Features.Function0, Any, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } @@ -201,12 +201,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } } - sealed case class ParenlessDef[+B](name: FunctionName) { self => - - def apply[B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Features.Function0, Any, B1] = - Expr.ParenlessFunctionCall0(self: ParenlessDef[B1]) - } - sealed case class AggregationDef[-A, +B](name: FunctionName) { self => def apply[F, Source, B1 >: B](expr: Expr[F, Source, A])(implicit @@ -226,9 +220,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { sealed case class FunctionDef[-A, +B](name: FunctionName) { self => -// def apply[Source, B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Unit, Source, B1] = - def apply[B1 >: B]()(implicit typeTag: TypeTag[B1]): Expr[Features.Function0, Any, B1] = - Expr.FunctionCall0(self: FunctionDef[A, B1]) + def apply[B1 >: B]()(implicit ev: Any <:< A, typeTag: TypeTag[B1]): Expr[Features.Function0, Any, B1] = + Expr.FunctionCall0(self.asInstanceOf[FunctionDef[Any, B1]]) def apply[F, Source, B1 >: B](param1: Expr[F, Source, A])(implicit typeTag: TypeTag[B1]): Expr[F, Source, B1] = Expr.FunctionCall1(param1, self: FunctionDef[A, B1]) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 1f834ec66..deb227f88 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -10,8 +10,8 @@ trait PostgresModule extends Jdbc { self => object PostgresFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) - val Timeofday = FunctionDef[Any, String](FunctionName("timeofday")) - val CurrentTime = ParenlessDef[OffsetTime](FunctionName("current_time")) + val TimeOfDay = FunctionDef[Any, String](FunctionName("timeofday")) + val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) } override def renderRead(read: self.Read[_]): String = { @@ -45,7 +45,7 @@ trait PostgresModule extends Jdbc { self => buildExpr(param) val _ = builder.append(")") case Expr.ParenlessFunctionCall0(function) => - val _ = builder.append(function.name.name) + val _ = builder.append(function.name) case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 4cade08eb..374cabf01 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -40,7 +40,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("timeofday") { - val query = select(Timeofday()) from customers + val query = select(TimeOfDay()) from customers val testResult = execute(query).to[String, String](identity) @@ -55,7 +55,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("current_time") { - val query = select(CurrentTime()) from customers + val query = select(CurrentTime) from customers val testResult = execute(query).to[OffsetTime, OffsetTime](identity) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 1a9211c8a..b374af3ff 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -35,7 +35,7 @@ trait SqlServerModule extends Jdbc { self => buildExpr(param) val _ = builder.append(")") case Expr.ParenlessFunctionCall0(function) => - val _ = builder.append(function.name.name) + val _ = builder.append(function.name) case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") From 99fbed9cc2088281557fa98c14608e2177e76c6d Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sat, 28 Nov 2020 17:50:30 +0100 Subject: [PATCH 106/673] Update PostgresModule.scala --- .../main/scala/zio/sql/postgresql/PostgresModule.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index fbc5729b3..65af8d99f 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -163,11 +163,11 @@ trait PostgresModule extends Jdbc { self => renderExpr(p) render(")") case Expr.ParenlessFunctionCall0(fn) => - val _ = builder.append(fn.name) + val _ = render(fn.name) case Expr.FunctionCall0(fn) => - builder.append(fn.name.name) - builder.append("(") - val _ = builder.append(")") + render(fn.name.name) + render("(") + val _ = render(")") case Expr.FunctionCall1(p, fn) => render(fn.name.name, "(") renderExpr(p) From b4d646f4b182159756fde31db4a26e43ce481cef Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sat, 28 Nov 2020 18:08:16 +0100 Subject: [PATCH 107/673] Update PostgresModule.scala --- .../src/main/scala/zio/sql/postgresql/PostgresModule.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 65af8d99f..aca669606 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -12,14 +12,14 @@ trait PostgresModule extends Jdbc { self => val TimeOfDay = FunctionDef[Any, String](FunctionName("timeofday")) val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) val CharLength = FunctionDef[String, Int](FunctionName("character_length")) - val Localtime = FunctionDef[Any, LocalTime](FunctionName("localtime")) + val Localtime = Expr.ParenlessFunctionCall0[LocalTime](FunctionName("localtime")) val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) - val Localtimestamp = FunctionDef[Any, Instant](FunctionName("localtimestamp")) + val Localtimestamp = Expr.ParenlessFunctionCall0[Instant](FunctionName("localtimestamp")) val LocaltimestampWithPrecision = FunctionDef[Int, Instant](FunctionName("localtimestamp")) val Md5 = FunctionDef[String, String](FunctionName("md5")) val ParseIdent = FunctionDef[String, String](FunctionName("parse_ident")) val Chr = FunctionDef[Int, String](FunctionName("chr")) - val CurrentDate = FunctionDef[Any, LocalDate](FunctionName("current_date")) + val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) val Initcap = FunctionDef[String, String](FunctionName("initcap")) val Repeat = FunctionDef[(String, Int), String](FunctionName("repeat")) val Reverse = FunctionDef[String, String](FunctionName("reverse")) From 6254ec8d48ab0816d67a0af7c4d1b6e253bfc94b Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sat, 28 Nov 2020 18:09:59 +0100 Subject: [PATCH 108/673] Update FunctionDefSpec.scala --- .../src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 6834a25ec..aaa288658 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -228,7 +228,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("localtime") { - val query = select(Localtime()) from customers + val query = select(Localtime) from customers val testResult = execute(query).to[LocalTime, LocalTime](identity) @@ -251,7 +251,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("localtimestamp") { - val query = select(Localtimestamp()) from customers + val query = select(Localtimestamp) from customers val testResult = execute(query).to[Instant, Instant](identity) @@ -374,7 +374,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("current_date") { - val query = select(CurrentDate()) from customers + val query = select(CurrentDate) from customers val expected = LocalDate.now() From 88d4ec39dbd06cd20f8f4b0199cb34eea11be3fd Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 28 Nov 2020 20:49:39 +0100 Subject: [PATCH 109/673] Update sbt-dotty to 0.4.6 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index f9819d719..fe33d0ade 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.15") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.24") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14") From bab7613fcf83ab8018e74c3167b5c77f8c7d31d9 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 28 Nov 2020 23:46:09 +0100 Subject: [PATCH 110/673] Update testcontainers-scala-oracle-xe to 0.38.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index e6cb242a5..9c46a0542 100644 --- a/build.sbt +++ b/build.sbt @@ -182,7 +182,7 @@ lazy val oracle = project "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.oracle.database.jdbc" % "ojdbc8" % "19.8.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.6" % Test + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.7" % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From 3c3243b7de4a56a6ea8802956436b5319017c533 Mon Sep 17 00:00:00 2001 From: fokot Date: Sun, 29 Nov 2020 00:16:42 +0100 Subject: [PATCH 111/673] transaction tests --- jdbc/src/main/scala/zio/sql/jdbc.scala | 20 +++--- jdbc/src/main/scala/zio/sql/transaction.scala | 72 +++++++++++-------- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 4 +- .../sql/postgresql/PostgresModuleTest.scala | 55 +++++++++++--- 4 files changed, 101 insertions(+), 50 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 1ee6f1216..3ceaa5986 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -90,7 +90,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { type TransactionExecutor = Has[TransactionExecutor.Service] object TransactionExecutor { trait Service { - def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] + def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] } val live: ZLayer[ @@ -107,22 +107,22 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { TransactionExecutor.Service ] { (pool, blocking, readS, updateS, deleteS) => new Service { - override def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] = { - def loop(tx: Transaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = tx match { - case Transaction.Effect(zio) => zio + override def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] = { + def loop(tx: ZTransaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = tx match { + case ZTransaction.Effect(zio) => zio // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) // This works and it is eagerly running the Stream - case Transaction.Select(read) => + case ZTransaction.Select(read) => readS .executeOn(read.asInstanceOf[Read[SelectionSet[_]]], conn) .runCollect .map(a => ZStream.fromIterator(a.iterator)) - case Transaction.Update(update) => updateS.executeOn(update, conn) - case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) - case Transaction.FoldCauseM(tx, k) => + case ZTransaction.Update(update) => updateS.executeOn(update, conn) + case ZTransaction.Delete(delete) => deleteS.executeOn(delete, conn) + case ZTransaction.FoldCauseM(tx, k) => loop(tx, conn).foldCauseM( - cause => loop(k.asInstanceOf[Transaction.K[R, E, Any, Any]].onHalt(cause), conn), + cause => loop(k.asInstanceOf[ZTransaction.K[R, E, Any, Any]].onHalt(cause), conn), success => loop(k.onSuccess(success), conn) ) } @@ -140,7 +140,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { } } } - def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R with TransactionExecutor, E, A] = + def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R with TransactionExecutor, E, A] = ZIO.accessM[R with TransactionExecutor](_.get.execute(tx)) type ReadExecutor = Has[ReadExecutor.Service] diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala index a25a6746b..f4c1af110 100644 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -4,62 +4,76 @@ import zio.{ Cause, ZIO } trait TransactionModule { self: SelectModule with DeleteModule with UpdateModule => - import Transaction._ + type Transaction[+E, +A] = ZTransaction[Any, E, A] - sealed trait Transaction[-R, +E, +A] { self => + sealed trait ZTransaction[-R, +E, +A] { self => + import ZTransaction._ - def map[B](f: A => B): Transaction[R, E, B] = - self.flatMap(f andThen Transaction.succeed) + def map[B](f: A => B): ZTransaction[R, E, B] = + self.flatMap(f andThen ZTransaction.succeed) - def flatMap[R1 <: R, E1 >: E, B](f: A => Transaction[R1, E1, B]): Transaction[R1, E1, B] = + def flatMap[R1 <: R, E1 >: E, B](f: A => ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = FoldCauseM(self, K[R1, E1, A, B](e => halt(e), f)) - def zip[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, (A, B)] = + def zip[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = zipWith[R1, E1, B, (A, B)](tx)((_, _)) - def zipWith[R1 <: R, E1 >: E, B, C](tx: Transaction[R1, E1, B])(f: (A, B) => C): Transaction[R1, E1, C] = + def zipWith[R1 <: R, E1 >: E, B, C](tx: ZTransaction[R1, E1, B])(f: (A, B) => C): ZTransaction[R1, E1, C] = for { a <- self b <- tx } yield f(a, b) - def *>[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, B] = + def *>[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self.flatMap(_ => tx) // named alias for *> - def zipRight[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, B] = + def zipRight[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self *> tx - def <*[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, A] = + def <*[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self.flatMap(a => tx.map(_ => a)) // named alias for <* - def zipLeft[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, A] = + def zipLeft[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self <* tx - def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: Throwable => Transaction[R1, E1, A1]): Transaction[R, E1, A] = ??? + def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: E1 => ZTransaction[R1, E1, A1]): ZTransaction[R1, E1, A1] = + FoldCauseM( + self, + K( + (cause: Cause[E1]) => + cause match { + case Cause.Fail(e) => f(e) + case cause => halt(cause) + }, + succeed[A1] + ) + ) } - object Transaction { - case class Effect[R, E, A](zio: ZIO[R, E, A]) extends Transaction[R, E, A] + object ZTransaction { + case class Effect[R, E, A](zio: ZIO[R, E, A]) extends ZTransaction[R, E, A] case class Select[A <: SelectionSet[_]](read: self.Read[A]) - extends Transaction[Any, Exception, zio.stream.Stream[Exception, A]] - case class Update[A](read: self.Update[A]) extends Transaction[Any, Exception, A] - case class Delete[A](read: self.Delete[_]) extends Transaction[Any, Exception, A] - case class FoldCauseM[R, E, A, B](tx: Transaction[R, E, A], k: K[R, E, A, B]) extends Transaction[R, E, B] - - case class K[R, E, A, B](onHalt: Cause[E] => Transaction[R, E, B], onSuccess: A => Transaction[R, E, B]) - - def succeed[A](a: A): Transaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) - def fail[E](e: E): Transaction[Any, E, Nothing] = Effect(ZIO.fail(e)) - def halt[E](e: Cause[E]): Transaction[Any, E, Nothing] = Effect(ZIO.halt(e)) - - def select[A <: SelectionSet[_]](read: self.Read[A]): Transaction[Any, Exception, zio.stream.Stream[Exception, A]] = - Transaction.Select(read) - def update[A](update: self.Update[A]): Transaction[Any, Exception, A] = + extends ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] + case class Update(read: self.Update[_]) extends ZTransaction[Any, Exception, Int] + case class Delete(read: self.Delete[_]) extends ZTransaction[Any, Exception, Int] + case class FoldCauseM[R, E, A, B](tx: ZTransaction[R, E, A], k: K[R, E, A, B]) extends ZTransaction[R, E, B] + + case class K[R, E, A, B](onHalt: Cause[E] => ZTransaction[R, E, B], onSuccess: A => ZTransaction[R, E, B]) + + def succeed[A](a: A): ZTransaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) + def fail[E](e: E): ZTransaction[Any, E, Nothing] = Effect(ZIO.fail(e)) + def halt[E](e: Cause[E]): ZTransaction[Any, E, Nothing] = Effect(ZIO.halt(e)) + + def select[A <: SelectionSet[_]]( + read: self.Read[A] + ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = + ZTransaction.Select(read) + def update(update: self.Update[_]): ZTransaction[Any, Exception, Int] = Update(update) - def delete[A](delete: self.Delete[_]): Transaction[Any, Exception, A] = + def delete(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = Delete(delete) } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 95eaa7837..63888743d 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -54,7 +54,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { LocalDate.parse("1987-03-23") ) ) - + val testResult = execute(query) .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) @@ -88,7 +88,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4, row._5) } - + val assertion = for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 6ecfdb3b7..2dadc8166 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -3,7 +3,7 @@ package zio.sql.postgresql import java.time.LocalDate import java.util.UUID -import zio.Cause +import zio.{ Cause, ZIO } import zio.test.Assertion._ import zio.test._ @@ -272,27 +272,64 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transactions is returning the last value") { + testM("Transaction is returning the last value") { val query = select(customerId) from customers val result = execute( - Transaction.Select(query) *> Transaction.Select(query) + ZTransaction.Select(query) *> ZTransaction.Select(query) ) - val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie + val assertion = assertM(result.flatMap(_.runCount))(equalTo(5L)).orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transactions is failing") { + testM("Transaction is failing") { val query = select(customerId) from customers val result = execute( - Transaction.Select(query) *> Transaction.fail(new Exception("failing")) *> Transaction.Select(query) + ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) ).mapError(_.getMessage) - val assertion = assertM(result.flip)(equalTo("failing")) - - assertion + assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction succeeded and deleted rows") { + val query = select(customerId) from customers + val deleteQuery = deleteFrom(customers).where(verified === false) + + (for { + allCustomersCount <- execute(query).to(identity[UUID](_)).runCount + _ <- execute(ZTransaction.Delete(deleteQuery)) + remainingCustomersCount <- execute(query).to(identity[UUID](_)).runCount + } yield assert(allCustomersCount)(equalTo(5L)) && + assert(remainingCustomersCount)(equalTo(4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction failed and didn't deleted rows") { + val query = select(customerId) from customers + val deleteQuery = deleteFrom(customers).where(verified === false) + + (for { + allCustomersCount <- execute(query).to(identity[UUID](_)).runCount + _ <- execute(ZTransaction.Delete(deleteQuery) *> ZTransaction.fail("this is error")).catchAllCause(_ => + ZIO.succeed("continue") + ) + remainingCustomersCount <- execute(query).to(identity[UUID](_)).runCount + } yield assert(allCustomersCount)(equalTo(5L)) && + assert(remainingCustomersCount)(equalTo(5L))) } +// // this does not work yet +// testM("Transaction recovered and committed") { +// val query = select(customerId) from customers +// val deleteQuery = deleteFrom(customers).where(verified === false) +// +// val tx = ZTransaction.Delete(deleteQuery) *> ZTransaction.fail("this is error") +// +// (for { +// allCustomersCount <- execute(query).to(identity[UUID](_)).runCount +// _ <- execute(tx.catchAllCause((_: Serializable) => ZTransaction.succeed("recover"))) +// remainingCustomersCount <- execute(query).to(identity[UUID](_)).runCount +// } yield +// assert(allCustomersCount)(equalTo(5L)) && +// assert(remainingCustomersCount)(equalTo(5L))) +// } // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet // val query = deleteFrom(customers) // println(renderDelete(query)) From 7899c12d8882f62a29052573a675b9f3cc7ffb29 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sun, 29 Nov 2020 15:00:30 +0100 Subject: [PATCH 112/673] fix quoting --- core/jvm/src/main/scala/zio/sql/expr.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 9e16342d1..2a252fee2 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,7 +108,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag - implicit def literal(str: String): Expr[Features.Literal, Any, String] = Expr.Literal(s"'${str}'") implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = From 54af9ac87f22740068350320ef3ce7b4d35e3722 Mon Sep 17 00:00:00 2001 From: Patryk Date: Sun, 29 Nov 2020 15:19:18 +0100 Subject: [PATCH 113/673] fmt code --- mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala | 4 ++-- .../src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 95eaa7837..63888743d 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -54,7 +54,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { LocalDate.parse("1987-03-23") ) ) - + val testResult = execute(query) .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) @@ -88,7 +88,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4, row._5) } - + val assertion = for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 59af8ceb8..ba30683b1 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -13,7 +13,7 @@ import zio.duration._ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import Customers._ - import FunctionDef.{CharLength => _, _} + import FunctionDef.{ CharLength => _, _ } import PostgresFunctionDef._ private def collectAndCompare( From a89aa3ef45b4ed314236027c98ec3422e14376aa Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Dec 2020 15:17:40 +0100 Subject: [PATCH 114/673] Update sbt-explicit-dependencies to 0.2.16 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 960ff4814..b559f2987 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -8,7 +8,7 @@ addSbtPlugin("org.scalameta" % "sbt-mdoc" % addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.5") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") -addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.15") +addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.24") From e24f7246b3a7b97501e3ea84d572cac297910b9e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 3 Dec 2020 13:44:06 +0100 Subject: [PATCH 115/673] Update sbt-bloop to 1.4.6 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 960ff4814..2bcb6fe5b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.13") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.5") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.6") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.15") From 9a04c03711de9aa614783886af9be0c9a411a21c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 4 Dec 2020 09:12:05 +0100 Subject: [PATCH 116/673] Update sbt-tpolecat to 0.1.16 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 960ff4814..a403da435 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,4 +12,4 @@ addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.24") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") From a66c7bab8a06ce945038f07e2abae15bdee7a6d4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 4 Dec 2020 20:33:43 +0100 Subject: [PATCH 117/673] Update sbt-ci-release to 1.5.5 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 960ff4814..c6690ba05 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.13") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.5") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.15") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") From 976bd34319cfa2e1631e9e4586a13eff2e45f6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Kli=C5=9B?= Date: Tue, 8 Dec 2020 16:10:29 +0100 Subject: [PATCH 118/673] Add test for ltrim & rtim --- .../zio/sql/postgresql/FunctionDefSpec.scala | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index ba30683b1..39e1c00c2 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -113,7 +113,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - suite("String functions") { + suite("String functions")( testM("CharLength") { val query = select(Length("hello")) from customers val expected = 5 @@ -124,9 +124,35 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ltrim") { + val query = select(Ltrim(" hello ")) from customers + + val expected = "hello " + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("rtrim") { + val query = select(Rtrim(" hello ")) from customers + + val expected = " hello" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } - }, + ), testM("abs") { val query = select(Abs(-3.14159)) from customers From dbffe30d179c10fa405370c9ea5be95a0f1b62f5 Mon Sep 17 00:00:00 2001 From: fokot Date: Tue, 8 Dec 2020 22:29:40 +0100 Subject: [PATCH 119/673] transaction rename --- jdbc/src/main/scala/zio/sql/jdbc.scala | 20 +++--- jdbc/src/main/scala/zio/sql/transaction.scala | 72 +++++++++++-------- .../sql/postgresql/PostgresModuleTest.scala | 10 ++- 3 files changed, 57 insertions(+), 45 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 1ee6f1216..3ceaa5986 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -90,7 +90,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { type TransactionExecutor = Has[TransactionExecutor.Service] object TransactionExecutor { trait Service { - def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] + def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] } val live: ZLayer[ @@ -107,22 +107,22 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { TransactionExecutor.Service ] { (pool, blocking, readS, updateS, deleteS) => new Service { - override def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R, E, A] = { - def loop(tx: Transaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = tx match { - case Transaction.Effect(zio) => zio + override def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] = { + def loop(tx: ZTransaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = tx match { + case ZTransaction.Effect(zio) => zio // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) // This works and it is eagerly running the Stream - case Transaction.Select(read) => + case ZTransaction.Select(read) => readS .executeOn(read.asInstanceOf[Read[SelectionSet[_]]], conn) .runCollect .map(a => ZStream.fromIterator(a.iterator)) - case Transaction.Update(update) => updateS.executeOn(update, conn) - case Transaction.Delete(delete) => deleteS.executeOn(delete, conn) - case Transaction.FoldCauseM(tx, k) => + case ZTransaction.Update(update) => updateS.executeOn(update, conn) + case ZTransaction.Delete(delete) => deleteS.executeOn(delete, conn) + case ZTransaction.FoldCauseM(tx, k) => loop(tx, conn).foldCauseM( - cause => loop(k.asInstanceOf[Transaction.K[R, E, Any, Any]].onHalt(cause), conn), + cause => loop(k.asInstanceOf[ZTransaction.K[R, E, Any, Any]].onHalt(cause), conn), success => loop(k.onSuccess(success), conn) ) } @@ -140,7 +140,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { } } } - def execute[R, E >: Exception, A](tx: Transaction[R, E, A]): ZIO[R with TransactionExecutor, E, A] = + def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R with TransactionExecutor, E, A] = ZIO.accessM[R with TransactionExecutor](_.get.execute(tx)) type ReadExecutor = Has[ReadExecutor.Service] diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala index a25a6746b..f4c1af110 100644 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -4,62 +4,76 @@ import zio.{ Cause, ZIO } trait TransactionModule { self: SelectModule with DeleteModule with UpdateModule => - import Transaction._ + type Transaction[+E, +A] = ZTransaction[Any, E, A] - sealed trait Transaction[-R, +E, +A] { self => + sealed trait ZTransaction[-R, +E, +A] { self => + import ZTransaction._ - def map[B](f: A => B): Transaction[R, E, B] = - self.flatMap(f andThen Transaction.succeed) + def map[B](f: A => B): ZTransaction[R, E, B] = + self.flatMap(f andThen ZTransaction.succeed) - def flatMap[R1 <: R, E1 >: E, B](f: A => Transaction[R1, E1, B]): Transaction[R1, E1, B] = + def flatMap[R1 <: R, E1 >: E, B](f: A => ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = FoldCauseM(self, K[R1, E1, A, B](e => halt(e), f)) - def zip[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, (A, B)] = + def zip[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = zipWith[R1, E1, B, (A, B)](tx)((_, _)) - def zipWith[R1 <: R, E1 >: E, B, C](tx: Transaction[R1, E1, B])(f: (A, B) => C): Transaction[R1, E1, C] = + def zipWith[R1 <: R, E1 >: E, B, C](tx: ZTransaction[R1, E1, B])(f: (A, B) => C): ZTransaction[R1, E1, C] = for { a <- self b <- tx } yield f(a, b) - def *>[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, B] = + def *>[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self.flatMap(_ => tx) // named alias for *> - def zipRight[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, B] = + def zipRight[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self *> tx - def <*[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, A] = + def <*[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self.flatMap(a => tx.map(_ => a)) // named alias for <* - def zipLeft[R1 <: R, E1 >: E, B](tx: Transaction[R1, E1, B]): Transaction[R1, E1, A] = + def zipLeft[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self <* tx - def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: Throwable => Transaction[R1, E1, A1]): Transaction[R, E1, A] = ??? + def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: E1 => ZTransaction[R1, E1, A1]): ZTransaction[R1, E1, A1] = + FoldCauseM( + self, + K( + (cause: Cause[E1]) => + cause match { + case Cause.Fail(e) => f(e) + case cause => halt(cause) + }, + succeed[A1] + ) + ) } - object Transaction { - case class Effect[R, E, A](zio: ZIO[R, E, A]) extends Transaction[R, E, A] + object ZTransaction { + case class Effect[R, E, A](zio: ZIO[R, E, A]) extends ZTransaction[R, E, A] case class Select[A <: SelectionSet[_]](read: self.Read[A]) - extends Transaction[Any, Exception, zio.stream.Stream[Exception, A]] - case class Update[A](read: self.Update[A]) extends Transaction[Any, Exception, A] - case class Delete[A](read: self.Delete[_]) extends Transaction[Any, Exception, A] - case class FoldCauseM[R, E, A, B](tx: Transaction[R, E, A], k: K[R, E, A, B]) extends Transaction[R, E, B] - - case class K[R, E, A, B](onHalt: Cause[E] => Transaction[R, E, B], onSuccess: A => Transaction[R, E, B]) - - def succeed[A](a: A): Transaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) - def fail[E](e: E): Transaction[Any, E, Nothing] = Effect(ZIO.fail(e)) - def halt[E](e: Cause[E]): Transaction[Any, E, Nothing] = Effect(ZIO.halt(e)) - - def select[A <: SelectionSet[_]](read: self.Read[A]): Transaction[Any, Exception, zio.stream.Stream[Exception, A]] = - Transaction.Select(read) - def update[A](update: self.Update[A]): Transaction[Any, Exception, A] = + extends ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] + case class Update(read: self.Update[_]) extends ZTransaction[Any, Exception, Int] + case class Delete(read: self.Delete[_]) extends ZTransaction[Any, Exception, Int] + case class FoldCauseM[R, E, A, B](tx: ZTransaction[R, E, A], k: K[R, E, A, B]) extends ZTransaction[R, E, B] + + case class K[R, E, A, B](onHalt: Cause[E] => ZTransaction[R, E, B], onSuccess: A => ZTransaction[R, E, B]) + + def succeed[A](a: A): ZTransaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) + def fail[E](e: E): ZTransaction[Any, E, Nothing] = Effect(ZIO.fail(e)) + def halt[E](e: Cause[E]): ZTransaction[Any, E, Nothing] = Effect(ZIO.halt(e)) + + def select[A <: SelectionSet[_]]( + read: self.Read[A] + ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = + ZTransaction.Select(read) + def update(update: self.Update[_]): ZTransaction[Any, Exception, Int] = Update(update) - def delete[A](delete: self.Delete[_]): Transaction[Any, Exception, A] = + def delete(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = Delete(delete) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 6ecfdb3b7..c56e45b4f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -276,22 +276,20 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { val query = select(customerId) from customers val result = execute( - Transaction.Select(query) *> Transaction.Select(query) + ZTransaction.Select(query) *> ZTransaction.Select(query) ) val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transactions is failing") { + testM("Transaction is failing") { val query = select(customerId) from customers val result = execute( - Transaction.Select(query) *> Transaction.fail(new Exception("failing")) *> Transaction.Select(query) + ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) ).mapError(_.getMessage) - val assertion = assertM(result.flip)(equalTo("failing")) - - assertion + assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) } // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet // val query = deleteFrom(customers) From be4f37796fcbdfd6e14f547161938f84484f0738 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 9 Dec 2020 01:19:22 +0100 Subject: [PATCH 120/673] Update sbt-ci-release to 1.5.5 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c1f510ed7..3f0443b4e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.13") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.6") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1") From 2c7e6dec4aca7c75a8cde051bdfcac6b87ded95c Mon Sep 17 00:00:00 2001 From: scalavision Date: Wed, 9 Dec 2020 18:29:31 +0100 Subject: [PATCH 121/673] add missing dependencies to module pattern --- core/jvm/src/main/scala/zio/sql/delete.scala | 2 +- core/jvm/src/main/scala/zio/sql/update.scala | 2 +- jdbc/src/main/scala/zio/sql/transaction.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/delete.scala b/core/jvm/src/main/scala/zio/sql/delete.scala index ef31c20dd..ee53ab2f9 100644 --- a/core/jvm/src/main/scala/zio/sql/delete.scala +++ b/core/jvm/src/main/scala/zio/sql/delete.scala @@ -1,6 +1,6 @@ package zio.sql -trait DeleteModule { self: ExprModule with TableModule => +trait DeleteModule { self: ExprModule with TableModule with SelectModule => sealed case class Delete[A](table: Table.Aux[A], whereExpr: Expr[_, A, Boolean]) { def where[F](expr: Expr[F, A, Boolean]): Delete[A] = Delete(table, expr) diff --git a/core/jvm/src/main/scala/zio/sql/update.scala b/core/jvm/src/main/scala/zio/sql/update.scala index b3bed2e81..27d9eeb1a 100644 --- a/core/jvm/src/main/scala/zio/sql/update.scala +++ b/core/jvm/src/main/scala/zio/sql/update.scala @@ -1,6 +1,6 @@ package zio.sql -trait UpdateModule { self: ExprModule with TableModule => +trait UpdateModule { self: ExprModule with TableModule with SelectModule => sealed case class UpdateBuilder[A](table: Table.Aux[A]) { def set[F: Features.IsSource, Value: TypeTag](lhs: Expr[F, A, Value], rhs: Expr[_, A, Value]): Update[A] = diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala index a25a6746b..fe1ff65d7 100644 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ b/jdbc/src/main/scala/zio/sql/transaction.scala @@ -2,7 +2,7 @@ package zio.sql import zio.{ Cause, ZIO } -trait TransactionModule { self: SelectModule with DeleteModule with UpdateModule => +trait TransactionModule { self: SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule => import Transaction._ From a30174620266da2dec57466ebb90478743417fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Kli=C5=9B?= Date: Wed, 9 Dec 2020 09:10:50 +0100 Subject: [PATCH 122/673] Add new postgresql functions: now, statement_timestamp and transaction_timestamp --- .../zio/sql/postgresql/PostgresModule.scala | 3 ++ .../zio/sql/postgresql/FunctionDefSpec.scala | 42 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 89e41b4d0..43be5ba0a 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -46,6 +46,9 @@ trait PostgresModule extends Jdbc { self => val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) val ToTimestamp = FunctionDef[Long, ZonedDateTime](FunctionName("to_timestamp")) val PgClientEncoding = FunctionDef[Any, String](FunctionName("pg_client_encoding")) + val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) + val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) + val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 39e1c00c2..25425a1d4 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -387,6 +387,48 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("now") { + val query = select(Now()) from customers + + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head.toString)( + Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("statement_timestamp") { + val query = select(StatementTimestamp()) from customers + + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head.toString)( + Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("transaction_timestamp") { + val query = select(TransactionTimestamp()) from customers + + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head.toString)( + Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("localtimestamp with precision") { val precision = 2 From ad0c12f53679c91f41ca50d182a9a2573b20d42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Kli=C5=9B?= Date: Fri, 11 Dec 2020 15:01:48 +0100 Subject: [PATCH 123/673] fix flaky timestamp tests --- .../zio/sql/postgresql/FunctionDefSpec.scala | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 25425a1d4..fb3447c67 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,6 +1,7 @@ package zio.sql.postgresql import java.time._ +import java.time.format.DateTimeFormatter import java.util.UUID import zio.Cause import zio.random.{ Random => ZioRandom } @@ -27,6 +28,8 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } + private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) + val spec = suite("Postgres FunctionDef")( testM("concat_ws #1 - combine flat values") { import Expr._ @@ -381,71 +384,66 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)( - Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("now") { - val query = select(Now()) from customers + testM("localtimestamp with precision") { + val precision = 2 - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val query = select(LocaltimestampWithPrecision(precision)) from customers + + val testResult = execute(query).to[Instant, Instant](identity) val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)( - Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("statement_timestamp") { - val query = select(StatementTimestamp()) from customers + testM("now") { + val query = select(Now()) from customers val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)( - Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("transaction_timestamp") { - val query = select(TransactionTimestamp()) from customers + testM("statement_timestamp") { + val query = select(StatementTimestamp()) from customers val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)( - Assertion.matchesRegex("([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}Z") + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("localtimestamp with precision") { - val precision = 2 - - val millis = - if (precision == 0) "" - else if (precision <= 3) List.fill(3)("[0-9]").mkString(".", "", "") - else List.fill(6)("[0-9]").mkString(".", "", "") - - val query = select(LocaltimestampWithPrecision(precision)) from customers + testM("transaction_timestamp") { + val query = select(TransactionTimestamp()) from customers - val testResult = execute(query).to[Instant, Instant](identity) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)( - Assertion.matchesRegex(s"([0-9]{4})-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}${millis}Z") + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) @@ -458,9 +456,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)( + } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( matchesRegex( - "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]Z" + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" ) ) From fb76a7c391d196d857af027541355d3bf0cf899f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 11 Dec 2020 20:56:37 +0100 Subject: [PATCH 124/673] Update database-commons, jdbc, mssqlserver, ... to 1.15.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9c46a0542..9e28a2b1b 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "1.0.3" -val testcontainersVersion = "1.15.0" +val testcontainersVersion = "1.15.1" val testcontainersScalaVersion = "1.0.0-alpha1" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 0316653bdb2a3d17f1d4c79d30d2666847ace8f4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 14 Dec 2020 11:32:43 +0100 Subject: [PATCH 125/673] Update sbt to 1.4.5 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 7de0a9382..c06db1bb2 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.4 +sbt.version=1.4.5 From acf6e74ecec9422420faca62e153f53804c305ee Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 17 Dec 2020 18:07:17 +0100 Subject: [PATCH 126/673] Update mdoc, sbt-mdoc to 2.2.14 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 605092d20..94654d734 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.13") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.14") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.6") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") From 8dc25c1cc65a9a74194eb6d9b346aca945e33c98 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 18 Dec 2020 02:42:55 +0100 Subject: [PATCH 127/673] Update sbt-dotty to 0.5.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 605092d20..8ec9ba7bb 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.24") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") From 4824813a573f03881084a7b4ae1fe6345c7c59e5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 18 Dec 2020 02:43:01 +0100 Subject: [PATCH 128/673] Update testcontainers-scala-oracle-xe to 0.38.8 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9e28a2b1b..2767c1415 100644 --- a/build.sbt +++ b/build.sbt @@ -182,7 +182,7 @@ lazy val oracle = project "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.oracle.database.jdbc" % "ojdbc8" % "19.8.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.7" % Test + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.8" % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From b0d3d84c1fddcd7de52da03c5b82b63ee83b814d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 20 Dec 2020 05:47:15 +0100 Subject: [PATCH 129/673] Update scala-collection-compat to 2.3.2 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index d68fbdca3..2ef7c6131 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -195,7 +195,7 @@ object BuildHelper { Seq( ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)), - "org.scala-lang.modules" %% "scala-collection-compat" % "2.3.1" + "org.scala-lang.modules" %% "scala-collection-compat" % "2.3.2" ) }, parallelExecution in Test := true, From 60fdf5820eac6ee0beb4a46b69932d47b9179ee4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 24 Dec 2020 13:32:15 +0100 Subject: [PATCH 130/673] Update sbt to 1.4.6 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index c06db1bb2..d91c272d4 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.5 +sbt.version=1.4.6 From c4f80d6d9df61ba01ca3809b2ff3b918df185e7d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 25 Dec 2020 00:40:52 +0100 Subject: [PATCH 131/673] Update ojdbc8 to 19.9.0.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9e28a2b1b..f0a4ea53f 100644 --- a/build.sbt +++ b/build.sbt @@ -181,7 +181,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "19.8.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "19.9.0.0" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.7" % Test ) ) From 4d66cc3bf6825d6f8ea85f31c8e4372e106e96e4 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 28 Dec 2020 22:20:25 +0100 Subject: [PATCH 132/673] Remove yarn.lock --- website/yarn.lock | 6679 --------------------------------------------- 1 file changed, 6679 deletions(-) delete mode 100644 website/yarn.lock diff --git a/website/yarn.lock b/website/yarn.lock deleted file mode 100644 index 352ecae07..000000000 --- a/website/yarn.lock +++ /dev/null @@ -1,6679 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" - integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/code-frame@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/compat-data@^7.12.1", "@babel/compat-data@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.5.tgz#f56db0c4bb1bbbf221b4e81345aab4141e7cb0e9" - integrity sha512-DTsS7cxrsH3by8nqQSpFSyjSfSYl57D6Cf4q8dW3LK83tBKBDCkfcay1nYkXq1nIHXnpX8WMMb/O25HOy3h1zg== - -"@babel/core@^7.9.0": - version "7.12.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8" - integrity sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.1" - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helpers" "^7.12.1" - "@babel/parser" "^7.12.3" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.1" - json5 "^2.1.2" - lodash "^4.17.19" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.12.1", "@babel/generator@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" - integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== - dependencies: - "@babel/types" "^7.12.5" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/helper-annotate-as-pure@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" - integrity sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helper-builder-react-jsx-experimental@^7.12.1": - version "7.12.4" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.12.4.tgz#55fc1ead5242caa0ca2875dcb8eed6d311e50f48" - integrity sha512-AjEa0jrQqNk7eDQOo0pTfUOwQBMF+xVqrausQwT9/rTKy0g04ggFNaJpaE09IQMn9yExluigWMJcj0WC7bq+Og== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-module-imports" "^7.12.1" - "@babel/types" "^7.12.1" - -"@babel/helper-builder-react-jsx@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz#8095cddbff858e6fa9c326daee54a2f2732c1d5d" - integrity sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helper-compilation-targets@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz#cb470c76198db6a24e9dbc8987275631e5d29831" - integrity sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw== - dependencies: - "@babel/compat-data" "^7.12.5" - "@babel/helper-validator-option" "^7.12.1" - browserslist "^4.14.5" - semver "^5.5.0" - -"@babel/helper-create-class-features-plugin@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e" - integrity sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.10.4" - -"@babel/helper-create-regexp-features-plugin@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz#18b1302d4677f9dc4740fe8c9ed96680e29d37e8" - integrity sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-regex" "^7.10.4" - regexpu-core "^4.7.1" - -"@babel/helper-define-map@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz#b53c10db78a640800152692b13393147acb9bb30" - integrity sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/types" "^7.10.5" - lodash "^4.17.19" - -"@babel/helper-explode-assignable-expression@^7.10.4": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz#8006a466695c4ad86a2a5f2fb15b5f2c31ad5633" - integrity sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA== - dependencies: - "@babel/types" "^7.12.1" - -"@babel/helper-function-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" - integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== - dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-hoist-variables@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" - integrity sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-member-expression-to-functions@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz#fba0f2fcff3fba00e6ecb664bb5e6e26e2d6165c" - integrity sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ== - dependencies: - "@babel/types" "^7.12.1" - -"@babel/helper-module-imports@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" - integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== - dependencies: - "@babel/types" "^7.12.5" - -"@babel/helper-module-transforms@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" - integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== - dependencies: - "@babel/helper-module-imports" "^7.12.1" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-simple-access" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/helper-validator-identifier" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" - lodash "^4.17.19" - -"@babel/helper-optimise-call-expression@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" - integrity sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== - -"@babel/helper-regex@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" - integrity sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg== - dependencies: - lodash "^4.17.19" - -"@babel/helper-remap-async-to-generator@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz#8c4dbbf916314f6047dc05e6a2217074238347fd" - integrity sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-wrap-function" "^7.10.4" - "@babel/types" "^7.12.1" - -"@babel/helper-replace-supers@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9" - integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.5" - -"@babel/helper-simple-access@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" - integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== - dependencies: - "@babel/types" "^7.12.1" - -"@babel/helper-skip-transparent-expression-wrappers@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" - integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== - dependencies: - "@babel/types" "^7.12.1" - -"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" - integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== - dependencies: - "@babel/types" "^7.11.0" - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== - -"@babel/helper-validator-option@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9" - integrity sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A== - -"@babel/helper-wrap-function@^7.10.4": - version "7.12.3" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz#3332339fc4d1fbbf1c27d7958c27d34708e990d9" - integrity sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helpers@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" - integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== - dependencies: - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.5" - -"@babel/highlight@^7.0.0", "@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.10.4", "@babel/parser@^7.12.3", "@babel/parser@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.5.tgz#b4af32ddd473c0bfa643bd7ff0728b8e71b81ea0" - integrity sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ== - -"@babel/plugin-proposal-async-generator-functions@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz#dc6c1170e27d8aca99ff65f4925bd06b1c90550e" - integrity sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-remap-async-to-generator" "^7.12.1" - "@babel/plugin-syntax-async-generators" "^7.8.0" - -"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.8.3": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz#a082ff541f2a29a4821065b8add9346c0c16e5de" - integrity sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-proposal-dynamic-import@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz#43eb5c2a3487ecd98c5c8ea8b5fdb69a2749b2dc" - integrity sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - -"@babel/plugin-proposal-export-namespace-from@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz#8b9b8f376b2d88f5dd774e4d24a5cc2e3679b6d4" - integrity sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz#d45423b517714eedd5621a9dfdc03fa9f4eb241c" - integrity sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-json-strings" "^7.8.0" - -"@babel/plugin-proposal-logical-assignment-operators@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz#f2c490d36e1b3c9659241034a5d2cd50263a2751" - integrity sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz#3ed4fff31c015e7f3f1467f190dbe545cd7b046c" - integrity sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" - -"@babel/plugin-proposal-numeric-separator@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.5.tgz#b1ce757156d40ed79d59d467cb2b154a5c4149ba" - integrity sha512-UiAnkKuOrCyjZ3sYNHlRlfuZJbBHknMQ9VMwVeX97Ofwx7RpD6gS2HfqTCh8KNUQgcOm8IKt103oR4KIjh7Q8g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.12.1", "@babel/plugin-proposal-object-rest-spread@^7.9.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069" - integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - "@babel/plugin-transform-parameters" "^7.12.1" - -"@babel/plugin-proposal-optional-catch-binding@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz#ccc2421af64d3aae50b558a71cede929a5ab2942" - integrity sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" - -"@babel/plugin-proposal-optional-chaining@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz#cce122203fc8a32794296fc377c6dedaf4363797" - integrity sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" - "@babel/plugin-syntax-optional-chaining" "^7.8.0" - -"@babel/plugin-proposal-private-methods@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz#86814f6e7a21374c980c10d38b4493e703f4a389" - integrity sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-proposal-unicode-property-regex@^7.12.1", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz#2a183958d417765b9eae334f47758e5d6a82e072" - integrity sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-async-generators@^7.8.0": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978" - integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-dynamic-import@^7.8.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-json-strings@^7.8.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz#9d9d357cc818aa7ae7935917c1257f67677a0926" - integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" - integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-arrow-functions@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz#8083ffc86ac8e777fbe24b5967c4b2521f3cb2b3" - integrity sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-async-to-generator@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz#3849a49cc2a22e9743cbd6b52926d30337229af1" - integrity sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A== - dependencies: - "@babel/helper-module-imports" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-remap-async-to-generator" "^7.12.1" - -"@babel/plugin-transform-block-scoped-functions@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz#f2a1a365bde2b7112e0a6ded9067fdd7c07905d9" - integrity sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-block-scoping@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz#f0ee727874b42a208a48a586b84c3d222c2bbef1" - integrity sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-classes@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz#65e650fcaddd3d88ddce67c0f834a3d436a32db6" - integrity sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-define-map" "^7.10.4" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.10.4" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz#d68cf6c9b7f838a8a4144badbe97541ea0904852" - integrity sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-destructuring@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz#b9a570fe0d0a8d460116413cb4f97e8e08b2f847" - integrity sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-dotall-regex@^7.12.1", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz#a1d16c14862817b6409c0a678d6f9373ca9cd975" - integrity sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-duplicate-keys@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz#745661baba295ac06e686822797a69fbaa2ca228" - integrity sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-exponentiation-operator@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz#b0f2ed356ba1be1428ecaf128ff8a24f02830ae0" - integrity sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-for-of@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz#07640f28867ed16f9511c99c888291f560921cfa" - integrity sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-function-name@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz#2ec76258c70fe08c6d7da154003a480620eba667" - integrity sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-literals@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz#d73b803a26b37017ddf9d3bb8f4dc58bfb806f57" - integrity sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-member-expression-literals@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz#496038602daf1514a64d43d8e17cbb2755e0c3ad" - integrity sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-modules-amd@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz#3154300b026185666eebb0c0ed7f8415fefcf6f9" - integrity sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ== - dependencies: - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-commonjs@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz#fa403124542636c786cf9b460a0ffbb48a86e648" - integrity sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag== - dependencies: - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-simple-access" "^7.12.1" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-systemjs@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz#663fea620d593c93f214a464cd399bf6dc683086" - integrity sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q== - dependencies: - "@babel/helper-hoist-variables" "^7.10.4" - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-validator-identifier" "^7.10.4" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-umd@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz#eb5a218d6b1c68f3d6217b8fa2cc82fec6547902" - integrity sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q== - dependencies: - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz#b407f5c96be0d9f5f88467497fa82b30ac3e8753" - integrity sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.12.1" - -"@babel/plugin-transform-new-target@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz#80073f02ee1bb2d365c3416490e085c95759dec0" - integrity sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-object-super@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz#4ea08696b8d2e65841d0c7706482b048bed1066e" - integrity sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-replace-supers" "^7.12.1" - -"@babel/plugin-transform-parameters@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz#d2e963b038771650c922eff593799c96d853255d" - integrity sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-property-literals@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz#41bc81200d730abb4456ab8b3fbd5537b59adecd" - integrity sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-react-display-name@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.1.tgz#1cbcd0c3b1d6648c55374a22fc9b6b7e5341c00d" - integrity sha512-cAzB+UzBIrekfYxyLlFqf/OagTvHLcVBb5vpouzkYkBclRPraiygVnafvAoipErZLI8ANv8Ecn6E/m5qPXD26w== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-react-jsx-development@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.5.tgz#677de5b96da310430d6cfb7fee16a1603afa3d56" - integrity sha512-1JJusg3iPgsZDthyWiCr3KQiGs31ikU/mSf2N2dSYEAO0GEImmVUbWf0VoSDGDFTAn5Dj4DUiR6SdIXHY7tELA== - dependencies: - "@babel/helper-builder-react-jsx-experimental" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-jsx" "^7.12.1" - -"@babel/plugin-transform-react-jsx-self@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.12.1.tgz#ef43cbca2a14f1bd17807dbe4376ff89d714cf28" - integrity sha512-FbpL0ieNWiiBB5tCldX17EtXgmzeEZjFrix72rQYeq9X6nUK38HCaxexzVQrZWXanxKJPKVVIU37gFjEQYkPkA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-react-jsx-source@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.12.1.tgz#d07de6863f468da0809edcf79a1aa8ce2a82a26b" - integrity sha512-keQ5kBfjJNRc6zZN1/nVHCd6LLIHq4aUKcVnvE/2l+ZZROSbqoiGFRtT5t3Is89XJxBQaP7NLZX2jgGHdZvvFQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-react-jsx@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.5.tgz#39ede0e30159770561b6963be143e40af3bde00c" - integrity sha512-2xkcPqqrYiOQgSlM/iwto1paPijjsDbUynN13tI6bosDz/jOW3CRzYguIE8wKX32h+msbBM22Dv5fwrFkUOZjQ== - dependencies: - "@babel/helper-builder-react-jsx" "^7.10.4" - "@babel/helper-builder-react-jsx-experimental" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-jsx" "^7.12.1" - -"@babel/plugin-transform-react-pure-annotations@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz#05d46f0ab4d1339ac59adf20a1462c91b37a1a42" - integrity sha512-RqeaHiwZtphSIUZ5I85PEH19LOSzxfuEazoY7/pWASCAIBuATQzpSVD+eT6MebeeZT2F4eSL0u4vw6n4Nm0Mjg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-regenerator@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz#5f0a28d842f6462281f06a964e88ba8d7ab49753" - integrity sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng== - dependencies: - regenerator-transform "^0.14.2" - -"@babel/plugin-transform-reserved-words@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz#6fdfc8cc7edcc42b36a7c12188c6787c873adcd8" - integrity sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-shorthand-properties@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz#0bf9cac5550fce0cfdf043420f661d645fdc75e3" - integrity sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-spread@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz#527f9f311be4ec7fdc2b79bb89f7bf884b3e1e1e" - integrity sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" - -"@babel/plugin-transform-sticky-regex@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.1.tgz#5c24cf50de396d30e99afc8d1c700e8bce0f5caf" - integrity sha512-CiUgKQ3AGVk7kveIaPEET1jNDhZZEl1RPMWdTBE1799bdz++SwqDHStmxfCtDfBhQgCl38YRiSnrMuUMZIWSUQ== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-regex" "^7.10.4" - -"@babel/plugin-transform-template-literals@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz#b43ece6ed9a79c0c71119f576d299ef09d942843" - integrity sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-typeof-symbol@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz#9ca6be343d42512fbc2e68236a82ae64bc7af78a" - integrity sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-unicode-escapes@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz#5232b9f81ccb07070b7c3c36c67a1b78f1845709" - integrity sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-unicode-regex@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz#cc9661f61390db5c65e3febaccefd5c6ac3faecb" - integrity sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/polyfill@^7.8.7": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" - integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.4" - -"@babel/preset-env@^7.9.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.1.tgz#9c7e5ca82a19efc865384bb4989148d2ee5d7ac2" - integrity sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg== - dependencies: - "@babel/compat-data" "^7.12.1" - "@babel/helper-compilation-targets" "^7.12.1" - "@babel/helper-module-imports" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-validator-option" "^7.12.1" - "@babel/plugin-proposal-async-generator-functions" "^7.12.1" - "@babel/plugin-proposal-class-properties" "^7.12.1" - "@babel/plugin-proposal-dynamic-import" "^7.12.1" - "@babel/plugin-proposal-export-namespace-from" "^7.12.1" - "@babel/plugin-proposal-json-strings" "^7.12.1" - "@babel/plugin-proposal-logical-assignment-operators" "^7.12.1" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.12.1" - "@babel/plugin-proposal-numeric-separator" "^7.12.1" - "@babel/plugin-proposal-object-rest-spread" "^7.12.1" - "@babel/plugin-proposal-optional-catch-binding" "^7.12.1" - "@babel/plugin-proposal-optional-chaining" "^7.12.1" - "@babel/plugin-proposal-private-methods" "^7.12.1" - "@babel/plugin-proposal-unicode-property-regex" "^7.12.1" - "@babel/plugin-syntax-async-generators" "^7.8.0" - "@babel/plugin-syntax-class-properties" "^7.12.1" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.0" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.0" - "@babel/plugin-syntax-top-level-await" "^7.12.1" - "@babel/plugin-transform-arrow-functions" "^7.12.1" - "@babel/plugin-transform-async-to-generator" "^7.12.1" - "@babel/plugin-transform-block-scoped-functions" "^7.12.1" - "@babel/plugin-transform-block-scoping" "^7.12.1" - "@babel/plugin-transform-classes" "^7.12.1" - "@babel/plugin-transform-computed-properties" "^7.12.1" - "@babel/plugin-transform-destructuring" "^7.12.1" - "@babel/plugin-transform-dotall-regex" "^7.12.1" - "@babel/plugin-transform-duplicate-keys" "^7.12.1" - "@babel/plugin-transform-exponentiation-operator" "^7.12.1" - "@babel/plugin-transform-for-of" "^7.12.1" - "@babel/plugin-transform-function-name" "^7.12.1" - "@babel/plugin-transform-literals" "^7.12.1" - "@babel/plugin-transform-member-expression-literals" "^7.12.1" - "@babel/plugin-transform-modules-amd" "^7.12.1" - "@babel/plugin-transform-modules-commonjs" "^7.12.1" - "@babel/plugin-transform-modules-systemjs" "^7.12.1" - "@babel/plugin-transform-modules-umd" "^7.12.1" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.12.1" - "@babel/plugin-transform-new-target" "^7.12.1" - "@babel/plugin-transform-object-super" "^7.12.1" - "@babel/plugin-transform-parameters" "^7.12.1" - "@babel/plugin-transform-property-literals" "^7.12.1" - "@babel/plugin-transform-regenerator" "^7.12.1" - "@babel/plugin-transform-reserved-words" "^7.12.1" - "@babel/plugin-transform-shorthand-properties" "^7.12.1" - "@babel/plugin-transform-spread" "^7.12.1" - "@babel/plugin-transform-sticky-regex" "^7.12.1" - "@babel/plugin-transform-template-literals" "^7.12.1" - "@babel/plugin-transform-typeof-symbol" "^7.12.1" - "@babel/plugin-transform-unicode-escapes" "^7.12.1" - "@babel/plugin-transform-unicode-regex" "^7.12.1" - "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.12.1" - core-js-compat "^3.6.2" - semver "^5.5.0" - -"@babel/preset-modules@^0.1.3": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.4.tgz#362f2b68c662842970fdb5e254ffc8fc1c2e415e" - integrity sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/preset-react@^7.9.4": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.12.5.tgz#d45625f65d53612078a43867c5c6750e78772c56" - integrity sha512-jcs++VPrgyFehkMezHtezS2BpnUlR7tQFAyesJn1vGTO9aTFZrgIQrA5YydlTwxbcjMwkFY6i04flCigRRr3GA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-transform-react-display-name" "^7.12.1" - "@babel/plugin-transform-react-jsx" "^7.12.5" - "@babel/plugin-transform-react-jsx-development" "^7.12.5" - "@babel/plugin-transform-react-jsx-self" "^7.12.1" - "@babel/plugin-transform-react-jsx-source" "^7.12.1" - "@babel/plugin-transform-react-pure-annotations" "^7.12.1" - -"@babel/register@^7.9.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.12.1.tgz#cdb087bdfc4f7241c03231f22e15d211acf21438" - integrity sha512-XWcmseMIncOjoydKZnWvWi0/5CUCD+ZYKhRwgYlWOrA8fGZ/FjuLRpqtIhLOVD/fvR1b9DQHtZPn68VvhpYf+Q== - dependencies: - find-cache-dir "^2.0.0" - lodash "^4.17.19" - make-dir "^2.1.0" - pirates "^4.0.0" - source-map-support "^0.5.16" - -"@babel/runtime@^7.8.4": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" - integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" - integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.9.0": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.5.tgz#78a0c68c8e8a35e4cacfd31db8bb303d5606f095" - integrity sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.5" - "@babel/types" "^7.12.5" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.4.4", "@babel/types@^7.9.0": - version "7.12.6" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.6.tgz#ae0e55ef1cce1fbc881cd26f8234eb3e657edc96" - integrity sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@mrmlnc/readdir-enhanced@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" - integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== - dependencies: - call-me-maybe "^1.0.1" - glob-to-regexp "^0.3.0" - -"@nodelib/fs.stat@^1.1.2": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" - integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== - -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" - integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== - -"@types/cheerio@^0.22.8": - version "0.22.22" - resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.22.tgz#ae71cf4ca59b8bbaf34c99af7a5d6c8894988f5f" - integrity sha512-05DYX4zU96IBfZFY+t3Mh88nlwSMtmmzSYaQkKN48T495VV1dkHSah6qYyDTN5ngaS0i0VonH37m+RuzSM0YiA== - dependencies: - "@types/node" "*" - -"@types/node@*": - version "14.14.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.7.tgz#8ea1e8f8eae2430cf440564b98c6dfce1ec5945d" - integrity sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg== - -"@types/q@^1.5.1": - version "1.5.4" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" - integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== - -accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -address@1.1.2, address@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" - integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== - -ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -alphanum-sort@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= - -ansi-escapes@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - -ansi-red@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" - integrity sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= - dependencies: - ansi-wrap "0.1.0" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-wrap@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" - integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -arch@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - -archive-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-4.0.0.tgz#f92e72233056dfc6969472749c267bdb046b1d70" - integrity sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA= - dependencies: - file-type "^4.2.0" - -argparse@^1.0.10, argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -async@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -autolinker@^3.11.0: - version "3.14.2" - resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-3.14.2.tgz#71856274eb768fb7149039e24d3a2be2f5c55a63" - integrity sha512-VO66nXUCZFxTq7fVHAaiAkZNXRQ1l3IFi6D5P7DLoyIEAn2E8g7TWbyEgLlz1uW74LfWmu1A17IPWuPQyGuNVg== - dependencies: - tslib "^1.9.3" - -autolinker@~0.28.0: - version "0.28.1" - resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" - integrity sha1-BlK0kYgYefB3XazgzcoyM5QqTkc= - dependencies: - gulp-header "^1.7.1" - -autoprefixer@^9.7.5: - version "9.8.6" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f" - integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg== - dependencies: - browserslist "^4.12.0" - caniuse-lite "^1.0.30001109" - colorette "^1.2.1" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.32" - postcss-value-parser "^4.1.0" - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - -babel-code-frame@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-plugin-dynamic-import-node@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" - integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - dependencies: - object.assign "^4.1.0" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base64-js@^1.3.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.0.tgz#2d03045876d9e2b68a7a0f87d6bd163595e3b6af" - integrity sha512-Jrdy04F2EKcNggUDfubMUPNAZg2vMquLQSm8sKLYJvz40ClFL1S8GKyDshGkNsbNNE5Z+fQavzU7nSK1I9JUGA== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -bin-build@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" - integrity sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA== - dependencies: - decompress "^4.0.0" - download "^6.2.2" - execa "^0.7.0" - p-map-series "^1.0.0" - tempfile "^2.0.0" - -bin-check@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-4.1.0.tgz#fc495970bdc88bb1d5a35fc17e65c4a149fc4a49" - integrity sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA== - dependencies: - execa "^0.7.0" - executable "^4.1.0" - -bin-version-check@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-4.0.0.tgz#7d819c62496991f80d893e6e02a3032361608f71" - integrity sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ== - dependencies: - bin-version "^3.0.0" - semver "^5.6.0" - semver-truncate "^1.1.2" - -bin-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-3.1.0.tgz#5b09eb280752b1bd28f0c9db3f96f2f43b6c0839" - integrity sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ== - dependencies: - execa "^1.0.0" - find-versions "^3.0.0" - -bin-wrapper@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-4.1.0.tgz#99348f2cf85031e3ef7efce7e5300aeaae960605" - integrity sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q== - dependencies: - bin-check "^4.1.0" - bin-version-check "^4.0.0" - download "^7.1.0" - import-lazy "^3.1.0" - os-filter-obj "^2.0.0" - pify "^4.0.1" - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bl@^1.0.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" - integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -body-parser@1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - -body@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/body/-/body-5.1.0.tgz#e4ba0ce410a46936323367609ecb4e6553125069" - integrity sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk= - dependencies: - continuable-cache "^0.3.1" - error "^7.0.0" - raw-body "~1.1.0" - safe-json-parse "~1.0.1" - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -browserslist@4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" - integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== - dependencies: - caniuse-lite "^1.0.30000989" - electron-to-chromium "^1.3.247" - node-releases "^1.1.29" - -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.14.6: - version "4.14.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.7.tgz#c071c1b3622c1c2e790799a37bb09473a4351cb6" - integrity sha512-BSVRLCeG3Xt/j/1cCGj1019Wbty0H+Yvu2AOuZSuoaUWn3RatbL33Cxk+Q4jRMRAbOm0p7SLravLjpnT6s0vzQ== - dependencies: - caniuse-lite "^1.0.30001157" - colorette "^1.2.1" - electron-to-chromium "^1.3.591" - escalade "^3.1.1" - node-releases "^1.1.66" - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer@^5.2.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bytes@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8" - integrity sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g= - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" - integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= - dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - -call-bind@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.0.tgz#24127054bb3f9bdcb4b1fb82418186072f77b8ce" - integrity sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.0" - -call-me-maybe@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" - integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= - -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - dependencies: - callsites "^2.0.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - dependencies: - caller-callsite "^2.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= - -caniuse-api@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" - integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - dependencies: - browserslist "^4.0.0" - caniuse-lite "^1.0.0" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001157: - version "1.0.30001157" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001157.tgz#2d11aaeb239b340bc1aa730eca18a37fdb07a9ab" - integrity sha512-gOerH9Wz2IRZ2ZPdMfBvyOi3cjaz4O4dgNwPGzx8EhqAs4+2IL/O+fJsbt+znSigujoZG8bVcIAUM/I/E5K3MA== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -caw@^2.0.0, caw@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" - integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== - dependencies: - get-proxy "^2.0.0" - isurl "^1.0.0-alpha5" - tunnel-agent "^0.6.0" - url-to-options "^1.0.1" - -chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^1.0.0, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - -cheerio@0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" - integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" - -chokidar@^2.0.4: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -classnames@^2.2.6: - version "2.2.6" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" - integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - -cli-width@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" - integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== - -clipboard@^2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376" - integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg== - dependencies: - good-listener "^1.2.2" - select "^1.1.2" - tiny-emitter "^2.0.0" - -clone-response@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -coa@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" - integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== - dependencies: - "@types/q" "^1.5.1" - chalk "^2.4.1" - q "^1.1.2" - -coffee-script@^1.12.4: - version "1.12.7" - resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" - integrity sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0, color-convert@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@^1.0.0, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-string@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.4.tgz#dd51cd25cfee953d138fe4002372cc3d0e504cb6" - integrity sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color@^3.0.0: - version "3.1.3" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e" - integrity sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ== - dependencies: - color-convert "^1.9.1" - color-string "^1.5.4" - -colorette@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" - integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.8.1: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - -commander@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-with-sourcemaps@*: - version "1.1.0" - resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" - integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== - dependencies: - source-map "^0.6.1" - -config-chain@^1.1.11: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - -console-stream@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" - integrity sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ= - -content-disposition@0.5.3, content-disposition@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -continuable-cache@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" - integrity sha1-vXJ6f67XfnH/OYWskzUakSczrQ8= - -convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js-compat@^3.6.2: - version "3.7.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.7.0.tgz#8479c5d3d672d83f1f5ab94cf353e57113e065ed" - integrity sha512-V8yBI3+ZLDVomoWICO6kq/CD28Y4r1M7CWeO4AGpMdMfseu8bkSubBmUPySMGKRTS+su4XQ07zUkAsiu9FCWTg== - dependencies: - browserslist "^4.14.6" - semver "7.0.0" - -core-js@^2.6.5: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cosmiconfig@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" - -cross-spawn@6.0.5, cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -crowdin-cli@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/crowdin-cli/-/crowdin-cli-0.3.0.tgz#eac9989a6fe7feaaf33090397afc187c67b46191" - integrity sha1-6smYmm/n/qrzMJA5evwYfGe0YZE= - dependencies: - request "^2.53.0" - yamljs "^0.2.1" - yargs "^2.3.0" - -css-color-names@0.0.4, css-color-names@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= - -css-declaration-sorter@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" - integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== - dependencies: - postcss "^7.0.1" - timsort "^0.3.0" - -css-select-base-adapter@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" - integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== - -css-select@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" - integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== - dependencies: - boolbase "^1.0.0" - css-what "^3.2.1" - domutils "^1.7.0" - nth-check "^1.0.2" - -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-tree@1.0.0-alpha.37: - version "1.0.0-alpha.37" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" - integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - dependencies: - mdn-data "2.0.4" - source-map "^0.6.1" - -css-tree@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0.tgz#21993fa270d742642a90409a2c0cb3ac0298adf6" - integrity sha512-CdVYz/Yuqw0VdKhXPBIgi8DO3NicJVYZNWeX9XcIuSp9ZoFT5IcleVRW07O5rMjdcx1mb+MEJPknTTEW7DdsYw== - dependencies: - mdn-data "2.0.12" - source-map "^0.6.1" - -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - -css-what@^3.2.1: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" - integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cssnano-preset-default@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76" - integrity sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA== - dependencies: - css-declaration-sorter "^4.0.1" - cssnano-util-raw-cache "^4.0.1" - postcss "^7.0.0" - postcss-calc "^7.0.1" - postcss-colormin "^4.0.3" - postcss-convert-values "^4.0.1" - postcss-discard-comments "^4.0.2" - postcss-discard-duplicates "^4.0.2" - postcss-discard-empty "^4.0.1" - postcss-discard-overridden "^4.0.1" - postcss-merge-longhand "^4.0.11" - postcss-merge-rules "^4.0.3" - postcss-minify-font-values "^4.0.2" - postcss-minify-gradients "^4.0.2" - postcss-minify-params "^4.0.2" - postcss-minify-selectors "^4.0.2" - postcss-normalize-charset "^4.0.1" - postcss-normalize-display-values "^4.0.2" - postcss-normalize-positions "^4.0.2" - postcss-normalize-repeat-style "^4.0.2" - postcss-normalize-string "^4.0.2" - postcss-normalize-timing-functions "^4.0.2" - postcss-normalize-unicode "^4.0.1" - postcss-normalize-url "^4.0.1" - postcss-normalize-whitespace "^4.0.2" - postcss-ordered-values "^4.1.2" - postcss-reduce-initial "^4.0.3" - postcss-reduce-transforms "^4.0.2" - postcss-svgo "^4.0.2" - postcss-unique-selectors "^4.0.1" - -cssnano-util-get-arguments@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" - integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= - -cssnano-util-get-match@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" - integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= - -cssnano-util-raw-cache@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" - integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== - dependencies: - postcss "^7.0.0" - -cssnano-util-same-parent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" - integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== - -cssnano@^4.1.10: - version "4.1.10" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" - integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== - dependencies: - cosmiconfig "^5.0.0" - cssnano-preset-default "^4.0.7" - is-resolvable "^1.0.0" - postcss "^7.0.0" - -csso@^4.0.2: - version "4.1.0" - resolved "https://registry.yarnpkg.com/csso/-/csso-4.1.0.tgz#1d31193efa99b87aa6bad6c0cef155e543d09e8b" - integrity sha512-h+6w/W1WqXaJA4tb1dk7r5tVbOm97MsKxzwnvOR04UQ6GILroryjMWu3pmCCtL2mLaEStQ0fZgeGiy99mo7iyg== - dependencies: - css-tree "^1.0.0" - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= - dependencies: - array-find-index "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== - dependencies: - ms "^2.1.1" - -debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== - dependencies: - ms "2.1.2" - -decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.2.0, decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" - integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== - dependencies: - file-type "^5.2.0" - is-stream "^1.1.0" - tar-stream "^1.5.2" - -decompress-tarbz2@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" - integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== - dependencies: - decompress-tar "^4.1.0" - file-type "^6.1.0" - is-stream "^1.1.0" - seek-bzip "^1.0.5" - unbzip2-stream "^1.0.9" - -decompress-targz@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" - integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== - dependencies: - decompress-tar "^4.1.1" - file-type "^5.2.0" - is-stream "^1.1.0" - -decompress-unzip@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" - integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= - dependencies: - file-type "^3.8.0" - get-stream "^2.2.0" - pify "^2.3.0" - yauzl "^2.4.2" - -decompress@^4.0.0, decompress@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" - integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== - dependencies: - decompress-tar "^4.0.0" - decompress-tarbz2 "^4.0.0" - decompress-targz "^4.0.0" - decompress-unzip "^4.0.1" - graceful-fs "^4.1.10" - make-dir "^1.0.0" - pify "^2.3.0" - strip-dirs "^2.0.0" - -deep-is@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegate@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" - integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-port-alt@1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" - integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== - dependencies: - address "^1.0.1" - debug "^2.6.0" - -diacritics-map@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/diacritics-map/-/diacritics-map-0.1.0.tgz#6dfc0ff9d01000a2edf2865371cac316e94977af" - integrity sha1-bfwP+dAQAKLt8oZTccrDFulJd68= - -dir-glob@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" - integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== - dependencies: - arrify "^1.0.1" - path-type "^3.0.0" - -docusaurus@^1.12.0: - version "1.14.6" - resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.14.6.tgz#ffab9f6dafe8c48c477e0ebc7f491e554143b2b5" - integrity sha512-Hpo6xqYIHwazwuhXW25AKYv/os+dWoJ87qql/m1j1xp83h/BnfYV2l8PA8zLggF1wGUbJQbTx7GWo6QvD8z+4Q== - dependencies: - "@babel/core" "^7.9.0" - "@babel/plugin-proposal-class-properties" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.9.0" - "@babel/polyfill" "^7.8.7" - "@babel/preset-env" "^7.9.0" - "@babel/preset-react" "^7.9.4" - "@babel/register" "^7.9.0" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" - autoprefixer "^9.7.5" - babylon "^6.18.0" - chalk "^3.0.0" - classnames "^2.2.6" - commander "^4.0.1" - crowdin-cli "^0.3.0" - cssnano "^4.1.10" - escape-string-regexp "^2.0.0" - express "^4.17.1" - feed "^4.0.0" - fs-extra "^8.1.0" - gaze "^1.1.3" - github-slugger "^1.2.1" - glob "^7.1.6" - highlight.js "^9.16.2" - imagemin "^6.0.0" - imagemin-gifsicle "^6.0.1" - imagemin-jpegtran "^6.0.0" - imagemin-optipng "^6.0.0" - imagemin-svgo "^7.0.0" - lodash "^4.17.15" - markdown-toc "^1.2.0" - mkdirp "^0.5.1" - portfinder "^1.0.25" - postcss "^7.0.23" - prismjs "^1.17.1" - react "^16.8.4" - react-dev-utils "^9.1.0" - react-dom "^16.8.4" - remarkable "^2.0.0" - request "^2.88.0" - shelljs "^0.8.4" - sitemap "^3.2.2" - tcp-port-used "^1.0.1" - tiny-lr "^1.1.1" - tree-node-cli "^1.2.5" - truncate-html "^1.0.3" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.2.tgz#f3b6e549201e46f588b59463dd77187131fe6971" - integrity sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA== - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1, domutils@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -dot-prop@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" - integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - dependencies: - is-obj "^2.0.0" - -download@^6.2.2: - version "6.2.5" - resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" - integrity sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA== - dependencies: - caw "^2.0.0" - content-disposition "^0.5.2" - decompress "^4.0.0" - ext-name "^5.0.0" - file-type "5.2.0" - filenamify "^2.0.0" - get-stream "^3.0.0" - got "^7.0.0" - make-dir "^1.0.0" - p-event "^1.0.0" - pify "^3.0.0" - -download@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/download/-/download-7.1.0.tgz#9059aa9d70b503ee76a132897be6dec8e5587233" - integrity sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ== - dependencies: - archive-type "^4.0.0" - caw "^2.0.1" - content-disposition "^0.5.2" - decompress "^4.2.0" - ext-name "^5.0.0" - file-type "^8.1.0" - filenamify "^2.0.0" - get-stream "^3.0.0" - got "^8.3.1" - make-dir "^1.2.0" - p-event "^2.1.0" - pify "^3.0.0" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -duplexer@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.591: - version "1.3.592" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.592.tgz#4621521b223bf6e5469373528321e185d3c24670" - integrity sha512-kGNowksvqQiPb1pUSQKpd8JFoGPLxYOwduNRCqCxGh/2Q1qE2JdmwouCW41lUzDxOb/2RIV4lR0tVIfboWlO9A== - -"emoji-regex@>=6.0.0 <=6.1.1": - version "6.1.1" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" - integrity sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4= - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== - -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -error@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" - integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== - dependencies: - string-template "~0.2.1" - -es-abstract@^1.17.0-next.1, es-abstract@^1.17.2: - version "1.17.7" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" - integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.1: - version "1.18.0-next.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" - integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-negative-zero "^2.0.0" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eventsource@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" - integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== - dependencies: - original "^1.0.0" - -exec-buffer@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b" - integrity sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA== - dependencies: - execa "^0.7.0" - p-finally "^1.0.0" - pify "^3.0.0" - rimraf "^2.5.4" - tempfile "^2.0.0" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -executable@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" - integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== - dependencies: - pify "^2.2.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -express@^4.17.1: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext-list@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" - integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== - dependencies: - mime-db "^1.28.0" - -ext-name@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" - integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== - dependencies: - ext-list "^2.0.0" - sort-keys-length "^1.0.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^2.0.2: - version "2.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" - integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== - dependencies: - "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.1.2" - glob-parent "^3.1.0" - is-glob "^4.0.0" - merge2 "^1.2.3" - micromatch "^3.1.10" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -faye-websocket@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" - integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ= - dependencies: - websocket-driver ">=0.5.1" - -faye-websocket@~0.11.1: - version "0.11.3" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" - integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== - dependencies: - websocket-driver ">=0.5.1" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -feed@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.1.tgz#b246ef891051c7dbf088ca203341d9fb0444baee" - integrity sha512-l28KKcK1J/u3iq5dRDmmoB2p7dtBfACC2NqJh4dI2kFptxH0asfjmOfcxqh5Sv8suAlVa73gZJ4REY5RrafVvg== - dependencies: - xml-js "^1.6.11" - -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= - dependencies: - escape-string-regexp "^1.0.5" - -file-type@5.2.0, file-type@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" - integrity sha1-LdvqfHP/42No365J3DOMBYwritY= - -file-type@^10.4.0, file-type@^10.7.0: - version "10.11.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.11.0.tgz#2961d09e4675b9fb9a3ee6b69e9cd23f43fd1890" - integrity sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw== - -file-type@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" - integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= - -file-type@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5" - integrity sha1-G2AOX8ofvcboDApwxxyNul95BsU= - -file-type@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" - integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== - -file-type@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-8.1.0.tgz#244f3b7ef641bbe0cca196c7276e4b332399f68c" - integrity sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ== - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -filename-reserved-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" - integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik= - -filenamify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" - integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== - dependencies: - filename-reserved-regex "^2.0.0" - strip-outer "^1.0.0" - trim-repeated "^1.0.0" - -filesize@3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -find-cache-dir@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - -find-up@3.0.0, find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -find-versions@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" - integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== - dependencies: - semver-regex "^2.0.0" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -fork-ts-checker-webpack-plugin@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.5.0.tgz#ce1d77190b44d81a761b10b6284a373795e41f0c" - integrity sha512-zEhg7Hz+KhZlBhILYpXy+Beu96gwvkROWJiTXOCyOOMMrdBIRPvsBpBqgTI4jfJGrJXcqGwJR8zsBGDmzY0jsA== - dependencies: - babel-code-frame "^6.22.0" - chalk "^2.4.1" - chokidar "^2.0.4" - micromatch "^3.1.10" - minimatch "^3.0.4" - semver "^5.6.0" - tapable "^1.0.0" - worker-rpc "^0.1.0" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -from2@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -gaze@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" - integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== - dependencies: - globule "^1.0.0" - -gensync@^1.0.0-beta.1: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-intrinsic@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.1.tgz#94a9768fcbdd0595a1c9273aacf4c89d075631be" - integrity sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-proxy@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" - integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== - dependencies: - npm-conf "^1.1.0" - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= - -get-stream@3.0.0, get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" - integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - -get-stream@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -gifsicle@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-4.0.1.tgz#30e1e61e3ee4884ef702641b2e98a15c2127b2e2" - integrity sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg== - dependencies: - bin-build "^3.0.0" - bin-wrapper "^4.0.0" - execa "^1.0.0" - logalot "^2.0.0" - -github-slugger@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.3.0.tgz#9bd0a95c5efdfc46005e82a906ef8e2a059124c9" - integrity sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q== - dependencies: - emoji-regex ">=6.0.0 <=6.1.1" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-to-regexp@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" - integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= - -glob@^7.0.0, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@~7.1.1: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globby@8.0.2, globby@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" - integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== - dependencies: - array-union "^1.0.1" - dir-glob "2.0.0" - fast-glob "^2.0.2" - glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -globule@^1.0.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.2.tgz#d8bdd9e9e4eef8f96e245999a5dee7eb5d8529c4" - integrity sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA== - dependencies: - glob "~7.1.1" - lodash "~4.17.10" - minimatch "~3.0.2" - -good-listener@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" - integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA= - dependencies: - delegate "^3.1.2" - -got@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - -got@^8.3.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" - integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -gray-matter@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-2.1.1.tgz#3042d9adec2a1ded6a7707a9ed2380f8a17a430e" - integrity sha1-MELZrewqHe1qdwep7SOA+KF6Qw4= - dependencies: - ansi-red "^0.1.1" - coffee-script "^1.12.4" - extend-shallow "^2.0.1" - js-yaml "^3.8.1" - toml "^2.3.2" - -gulp-header@^1.7.1: - version "1.8.12" - resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" - integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== - dependencies: - concat-with-sourcemaps "*" - lodash.template "^4.4.0" - through2 "^2.0.0" - -gzip-size@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" - integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== - dependencies: - duplexer "^0.1.1" - pify "^4.0.1" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.0, has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hex-color-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" - integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== - -highlight.js@^9.16.2: - version "9.18.3" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.3.tgz#a1a0a2028d5e3149e2380f8a865ee8516703d634" - integrity sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ== - -hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== - -hsl-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" - integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= - -hsla-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" - integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= - -html-comment-regex@^1.1.0, html-comment-regex@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" - integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== - -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -http-cache-semantics@3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-parser-js@>=0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" - integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -iconv-lite@0.4.24, iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^3.3.5: - version "3.3.10" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" - integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== - -imagemin-gifsicle@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz#6abad4e95566d52e5a104aba1c24b4f3b48581b3" - integrity sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng== - dependencies: - exec-buffer "^3.0.0" - gifsicle "^4.0.0" - is-gif "^3.0.0" - -imagemin-jpegtran@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz#c8d3bcfb6ec9c561c20a987142854be70d90b04f" - integrity sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g== - dependencies: - exec-buffer "^3.0.0" - is-jpg "^2.0.0" - jpegtran-bin "^4.0.0" - -imagemin-optipng@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz#a6bfc7b542fc08fc687e83dfb131249179a51a68" - integrity sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A== - dependencies: - exec-buffer "^3.0.0" - is-png "^1.0.0" - optipng-bin "^5.0.0" - -imagemin-svgo@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz#528a42fd3d55eff5d4af8fd1113f25fb61ad6d9a" - integrity sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg== - dependencies: - is-svg "^4.2.1" - svgo "^1.3.2" - -imagemin@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-6.1.0.tgz#62508b465728fea36c03cdc07d915fe2d8cf9e13" - integrity sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A== - dependencies: - file-type "^10.7.0" - globby "^8.0.1" - make-dir "^1.0.0" - p-pipe "^1.1.0" - pify "^4.0.1" - replace-ext "^1.0.0" - -immer@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d" - integrity sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg== - -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - -import-lazy@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-3.1.0.tgz#891279202c8a2280fdbd6674dbd8da1a1dfc67cc" - integrity sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ== - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= - dependencies: - repeating "^2.0.0" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.4, ini@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -inquirer@6.5.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" - integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== - dependencies: - ansi-escapes "^3.2.0" - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.12" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.4.0" - string-width "^2.1.0" - strip-ansi "^5.1.0" - through "^2.3.6" - -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" - integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-callable@^1.1.4, is-callable@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== - -is-color-stop@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" - integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= - dependencies: - css-color-names "^0.0.4" - hex-color-regex "^1.1.0" - hsl-regex "^1.0.0" - hsla-regex "^1.0.0" - rgb-regex "^1.0.1" - rgba-regex "^1.0.0" - -is-core-module@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" - integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== - dependencies: - has "^1.0.3" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-gif@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-3.0.0.tgz#c4be60b26a301d695bb833b20d9b5d66c6cf83b1" - integrity sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw== - dependencies: - file-type "^10.4.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-jpg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-2.0.0.tgz#2e1997fa6e9166eaac0242daae443403e4ef1d97" - integrity sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc= - -is-natural-number@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" - integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= - -is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-png@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce" - integrity sha1-1XSxK/J1wDUEVVcLDltXqwYgd84= - -is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - -is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== - -is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-root@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" - integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== - -is-stream@^1.0.0, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-svg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" - integrity sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ== - dependencies: - html-comment-regex "^1.1.0" - -is-svg@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.2.1.tgz#095b496e345fec9211c2a7d5d021003e040d6f81" - integrity sha512-PHx3ANecKsKNl5y5+Jvt53Y4J7MfMpbNZkv384QNiswMKAWIbvcqbPz+sYbFKJI8Xv3be01GSFniPmoaP+Ai5A== - dependencies: - html-comment-regex "^1.1.2" - -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-url@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" - integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - -is2@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.1.tgz#8ac355644840921ce435d94f05d3a94634d3481a" - integrity sha512-+WaJvnaA7aJySz2q/8sLjMb2Mw14KTplHmSwcSpZ/fWJPkUmqw3YTzSWbPJ7OAwRvdYTWF2Wg+yYJ1AdP5Z8CA== - dependencies: - deep-is "^0.1.3" - ip-regex "^2.1.0" - is-url "^1.2.2" - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -jpegtran-bin@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz#d00aed809fba7aa6f30817e59eee4ddf198f8f10" - integrity sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ== - dependencies: - bin-build "^3.0.0" - bin-wrapper "^4.0.0" - logalot "^2.0.0" - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.13.1, js-yaml@^3.8.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json3@^3.3.2: - version "3.3.3" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" - integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" - integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== - dependencies: - minimist "^1.2.5" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" - integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== - dependencies: - json-buffer "3.0.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -lazy-cache@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" - integrity sha1-uRkKT5EzVGlIQIWfio9whNiCImQ= - dependencies: - set-getter "^0.1.0" - -list-item@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/list-item/-/list-item-1.1.1.tgz#0c65d00e287cb663ccb3cb3849a77e89ec268a56" - integrity sha1-DGXQDih8tmPMs8s4Sad+iewmilY= - dependencies: - expand-range "^1.8.1" - extend-shallow "^2.0.1" - is-number "^2.1.0" - repeat-string "^1.5.2" - -livereload-js@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" - integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -loader-utils@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" - integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== - dependencies: - big.js "^5.2.2" - emojis-list "^2.0.0" - json5 "^1.0.1" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= - -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= - -lodash.chunk@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" - integrity sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw= - -lodash.defaults@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= - -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= - -lodash.flatten@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= - -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= - -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= - -lodash.merge@^4.4.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.padstart@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" - integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= - -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= - -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash.template@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= - -lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@~4.17.10: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -logalot@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" - integrity sha1-X46MkNME7fElMJUaVVSruMXj9VI= - dependencies: - figures "^1.3.5" - squeak "^1.0.0" - -longest@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= - -loose-envify@^1.1.0, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -loud-rejection@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -lowercase-keys@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= - -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lpad-align@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e" - integrity sha1-IfYArBwwlcPG5JfuZyce4ISB/p4= - dependencies: - get-stdin "^4.0.1" - indent-string "^2.1.0" - longest "^1.0.0" - meow "^3.3.0" - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -make-dir@^1.0.0, make-dir@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -make-dir@^2.0.0, make-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-obj@^1.0.0, map-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -markdown-link@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/markdown-link/-/markdown-link-0.1.1.tgz#32c5c65199a6457316322d1e4229d13407c8c7cf" - integrity sha1-MsXGUZmmRXMWMi0eQinRNAfIx88= - -markdown-toc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/markdown-toc/-/markdown-toc-1.2.0.tgz#44a15606844490314afc0444483f9e7b1122c339" - integrity sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg== - dependencies: - concat-stream "^1.5.2" - diacritics-map "^0.1.0" - gray-matter "^2.1.0" - lazy-cache "^2.0.2" - list-item "^1.1.1" - markdown-link "^0.1.1" - minimist "^1.2.0" - mixin-deep "^1.1.3" - object.pick "^1.2.0" - remarkable "^1.7.1" - repeat-string "^1.6.1" - strip-color "^0.1.0" - -math-random@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" - integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== - -mdn-data@2.0.12: - version "2.0.12" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.12.tgz#bbb658d08b38f574bbb88f7b83703defdcc46844" - integrity sha512-ULbAlgzVb8IqZ0Hsxm6hHSlQl3Jckst2YEQS7fODu9ilNWy2LvcoSY7TRFIktABP2mdppBioc66va90T+NUs8Q== - -mdn-data@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" - integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -meow@^3.3.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge2@^1.2.3: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -microevent.ts@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" - integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -mime-db@^1.28.0: - version "1.45.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" - integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== - -mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mixin-deep@^1.1.3, mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@2.1.2, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= - -nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-modules-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" - integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= - -node-releases@^1.1.29, node-releases@^1.1.66: - version "1.1.66" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.66.tgz#609bd0dc069381015cd982300bae51ab4f1b1814" - integrity sha512-JHEQ1iWPGK+38VLB2H9ef2otU4l8s3yAMt9Xf934r6+ojCYDMHPMqvCc9TnzfeFSP1QEOeU6YZEd3+De0LTCgg== - -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= - -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - -normalize-url@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== - -npm-conf@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" - integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== - dependencies: - config-chain "^1.1.11" - pify "^3.0.0" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -nth-check@^1.0.2, nth-check@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.assign@^4.1.0, object.assign@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.getownpropertydescriptors@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - -object.pick@^1.2.0, object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -object.values@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" - integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - has "^1.0.3" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - -open@^6.3.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" - integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== - dependencies: - is-wsl "^1.1.0" - -optipng-bin@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-5.1.0.tgz#a7c7ab600a3ab5a177dae2f94c2d800aa386b5a9" - integrity sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA== - dependencies: - bin-build "^3.0.0" - bin-wrapper "^4.0.0" - logalot "^2.0.0" - -original@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" - integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== - dependencies: - url-parse "^1.4.3" - -os-filter-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-2.0.0.tgz#1c0b62d5f3a2442749a2d139e6dddee6e81d8d16" - integrity sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg== - dependencies: - arch "^2.1.0" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" - integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== - -p-event@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-1.3.0.tgz#8e6b4f4f65c72bc5b6fe28b75eda874f96a4a085" - integrity sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU= - dependencies: - p-timeout "^1.1.1" - -p-event@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-2.3.1.tgz#596279ef169ab2c3e0cae88c1cfbb08079993ef6" - integrity sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA== - dependencies: - p-timeout "^2.0.1" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-map-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" - integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= - dependencies: - p-reduce "^1.0.0" - -p-pipe@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" - integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= - -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= - dependencies: - p-finally "^1.0.0" - -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pirates@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" - integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== - dependencies: - node-modules-regexp "^1.0.0" - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-up@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= - dependencies: - find-up "^2.1.0" - -portfinder@^1.0.25: - version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -postcss-calc@^7.0.1: - version "7.0.5" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" - integrity sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== - dependencies: - postcss "^7.0.27" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.0.2" - -postcss-colormin@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" - integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== - dependencies: - browserslist "^4.0.0" - color "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-convert-values@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" - integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-discard-comments@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" - integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== - dependencies: - postcss "^7.0.0" - -postcss-discard-duplicates@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" - integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== - dependencies: - postcss "^7.0.0" - -postcss-discard-empty@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" - integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== - dependencies: - postcss "^7.0.0" - -postcss-discard-overridden@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" - integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== - dependencies: - postcss "^7.0.0" - -postcss-merge-longhand@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" - integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== - dependencies: - css-color-names "0.0.4" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - stylehacks "^4.0.0" - -postcss-merge-rules@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" - integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - cssnano-util-same-parent "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - vendors "^1.0.0" - -postcss-minify-font-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" - integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-minify-gradients@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" - integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - is-color-stop "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-minify-params@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" - integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== - dependencies: - alphanum-sort "^1.0.0" - browserslist "^4.0.0" - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - uniqs "^2.0.0" - -postcss-minify-selectors@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" - integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== - dependencies: - alphanum-sort "^1.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - -postcss-normalize-charset@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" - integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== - dependencies: - postcss "^7.0.0" - -postcss-normalize-display-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" - integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-positions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" - integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== - dependencies: - cssnano-util-get-arguments "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-repeat-style@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" - integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-string@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" - integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== - dependencies: - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-timing-functions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" - integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-unicode@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" - integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-url@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" - integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-whitespace@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" - integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-ordered-values@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" - integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== - dependencies: - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-reduce-initial@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" - integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - -postcss-reduce-transforms@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" - integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== - dependencies: - cssnano-util-get-match "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-selector-parser@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" - integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== - dependencies: - dot-prop "^5.2.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-selector-parser@^6.0.2: - version "6.0.4" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" - integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== - dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - util-deprecate "^1.0.2" - -postcss-svgo@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258" - integrity sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw== - dependencies: - is-svg "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - svgo "^1.0.0" - -postcss-unique-selectors@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" - integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== - dependencies: - alphanum-sort "^1.0.0" - postcss "^7.0.0" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== - -postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.23, postcss@^7.0.27, postcss@^7.0.32: - version "7.0.35" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" - integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -prismjs@^1.17.1: - version "1.22.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa" - integrity sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w== - optionalDependencies: - clipboard "^2.0.0" - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -prop-types@^15.6.2: - version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" - integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.8.1" - -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= - -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" - integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -q@^1.1.2: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= - -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - -qs@^6.4.0: - version "6.9.4" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" - integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-body@~1.1.0: - version "1.1.7" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-1.1.7.tgz#1d027c2bfa116acc6623bca8f00016572a87d425" - integrity sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU= - dependencies: - bytes "1" - string_decoder "0.10" - -react-dev-utils@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.1.0.tgz#3ad2bb8848a32319d760d0a84c56c14bdaae5e81" - integrity sha512-X2KYF/lIGyGwP/F/oXgGDF24nxDA2KC4b7AFto+eqzc/t838gpSGiaU8trTqHXOohuLxxc5qi1eDzsl9ucPDpg== - dependencies: - "@babel/code-frame" "7.5.5" - address "1.1.2" - browserslist "4.7.0" - chalk "2.4.2" - cross-spawn "6.0.5" - detect-port-alt "1.1.6" - escape-string-regexp "1.0.5" - filesize "3.6.1" - find-up "3.0.0" - fork-ts-checker-webpack-plugin "1.5.0" - global-modules "2.0.0" - globby "8.0.2" - gzip-size "5.1.1" - immer "1.10.0" - inquirer "6.5.0" - is-root "2.1.0" - loader-utils "1.2.3" - open "^6.3.0" - pkg-up "2.0.0" - react-error-overlay "^6.0.3" - recursive-readdir "2.2.2" - shell-quote "1.7.2" - sockjs-client "1.4.0" - strip-ansi "5.2.0" - text-table "0.2.0" - -react-dom@^16.8.4: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89" - integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.19.1" - -react-error-overlay@^6.0.3: - version "6.0.8" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.8.tgz#474ed11d04fc6bda3af643447d85e9127ed6b5de" - integrity sha512-HvPuUQnLp5H7TouGq3kzBeioJmXms1wHy9EGjz2OURWBp4qZO6AfGEcnxts1D/CbwPLRAgTMPCEgYhA3sEM4vw== - -react-is@^16.8.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-sidecar@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/react-sidecar/-/react-sidecar-0.1.1.tgz#e4970bc95e495f1688d2727f948efc257555884e" - integrity sha1-5JcLyV5JXxaI0nJ/lI78JXVViE4= - -react@^16.8.4: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" - integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.1.1: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - -recursive-readdir@2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" - integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== - dependencies: - minimatch "3.0.4" - -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - -regenerate-unicode-properties@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" - integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.4.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - -regenerator-transform@^0.14.2: - version "0.14.5" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" - integrity sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== - dependencies: - "@babel/runtime" "^7.8.4" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" - integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^8.2.0" - regjsgen "^0.5.1" - regjsparser "^0.6.4" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.2.0" - -regjsgen@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" - integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== - -regjsparser@^0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" - integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== - dependencies: - jsesc "~0.5.0" - -remarkable@^1.7.1: - version "1.7.4" - resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" - integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== - dependencies: - argparse "^1.0.10" - autolinker "~0.28.0" - -remarkable@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-2.0.1.tgz#280ae6627384dfb13d98ee3995627ca550a12f31" - integrity sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA== - dependencies: - argparse "^1.0.10" - autolinker "^3.11.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -replace-ext@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" - integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== - -request@^2.53.0, request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - -responselike@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -rgb-regex@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" - integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= - -rgba-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" - integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= - -rimraf@^2.5.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -run-async@^2.2.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - -rxjs@^6.4.0: - version "6.6.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" - integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== - dependencies: - tslib "^1.9.0" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-json-parse@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" - integrity sha1-PnZyPjjf3aE8mx0poeB//uSzC1c= - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sax@^1.2.4, sax@~1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -scheduler@^0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" - integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - -seek-bzip@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" - integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== - dependencies: - commander "^2.8.1" - -select@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" - integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= - -semver-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" - integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== - -semver-truncate@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" - integrity sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g= - dependencies: - semver "^5.3.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - -set-getter@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" - integrity sha1-12nBgsnVpR9AkUXy+6guXoboA3Y= - dependencies: - to-object-path "^0.3.0" - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shell-quote@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" - integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== - -shelljs@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" - integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= - dependencies: - is-arrayish "^0.3.1" - -sitemap@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.2.2.tgz#3f77c358fa97b555c879e457098e39910095c62b" - integrity sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg== - dependencies: - lodash.chunk "^4.2.0" - lodash.padstart "^4.6.1" - whatwg-url "^7.0.0" - xmlbuilder "^13.0.0" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sockjs-client@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" - integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== - dependencies: - debug "^3.2.5" - eventsource "^1.0.7" - faye-websocket "~0.11.1" - inherits "^2.0.3" - json3 "^3.3.2" - url-parse "^1.4.3" - -sort-keys-length@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" - integrity sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg= - dependencies: - sort-keys "^1.0.0" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0= - dependencies: - is-plain-obj "^1.0.0" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.5.16: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.0, source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.6" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz#c80757383c28abf7296744998cbc106ae8b854ce" - integrity sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -squeak@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3" - integrity sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM= - dependencies: - chalk "^1.0.0" - console-stream "^0.1.1" - lpad-align "^1.0.1" - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stable@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" - integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - -string-template@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" - integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= - -string-width@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string.prototype.trimend@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz#6ddd9a8796bc714b489a3ae22246a208f37bfa46" - integrity sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - -string.prototype.trimstart@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz#22d45da81015309cd0cdd79787e8919fc5c613e7" - integrity sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - -string_decoder@0.10: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@5.2.0, strip-ansi@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-color@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/strip-color/-/strip-color-0.1.0.tgz#106f65d3d3e6a2d9401cac0eb0ce8b8a702b4f7b" - integrity sha1-EG9l09PmotlAHKwOsM6LinArT3s= - -strip-dirs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" - integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== - dependencies: - is-natural-number "^4.0.1" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= - dependencies: - get-stdin "^4.0.1" - -strip-outer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" - integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== - dependencies: - escape-string-regexp "^1.0.2" - -stylehacks@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" - integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -svgo@^1.0.0, svgo@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" - integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== - dependencies: - chalk "^2.4.1" - coa "^2.0.2" - css-select "^2.0.0" - css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.37" - csso "^4.0.2" - js-yaml "^3.13.1" - mkdirp "~0.5.1" - object.values "^1.1.0" - sax "~1.2.4" - stable "^0.1.8" - unquote "~1.1.1" - util.promisify "~1.0.0" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tar-stream@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -tcp-port-used@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.1.tgz#46061078e2d38c73979a2c2c12b5a674e6689d70" - integrity sha512-rwi5xJeU6utXoEIiMvVBMc9eJ2/ofzB+7nLOdnZuFTmNCLqRiQh2sMG9MqCxHU/69VC/Fwp5dV9306Qd54ll1Q== - dependencies: - debug "4.1.0" - is2 "2.0.1" - -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - -tempfile@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265" - integrity sha1-awRGhWqbERTRhW/8vlCczLCXcmU= - dependencies: - temp-dir "^1.0.0" - uuid "^3.0.1" - -text-table@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through@^2.3.6, through@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -timed-out@^4.0.0, timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -timsort@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" - integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= - -tiny-emitter@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" - integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== - -tiny-lr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-1.1.1.tgz#9fa547412f238fedb068ee295af8b682c98b2aab" - integrity sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA== - dependencies: - body "^5.1.0" - debug "^3.1.0" - faye-websocket "~0.10.0" - livereload-js "^2.3.0" - object-assign "^4.1.0" - qs "^6.4.0" - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - -toml@^2.3.2: - version "2.3.6" - resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.6.tgz#25b0866483a9722474895559088b436fd11f861b" - integrity sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ== - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - -tree-node-cli@^1.2.5: - version "1.4.0" - resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.4.0.tgz#8f4028554610d6ee1cdeb98554a60841a3cfa3ac" - integrity sha512-hBc/cp7rTSHFSFvaTzmHNYyJv87UJBsxsfCoq2DtDQuMES4vhnLuvXZit/asGtZG8edWTCydWeFWoBz9LYkJdQ== - dependencies: - commander "^5.0.0" - -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= - -trim-repeated@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" - integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE= - dependencies: - escape-string-regexp "^1.0.2" - -truncate-html@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.3.tgz#0166dfc7890626130c2e4174c6b73d4d63993e5f" - integrity sha512-1o1prdRv+iehXcGwn29YgXU17DotHkr+OK3ijVEG7FGMwHNG9RyobXwimw6djDvbIc24rhmz3tjNNvNESjkNkQ== - dependencies: - "@types/cheerio" "^0.22.8" - cheerio "0.22.0" - -tslib@^1.9.0, tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -unbzip2-stream@^1.0.9: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-value-ecmascript@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" - integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" - integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unquote@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" - integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -uri-js@^4.2.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" - integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-parse@^1.4.3: - version "1.4.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" - integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util.promisify@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" - integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.2" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.0" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.0.1, uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -vendors@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" - integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -websocket-driver@>=0.5.1: - version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -which@^1.2.9, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= - -worker-rpc@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5" - integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg== - dependencies: - microevent.ts "~0.1.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -xml-js@^1.6.11: - version "1.6.11" - resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" - integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g== - dependencies: - sax "^1.2.4" - -xmlbuilder@^13.0.0: - version "13.0.2" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" - integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== - -xtend@^4.0.0, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yamljs@^0.2.1: - version "0.2.10" - resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.2.10.tgz#481cc7c25ca73af59f591f0c96e3ce56c757a40f" - integrity sha1-SBzHwlynOvWfWR8MluPOVsdXpA8= - dependencies: - argparse "^1.0.7" - glob "^7.0.5" - -yargs@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-2.3.0.tgz#e900c87250ec5cd080db6009fe3dd63156f1d7fb" - integrity sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s= - dependencies: - wordwrap "0.0.2" - -yauzl@^2.4.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" From e897797afd6b3ed2036aae87300587e616e95e94 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 28 Dec 2020 22:50:16 +0100 Subject: [PATCH 133/673] Update testcontainers-scala-oracle-xe to 0.38.8 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f0a4ea53f..144ee3320 100644 --- a/build.sbt +++ b/build.sbt @@ -182,7 +182,7 @@ lazy val oracle = project "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.oracle.database.jdbc" % "ojdbc8" % "19.9.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.7" % Test + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.8" % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From bdeeb409288e8134354c3b055b5df42aa82b1967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dejan=20Miji=C4=87?= Date: Tue, 29 Dec 2020 18:46:38 +0100 Subject: [PATCH 134/673] Migrate CI to Github actions --- .circleci/config.yml | 323 -------------------------- .github/CODEOWNERS | 3 +- .github/release-drafter.yml | 19 ++ .github/workflows/auto-approve.yml | 13 ++ .github/workflows/ci.yml | 90 +++++++ .github/workflows/clean.yml | 50 ++++ .github/workflows/mdoc.yml | 17 ++ .github/workflows/release-drafter.yml | 13 ++ README.md | 5 +- 9 files changed, 206 insertions(+), 327 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/auto-approve.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/clean.yml create mode 100644 .github/workflows/mdoc.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 08911a19a..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,323 +0,0 @@ -version: 2.1 - -scala_212: &scala_212 - SCALA_VERSION: 2.12.12 - -scala_213: &scala_213 - SCALA_VERSION: 2.13.3 - -scala_dotty: &scala_dotty - SCALA_VERSION: 0.27.0-RC1 - -jdk_8: &jdk_8 - JDK_VERSION: 8 - -jdk_11: &jdk_11 - JDK_VERSION: 11 - -machine_ubuntu: &machine_ubuntu - machine: - image: ubuntu-1604:201903-01 - -install_jdk: &install_jdk - - run: - name: Install JDK - command: | - while $(ps aux | grep -i ' apt ' | grep -v grep > /dev/null); do sleep 1; done # Wait for apt to be ready - - sudo rm /etc/apt/sources.list.d/* - sudo tee /etc/apt/sources.list > /dev/null \<< 'EOF' - deb http://mirror.math.princeton.edu/pub/ubuntu/ xenial main universe - deb http://mirror.math.princeton.edu/pub/ubuntu/ xenial-updates main universe - deb http://mirror.math.princeton.edu/pub/ubuntu/ xenial-backports main universe - deb http://mirror.math.princeton.edu/pub/ubuntu/ xenial-security main restricted universe - EOF - - if [ $JDK_VERSION == 11 ]; then - wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add - - sudo add-apt-repository https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ -y - fi - sudo apt update - if [ $JDK_VERSION == 11 ]; then - sudo apt install -y adoptopenjdk-11-hotspot - elif [ $JDK_VERSION == 8 ]; then - sudo apt install -y openjdk-8-jdk - fi - java -version - -load_cache: &load_cache - - restore_cache: - key: sbt-zio-sql-cache-v2 - -clean_cache: &clean_cache - - run: - name: Clean unwanted files from cache - command: | - rm -fv $HOME/.ivy2/.sbt.ivy.lock - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete - find $HOME/.sbt -name "*.lock" -print -delete - -save_cache: &save_cache - - save_cache: - key: sbt-zio-sql-cache-v2 - paths: - - "~/.ivy2/cache" - - "~/.sbt" - - "~/.m2" - - "~/.cache" - - "~/website/node_modules" - -install_yarn: &install_yarn - - run: - name: Install Yarn - command: | - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13 - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5DC22404A6F9F1CA - curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - sudo bash -c 'echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list' - sudo apt update && sudo apt install yarn -y - yarn policies set-version - yarn -v - -install_nodejs: &install_nodejs - - run: - name: Install node.js - command: | - export NVM_DIR="/opt/circleci/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm install - nvm use - node -v - -filter_tags: &filter_tags - tags: - only: /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/ - -compile: &compile - steps: - - checkout - - <<: *load_cache - - run: - name: Compile code - command: ./sbt ++${SCALA_VERSION}! compile - - <<: *save_cache - -lint: &lint - steps: - - checkout - - <<: *load_cache - - run: - name: Lint code - command: ./sbt ++${SCALA_VERSION}! check - - <<: *save_cache - -mdoc: &mdoc - steps: - - checkout - - <<: *load_cache - - run: - name: Generate documentation - command: | - ./sbt coreJVM/doc coreJS/doc jdbc/doc mysql/doc oracle/doc postgres/doc sqlserver/doc - ./sbt ++${SCALA_VERSION}! docs/mdoc - - <<: *save_cache - -test: &test - steps: - - checkout - - <<: *load_cache - - <<: *install_jdk - - run: - name: Run tests - command: ./sbt ++${SCALA_VERSION}! test - - <<: *save_cache - -release: &release - steps: - - checkout - - run: - name: Fetch git tags - command: git fetch --tags - - <<: *load_cache - - run: - name: Write sonatype credentials - command: echo "credentials += Credentials(\"Sonatype Nexus Repository Manager\", \"oss.sonatype.org\", \"${SONATYPE_USER}\", \"${SONATYPE_PASSWORD}\")" > ~/.sbt/1.0/sonatype.sbt - - run: - name: Write PGP public key - command: echo -n "${PGP_PUBLIC}" | base64 -di > /tmp/public.asc - - run: - name: Write PGP secret key - command: echo -n "${PGP_SECRET}" | base64 -di > /tmp/secret.asc - - run: - name: Release artifacts - command: | - mkdir -p $HOME/bin - sudo apt-get update && sudo apt-get -y install gnupg2 - echo pinentry-mode loopback >> ~/.gnupg/gpg.conf - echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf - chmod 600 ~/.gnupg/* - ln -s /usr/bin/gpg2 $HOME/bin/gpg - $HOME/bin/gpg --version - echo RELOADAGENT | gpg-connect-agent - echo $PGP_SECRET | base64 -di | gpg2 --import --no-tty --batch --yes - PATH=$HOME/bin:$PATH ./sbt ++${SCALA_VERSION}! clean ci-release - -microsite: µsite - steps: - - add_ssh_keys: - fingerprints: - - "11:2c:fa:98:69:d8:a1:d5:76:2e:38:d0:91:39:85:ce" - - checkout - - <<: *load_cache - - <<: *install_nodejs - - <<: *install_yarn - - run: - name: Publishing website - command: | - git config --global user.email "${GH_NAME}@users.noreply.github.com" - git config --global user.name "${GH_NAME}" - export GIT_USER=${GH_NAME} - export TRAVIS_BUILD_NUMBER="${CIRCLE_BUILD_NUM}" - export TRAVIS_COMMIT="${CIRCLE_SHA1}" - sudo chown -R $USER:$USER /tmp - export NVM_DIR="/opt/circleci/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm install - nvm use - node -v - ./sbt ++${SCALA_VERSION}! docs/docusaurusCreateSite - ./sbt ++${SCALA_VERSION}! docs/docusaurusPublishGhpages - - <<: *clean_cache - - <<: *save_cache - -jobs: - lint: - <<: *lint - <<: *machine_ubuntu - environment: - - <<: *scala_212 - - <<: *jdk_8 - - compile_dotty: - <<: *compile - <<: *machine_ubuntu - environment: - - <<: *scala_dotty - - <<: *jdk_8 - - mdoc: - <<: *mdoc - <<: *machine_ubuntu - environment: - - <<: *scala_212 - - <<: *jdk_8 - - test_212_jdk8_jvm: - <<: *test - <<: *machine_ubuntu - environment: - - <<: *scala_212 - - <<: *jdk_8 - - test_213_jdk8_jvm: - <<: *test - <<: *machine_ubuntu - environment: - - <<: *scala_213 - - <<: *jdk_8 - - test_dotty_jdk8_jvm: - <<: *test - <<: *machine_ubuntu - environment: - - <<: *scala_dotty - - <<: *jdk_8 - - test_212_jdk11_jvm: - <<: *test - <<: *machine_ubuntu - environment: - - <<: *scala_212 - - <<: *jdk_11 - - test_213_jdk11_jvm: - <<: *test - <<: *machine_ubuntu - environment: - - <<: *scala_213 - - <<: *jdk_11 - - test_dotty_jdk11_jvm: - <<: *test - <<: *machine_ubuntu - environment: - - <<: *scala_dotty - - <<: *jdk_11 - - release: - <<: *release - <<: *machine_ubuntu - environment: - - <<: *scala_213 - - <<: *jdk_8 - - microsite: - <<: *microsite - <<: *machine_ubuntu - environment: - - <<: *scala_212 - - <<: *jdk_8 - -workflows: - version: 2 - build: - jobs: - - lint: - filters: - <<: *filter_tags - - mdoc: - # requires: - # - lint - filters: - <<: *filter_tags - - test_212_jdk8_jvm: - # requires: - # - lint - filters: - <<: *filter_tags - - test_213_jdk8_jvm: - # requires: - # - lint - filters: - <<: *filter_tags - - test_212_jdk11_jvm: - # requires: - # - lint - filters: - <<: *filter_tags - - test_213_jdk11_jvm: - # requires: - # - lint - filters: - <<: *filter_tags - - release: - context: Sonatype2 - requires: - - test_212_jdk8_jvm - - test_212_jdk11_jvm - - test_213_jdk8_jvm - - test_213_jdk11_jvm - - mdoc - filters: - <<: *filter_tags - branches: - only: - - master - - microsite: - context: Website - requires: - - release - filters: - <<: *filter_tags - branches: - ignore: /.*/ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c130b6153..58eb3dda6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,5 @@ -.circleci/config.yml @softinio @mijicd +* @zio/zio-sql +.github/workflows/ @softinio @mijicd build.sbt @softinio @mijicd project/BuildHelper.scala @softinio @mijicd diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 000000000..7e2bf4460 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,19 @@ +name-template: 'v$NEXT_PATCH_VERSION' +tag-template: 'v$NEXT_PATCH_VERSION' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - title: '🐛 Bug Fixes' + labels: + - 'bug' + - title: '🧰 Maintenance' + labels: + - 'build' + - title: '🌱 Dependency Updates' + labels: + - 'dependency-update' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +template: | + ## Changes + $CHANGES diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml new file mode 100644 index 000000000..e5a14bd4e --- /dev/null +++ b/.github/workflows/auto-approve.yml @@ -0,0 +1,13 @@ +name: Auto approve + +on: + pull_request_target + +jobs: + auto-approve: + runs-on: ubuntu-20.04 + steps: + - uses: hmarr/auto-approve-action@v2.0.0 + if: github.actor == 'scala-steward' + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..a392c771d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,90 @@ +name: CI + +on: + pull_request: + branches: ['*'] + push: + branches: ['master'] + tags: ['v*'] + +jobs: + lint: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + steps: + - name: Checkout current branch + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: Setup Scala and Java + uses: olafurpg/setup-scala@v10 + - name: Cache scala dependencies + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.m2 + ~/.cache + key: sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: Lint code + run: sbt check + + test: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + java: ['adopt@1.8', 'adopt@1.11'] + scala: ['2.12.12', '2.13.3'] + steps: + - name: Checkout current branch + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: Setup Scala and Java + uses: olafurpg/setup-scala@v10 + with: + java-version: ${{ matrix.java }} + - name: Cache scala dependencies + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.m2 + ~/.cache + key: sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: Run tests + run: sbt ++${{ matrix.scala }}! test + + publish: + runs-on: ubuntu-20.04 + needs: [lint, test] + if: github.event_name != 'pull_request' + steps: + - name: Checkout current branch + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: Setup Scala and Java + uses: olafurpg/setup-scala@v10 + - name: Cache scala dependencies + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.m2 + ~/.cache + key: sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: Setup GPG + uses: olafurpg/setup-gpg@v3 + - name: Release artifacts + run: sbt ci-release + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml new file mode 100644 index 000000000..ce86ea609 --- /dev/null +++ b/.github/workflows/clean.yml @@ -0,0 +1,50 @@ +name: Clean + +on: push + +jobs: + delete-artifacts: + name: Delete artifacts + runs-on: ubuntu-20.04 + steps: + - name: Delete artifacts + run: | + # Customize those three lines with your repository and credentials: + REPO=${GITHUB_API_URL}/repos/${{ github.repository }} + + # A shortcut to call GitHub API. + ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } + + # A temporary file which receives HTTP response headers. + TMPFILE=/tmp/tmp.$$ + + # An associative array, key: artifact name, value: number of artifacts of that name. + declare -A ARTCOUNT + + # Process all artifacts on this repository, loop on returned "pages". + URL=$REPO/actions/artifacts + while [[ -n "$URL" ]]; do + + # Get current page, get response headers in a temporary file. + JSON=$(ghapi --dump-header $TMPFILE "$URL") + + # Get URL of next page. Will be empty if we are at the last page. + URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*.*//') + rm -f $TMPFILE + + # Number of artifacts on this page: + COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') )) + + # Loop on all artifacts on this page. + for ((i=0; $i < $COUNT; i++)); do + + # Get name of artifact and count instances of this name. + name=$(jq <<<$JSON -r ".artifacts[$i].name?") + ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1)) + + id=$(jq <<<$JSON -r ".artifacts[$i].id?") + size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") )) + printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size + ghapi -X DELETE $REPO/actions/artifacts/$id + done + done diff --git a/.github/workflows/mdoc.yml b/.github/workflows/mdoc.yml new file mode 100644 index 000000000..08925ef85 --- /dev/null +++ b/.github/workflows/mdoc.yml @@ -0,0 +1,17 @@ +name: Website + +on: + push: + branches: [master] + tags: ["*"] + +jobs: + publish: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: olafurpg/setup-scala@v10 + - uses: olafurpg/setup-gpg@v3 + - run: sbt docs/docusaurusPublishGhpages + env: + GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 000000000..58bddcebd --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,13 @@ +name: Release Drafter + +on: + push: + branches: ['master'] + +jobs: + update_release_draft: + runs-on: ubuntu-20.04 + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 6f591dbaf..24437ffab 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ | CI | Discord | | --- | --- | -| [![Build Status][badge-ci]][link-ci] | [![badge-discord]][link-discord] | +| ![CI][badge-ci] | [![badge-discord]][link-discord] | ## Current status: pre-0.1 (no release yet) @@ -53,9 +53,8 @@ For the JDBC module: ZIO SQL does not offer Language Integrated Queries (LINQ) or similar functionality. It is intended only as a data model for representing SQL queries and an accompanying lightweight JDBC-based executor. -[badge-ci]: https://circleci.com/gh/zio/zio-sql/tree/master.svg?style=svg +[badge-ci]: https://github.com/zio/zio-sql/workflows/CI/badge.svg [badge-discord]: https://img.shields.io/discord/629491597070827530?logo=discord "chat on discord" -[link-ci]: https://circleci.com/gh/zio/zio-sql/tree/master [link-discord]: https://discord.gg/2ccFBr4 "Discord" ## Setup From 30707b1f958f88c62826f537a6e16ec68bd5b28f Mon Sep 17 00:00:00 2001 From: Hugo Sousa Date: Sun, 3 Jan 2021 21:54:10 +0100 Subject: [PATCH 135/673] Revert rendering hack --- core/jvm/src/main/scala/zio/sql/expr.scala | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index a27c38699..efd47559d 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -112,11 +112,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def typeTagOf[A](expr: Expr[_, _, A]): TypeTag[A] = expr.asInstanceOf[InvariantExpr[_, _, A]].typeTag - implicit def literal[A](a: A)(implicit typeTag: TypeTag[A]): Expr[Features.Literal, Any, A] = - typeTag match { - case TypeTag.TString => Expr.Literal(s"'${a.toString}'").asInstanceOf[Expr[Features.Literal, Any, A]] - case _ => Expr.Literal(a) - } + implicit def literal[A: TypeTag](a: A): Expr[Features.Literal, Any, A] = Expr.Literal(a) def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { From 1223fdc13a2e78f74701060ecca502579c540652 Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Thu, 7 Jan 2021 14:02:00 +0000 Subject: [PATCH 136/673] ZManaged into spec --- .../test/scala/zio/sql/TestContainers.scala | 6 +- .../sql/postgresql/PostgresModuleTest2.scala | 256 ++++++++++++++++++ 2 files changed, 261 insertions(+), 1 deletion(-) create mode 100644 postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala diff --git a/postgres/src/test/scala/zio/sql/TestContainers.scala b/postgres/src/test/scala/zio/sql/TestContainers.scala index 067ef2922..9be975432 100644 --- a/postgres/src/test/scala/zio/sql/TestContainers.scala +++ b/postgres/src/test/scala/zio/sql/TestContainers.scala @@ -24,9 +24,13 @@ object TestContainer { a.withInitScript("shop_schema.sql") () } + println("----> c.start()") c.start() c } - }(container => effectBlocking(container.stop()).orDie).toLayer + } { container => + println("----> c.stop()") + effectBlocking(container.stop()).orDie + }.toLayer } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala new file mode 100644 index 000000000..83559e13d --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala @@ -0,0 +1,256 @@ +package zio.sql.postgresql + +import java.time.LocalDate +import java.util.UUID + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +import zio.sql.Jdbc +import java.util.Properties +import zio.sql.TestContainer +import zio.Has +import zio.ZLayer +import zio.blocking.Blocking +import zio.test.environment.TestEnvironment +import scala.language.postfixOps + +object PostgresModuleTest2 + extends DefaultRunnableSpec + with Jdbc + with /*PostgresRunnableSpec with */ ShopSchema + with PostgresModule { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + private lazy val executorLayer = { + println("!!! SETUP executorLayer") + val poolConfigLayer = TestContainer + .postgres("postgres:alpine:13") + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + + val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live + + (ZLayer.identity[ + Blocking + ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie + } + + import Customers._ + import Orders._ + + private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { + case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) + + val query = + select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (condition) + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + false, + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + + override def spec = suite("Postgres module")( + testM("Can select from single table") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("1983-01-05") + ), + Customer( + UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), + "Terrence", + "Noel", + LocalDate.parse("1999-11-02") + ), + Customer( + UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), + "Mila", + "Paterso", + LocalDate.parse("1990-11-16") + ), + Customer( + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + "Alana", + "Murray", + LocalDate.parse("1995-11-12") + ), + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select with property unary operator") { + customerSelectJoseAssertion(verified isNotTrue) + }, + testM("Can select from single table with limit, offset and order by") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select from joined tables (inner join)") { + val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) + + println(renderRead(query)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) + + val result = execute(query) + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select using like") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") + + println(renderRead(query)) + val expected = Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transactions is returning the last value") { + val query = select(customerId) from customers + + val result = execute( + ZTransaction.Select(query) *> ZTransaction.Select(query) + ) + val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction is failing") { + val query = select(customerId) from customers + + val result = execute( + ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) + ).mapError(_.getMessage) + + assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ).provideCustomLayerShared(TestEnvironment.live >+> executorLayer) + +} From 0bdd5ec09b837792b2a7e669cd42b30745e1c3ff Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Thu, 7 Jan 2021 15:41:24 +0000 Subject: [PATCH 137/673] Postgres specs using single docker container --- .../zio/sql/postgresql/FunctionDefSpec.scala | 14 +- .../sql/postgresql/JdbcExecutorLayer.scala | 29 ++ .../sql/postgresql/PostgresModuleTest.scala | 6 +- .../sql/postgresql/PostgresModuleTest2.scala | 256 ------------------ .../sql/postgresql/PostgresRunnableSpec.scala | 35 +-- .../PostgresRunnableSpecSeparateDB.scala | 12 + 6 files changed, 56 insertions(+), 296 deletions(-) create mode 100644 postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala delete mode 100644 postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala create mode 100644 postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index fb3447c67..294ea5a4a 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -10,6 +10,7 @@ import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.{ ignore, timeout } import zio.duration._ +import zio.test.environment.TestEnvironment object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { @@ -20,7 +21,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { private def collectAndCompare( expected: Seq[String], testResult: ZStream[FunctionDefSpec.ReadExecutor, Exception, String] - ): zio.ZIO[FunctionDefSpec.Environment, Any, TestResult] = { + ) = { val assertion = for { r <- testResult.runCollect } yield assert(r.toList)(equalTo(expected)) @@ -30,7 +31,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) - val spec = suite("Postgres FunctionDef")( + val spec = (suite("Postgres FunctionDef")( testM("concat_ws #1 - combine flat values") { import Expr._ @@ -988,10 +989,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) val roundTripQuery = select(createdString ++ createdTimestamp) from customers - val roundTripResults = execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { - case row => + val roundTripResults = + execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { case row => (row._1, ZonedDateTime.parse(row._1), row._2) - } + } val roundTripExpected = List( ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), @@ -1067,5 +1068,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } @@ ignore //todo fix - select(PgClientEncoding())? - ) @@ timeout(5.minutes) + ) @@ timeout(5.minutes)).provideCustomLayerShared(TestEnvironment.live >+> executorLayer) + } diff --git a/postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala b/postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala new file mode 100644 index 000000000..6b52c8856 --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala @@ -0,0 +1,29 @@ +package zio.sql.postgresql + +import java.util.Properties +import zio.sql.TestContainer +import zio.Has +import zio.ZLayer +import zio.blocking.Blocking +import zio.sql.Jdbc + +trait JdbcExecutorLayer { self: Jdbc => + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + lazy val executorLayer = { + val poolConfigLayer = TestContainer + .postgres("postgres:alpine:13") + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + + val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live + + (ZLayer.identity[ + Blocking + ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie + } +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index c56e45b4f..64eff0485 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -7,6 +7,7 @@ import zio.Cause import zio.test.Assertion._ import zio.test._ +import zio.test.environment.TestEnvironment import scala.language.postfixOps object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { @@ -45,7 +46,7 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } - val spec = suite("Postgres module")( + override def spec = suite("Postgres module")( testM("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) @@ -315,5 +316,6 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) // } - ) + ).provideCustomLayerShared(TestEnvironment.live >+> executorLayer) + } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala deleted file mode 100644 index 83559e13d..000000000 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest2.scala +++ /dev/null @@ -1,256 +0,0 @@ -package zio.sql.postgresql - -import java.time.LocalDate -import java.util.UUID - -import zio.Cause -import zio.test.Assertion._ -import zio.test._ - -import zio.sql.Jdbc -import java.util.Properties -import zio.sql.TestContainer -import zio.Has -import zio.ZLayer -import zio.blocking.Blocking -import zio.test.environment.TestEnvironment -import scala.language.postfixOps - -object PostgresModuleTest2 - extends DefaultRunnableSpec - with Jdbc - with /*PostgresRunnableSpec with */ ShopSchema - with PostgresModule { - - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - private lazy val executorLayer = { - println("!!! SETUP executorLayer") - val poolConfigLayer = TestContainer - .postgres("postgres:alpine:13") - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - - val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live - - (ZLayer.identity[ - Blocking - ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie - } - - import Customers._ - import Orders._ - - private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { - case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) - - val query = - select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (condition) - - println(renderRead(query)) - - val expected = - Seq( - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - false, - LocalDate.parse("1987-03-23") - ) - ) - - val testResult = execute(query) - .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4, row._5) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - - override def spec = suite("Postgres module")( - testM("Can select from single table") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = select(customerId ++ fName ++ lName ++ dob) from customers - - println(renderRead(query)) - - val expected = - Seq( - Customer( - UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), - "Ronald", - "Russell", - LocalDate.parse("1983-01-05") - ), - Customer( - UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), - "Terrence", - "Noel", - LocalDate.parse("1999-11-02") - ), - Customer( - UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), - "Mila", - "Paterso", - LocalDate.parse("1990-11-16") - ), - Customer( - UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), - "Alana", - "Murray", - LocalDate.parse("1995-11-12") - ), - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") - ) - ) - - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can select with property unary operator") { - customerSelectJoseAssertion(verified isNotTrue) - }, - testM("Can select from single table with limit, offset and order by") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) - - println(renderRead(query)) - - val expected = - Seq( - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") - ) - ) - - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) - - println(renderRead(query)) - - case class Row(firstName: String, lastName: String, orderDate: LocalDate) - - val expected = Seq( - Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) - ) - - val result = execute(query) - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - } - - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can select using like") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") - - println(renderRead(query)) - val expected = Seq( - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") - ) - ) - - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Transactions is returning the last value") { - val query = select(customerId) from customers - - val result = execute( - ZTransaction.Select(query) *> ZTransaction.Select(query) - ) - val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Transaction is failing") { - val query = select(customerId) from customers - - val result = execute( - ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) - ).mapError(_.getMessage) - - assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ).provideCustomLayerShared(TestEnvironment.live >+> executorLayer) - -} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index a6948d163..78b0aae4b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,35 +1,6 @@ package zio.sql.postgresql -import zio.{ Has, ZEnv, ZLayer } -import zio.blocking.Blocking -import zio.sql.TestContainer -import zio.test.environment.TestEnvironment +import zio.sql.Jdbc +import zio.test.DefaultRunnableSpec -import java.util.Properties -import zio.sql.JdbcRunnableSpec - -trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { - - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - private val executorLayer = { - val poolConfigLayer = TestContainer - .postgres("postgres:alpine:13") - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - - val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live - - (ZLayer.identity[ - Blocking - ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie - } - - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] = - TestEnvironment.live >+> executorLayer - -} +trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresModule with JdbcExecutorLayer diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala new file mode 100644 index 000000000..a197e7f1e --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala @@ -0,0 +1,12 @@ +package zio.sql.postgresql + +import zio.{ ZEnv, ZLayer } +import zio.test.environment.TestEnvironment +import zio.sql.JdbcRunnableSpec + +trait PostgresRunnableSpecSeparateDB extends JdbcRunnableSpec with PostgresModule with JdbcExecutorLayer { + + override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] = + TestEnvironment.live >+> executorLayer + +} From 37e2323d153d0984ab67e9d5e73a26b3181419bc Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 12:26:03 +0000 Subject: [PATCH 138/673] Common layer --- .../zio/sql/postgresql/FunctionDefSpec.scala | 1544 ++++++++--------- .../sql/postgresql/PostgresModuleTest.scala | 376 ++-- .../sql/postgresql/PostgresRunnableSpec.scala | 16 +- 3 files changed, 974 insertions(+), 962 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 294ea5a4a..c44b2f190 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -10,7 +10,6 @@ import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.{ ignore, timeout } import zio.duration._ -import zio.test.environment.TestEnvironment object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { @@ -31,1043 +30,1044 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) - val spec = (suite("Postgres FunctionDef")( - testM("concat_ws #1 - combine flat values") { - import Expr._ - - //note: a plain number (3) would and should not compile - val query = select(ConcatWs4("+", "1", "2", "3")) from customers - println(renderRead(query)) - - val expected = Seq( // note: one for each row - "1+2+3", - "1+2+3", - "1+2+3", - "1+2+3", - "1+2+3" - ) - - val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) - }, - testM("concat_ws #2 - combine columns") { - import Expr._ - - // note: you can't use customerId here as it is a UUID, hence not a string in our book - val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers - println(renderRead(query)) - - val expected = Seq( - "RonaldRonaldRussell", - "TerrenceTerrenceNoel", - "MilaMilaPaterso", - "AlanaAlanaMurray", - "JoseJoseWiggins" - ) - - val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) - }, - testM("concat_ws #3 - combine columns and flat values") { - import Expr._ - - val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers - println(renderRead(query)) - - val expected = Seq( - "Person: Ronald Russell", - "Person: Terrence Noel", - "Person: Mila Paterso", - "Person: Alana Murray", - "Person: Jose Wiggins" - ) - - val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) - }, - testM("concat_ws #3 - combine function calls together") { - import Expr._ - - val query = select( - ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) - ) from customers - println(renderRead(query)) - - val expected = Seq( - "Name: Ronald and Surname: Russell", - "Name: Terrence and Surname: Noel", - "Name: Mila and Surname: Paterso", - "Name: Alana and Surname: Murray", - "Name: Jose and Surname: Wiggins" - ) - - val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) - }, - testM("isfinite") { - val query = select(IsFinite(Instant.now)) from customers - - val expected: Boolean = true - - val testResult = execute(query).to[Boolean, Boolean](identity) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - suite("String functions")( - testM("CharLength") { - val query = select(Length("hello")) from customers - val expected = 5 - - val testResult = execute(query).to[Int, Int](identity) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + override def specLayered = ( + suite("Postgres FunctionDef")( + testM("concat_ws #1 - combine flat values") { + import Expr._ + + //note: a plain number (3) would and should not compile + val query = select(ConcatWs4("+", "1", "2", "3")) from customers + println(renderRead(query)) + + val expected = Seq( // note: one for each row + "1+2+3", + "1+2+3", + "1+2+3", + "1+2+3", + "1+2+3" + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) }, - testM("ltrim") { - val query = select(Ltrim(" hello ")) from customers - - val expected = "hello " + testM("concat_ws #2 - combine columns") { + import Expr._ + + // note: you can't use customerId here as it is a UUID, hence not a string in our book + val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers + println(renderRead(query)) + + val expected = Seq( + "RonaldRonaldRussell", + "TerrenceTerrenceNoel", + "MilaMilaPaterso", + "AlanaAlanaMurray", + "JoseJoseWiggins" + ) val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #3 - combine columns and flat values") { + import Expr._ + + val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers + println(renderRead(query)) + + val expected = Seq( + "Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" + ) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #3 - combine function calls together") { + import Expr._ + + val query = select( + ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) + ) from customers + println(renderRead(query)) + + val expected = Seq( + "Name: Ronald and Surname: Russell", + "Name: Terrence and Surname: Noel", + "Name: Mila and Surname: Paterso", + "Name: Alana and Surname: Murray", + "Name: Jose and Surname: Wiggins" + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) }, - testM("rtrim") { - val query = select(Rtrim(" hello ")) from customers + testM("isfinite") { + val query = select(IsFinite(Instant.now)) from customers - val expected = " hello" + val expected: Boolean = true - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query).to[Boolean, Boolean](identity) val assertion = for { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ), - testM("abs") { - val query = select(Abs(-3.14159)) from customers + }, + suite("String functions")( + testM("CharLength") { + val query = select(Length("hello")) from customers + val expected = 5 - val expected = 3.14159 + val testResult = execute(query).to[Int, Int](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ltrim") { + val query = select(Ltrim(" hello ")) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("log") { - val query = select(Log(2.0, 32.0)) from customers + val expected = "hello " - val expected: Double = 5 + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("rtrim") { + val query = select(Rtrim(" hello ")) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("acos") { - val query = select(Acos(-1.0)) from customers + val expected = " hello" - val expected = 3.141592653589793 + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ), + testM("abs") { + val query = select(Abs(-3.14159)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("repeat") { - val query = select(Repeat("Zio", 3)) from customers + val expected = 3.14159 - val expected = "ZioZioZio" + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("log") { + val query = select(Log(2.0, 32.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("asin") { - val query = select(Asin(0.5)) from customers + val expected: Double = 5 - val expected = 0.5235987755982989 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("acos") { + val query = select(Acos(-1.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("ln") { - val query = select(Ln(3.0)) from customers + val expected = 3.141592653589793 - val expected = 1.0986122886681097 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("repeat") { + val query = select(Repeat("Zio", 3)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("atan") { - val query = select(Atan(10.0)) from customers + val expected = "ZioZioZio" - val expected = 1.4711276743037347 + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("asin") { + val query = select(Asin(0.5)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("reverse") { - val query = select(Reverse("abcd")) from customers + val expected = 0.5235987755982989 - val expected = "dcba" + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ln") { + val query = select(Ln(3.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("cos") { - val query = select(Cos(3.141592653589793)) from customers + val expected = 1.0986122886681097 - val expected = -1.0 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("atan") { + val query = select(Atan(10.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("exp") { - val query = select(Exp(1.0)) from customers + val expected = 1.4711276743037347 - val expected = 2.718281828459045 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("reverse") { + val query = select(Reverse("abcd")) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("floor") { - val query = select(Floor(-3.14159)) from customers + val expected = "dcba" - val expected = -4.0 + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cos") { + val query = select(Cos(3.141592653589793)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("ceil") { - val query = select(Ceil(53.7) ++ Ceil(-53.7)) from customers + val expected = -1.0 - val expected = (54.0, -53.0) + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double, (Double, Double)]((a, b) => (a, b)) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("exp") { + val query = select(Exp(1.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sin") { - val query = select(Sin(1.0)) from customers + val expected = 2.718281828459045 - val expected = 0.8414709848078965 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("floor") { + val query = select(Floor(-3.14159)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sind") { - val query = select(Sind(30.0)) from customers + val expected = -4.0 - val expected = 0.5 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ceil") { + val query = select(Ceil(53.7) ++ Ceil(-53.7)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("timeofday") { - val query = select(TimeOfDay()) from customers + val expected = (54.0, -53.0) - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query).to[Double, Double, (Double, Double)]((a, b) => (a, b)) - val assertion = - for { + val assertion = for { r <- testResult.runCollect - } yield assert(r.head)( - matchesRegex( - "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3}" - ) - ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtime") { - val query = select(Localtime) from customers + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[LocalTime, LocalTime](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sin") { + val query = select(Sin(1.0)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{3}")) + val expected = 0.8414709848078965 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtime with precision") { - val precision = 0 - val query = select(LocaltimeWithPrecision(precision)) from customers + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[LocalTime, LocalTime](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex(s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}")) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sind") { + val query = select(Sind(30.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtimestamp") { - val query = select(Localtimestamp) from customers + val expected = 0.5 - val testResult = execute(query).to[Instant, Instant](identity) + val testResult = execute(query).to[Double, Double](identity) - val assertion = - for { + val assertion = for { r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) + } yield assert(r.head)(equalTo(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtimestamp with precision") { - val precision = 2 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("timeofday") { + val query = select(TimeOfDay()) from customers + + val testResult = execute(query).to[String, String](identity) - val query = select(LocaltimestampWithPrecision(precision)) from customers + val assertion = + for { + r <- testResult.runCollect + } yield assert(r.head)( + matchesRegex( + "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3}" + ) + ) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtime") { + val query = select(Localtime) from customers - val testResult = execute(query).to[Instant, Instant](identity) + val testResult = execute(query).to[LocalTime, LocalTime](identity) - val assertion = - for { + val assertion = for { r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") - ) + } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{3}")) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("now") { - val query = select(Now()) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtime with precision") { + val precision = 0 + val query = select(LocaltimeWithPrecision(precision)) from customers - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val testResult = execute(query).to[LocalTime, LocalTime](identity) - val assertion = - for { + val assertion = for { r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) + } yield assert(r.head.toString)(Assertion.matchesRegex(s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}")) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("statement_timestamp") { - val query = select(StatementTimestamp()) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtimestamp") { + val query = select(Localtimestamp) from customers - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val testResult = execute(query).to[Instant, Instant](identity) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("transaction_timestamp") { - val query = select(TransactionTimestamp()) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtimestamp with precision") { + val precision = 2 - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val query = select(LocaltimestampWithPrecision(precision)) from customers - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) + val testResult = execute(query).to[Instant, Instant](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("current_time") { - val query = select(CurrentTime) from customers + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") + ) - val testResult = execute(query).to[OffsetTime, OffsetTime](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("now") { + val query = select(Now()) from customers - val assertion = - for { - r <- testResult.runCollect - } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( - matchesRegex( - "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") ) - ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("md5") { - val query = select(Md5("hello, world!")) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("statement_timestamp") { + val query = select(StatementTimestamp()) from customers + + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) - val expected = "3adbbad1791fbae3ec908894c4963870" + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("transaction_timestamp") { + val query = select(TransactionTimestamp()) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - suite("parseIdent")( - testM("parseIdent removes quoting of individual identifiers") { - val someString: Gen[ZioRandom with Sized, String] = Gen.anyString - .filter(x => x.length < 50 && x.length > 1) - //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it - val genTestString: Gen[ZioRandom with Sized, String] = + val assertion = for { - string1 <- someString - string2 <- someString - } yield s""""${string1}".${string2}""" + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) - val assertion = checkM(genTestString) { (testString) => - val query = select(ParseIdent(testString)) from customers - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("current_time") { + val query = select(CurrentTime) from customers + + val testResult = execute(query).to[OffsetTime, OffsetTime](identity) + val assertion = for { r <- testResult.runCollect - } yield assert(r.head)(not(containsString("'")) && not(containsString("\""))) + } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( + matchesRegex( + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" + ) + ) - } assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("parseIdent fails with invalid identifier") { - val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) from customers + testM("md5") { + val query = select(Md5("hello, world!")) from customers + + val expected = "3adbbad1791fbae3ec908894c4963870" + val testResult = execute(query).to[String, String](identity) val assertion = for { - r <- testResult.runCollect.run - } yield assert(r)(fails(anything)) + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ) @@ ignore, - testM("sqrt") { - val query = select(Sqrt(121.0)) from customers + }, + suite("parseIdent")( + testM("parseIdent removes quoting of individual identifiers") { + val someString: Gen[ZioRandom with Sized, String] = Gen.anyString + .filter(x => x.length < 50 && x.length > 1) + //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it + val genTestString: Gen[ZioRandom with Sized, String] = + for { + string1 <- someString + string2 <- someString + } yield s""""${string1}".${string2}""" + + val assertion = checkM(genTestString) { (testString) => + val query = select(ParseIdent(testString)) from customers + val testResult = execute(query).to[String, String](identity) + + for { + r <- testResult.runCollect + } yield assert(r.head)(not(containsString("'")) && not(containsString("\""))) + + } + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("parseIdent fails with invalid identifier") { + val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) from customers + val testResult = execute(query).to[String, String](identity) - val expected = 11.0 + val assertion = for { + r <- testResult.runCollect.run + } yield assert(r)(fails(anything)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) @@ ignore, + testM("sqrt") { + val query = select(Sqrt(121.0)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 11.0 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("chr") { - val query = select(Chr(65)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = "A" + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("chr") { + val query = select(Chr(65)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = "A" - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("current_date") { - val query = select(CurrentDate) from customers + val testResult = execute(query).to[String, String](identity) - val expected = LocalDate.now() + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[LocalDate, LocalDate](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("current_date") { + val query = select(CurrentDate) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = LocalDate.now() - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("initcap") { - val query = select(Initcap("hi THOMAS")) from customers + val testResult = execute(query).to[LocalDate, LocalDate](identity) - val expected = "Hi Thomas" + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("initcap") { + val query = select(Initcap("hi THOMAS")) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = "Hi Thomas" - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("trim_scale") { - val query = select(TrimScale(8.4100)) from customers + val testResult = execute(query).to[String, String](identity) - val expected = 8.41 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("trim_scale") { + val query = select(TrimScale(8.4100)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 8.41 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("hex") { - val query = select(Hex(2147483647)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = "7fffffff" + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("hex") { + val query = select(Hex(2147483647)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = "7fffffff" - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("trunc") { - val query = select(Trunc(42.8)) from customers + val testResult = execute(query).to[String, String](identity) - val expected = 42d + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("trunc") { + val query = select(Trunc(42.8)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 42d - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("round") { - val query = select(Round(10.8124, 2)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = 10.81 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("round") { + val query = select(Round(10.8124, 2)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 10.81 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sign positive") { - val query = select(Sign(3.0)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = 1 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Int, Int](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sign positive") { + val query = select(Sign(3.0)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 1 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sign negative") { - val query = select(Sign(-3.0)) from customers + val testResult = execute(query).to[Int, Int](identity) - val expected = -1 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Int, Int](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sign negative") { + val query = select(Sign(-3.0)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = -1 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sign zero") { - val query = select(Sign(0.0)) from customers + val testResult = execute(query).to[Int, Int](identity) - val expected = 0 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Int, Int](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sign zero") { + val query = select(Sign(0.0)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 0 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("power") { - val query = select(Power(7.0, 3.0)) from customers + val testResult = execute(query).to[Int, Int](identity) - val expected = 343.000000000000000 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("power") { + val query = select(Power(7.0, 3.0)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 343.000000000000000 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("length") { - val query = select(Length("hello")) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = 5 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Int, Int](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("length") { + val query = select(Length("hello")) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 5 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("mod") { - val query = select(Mod(-15.0, -4.0)) from customers + val testResult = execute(query).to[Int, Int](identity) - val expected = -3.0 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("mod") { + val query = select(Mod(-15.0, -4.0)) from customers + + val expected = -3.0 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("translate") { - val query = select(Translate("12345", "143", "ax")) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = "a2x5" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("translate") { + val query = select(Translate("12345", "143", "ax")) from customers - val testResult = execute(query).to[String, String](identity) + val expected = "a2x5" - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("left") { - val query = select(Left("abcde", 2)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = "ab" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("left") { + val query = select(Left("abcde", 2)) from customers - val testResult = execute(query).to[String, String](identity) + val expected = "ab" - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("right") { - val query = select(Right("abcde", 2)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = "de" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("right") { + val query = select(Right("abcde", 2)) from customers - val testResult = execute(query).to[String, String](identity) + val expected = "de" - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("radians") { - val query = select(Radians(45.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 0.7853981634 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("radians") { + val query = select(Radians(45.0)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 0.7853981634 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(approximatelyEquals(expected, 10.0)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("min_scale") { - val query = select(MinScale(8.4100)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(approximatelyEquals(expected, 10.0)) - val expected = 2 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("min_scale") { + val query = select(MinScale(8.4100)) from customers - val testResult = execute(query).to[Int, Int](identity) + val expected = 2 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Int, Int](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("starts_with") { - case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val query = - (select(customerId ++ fName ++ lName ++ verified ++ dob) from customers).where(StartsWith(fName, "R")) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("starts_with") { + case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) + + val query = + (select(customerId ++ fName ++ lName ++ verified ++ dob) from customers).where(StartsWith(fName, "R")) + + val expected = + Seq( + Customer( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + true, + LocalDate.parse("1983-01-05") + ) + ) - val expected = - Seq( - Customer( - UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), - "Ronald", - "Russell", - true, - LocalDate.parse("1983-01-05") + val testResult = execute(query) + .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => + Customer(id, fname, lname, verified, dob) ) - ) - val testResult = execute(query) - .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => - Customer(id, fname, lname, verified, dob) - ) + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("lower") { + val query = select(Lower(fName)) from customers limit (1) + + val expected = "ronald" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("octet_length") { + val query = select(OctetLength("josé")) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val expected = 5 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("lower") { - val query = select(Lower(fName)) from customers limit (1) + val testResult = execute(query).to[Int, Int](identity) - val expected = "ronald" + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ascii") { + val query = select(Ascii("""x""")) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 120 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("octet_length") { - val query = select(OctetLength("josé")) from customers + val testResult = execute(query).to[Int, Int](identity) - val expected = 5 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Int, Int](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("upper") { + val query = (select(Upper("ronald")) from customers).limit(1) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = "RONALD" - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("ascii") { - val query = select(Ascii("""x""")) from customers + val testResult = execute(query).to[String, String](identity) - val expected = 120 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Int, Int](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("width_bucket") { + val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 3 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("upper") { - val query = (select(Upper("ronald")) from customers).limit(1) + val testResult = execute(query).to[Int, Int](identity) - val expected = "RONALD" + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("tan") { + val query = select(Tan(0.7853981634)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 1.0000000000051035 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("width_bucket") { - val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = 3 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Int, Int](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("gcd") { + val query = select(GCD(1071d, 462d)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 21d - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("tan") { - val query = select(Tan(0.7853981634)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = 1.0000000000051035 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("lcm") { + val query = select(LCM(1071d, 462d)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 23562d - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("gcd") { - val query = select(GCD(1071d, 462d)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = 21d + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cbrt") { + val query = select(CBRT(64.0)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val expected = 4d - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("lcm") { - val query = select(LCM(1071d, 462d)) from customers + val testResult = execute(query).to[Double, Double](identity) - val expected = 23562d + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("degrees") { + val query = select(Degrees(0.5)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 28.64788975654116 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("cbrt") { - val query = select(CBRT(64.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 4d + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("div") { + val query = select(Div(8d, 4d)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 2d - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("degrees") { - val query = select(Degrees(0.5)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 28.64788975654116 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("factorial") { + val query = select(Factorial(5)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 120 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Int, Int](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("div") { - val query = select(Div(8d, 4d)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 2d + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("random") { + val query = select(Random()) from customers - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query).to[Double, Double](identity) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("factorial") { - val query = select(Factorial(5)) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } @@ ignore, //todo fix need custom rendering? + testM("Can concat strings with concat function") { - val expected = 120 + val query = select(Concat(fName, lName) as "fullname") from customers - val testResult = execute(query).to[Int, Int](identity) + val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val result = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("random") { - val query = select(Random()) from customers + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can calculate character length of a string") { - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) + val query = select(CharLength(fName)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ ignore, //todo fix need custom rendering? - testM("Can concat strings with concat function") { + val expected = Seq(6, 8, 4, 5, 4) - val query = select(Concat(fName, lName) as "fullname") from customers + val result = execute(query).to[Int, Int](identity) - val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElements(expected)) - val result = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("to_timestamp") { + val query = select(ToTimestamp(1284352323L)) from customers + val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + + val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) + val roundTripQuery = + select(createdString ++ createdTimestamp) from customers + val roundTripResults = + execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { case row => + (row._1, ZonedDateTime.parse(row._1), row._2) + } + val roundTripExpected = List( + ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), + ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), + ("2020-11-22T02:10:25+07:00", ZonedDateTime.parse("2020-11-22T02:10:25+07:00"), expectedRoundTripTimestamp), + ("2020-11-21T12:10:25-07:00", ZonedDateTime.parse("2020-11-21T12:10:25-07:00"), expectedRoundTripTimestamp) + ) - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val assertion = for { + single <- testResult.runCollect + roundTrip <- roundTripResults.runCollect + } yield assert(single.head)(equalTo(expected)) && + assert(roundTrip)(hasSameElementsDistinct(roundTripExpected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can calculate character length of a string") { + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("replace") { + val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" + val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" - val query = select(CharLength(fName)) from customers + val query = select(lastNameReplaced ++ computedReplace) from customers - val expected = Seq(6, 8, 4, 5, 4) + val expected = ("Russe_", "special ::__::") - val result = execute(query).to[Int, Int](identity) + val testResult = + execute(query).to[String, String, (String, String)] { case row => + (row._1, row._2) + } - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElements(expected)) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("to_timestamp") { - val query = select(ToTimestamp(1284352323L)) from customers - val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("lpad") { + def runTest(s: String, pad: String) = { + val query = select(LPad(s, 5, pad)) from customers - val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) - val roundTripQuery = - select(createdString ++ createdTimestamp) from customers - val roundTripResults = - execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { case row => - (row._1, ZonedDateTime.parse(row._1), row._2) + for { + r <- execute(query).to[String, String](identity).runCollect + } yield r.head } - val roundTripExpected = List( - ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), - ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), - ("2020-11-22T02:10:25+07:00", ZonedDateTime.parse("2020-11-22T02:10:25+07:00"), expectedRoundTripTimestamp), - ("2020-11-21T12:10:25-07:00", ZonedDateTime.parse("2020-11-21T12:10:25-07:00"), expectedRoundTripTimestamp) - ) - - val assertion = for { - single <- testResult.runCollect - roundTrip <- roundTripResults.runCollect - } yield assert(single.head)(equalTo(expected)) && - assert(roundTrip)(hasSameElementsDistinct(roundTripExpected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("replace") { - val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" - val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" - - val query = select(lastNameReplaced ++ computedReplace) from customers - - val expected = ("Russe_", "special ::__::") - - val testResult = - execute(query).to[String, String, (String, String)] { case row => - (row._1, row._2) + + (for { + t1 <- assertM(runTest("hi", "xy"))(equalTo("xyxhi")) + t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("rpad") { + def runTest(s: String, pad: String) = { + val query = select(RPad(s, 5, pad)) from customers + + for { + r <- execute(query).to[String, String](identity).runCollect + } yield r.head } - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("lpad") { - def runTest(s: String, pad: String) = { - val query = select(LPad(s, 5, pad)) from customers - - for { - r <- execute(query).to[String, String](identity).runCollect - } yield r.head - } - - (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("xyxhi")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) - } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("rpad") { - def runTest(s: String, pad: String) = { - val query = select(RPad(s, 5, pad)) from customers - - for { - r <- execute(query).to[String, String](identity).runCollect - } yield r.head - } - - (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("hixyx")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) - } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("pg_client_encoding") { - val query = select(PgClientEncoding()) from customers - - val testResult = execute(query).to[String, String](identity) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo("UTF8")) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ ignore //todo fix - select(PgClientEncoding())? - ) @@ timeout(5.minutes)).provideCustomLayerShared(TestEnvironment.live >+> executorLayer) + (for { + t1 <- assertM(runTest("hi", "xy"))(equalTo("hixyx")) + t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("pg_client_encoding") { + val query = select(PgClientEncoding()) from customers + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo("UTF8")) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } @@ ignore //todo fix - select(PgClientEncoding())? + ) @@ timeout(5.minutes) + ) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index 64eff0485..cc2617cc6 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -7,7 +7,6 @@ import zio.Cause import zio.test.Assertion._ import zio.test._ -import zio.test.environment.TestEnvironment import scala.language.postfixOps object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { @@ -46,64 +45,65 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } - override def spec = suite("Postgres module")( - testM("Can select from single table") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = select(customerId ++ fName ++ lName ++ dob) from customers - - println(renderRead(query)) - - val expected = - Seq( - Customer( - UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), - "Ronald", - "Russell", - LocalDate.parse("1983-01-05") - ), - Customer( - UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), - "Terrence", - "Noel", - LocalDate.parse("1999-11-02") - ), - Customer( - UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), - "Mila", - "Paterso", - LocalDate.parse("1990-11-16") - ), - Customer( - UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), - "Alana", - "Murray", - LocalDate.parse("1995-11-12") - ), - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") + override def specLayered = + suite("Postgres module")( + testM("Can select from single table") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("1983-01-05") + ), + Customer( + UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), + "Terrence", + "Noel", + LocalDate.parse("1999-11-02") + ), + Customer( + UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), + "Mila", + "Paterso", + LocalDate.parse("1990-11-16") + ), + Customer( + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + "Alana", + "Murray", + LocalDate.parse("1995-11-12") + ), + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) ) - ) // execute(query ++ query ++ query ++ query) - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can select with property unary operator") { - customerSelectJoseAssertion(verified isNotTrue) - }, + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select with property unary operator") { + customerSelectJoseAssertion(verified isNotTrue) + }, // TODO: uncomment when #311 (rendering literals) will be fixed // testM("Can select with property binary operator with UUID") { // customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) @@ -158,164 +158,164 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { // // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) // }, - testM("Can select from single table with limit, offset and order by") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + testM("Can select from single table with limit, offset and order by") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) + val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) - println(renderRead(query)) + println(renderRead(query)) - val expected = - Seq( - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") + val expected = + Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) ) - ) - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - /* - * This is a failing test for aggregation function. - * Uncomment it when aggregation function handling is fixed. - */ - // testM("Can count rows") { - // val query = select { Count(userId) } from users - - // val expected = 5L - - // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) - - // for { - // r <- result.runCollect - // } yield assert(r.head)(equalTo(expected)) - // }, - testM("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) - - println(renderRead(query)) - - case class Row(firstName: String, lastName: String, orderDate: LocalDate) - - val expected = Seq( - Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) - ) + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + /* + * This is a failing test for aggregation function. + * Uncomment it when aggregation function handling is fixed. + */ + // testM("Can count rows") { + // val query = select { Count(userId) } from users + + // val expected = 5L + + // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) + + // for { + // r <- result.runCollect + // } yield assert(r.head)(equalTo(expected)) + // }, + testM("Can select from joined tables (inner join)") { + val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) + + println(renderRead(query)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) - val result = execute(query) - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - } + val result = execute(query) + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can select using like") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select using like") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") + val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") - println(renderRead(query)) - val expected = Seq( - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") + println(renderRead(query)) + val expected = Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) ) - ) - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Transactions is returning the last value") { - val query = select(customerId) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transactions is returning the last value") { + val query = select(customerId) from customers - val result = execute( - ZTransaction.Select(query) *> ZTransaction.Select(query) - ) - val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie + val result = execute( + ZTransaction.Select(query) *> ZTransaction.Select(query) + ) + val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Transaction is failing") { - val query = select(customerId) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction is failing") { + val query = select(customerId) from customers - val result = execute( - ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) - ).mapError(_.getMessage) + val result = execute( + ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) + ).mapError(_.getMessage) - assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet - // val query = deleteFrom(customers) - // println(renderDelete(query)) + assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet + // val query = deleteFrom(customers) + // println(renderDelete(query)) - // val result = execute(query) + // val result = execute(query) - // val assertion = for { - // r <- result - // } yield assert(r)(equalTo(5)) + // val assertion = for { + // r <- result + // } yield assert(r)(equalTo(5)) - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // }, - // testM("Can delete from single table with a condition") { - // val query = deleteFrom(customers) where (verified isNotTrue) - // println(renderDelete(query)) + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // }, + // testM("Can delete from single table with a condition") { + // val query = deleteFrom(customers) where (verified isNotTrue) + // println(renderDelete(query)) - // val result = execute(query) + // val result = execute(query) - // val assertion = for { - // r <- result - // } yield assert(r)(equalTo(1)) + // val assertion = for { + // r <- result + // } yield assert(r)(equalTo(1)) - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // } - ).provideCustomLayerShared(TestEnvironment.live >+> executorLayer) + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // } + ) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 78b0aae4b..44953aed3 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,6 +1,18 @@ package zio.sql.postgresql import zio.sql.Jdbc -import zio.test.DefaultRunnableSpec +import zio.test._ +import zio.test.environment.TestEnvironment +import zio.Has -trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresModule with JdbcExecutorLayer +trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresModule with JdbcExecutorLayer { + + private val layer = TestEnvironment.live >+> executorLayer + + override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) + + def specLayered: Spec[TestEnvironment with Has[TransactionExecutor.Service] with Has[ + ReadExecutor.Service + ], TestFailure[Object], TestSuccess] + +} From c91fe7ed39a9337da15a0b3dfc3d3e2c914ff81b Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 12:47:30 +0000 Subject: [PATCH 139/673] Use types --- .../test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 44953aed3..78223f7eb 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -3,7 +3,6 @@ package zio.sql.postgresql import zio.sql.Jdbc import zio.test._ import zio.test.environment.TestEnvironment -import zio.Has trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresModule with JdbcExecutorLayer { @@ -11,8 +10,6 @@ trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresMo override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) - def specLayered: Spec[TestEnvironment with Has[TransactionExecutor.Service] with Has[ - ReadExecutor.Service - ], TestFailure[Object], TestSuccess] + def specLayered: Spec[TestEnvironment with TransactionExecutor with ReadExecutor, TestFailure[Object], TestSuccess] } From b6d85d11440b2c3c98bea23c4285fc02480ee639 Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 12:49:48 +0000 Subject: [PATCH 140/673] Remove printlns --- postgres/src/test/scala/zio/sql/TestContainers.scala | 2 -- 1 file changed, 2 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/TestContainers.scala b/postgres/src/test/scala/zio/sql/TestContainers.scala index 9be975432..ac10346db 100644 --- a/postgres/src/test/scala/zio/sql/TestContainers.scala +++ b/postgres/src/test/scala/zio/sql/TestContainers.scala @@ -24,12 +24,10 @@ object TestContainer { a.withInitScript("shop_schema.sql") () } - println("----> c.start()") c.start() c } } { container => - println("----> c.stop()") effectBlocking(container.stop()).orDie }.toLayer From 6a7ec9bcf5ee97f28581b7783f465839e07fb9dc Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 13:05:07 +0000 Subject: [PATCH 141/673] Simplified --- .../sql/postgresql/JdbcExecutorLayer.scala | 29 ------------------- .../sql/postgresql/PostgresRunnableSpec.scala | 28 ++++++++++++++++-- .../PostgresRunnableSpecSeparateDB.scala | 12 -------- 3 files changed, 26 insertions(+), 43 deletions(-) delete mode 100644 postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala delete mode 100644 postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala diff --git a/postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala b/postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala deleted file mode 100644 index 6b52c8856..000000000 --- a/postgres/src/test/scala/zio/sql/postgresql/JdbcExecutorLayer.scala +++ /dev/null @@ -1,29 +0,0 @@ -package zio.sql.postgresql - -import java.util.Properties -import zio.sql.TestContainer -import zio.Has -import zio.ZLayer -import zio.blocking.Blocking -import zio.sql.Jdbc - -trait JdbcExecutorLayer { self: Jdbc => - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - lazy val executorLayer = { - val poolConfigLayer = TestContainer - .postgres("postgres:alpine:13") - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - - val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live - - (ZLayer.identity[ - Blocking - ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie - } -} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 78223f7eb..44015d2b5 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,10 +1,34 @@ package zio.sql.postgresql -import zio.sql.Jdbc import zio.test._ import zio.test.environment.TestEnvironment +import java.util.Properties +import zio.sql.TestContainer +import zio.Has +import zio.ZLayer +import zio.blocking.Blocking +import zio.sql.Jdbc + +trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresModule { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + lazy val executorLayer = { + val poolConfigLayer = TestContainer + .postgres("postgres:alpine:13") + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + + val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live -trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresModule with JdbcExecutorLayer { + (ZLayer.identity[ + Blocking + ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie + } private val layer = TestEnvironment.live >+> executorLayer diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala deleted file mode 100644 index a197e7f1e..000000000 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpecSeparateDB.scala +++ /dev/null @@ -1,12 +0,0 @@ -package zio.sql.postgresql - -import zio.{ ZEnv, ZLayer } -import zio.test.environment.TestEnvironment -import zio.sql.JdbcRunnableSpec - -trait PostgresRunnableSpecSeparateDB extends JdbcRunnableSpec with PostgresModule with JdbcExecutorLayer { - - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] = - TestEnvironment.live >+> executorLayer - -} From 59196beba6971ce5068a215d7528878c01555b4a Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 13:10:12 +0000 Subject: [PATCH 142/673] mysql --- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 2 +- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 2 +- .../scala/zio/sql/mysql/MysqlRunnableSpec.scala | 15 +++++++++------ .../zio/sql/postgresql/PostgresRunnableSpec.scala | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 7c3f51538..e7b80b007 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -9,7 +9,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ import FunctionDef._ - val spec = suite("Mysql FunctionDef")( + override def specLayered = suite("Mysql FunctionDef")( testM("lower") { val query = select(Lower("first_name")) from customers limit (1) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 63888743d..4ab2f57d5 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -13,7 +13,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { import this.Customers._ import this.Orders._ - val spec = suite("Mysql module")( + override def specLayered = suite("Mysql module")( testM("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 03d25b4b3..b0812de5d 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -2,13 +2,13 @@ package zio.sql.mysql import java.util.Properties -import zio.{ Has, ZEnv, ZLayer } +import zio._ import zio.blocking.Blocking -import zio.sql.JdbcRunnableSpec -import zio.sql.TestContainer +import zio.sql._ import zio.test.environment.TestEnvironment +import zio.test._ -trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { +trait MysqlRunnableSpec extends DefaultRunnableSpec with Jdbc with MysqlModule { private def connProperties(user: String, password: String): Properties = { val props = new Properties @@ -29,7 +29,10 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie } - override val jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] = - TestEnvironment.live >+> executorLayer + private val layer = TestEnvironment.live >+> executorLayer + + override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) + + def specLayered: Spec[TestEnvironment with TransactionExecutor with ReadExecutor, TestFailure[Object], TestSuccess] } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 44015d2b5..68d5f597c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -34,6 +34,7 @@ trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresMo override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) + //TODO use object Environment from jdbcrunnable def specLayered: Spec[TestEnvironment with TransactionExecutor with ReadExecutor, TestFailure[Object], TestSuccess] } From 3e6e4d835bd8e36c075a4a49457772ebb59934b4 Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 13:16:37 +0000 Subject: [PATCH 143/673] default postgres image name --- postgres/src/test/scala/zio/sql/TestContainers.scala | 6 ++++-- .../scala/zio/sql/postgresql/PostgresRunnableSpec.scala | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/TestContainers.scala b/postgres/src/test/scala/zio/sql/TestContainers.scala index ac10346db..36081cf1d 100644 --- a/postgres/src/test/scala/zio/sql/TestContainers.scala +++ b/postgres/src/test/scala/zio/sql/TestContainers.scala @@ -15,11 +15,13 @@ object TestContainer { } }(container => effectBlocking(container.stop()).orDie).toLayer - def postgres(imageName: String): ZLayer[Blocking, Throwable, Has[PostgreSQLContainer]] = + def postgres( + imageName: Option[String] = Some("postgres:alpine:13") + ): ZLayer[Blocking, Throwable, Has[PostgreSQLContainer]] = ZManaged.make { effectBlocking { val c = new PostgreSQLContainer( - dockerImageNameOverride = Some(imageName) + dockerImageNameOverride = imageName ).configure { a => a.withInitScript("shop_schema.sql") () diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 68d5f597c..b31f31fec 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -20,7 +20,7 @@ trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresMo lazy val executorLayer = { val poolConfigLayer = TestContainer - .postgres("postgres:alpine:13") + .postgres() .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live From 9653d3a5be493c5c8cfc308cb675d6cb8032b921 Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 13:22:23 +0000 Subject: [PATCH 144/673] Use jdbcRunnableSpec --- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 17 +++-------------- .../scala/zio/sql/mysql/MysqlRunnableSpec.scala | 4 ++-- .../sql/postgresql/PostgresRunnableSpec.scala | 7 +++---- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index a4fd15771..bba87ae2c 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -1,25 +1,14 @@ package zio.sql -import zio.{ ZEnv, ZLayer } -import zio.duration._ -import zio.test._ import zio.test.environment.TestEnvironment +import zio.test.DefaultRunnableSpec -trait JdbcRunnableSpec extends AbstractRunnableSpec with Jdbc { +trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { - override type Environment = TestEnvironment + type JdbcEnvironment = TestEnvironment with ReadExecutor with UpdateExecutor with DeleteExecutor with TransactionExecutor - override type Failure = Any - - override def aspects: List[TestAspect[Nothing, TestEnvironment, Nothing, Any]] = - List(TestAspect.timeoutWarning(60.seconds)) - - def jdbcTestEnvironment: ZLayer[ZEnv, Nothing, Environment] - - override def runner: TestRunner[Environment, Any] = - TestRunner(TestExecutor.default(ZEnv.live >>> jdbcTestEnvironment)) } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index b0812de5d..c70ddabb9 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -8,7 +8,7 @@ import zio.sql._ import zio.test.environment.TestEnvironment import zio.test._ -trait MysqlRunnableSpec extends DefaultRunnableSpec with Jdbc with MysqlModule { +trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { private def connProperties(user: String, password: String): Properties = { val props = new Properties @@ -33,6 +33,6 @@ trait MysqlRunnableSpec extends DefaultRunnableSpec with Jdbc with MysqlModule { override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) - def specLayered: Spec[TestEnvironment with TransactionExecutor with ReadExecutor, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index b31f31fec..bffcd7325 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -7,9 +7,9 @@ import zio.sql.TestContainer import zio.Has import zio.ZLayer import zio.blocking.Blocking -import zio.sql.Jdbc +import zio.sql.JdbcRunnableSpec -trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresModule { +trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { private def connProperties(user: String, password: String): Properties = { val props = new Properties @@ -34,7 +34,6 @@ trait PostgresRunnableSpec extends DefaultRunnableSpec with Jdbc with PostgresMo override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) - //TODO use object Environment from jdbcrunnable - def specLayered: Spec[TestEnvironment with TransactionExecutor with ReadExecutor, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] } From 0f1a72f8371d0266a441ad563d67be87c4b9313e Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 13:36:51 +0000 Subject: [PATCH 145/673] Common code in jdbc runnable --- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 14 +++++++++++++ .../zio/sql/mysql/MysqlRunnableSpec.scala | 20 +++++------------- .../sql/postgresql/PostgresRunnableSpec.scala | 21 +++++-------------- 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index bba87ae2c..5feb2677f 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -2,6 +2,9 @@ package zio.sql import zio.test.environment.TestEnvironment import zio.test.DefaultRunnableSpec +import zio.ZLayer +import zio.blocking.Blocking +import zio.Has trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { @@ -11,4 +14,15 @@ trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { with DeleteExecutor with TransactionExecutor + val poolConfigLayer: ZLayer[Blocking, Throwable, Has[ConnectionPool.Config]] + + final lazy val executorLayer = { + val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live + + (ZLayer.identity[ + Blocking + ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie + } + + final lazy val jdbcLayer = TestEnvironment.live >+> executorLayer } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index c70ddabb9..b2bb5c071 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -3,7 +3,6 @@ package zio.sql.mysql import java.util.Properties import zio._ -import zio.blocking.Blocking import zio.sql._ import zio.test.environment.TestEnvironment import zio.test._ @@ -17,21 +16,12 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { props } - private val executorLayer = { - val poolConfigLayer = TestContainer - .mysql() - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + val poolConfigLayer = TestContainer + .mysql() + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - val connectionPoolLayer = Blocking.live >+> poolConfigLayer >>> ConnectionPool.live - - (ZLayer.identity[ - Blocking - ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie - } - - private val layer = TestEnvironment.live >+> executorLayer - - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) + override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + specLayered.provideCustomLayerShared(jdbcLayer) def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index bffcd7325..3f655f8e6 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -5,8 +5,6 @@ import zio.test.environment.TestEnvironment import java.util.Properties import zio.sql.TestContainer import zio.Has -import zio.ZLayer -import zio.blocking.Blocking import zio.sql.JdbcRunnableSpec trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { @@ -18,21 +16,12 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { props } - lazy val executorLayer = { - val poolConfigLayer = TestContainer - .postgres() - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + val poolConfigLayer = TestContainer + .postgres() + .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) - val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live - - (ZLayer.identity[ - Blocking - ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie - } - - private val layer = TestEnvironment.live >+> executorLayer - - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(layer) + override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + specLayered.provideCustomLayerShared(jdbcLayer) def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] From f71b0ec2931b17aa21af1b1f4ea1650c976b4419 Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 14:24:33 +0000 Subject: [PATCH 146/673] Less changes --- .../zio/sql/postgresql/FunctionDefSpec.scala | 1536 ++++++++--------- 1 file changed, 767 insertions(+), 769 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index c44b2f190..69791d8c2 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -30,1044 +30,1042 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) - override def specLayered = ( - suite("Postgres FunctionDef")( - testM("concat_ws #1 - combine flat values") { - import Expr._ - - //note: a plain number (3) would and should not compile - val query = select(ConcatWs4("+", "1", "2", "3")) from customers - println(renderRead(query)) - - val expected = Seq( // note: one for each row - "1+2+3", - "1+2+3", - "1+2+3", - "1+2+3", - "1+2+3" - ) + override def specLayered = suite("Postgres FunctionDef")( + testM("concat_ws #1 - combine flat values") { + import Expr._ + + //note: a plain number (3) would and should not compile + val query = select(ConcatWs4("+", "1", "2", "3")) from customers + println(renderRead(query)) + + val expected = Seq( // note: one for each row + "1+2+3", + "1+2+3", + "1+2+3", + "1+2+3", + "1+2+3" + ) + + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #2 - combine columns") { + import Expr._ + + // note: you can't use customerId here as it is a UUID, hence not a string in our book + val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers + println(renderRead(query)) + + val expected = Seq( + "RonaldRonaldRussell", + "TerrenceTerrenceNoel", + "MilaMilaPaterso", + "AlanaAlanaMurray", + "JoseJoseWiggins" + ) + + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #3 - combine columns and flat values") { + import Expr._ + + val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers + println(renderRead(query)) + + val expected = Seq( + "Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" + ) + + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("concat_ws #3 - combine function calls together") { + import Expr._ + + val query = select( + ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) + ) from customers + println(renderRead(query)) + + val expected = Seq( + "Name: Ronald and Surname: Russell", + "Name: Terrence and Surname: Noel", + "Name: Mila and Surname: Paterso", + "Name: Alana and Surname: Murray", + "Name: Jose and Surname: Wiggins" + ) + + val testResult = execute(query).to[String, String](identity) + collectAndCompare(expected, testResult) + }, + testM("isfinite") { + val query = select(IsFinite(Instant.now)) from customers + + val expected: Boolean = true + + val testResult = execute(query).to[Boolean, Boolean](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + suite("String functions")( + testM("CharLength") { + val query = select(Length("hello")) from customers + val expected = 5 - val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) - }, - testM("concat_ws #2 - combine columns") { - import Expr._ - - // note: you can't use customerId here as it is a UUID, hence not a string in our book - val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers - println(renderRead(query)) - - val expected = Seq( - "RonaldRonaldRussell", - "TerrenceTerrenceNoel", - "MilaMilaPaterso", - "AlanaAlanaMurray", - "JoseJoseWiggins" - ) + val testResult = execute(query).to[Int, Int](identity) - val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) - }, - testM("concat_ws #3 - combine columns and flat values") { - import Expr._ - - val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers - println(renderRead(query)) - - val expected = Seq( - "Person: Ronald Russell", - "Person: Terrence Noel", - "Person: Mila Paterso", - "Person: Alana Murray", - "Person: Jose Wiggins" - ) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("concat_ws #3 - combine function calls together") { - import Expr._ - - val query = select( - ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) - ) from customers - println(renderRead(query)) - - val expected = Seq( - "Name: Ronald and Surname: Russell", - "Name: Terrence and Surname: Noel", - "Name: Mila and Surname: Paterso", - "Name: Alana and Surname: Murray", - "Name: Jose and Surname: Wiggins" - ) + testM("ltrim") { + val query = select(Ltrim(" hello ")) from customers + + val expected = "hello " val testResult = execute(query).to[String, String](identity) - collectAndCompare(expected, testResult) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("isfinite") { - val query = select(IsFinite(Instant.now)) from customers + testM("rtrim") { + val query = select(Rtrim(" hello ")) from customers - val expected: Boolean = true + val expected = " hello" - val testResult = execute(query).to[Boolean, Boolean](identity) + val testResult = execute(query).to[String, String](identity) val assertion = for { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - suite("String functions")( - testM("CharLength") { - val query = select(Length("hello")) from customers - val expected = 5 + } + ), + testM("abs") { + val query = select(Abs(-3.14159)) from customers - val testResult = execute(query).to[Int, Int](identity) + val expected = 3.14159 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("ltrim") { - val query = select(Ltrim(" hello ")) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = "hello " + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("log") { + val query = select(Log(2.0, 32.0)) from customers - val testResult = execute(query).to[String, String](identity) + val expected: Double = 5 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("rtrim") { - val query = select(Rtrim(" hello ")) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = " hello" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("acos") { + val query = select(Acos(-1.0)) from customers - val testResult = execute(query).to[String, String](identity) + val expected = 3.141592653589793 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ), - testM("abs") { - val query = select(Abs(-3.14159)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 3.14159 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("repeat") { + val query = select(Repeat("Zio", 3)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = "ZioZioZio" - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("log") { - val query = select(Log(2.0, 32.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected: Double = 5 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("asin") { + val query = select(Asin(0.5)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 0.5235987755982989 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("acos") { - val query = select(Acos(-1.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 3.141592653589793 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ln") { + val query = select(Ln(3.0)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 1.0986122886681097 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("repeat") { - val query = select(Repeat("Zio", 3)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = "ZioZioZio" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("atan") { + val query = select(Atan(10.0)) from customers - val testResult = execute(query).to[String, String](identity) + val expected = 1.4711276743037347 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("asin") { - val query = select(Asin(0.5)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 0.5235987755982989 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("reverse") { + val query = select(Reverse("abcd")) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = "dcba" - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("ln") { - val query = select(Ln(3.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 1.0986122886681097 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cos") { + val query = select(Cos(3.141592653589793)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = -1.0 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("atan") { - val query = select(Atan(10.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 1.4711276743037347 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("exp") { + val query = select(Exp(1.0)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 2.718281828459045 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("reverse") { - val query = select(Reverse("abcd")) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = "dcba" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("floor") { + val query = select(Floor(-3.14159)) from customers - val testResult = execute(query).to[String, String](identity) + val expected = -4.0 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("cos") { - val query = select(Cos(3.141592653589793)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = -1.0 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ceil") { + val query = select(Ceil(53.7) ++ Ceil(-53.7)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = (54.0, -53.0) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double, (Double, Double)]((a, b) => (a, b)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("exp") { - val query = select(Exp(1.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 2.718281828459045 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sin") { + val query = select(Sin(1.0)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 0.8414709848078965 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("floor") { - val query = select(Floor(-3.14159)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = -4.0 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sind") { + val query = select(Sind(30.0)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 0.5 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("ceil") { - val query = select(Ceil(53.7) ++ Ceil(-53.7)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = (54.0, -53.0) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("timeofday") { + val query = select(TimeOfDay()) from customers - val testResult = execute(query).to[Double, Double, (Double, Double)]((a, b) => (a, b)) + val testResult = execute(query).to[String, String](identity) - val assertion = for { + val assertion = + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + } yield assert(r.head)( + matchesRegex( + "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3}" + ) + ) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtime") { + val query = select(Localtime) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sin") { - val query = select(Sin(1.0)) from customers + val testResult = execute(query).to[LocalTime, LocalTime](identity) - val expected = 0.8414709848078965 + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{3}")) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtime with precision") { + val precision = 0 + val query = select(LocaltimeWithPrecision(precision)) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[LocalTime, LocalTime](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sind") { - val query = select(Sind(30.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head.toString)(Assertion.matchesRegex(s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}")) - val expected = 0.5 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtimestamp") { + val query = select(Localtimestamp) from customers - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query).to[Instant, Instant](identity) - val assertion = for { + val assertion = + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("timeofday") { - val query = select(TimeOfDay()) from customers + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) - val testResult = execute(query).to[String, String](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("localtimestamp with precision") { + val precision = 2 - val assertion = - for { - r <- testResult.runCollect - } yield assert(r.head)( - matchesRegex( - "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3}" - ) - ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtime") { - val query = select(Localtime) from customers + val query = select(LocaltimestampWithPrecision(precision)) from customers - val testResult = execute(query).to[LocalTime, LocalTime](identity) + val testResult = execute(query).to[Instant, Instant](identity) - val assertion = for { + val assertion = + for { r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{3}")) + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtime with precision") { - val precision = 0 - val query = select(LocaltimeWithPrecision(precision)) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("now") { + val query = select(Now()) from customers - val testResult = execute(query).to[LocalTime, LocalTime](identity) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) - val assertion = for { + val assertion = + for { r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex(s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}")) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtimestamp") { - val query = select(Localtimestamp) from customers + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) - val testResult = execute(query).to[Instant, Instant](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("statement_timestamp") { + val query = select(StatementTimestamp()) from customers - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("localtimestamp with precision") { - val precision = 2 + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) - val query = select(LocaltimestampWithPrecision(precision)) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("transaction_timestamp") { + val query = select(TransactionTimestamp()) from customers - val testResult = execute(query).to[Instant, Instant](identity) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") - ) + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("now") { - val query = select(Now()) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("current_time") { + val query = select(CurrentTime) from customers - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val testResult = execute(query).to[OffsetTime, OffsetTime](identity) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + val assertion = + for { + r <- testResult.runCollect + } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( + matchesRegex( + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" ) + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("statement_timestamp") { - val query = select(StatementTimestamp()) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("md5") { + val query = select(Md5("hello, world!")) from customers - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val expected = "3adbbad1791fbae3ec908894c4963870" - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("transaction_timestamp") { - val query = select(TransactionTimestamp()) from customers + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + suite("parseIdent")( + testM("parseIdent removes quoting of individual identifiers") { + val someString: Gen[ZioRandom with Sized, String] = Gen.anyString + .filter(x => x.length < 50 && x.length > 1) + //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it + val genTestString: Gen[ZioRandom with Sized, String] = for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) + string1 <- someString + string2 <- someString + } yield s""""${string1}".${string2}""" - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("current_time") { - val query = select(CurrentTime) from customers - - val testResult = execute(query).to[OffsetTime, OffsetTime](identity) + val assertion = checkM(genTestString) { (testString) => + val query = select(ParseIdent(testString)) from customers + val testResult = execute(query).to[String, String](identity) - val assertion = for { r <- testResult.runCollect - } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( - matchesRegex( - "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" - ) - ) + } yield assert(r.head)(not(containsString("'")) && not(containsString("\""))) + } assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("md5") { - val query = select(Md5("hello, world!")) from customers - - val expected = "3adbbad1791fbae3ec908894c4963870" - + testM("parseIdent fails with invalid identifier") { + val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) from customers val testResult = execute(query).to[String, String](identity) val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + r <- testResult.runCollect.run + } yield assert(r)(fails(anything)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - suite("parseIdent")( - testM("parseIdent removes quoting of individual identifiers") { - val someString: Gen[ZioRandom with Sized, String] = Gen.anyString - .filter(x => x.length < 50 && x.length > 1) - //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it - val genTestString: Gen[ZioRandom with Sized, String] = - for { - string1 <- someString - string2 <- someString - } yield s""""${string1}".${string2}""" - - val assertion = checkM(genTestString) { (testString) => - val query = select(ParseIdent(testString)) from customers - val testResult = execute(query).to[String, String](identity) - - for { - r <- testResult.runCollect - } yield assert(r.head)(not(containsString("'")) && not(containsString("\""))) - - } - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("parseIdent fails with invalid identifier") { - val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) from customers - val testResult = execute(query).to[String, String](identity) + } + ) @@ ignore, + testM("sqrt") { + val query = select(Sqrt(121.0)) from customers - val assertion = for { - r <- testResult.runCollect.run - } yield assert(r)(fails(anything)) + val expected = 11.0 - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ) @@ ignore, - testM("sqrt") { - val query = select(Sqrt(121.0)) from customers - - val expected = 11.0 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("chr") { + val query = select(Chr(65)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("chr") { - val query = select(Chr(65)) from customers + val expected = "A" - val expected = "A" + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("current_date") { + val query = select(CurrentDate) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("current_date") { - val query = select(CurrentDate) from customers + val expected = LocalDate.now() - val expected = LocalDate.now() + val testResult = execute(query).to[LocalDate, LocalDate](identity) - val testResult = execute(query).to[LocalDate, LocalDate](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("initcap") { + val query = select(Initcap("hi THOMAS")) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("initcap") { - val query = select(Initcap("hi THOMAS")) from customers + val expected = "Hi Thomas" - val expected = "Hi Thomas" + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("trim_scale") { + val query = select(TrimScale(8.4100)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("trim_scale") { - val query = select(TrimScale(8.4100)) from customers + val expected = 8.41 - val expected = 8.41 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("hex") { + val query = select(Hex(2147483647)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("hex") { - val query = select(Hex(2147483647)) from customers + val expected = "7fffffff" - val expected = "7fffffff" + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("trunc") { + val query = select(Trunc(42.8)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("trunc") { - val query = select(Trunc(42.8)) from customers + val expected = 42d - val expected = 42d + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("round") { + val query = select(Round(10.8124, 2)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("round") { - val query = select(Round(10.8124, 2)) from customers + val expected = 10.81 - val expected = 10.81 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sign positive") { + val query = select(Sign(3.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sign positive") { - val query = select(Sign(3.0)) from customers + val expected = 1 - val expected = 1 + val testResult = execute(query).to[Int, Int](identity) - val testResult = execute(query).to[Int, Int](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sign negative") { + val query = select(Sign(-3.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sign negative") { - val query = select(Sign(-3.0)) from customers + val expected = -1 - val expected = -1 + val testResult = execute(query).to[Int, Int](identity) - val testResult = execute(query).to[Int, Int](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("sign zero") { + val query = select(Sign(0.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("sign zero") { - val query = select(Sign(0.0)) from customers + val expected = 0 - val expected = 0 + val testResult = execute(query).to[Int, Int](identity) - val testResult = execute(query).to[Int, Int](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("power") { + val query = select(Power(7.0, 3.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("power") { - val query = select(Power(7.0, 3.0)) from customers + val expected = 343.000000000000000 - val expected = 343.000000000000000 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("length") { + val query = select(Length("hello")) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("length") { - val query = select(Length("hello")) from customers + val expected = 5 - val expected = 5 + val testResult = execute(query).to[Int, Int](identity) - val testResult = execute(query).to[Int, Int](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("mod") { + val query = select(Mod(-15.0, -4.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("mod") { - val query = select(Mod(-15.0, -4.0)) from customers + val expected = -3.0 - val expected = -3.0 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("translate") { + val query = select(Translate("12345", "143", "ax")) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("translate") { - val query = select(Translate("12345", "143", "ax")) from customers + val expected = "a2x5" - val expected = "a2x5" + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("left") { + val query = select(Left("abcde", 2)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("left") { - val query = select(Left("abcde", 2)) from customers + val expected = "ab" - val expected = "ab" + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("right") { + val query = select(Right("abcde", 2)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("right") { - val query = select(Right("abcde", 2)) from customers + val expected = "de" - val expected = "de" + val testResult = execute(query).to[String, String](identity) - val testResult = execute(query).to[String, String](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("radians") { + val query = select(Radians(45.0)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("radians") { - val query = select(Radians(45.0)) from customers + val expected = 0.7853981634 - val expected = 0.7853981634 + val testResult = execute(query).to[Double, Double](identity) - val testResult = execute(query).to[Double, Double](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(approximatelyEquals(expected, 10.0)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(approximatelyEquals(expected, 10.0)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("min_scale") { + val query = select(MinScale(8.4100)) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("min_scale") { - val query = select(MinScale(8.4100)) from customers + val expected = 2 - val expected = 2 + val testResult = execute(query).to[Int, Int](identity) - val testResult = execute(query).to[Int, Int](identity) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("starts_with") { + case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("starts_with") { - case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) - - val query = - (select(customerId ++ fName ++ lName ++ verified ++ dob) from customers).where(StartsWith(fName, "R")) - - val expected = - Seq( - Customer( - UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), - "Ronald", - "Russell", - true, - LocalDate.parse("1983-01-05") - ) - ) + val query = + (select(customerId ++ fName ++ lName ++ verified ++ dob) from customers).where(StartsWith(fName, "R")) - val testResult = execute(query) - .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => - Customer(id, fname, lname, verified, dob) + val expected = + Seq( + Customer( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + true, + LocalDate.parse("1983-01-05") ) + ) - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val testResult = execute(query) + .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => + Customer(id, fname, lname, verified, dob) + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("lower") { - val query = select(Lower(fName)) from customers limit (1) + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - val expected = "ronald" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("lower") { + val query = select(Lower(fName)) from customers limit (1) - val testResult = execute(query).to[String, String](identity) + val expected = "ronald" - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("octet_length") { - val query = select(OctetLength("josé")) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 5 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("octet_length") { + val query = select(OctetLength("josé")) from customers - val testResult = execute(query).to[Int, Int](identity) + val expected = 5 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Int, Int](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("ascii") { - val query = select(Ascii("""x""")) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 120 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("ascii") { + val query = select(Ascii("""x""")) from customers - val testResult = execute(query).to[Int, Int](identity) + val expected = 120 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Int, Int](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("upper") { - val query = (select(Upper("ronald")) from customers).limit(1) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = "RONALD" + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("upper") { + val query = (select(Upper("ronald")) from customers).limit(1) - val testResult = execute(query).to[String, String](identity) + val expected = "RONALD" - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("width_bucket") { - val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 3 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("width_bucket") { + val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) from customers - val testResult = execute(query).to[Int, Int](identity) + val expected = 3 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Int, Int](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("tan") { - val query = select(Tan(0.7853981634)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 1.0000000000051035 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("tan") { + val query = select(Tan(0.7853981634)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 1.0000000000051035 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("gcd") { - val query = select(GCD(1071d, 462d)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 21d + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("gcd") { + val query = select(GCD(1071d, 462d)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 21d - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("lcm") { - val query = select(LCM(1071d, 462d)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 23562d + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("lcm") { + val query = select(LCM(1071d, 462d)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 23562d - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("cbrt") { - val query = select(CBRT(64.0)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 4d + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cbrt") { + val query = select(CBRT(64.0)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 4d - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("degrees") { - val query = select(Degrees(0.5)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 28.64788975654116 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("degrees") { + val query = select(Degrees(0.5)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 28.64788975654116 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("div") { - val query = select(Div(8d, 4d)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 2d + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("div") { + val query = select(Div(8d, 4d)) from customers - val testResult = execute(query).to[Double, Double](identity) + val expected = 2d - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("factorial") { - val query = select(Factorial(5)) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val expected = 120 + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("factorial") { + val query = select(Factorial(5)) from customers - val testResult = execute(query).to[Int, Int](identity) + val expected = 120 - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val testResult = execute(query).to[Int, Int](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("random") { - val query = select(Random()) from customers + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - val testResult = execute(query).to[Double, Double](identity) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("random") { + val query = select(Random()) from customers - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) + val testResult = execute(query).to[Double, Double](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ ignore, //todo fix need custom rendering? - testM("Can concat strings with concat function") { + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) - val query = select(Concat(fName, lName) as "fullname") from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } @@ ignore, //todo fix need custom rendering? + testM("Can concat strings with concat function") { - val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") + val query = select(Concat(fName, lName) as "fullname") from customers - val result = execute(query).to[String, String](identity) + val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val result = execute(query).to[String, String](identity) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can calculate character length of a string") { - - val query = select(CharLength(fName)) from customers - - val expected = Seq(6, 8, 4, 5, 4) + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - val result = execute(query).to[Int, Int](identity) - - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElements(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can calculate character length of a string") { - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("to_timestamp") { - val query = select(ToTimestamp(1284352323L)) from customers - val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) - - val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) - val roundTripQuery = - select(createdString ++ createdTimestamp) from customers - val roundTripResults = - execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { case row => - (row._1, ZonedDateTime.parse(row._1), row._2) - } - val roundTripExpected = List( - ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), - ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), - ("2020-11-22T02:10:25+07:00", ZonedDateTime.parse("2020-11-22T02:10:25+07:00"), expectedRoundTripTimestamp), - ("2020-11-21T12:10:25-07:00", ZonedDateTime.parse("2020-11-21T12:10:25-07:00"), expectedRoundTripTimestamp) - ) + val query = select(CharLength(fName)) from customers - val assertion = for { - single <- testResult.runCollect - roundTrip <- roundTripResults.runCollect - } yield assert(single.head)(equalTo(expected)) && - assert(roundTrip)(hasSameElementsDistinct(roundTripExpected)) + val expected = Seq(6, 8, 4, 5, 4) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("replace") { - val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" - val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" + val result = execute(query).to[Int, Int](identity) - val query = select(lastNameReplaced ++ computedReplace) from customers + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElements(expected)) - val expected = ("Russe_", "special ::__::") + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("to_timestamp") { + val query = select(ToTimestamp(1284352323L)) from customers + val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) + val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) - val testResult = - execute(query).to[String, String, (String, String)] { case row => - (row._1, row._2) - } + val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) + val roundTripQuery = + select(createdString ++ createdTimestamp) from customers + val roundTripResults = execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { + case row => + (row._1, ZonedDateTime.parse(row._1), row._2) + } + val roundTripExpected = List( + ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), + ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), + ("2020-11-22T02:10:25+07:00", ZonedDateTime.parse("2020-11-22T02:10:25+07:00"), expectedRoundTripTimestamp), + ("2020-11-21T12:10:25-07:00", ZonedDateTime.parse("2020-11-21T12:10:25-07:00"), expectedRoundTripTimestamp) + ) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val assertion = for { + single <- testResult.runCollect + roundTrip <- roundTripResults.runCollect + } yield assert(single.head)(equalTo(expected)) && + assert(roundTrip)(hasSameElementsDistinct(roundTripExpected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("lpad") { - def runTest(s: String, pad: String) = { - val query = select(LPad(s, 5, pad)) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("replace") { + val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" + val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" - for { - r <- execute(query).to[String, String](identity).runCollect - } yield r.head - } + val query = select(lastNameReplaced ++ computedReplace) from customers - (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("xyxhi")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) - } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("rpad") { - def runTest(s: String, pad: String) = { - val query = select(RPad(s, 5, pad)) from customers + val expected = ("Russe_", "special ::__::") - for { - r <- execute(query).to[String, String](identity).runCollect - } yield r.head + val testResult = + execute(query).to[String, String, (String, String)] { case row => + (row._1, row._2) } - (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("hixyx")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) - } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("pg_client_encoding") { - val query = select(PgClientEncoding()) from customers - - val testResult = execute(query).to[String, String](identity) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo("UTF8")) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ ignore //todo fix - select(PgClientEncoding())? - ) @@ timeout(5.minutes) - ) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("lpad") { + def runTest(s: String, pad: String) = { + val query = select(LPad(s, 5, pad)) from customers + + for { + r <- execute(query).to[String, String](identity).runCollect + } yield r.head + } + + (for { + t1 <- assertM(runTest("hi", "xy"))(equalTo("xyxhi")) + t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("rpad") { + def runTest(s: String, pad: String) = { + val query = select(RPad(s, 5, pad)) from customers + + for { + r <- execute(query).to[String, String](identity).runCollect + } yield r.head + } + + (for { + t1 <- assertM(runTest("hi", "xy"))(equalTo("hixyx")) + t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("pg_client_encoding") { + val query = select(PgClientEncoding()) from customers + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo("UTF8")) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } @@ ignore //todo fix - select(PgClientEncoding())? + ) @@ timeout(5.minutes) } From 02f56245389f21a43ed230d288601d82f1888cde Mon Sep 17 00:00:00 2001 From: Maciej Bak Date: Fri, 8 Jan 2021 14:35:50 +0000 Subject: [PATCH 147/673] Code style --- .../sql/postgresql/PostgresModuleTest.scala | 374 +++++++++--------- 1 file changed, 186 insertions(+), 188 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala index cc2617cc6..2048d659c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala @@ -45,65 +45,64 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } - override def specLayered = - suite("Postgres module")( - testM("Can select from single table") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = select(customerId ++ fName ++ lName ++ dob) from customers - - println(renderRead(query)) - - val expected = - Seq( - Customer( - UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), - "Ronald", - "Russell", - LocalDate.parse("1983-01-05") - ), - Customer( - UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), - "Terrence", - "Noel", - LocalDate.parse("1999-11-02") - ), - Customer( - UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), - "Mila", - "Paterso", - LocalDate.parse("1990-11-16") - ), - Customer( - UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), - "Alana", - "Murray", - LocalDate.parse("1995-11-12") - ), - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") - ) + override def specLayered = suite("Postgres module")( + testM("Can select from single table") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob) from customers + + println(renderRead(query)) + + val expected = + Seq( + Customer( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("1983-01-05") + ), + Customer( + UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), + "Terrence", + "Noel", + LocalDate.parse("1999-11-02") + ), + Customer( + UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), + "Mila", + "Paterso", + LocalDate.parse("1990-11-16") + ), + Customer( + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + "Alana", + "Murray", + LocalDate.parse("1995-11-12") + ), + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") ) + ) // execute(query ++ query ++ query ++ query) - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can select with property unary operator") { - customerSelectJoseAssertion(verified isNotTrue) - }, + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select with property unary operator") { + customerSelectJoseAssertion(verified isNotTrue) + }, // TODO: uncomment when #311 (rendering literals) will be fixed // testM("Can select with property binary operator with UUID") { // customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) @@ -158,102 +157,15 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { // // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) // }, - testM("Can select from single table with limit, offset and order by") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) + testM("Can select from single table with limit, offset and order by") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - println(renderRead(query)) - - val expected = - Seq( - Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") - ) - ) - - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - /* - * This is a failing test for aggregation function. - * Uncomment it when aggregation function handling is fixed. - */ - // testM("Can count rows") { - // val query = select { Count(userId) } from users - - // val expected = 5L - - // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) - - // for { - // r <- result.runCollect - // } yield assert(r.head)(equalTo(expected)) - // }, - testM("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) - - println(renderRead(query)) - - case class Row(firstName: String, lastName: String, orderDate: LocalDate) - - val expected = Seq( - Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) - ) + val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) - val result = execute(query) - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - } + println(renderRead(query)) - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Can select using like") { - case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - - val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") - - println(renderRead(query)) - val expected = Seq( + val expected = + Seq( Customer( UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), "Jose", @@ -262,60 +174,146 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + /* + * This is a failing test for aggregation function. + * Uncomment it when aggregation function handling is fixed. + */ + // testM("Can count rows") { + // val query = select { Count(userId) } from users + + // val expected = 5L + + // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) + + // for { + // r <- result.runCollect + // } yield assert(r.head)(equalTo(expected)) + // }, + testM("Can select from joined tables (inner join)") { + val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) + + println(renderRead(query)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) + + val result = execute(query) + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } - val assertion = for { - r <- testResult.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Transactions is returning the last value") { - val query = select(customerId) from customers + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Can select using like") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val result = execute( - ZTransaction.Select(query) *> ZTransaction.Select(query) + val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") + + println(renderRead(query)) + val expected = Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") ) - val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie + ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("Transaction is failing") { - val query = select(customerId) from customers + val testResult = execute(query) + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } - val result = execute( - ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) - ).mapError(_.getMessage) + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) - assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet - // val query = deleteFrom(customers) - // println(renderDelete(query)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transactions is returning the last value") { + val query = select(customerId) from customers + + val result = execute( + ZTransaction.Select(query) *> ZTransaction.Select(query) + ) + val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction is failing") { + val query = select(customerId) from customers + + val result = execute( + ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) + ).mapError(_.getMessage) - // val result = execute(query) + assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet + // val query = deleteFrom(customers) + // println(renderDelete(query)) - // val assertion = for { - // r <- result - // } yield assert(r)(equalTo(5)) + // val result = execute(query) - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // }, - // testM("Can delete from single table with a condition") { - // val query = deleteFrom(customers) where (verified isNotTrue) - // println(renderDelete(query)) + // val assertion = for { + // r <- result + // } yield assert(r)(equalTo(5)) - // val result = execute(query) + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // }, + // testM("Can delete from single table with a condition") { + // val query = deleteFrom(customers) where (verified isNotTrue) + // println(renderDelete(query)) - // val assertion = for { - // r <- result - // } yield assert(r)(equalTo(1)) + // val result = execute(query) - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // } - ) + // val assertion = for { + // r <- result + // } yield assert(r)(equalTo(1)) + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // } + ) } From b10a826a019ad3e5d05c9895002b1e44b11edf96 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 11 Jan 2021 23:31:37 +0100 Subject: [PATCH 148/673] Update sbt-scalajs, scalajs-compiler, ... to 1.4.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 05155c24d..77312cb83 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.4.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") From 3ea3e3ee67295ce7178369a7e7c727a85072b3ff Mon Sep 17 00:00:00 2001 From: Daniele Torelli Date: Mon, 14 Dec 2020 11:45:55 +0100 Subject: [PATCH 149/673] Add `encode` function to Postgres module --- .../scala/zio/sql/postgresql/PostgresModule.scala | 1 + .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 43be5ba0a..63b4cf340 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -49,6 +49,7 @@ trait PostgresModule extends Jdbc { self => val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) + val Encode = FunctionDef[(String, String), String](FunctionName("encode")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 69791d8c2..e987505a4 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -588,6 +588,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("encode") { + val query = select(Encode("\\x3132330001", "BASE64")) from customers + + val expected = "MTIzAAE=" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("trunc") { val query = select(Trunc(42.8)) from customers From 368ebd09adda72bc29d3ed569977501f1299fa29 Mon Sep 17 00:00:00 2001 From: Daniele Torelli Date: Mon, 14 Dec 2020 11:46:17 +0100 Subject: [PATCH 150/673] Add `decode` function to Postgres module --- .../scala/zio/sql/postgresql/PostgresModule.scala | 1 + .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 63b4cf340..d6d1a84ef 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -50,6 +50,7 @@ trait PostgresModule extends Jdbc { self => val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) val Encode = FunctionDef[(String, String), String](FunctionName("encode")) + val Decode = FunctionDef[(String, String), String](FunctionName("decode")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index e987505a4..79d480725 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -601,6 +601,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("decode") { + val query = select(Decode("MTIzAAE=", "BASE64")) from customers + + val expected = "\\x3132330001" + + val testResult = execute(query).to[String, String](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("trunc") { val query = select(Trunc(42.8)) from customers From 63697aafe2c059a59b51496fc031e001a00e562e Mon Sep 17 00:00:00 2001 From: Daniele Torelli Date: Tue, 15 Dec 2020 11:14:21 +0100 Subject: [PATCH 151/673] Make `encode` and `decode` work over `Chunk[Byte]` --- core/jvm/src/main/scala/zio/sql/typetag.scala | 44 +++++++++---------- .../zio/sql/postgresql/PostgresModule.scala | 12 +++-- .../zio/sql/postgresql/FunctionDefSpec.scala | 12 ++--- 3 files changed, 33 insertions(+), 35 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 0def47c0b..eae8dd8c3 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -9,32 +9,32 @@ trait TypeTagModule { type TypeTagExtension[+A] - sealed trait TypeTag[+A] { + sealed trait TypeTag[A] { private[zio] def cast(a: Any): A = a.asInstanceOf[A] } object TypeTag { - sealed trait NotNull[+A] extends TypeTag[A] - implicit case object TBigDecimal extends NotNull[BigDecimal] - implicit case object TBoolean extends NotNull[Boolean] - implicit case object TByte extends NotNull[Byte] - implicit case object TByteArray extends NotNull[Chunk[Byte]] - implicit case object TChar extends NotNull[Char] - implicit case object TDouble extends NotNull[Double] - implicit case object TFloat extends NotNull[Float] - implicit case object TInstant extends NotNull[Instant] - implicit case object TInt extends NotNull[Int] - implicit case object TLocalDate extends NotNull[LocalDate] - implicit case object TLocalDateTime extends NotNull[LocalDateTime] - implicit case object TLocalTime extends NotNull[LocalTime] - implicit case object TLong extends NotNull[Long] - implicit case object TOffsetDateTime extends NotNull[OffsetDateTime] - implicit case object TOffsetTime extends NotNull[OffsetTime] - implicit case object TShort extends NotNull[Short] - implicit case object TString extends NotNull[String] - implicit case object TUUID extends NotNull[UUID] - implicit case object TZonedDateTime extends NotNull[ZonedDateTime] - sealed case class TDialectSpecific[+A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] + sealed trait NotNull[A] extends TypeTag[A] + implicit case object TBigDecimal extends NotNull[BigDecimal] + implicit case object TBoolean extends NotNull[Boolean] + implicit case object TByte extends NotNull[Byte] + implicit case object TByteArray extends NotNull[Chunk[Byte]] + implicit case object TChar extends NotNull[Char] + implicit case object TDouble extends NotNull[Double] + implicit case object TFloat extends NotNull[Float] + implicit case object TInstant extends NotNull[Instant] + implicit case object TInt extends NotNull[Int] + implicit case object TLocalDate extends NotNull[LocalDate] + implicit case object TLocalDateTime extends NotNull[LocalDateTime] + implicit case object TLocalTime extends NotNull[LocalTime] + implicit case object TLong extends NotNull[Long] + implicit case object TOffsetDateTime extends NotNull[OffsetDateTime] + implicit case object TOffsetTime extends NotNull[OffsetTime] + implicit case object TShort extends NotNull[Short] + implicit case object TString extends NotNull[String] + implicit case object TUUID extends NotNull[UUID] + implicit case object TZonedDateTime extends NotNull[ZonedDateTime] + sealed case class TDialectSpecific[A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index d6d1a84ef..601d7860f 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,7 +1,7 @@ package zio.sql.postgresql import java.time._ - +import zio.Chunk import zio.sql.{ Jdbc, Renderer } /** @@ -49,8 +49,8 @@ trait PostgresModule extends Jdbc { self => val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) - val Encode = FunctionDef[(String, String), String](FunctionName("encode")) - val Decode = FunctionDef[(String, String), String](FunctionName("decode")) + val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) + val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) } override def renderRead(read: self.Read[_]): String = { @@ -117,10 +117,8 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderLit[A, B](lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { import TypeTag._ lit.typeTag match { - case tt @ TByteArray => render(tt.cast(lit.value)) // todo still broken - //something like? render(tt.cast(lit.value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) - case tt @ TChar => - render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping + case tt @ TByteArray => render(tt.cast(lit.value).map("""\%03o""" format _).mkString("E\'", "", "\'")) + case tt @ TChar => render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping case tt @ TInstant => render("TIMESTAMP '", tt.cast(lit.value), "'") //todo test case tt @ TLocalDate => render(tt.cast(lit.value)) // todo still broken case tt @ TLocalDateTime => render(tt.cast(lit.value)) // todo still broken diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 79d480725..922647e6f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -3,7 +3,7 @@ package zio.sql.postgresql import java.time._ import java.time.format.DateTimeFormatter import java.util.UUID -import zio.Cause +import zio.{ Cause, Chunk } import zio.random.{ Random => ZioRandom } import zio.stream.ZStream import zio.test.Assertion._ @@ -589,9 +589,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("encode") { - val query = select(Encode("\\x3132330001", "BASE64")) from customers + val query = select(Encode(Chunk.fromArray("Hello, World!".getBytes), "BASE64")) from customers - val expected = "MTIzAAE=" + val expected = "SGVsbG8sIFdvcmxkIQ==" val testResult = execute(query).to[String, String](identity) @@ -602,11 +602,11 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("decode") { - val query = select(Decode("MTIzAAE=", "BASE64")) from customers + val query = select(Decode("SGVsbG8sIFdvcmxkIQ==", "BASE64")) from customers - val expected = "\\x3132330001" + val expected = Chunk.fromArray("Hello, World!".getBytes) - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query).to[Chunk[Byte], Chunk[Byte]](identity) val assertion = for { r <- testResult.runCollect From 4a0a5e0510f90126ad7b67672b2451b78979456f Mon Sep 17 00:00:00 2001 From: Daniele Torelli Date: Wed, 13 Jan 2021 11:54:39 +0100 Subject: [PATCH 152/673] Requested changes --- core/jvm/src/main/scala/zio/sql/typetag.scala | 44 +++++++++---------- .../zio/sql/postgresql/PostgresModule.scala | 5 ++- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index eae8dd8c3..0def47c0b 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -9,32 +9,32 @@ trait TypeTagModule { type TypeTagExtension[+A] - sealed trait TypeTag[A] { + sealed trait TypeTag[+A] { private[zio] def cast(a: Any): A = a.asInstanceOf[A] } object TypeTag { - sealed trait NotNull[A] extends TypeTag[A] - implicit case object TBigDecimal extends NotNull[BigDecimal] - implicit case object TBoolean extends NotNull[Boolean] - implicit case object TByte extends NotNull[Byte] - implicit case object TByteArray extends NotNull[Chunk[Byte]] - implicit case object TChar extends NotNull[Char] - implicit case object TDouble extends NotNull[Double] - implicit case object TFloat extends NotNull[Float] - implicit case object TInstant extends NotNull[Instant] - implicit case object TInt extends NotNull[Int] - implicit case object TLocalDate extends NotNull[LocalDate] - implicit case object TLocalDateTime extends NotNull[LocalDateTime] - implicit case object TLocalTime extends NotNull[LocalTime] - implicit case object TLong extends NotNull[Long] - implicit case object TOffsetDateTime extends NotNull[OffsetDateTime] - implicit case object TOffsetTime extends NotNull[OffsetTime] - implicit case object TShort extends NotNull[Short] - implicit case object TString extends NotNull[String] - implicit case object TUUID extends NotNull[UUID] - implicit case object TZonedDateTime extends NotNull[ZonedDateTime] - sealed case class TDialectSpecific[A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] + sealed trait NotNull[+A] extends TypeTag[A] + implicit case object TBigDecimal extends NotNull[BigDecimal] + implicit case object TBoolean extends NotNull[Boolean] + implicit case object TByte extends NotNull[Byte] + implicit case object TByteArray extends NotNull[Chunk[Byte]] + implicit case object TChar extends NotNull[Char] + implicit case object TDouble extends NotNull[Double] + implicit case object TFloat extends NotNull[Float] + implicit case object TInstant extends NotNull[Instant] + implicit case object TInt extends NotNull[Int] + implicit case object TLocalDate extends NotNull[LocalDate] + implicit case object TLocalDateTime extends NotNull[LocalDateTime] + implicit case object TLocalTime extends NotNull[LocalTime] + implicit case object TLong extends NotNull[Long] + implicit case object TOffsetDateTime extends NotNull[OffsetDateTime] + implicit case object TOffsetTime extends NotNull[OffsetTime] + implicit case object TShort extends NotNull[Short] + implicit case object TString extends NotNull[String] + implicit case object TUUID extends NotNull[UUID] + implicit case object TZonedDateTime extends NotNull[ZonedDateTime] + sealed case class TDialectSpecific[+A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 601d7860f..b523fa8d7 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -117,7 +117,10 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderLit[A, B](lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { import TypeTag._ lit.typeTag match { - case tt @ TByteArray => render(tt.cast(lit.value).map("""\%03o""" format _).mkString("E\'", "", "\'")) + case TByteArray => + render( + lit.value.asInstanceOf[Chunk[Byte]].map("""\%03o""" format _).mkString("E\'", "", "\'") + ) // todo fix `cast` infers correctly but map doesn't work for some reason case tt @ TChar => render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping case tt @ TInstant => render("TIMESTAMP '", tt.cast(lit.value), "'") //todo test case tt @ TLocalDate => render(tt.cast(lit.value)) // todo still broken From 4cc4d194d7c56af58def4788027d9b4264eadcca Mon Sep 17 00:00:00 2001 From: Daniele Torelli Date: Tue, 15 Dec 2020 17:01:17 +0100 Subject: [PATCH 153/673] Update testcontainers-scala to v0.38.8 --- build.sbt | 18 +++++++++--------- ...estContainers.scala => TestContainer.scala} | 5 +++-- ...estContainers.scala => TestContainer.scala} | 5 +++-- 3 files changed, 15 insertions(+), 13 deletions(-) rename mysql/src/test/scala/zio/sql/{TestContainers.scala => TestContainer.scala} (77%) rename postgres/src/test/scala/zio/sql/{TestContainers.scala => TestContainer.scala} (82%) diff --git a/build.sbt b/build.sbt index 144ee3320..7e65af629 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.3" val testcontainersVersion = "1.15.1" -val testcontainersScalaVersion = "1.0.0-alpha1" +val testcontainersScalaVersion = "0.38.8" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) @@ -175,14 +175,14 @@ lazy val oracle = project .settings( libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test", - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "19.9.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.8" % Test + "dev.zio" %% "zio-test" % zioVersion % "test", + "dev.zio" %% "zio-test-sbt" % zioVersion % "test", + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "19.9.0.0" % Test, + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/mysql/src/test/scala/zio/sql/TestContainers.scala b/mysql/src/test/scala/zio/sql/TestContainer.scala similarity index 77% rename from mysql/src/test/scala/zio/sql/TestContainers.scala rename to mysql/src/test/scala/zio/sql/TestContainer.scala index acd337f00..2106668d9 100644 --- a/mysql/src/test/scala/zio/sql/TestContainers.scala +++ b/mysql/src/test/scala/zio/sql/TestContainer.scala @@ -2,6 +2,7 @@ package zio.sql import com.dimafeng.testcontainers.SingleContainer import com.dimafeng.testcontainers.MySQLContainer +import org.testcontainers.utility.DockerImageName import zio._ import zio.blocking.{ effectBlocking, Blocking } @@ -15,11 +16,11 @@ object TestContainer { } }(container => effectBlocking(container.stop()).orDie).toLayer - def mysql(imageName: Option[String] = None): ZLayer[Blocking, Throwable, Has[MySQLContainer]] = + def mysql(imageName: String): ZLayer[Blocking, Throwable, Has[MySQLContainer]] = ZManaged.make { effectBlocking { val c = new MySQLContainer( - mysqlImageVersion = imageName + mysqlImageVersion = Option(imageName).map(DockerImageName.parse) ).configure { a => a.withInitScript("shop_schema.sql") () diff --git a/postgres/src/test/scala/zio/sql/TestContainers.scala b/postgres/src/test/scala/zio/sql/TestContainer.scala similarity index 82% rename from postgres/src/test/scala/zio/sql/TestContainers.scala rename to postgres/src/test/scala/zio/sql/TestContainer.scala index 36081cf1d..a00859280 100644 --- a/postgres/src/test/scala/zio/sql/TestContainers.scala +++ b/postgres/src/test/scala/zio/sql/TestContainer.scala @@ -2,6 +2,7 @@ package zio.sql import com.dimafeng.testcontainers.SingleContainer import com.dimafeng.testcontainers.PostgreSQLContainer +import org.testcontainers.utility.DockerImageName import zio._ import zio.blocking.{ effectBlocking, Blocking } @@ -16,12 +17,12 @@ object TestContainer { }(container => effectBlocking(container.stop()).orDie).toLayer def postgres( - imageName: Option[String] = Some("postgres:alpine:13") + imageName: String = "postgres:alpine:13" ): ZLayer[Blocking, Throwable, Has[PostgreSQLContainer]] = ZManaged.make { effectBlocking { val c = new PostgreSQLContainer( - dockerImageNameOverride = imageName + dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) ).configure { a => a.withInitScript("shop_schema.sql") () From a77c35e9f23750e9338bbe8b81fe69604d381be7 Mon Sep 17 00:00:00 2001 From: Daniele Torelli Date: Thu, 14 Jan 2021 08:18:08 +0100 Subject: [PATCH 154/673] Use latest images unless differently specified --- mysql/src/test/scala/zio/sql/TestContainer.scala | 2 +- postgres/src/test/scala/zio/sql/TestContainer.scala | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/TestContainer.scala b/mysql/src/test/scala/zio/sql/TestContainer.scala index 2106668d9..93f5d0241 100644 --- a/mysql/src/test/scala/zio/sql/TestContainer.scala +++ b/mysql/src/test/scala/zio/sql/TestContainer.scala @@ -16,7 +16,7 @@ object TestContainer { } }(container => effectBlocking(container.stop()).orDie).toLayer - def mysql(imageName: String): ZLayer[Blocking, Throwable, Has[MySQLContainer]] = + def mysql(imageName: String = "mysql"): ZLayer[Blocking, Throwable, Has[MySQLContainer]] = ZManaged.make { effectBlocking { val c = new MySQLContainer( diff --git a/postgres/src/test/scala/zio/sql/TestContainer.scala b/postgres/src/test/scala/zio/sql/TestContainer.scala index a00859280..a5c6b7e4d 100644 --- a/postgres/src/test/scala/zio/sql/TestContainer.scala +++ b/postgres/src/test/scala/zio/sql/TestContainer.scala @@ -16,9 +16,7 @@ object TestContainer { } }(container => effectBlocking(container.stop()).orDie).toLayer - def postgres( - imageName: String = "postgres:alpine:13" - ): ZLayer[Blocking, Throwable, Has[PostgreSQLContainer]] = + def postgres(imageName: String = "postgres:alpine"): ZLayer[Blocking, Throwable, Has[PostgreSQLContainer]] = ZManaged.make { effectBlocking { val c = new PostgreSQLContainer( From c6a96b14daf1360da3742860c76aa1d0512caed2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 15 Jan 2021 18:58:48 +0100 Subject: [PATCH 155/673] Update sbt-scalafix to 0.9.25 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 77312cb83..1bb0ed370 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,5 +11,5 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.1") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.24") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.25") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") From f12ae6de9042214146269f0896c9a8e32c9d9e75 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 16 Jan 2021 19:09:12 +0100 Subject: [PATCH 156/673] Update ojdbc8 to 21.1.0.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 144ee3320..1fef8d536 100644 --- a/build.sbt +++ b/build.sbt @@ -181,7 +181,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "19.9.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.1.0.0" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.8" % Test ) ) From ab0b481ff7a74e3f31ace09e0b1ed38019d8c1a4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 17 Jan 2021 13:52:21 +0100 Subject: [PATCH 157/673] Update mysql-connector-java to 8.0.23 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 144ee3320..bbededf3e 100644 --- a/build.sbt +++ b/build.sbt @@ -160,7 +160,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.22" % Test, + "mysql" % "mysql-connector-java" % "8.0.23" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) From eef0186ba360f7bdad7c50f6fff8d317435b2791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dejan=20Miji=C4=87?= Date: Fri, 22 Jan 2021 17:19:17 +0100 Subject: [PATCH 158/673] Update release triggers --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a392c771d..1becdfcf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,9 @@ on: branches: ['*'] push: branches: ['master'] - tags: ['v*'] + release: + types: + - published jobs: lint: From f49c12e14538ba4b09b9fb92e04846444b288258 Mon Sep 17 00:00:00 2001 From: Brandon Brown Date: Sat, 21 Nov 2020 10:40:18 -0500 Subject: [PATCH 159/673] feat(postgres): adding in the make_ date based functions --- build.sbt | 2 +- core/jvm/src/main/scala/zio/sql/expr.scala | 110 ++++++++ core/jvm/src/main/scala/zio/sql/typetag.scala | 14 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 6 +- .../zio/sql/postgresql/PostgresModule.scala | 257 ++++++++++++++++-- .../zio/sql/postgresql/FunctionDefSpec.scala | 81 +++++- .../zio/sql/sqlserver/SqlServerModule.scala | 73 ++++- 7 files changed, 500 insertions(+), 43 deletions(-) diff --git a/build.sbt b/build.sbt index 144ee3320..a585b3b7c 100644 --- a/build.sbt +++ b/build.sbt @@ -202,7 +202,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.18" % Test, + "org.postgresql" % "postgresql" % "42.2.18" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index efd47559d..b8bc1e75d 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -203,6 +203,53 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { ) extends InvariantExpr[Features.Union[F1, Features.Union[F2, Features.Union[F3, F4]]], A, Z] { def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] } + + sealed case class FunctionCall5[F1, F2, F3, F4, F5, A, B, C, D, E, F, Z: TypeTag]( + param1: Expr[F1, A, B], + param2: Expr[F2, A, C], + param3: Expr[F3, A, D], + param4: Expr[F4, A, E], + param5: Expr[F5, A, F], + function: FunctionDef[(B, C, D, E, F), Z] + ) extends InvariantExpr[Features.Union[F1, Features.Union[F2, Features.Union[F3, Features.Union[F4, F5]]]], A, Z] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } + + sealed case class FunctionCall6[F1, F2, F3, F4, F5, F6, A, B, C, D, E, F, G, Z: TypeTag]( + param1: Expr[F1, A, B], + param2: Expr[F2, A, C], + param3: Expr[F3, A, D], + param4: Expr[F4, A, E], + param5: Expr[F5, A, F], + param6: Expr[F6, A, G], + function: FunctionDef[(B, C, D, E, F, G), Z] + ) extends InvariantExpr[ + Features.Union[F1, Features.Union[F2, Features.Union[F3, Features.Union[F4, Features.Union[F5, F6]]]]], + A, + Z + ] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } + + sealed case class FunctionCall7[F1, F2, F3, F4, F5, F6, F7, A, B, C, D, E, F, G, H, Z: TypeTag]( + param1: Expr[F1, A, B], + param2: Expr[F2, A, C], + param3: Expr[F3, A, D], + param4: Expr[F4, A, E], + param5: Expr[F5, A, F], + param6: Expr[F6, A, G], + param7: Expr[F7, A, H], + function: FunctionDef[(B, C, D, E, F, G, H), Z] + ) extends InvariantExpr[ + Features.Union[ + F1, + Features.Union[F2, Features.Union[F3, Features.Union[F4, Features.Union[F5, Features.Union[F6, F7]]]]] + ], + A, + Z + ] { + def typeTag: TypeTag[Z] = implicitly[TypeTag[Z]] + } } sealed case class AggregationDef[-A, +B](name: FunctionName) { self => @@ -257,6 +304,69 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { self.narrow[(P1, P2, P3, P4)]: FunctionDef[(P1, P2, P3, P4), B1] ) + def apply[F1, F2, F3, F4, F5, Source, P1, P2, P3, P4, P5, B1 >: B]( + param1: Expr[F1, Source, P1], + param2: Expr[F2, Source, P2], + param3: Expr[F3, Source, P3], + param4: Expr[F4, Source, P4], + param5: Expr[F5, Source, P5] + )(implicit + ev: (P1, P2, P3, P4, P5) <:< A, + typeTag: TypeTag[B1] + ): Expr[F1 :||: F2 :||: F3 :||: F4 :||: F5, Source, B1] = + Expr.FunctionCall5( + param1, + param2, + param3, + param4, + param5, + self.narrow[(P1, P2, P3, P4, P5)]: FunctionDef[(P1, P2, P3, P4, P5), B1] + ) + + def apply[F1, F2, F3, F4, F5, F6, Source, P1, P2, P3, P4, P5, P6, B1 >: B]( + param1: Expr[F1, Source, P1], + param2: Expr[F2, Source, P2], + param3: Expr[F3, Source, P3], + param4: Expr[F4, Source, P4], + param5: Expr[F5, Source, P5], + param6: Expr[F6, Source, P6] + )(implicit + ev: (P1, P2, P3, P4, P5, P6) <:< A, + typeTag: TypeTag[B1] + ): Expr[F1 :||: F2 :||: F3 :||: F4 :||: F5 :||: F6, Source, B1] = + Expr.FunctionCall6( + param1, + param2, + param3, + param4, + param5, + param6, + self.narrow[(P1, P2, P3, P4, P5, P6)]: FunctionDef[(P1, P2, P3, P4, P5, P6), B1] + ) + + def apply[F1, F2, F3, F4, F5, F6, F7, Source, P1, P2, P3, P4, P5, P6, P7, B1 >: B]( + param1: Expr[F1, Source, P1], + param2: Expr[F2, Source, P2], + param3: Expr[F3, Source, P3], + param4: Expr[F4, Source, P4], + param5: Expr[F5, Source, P5], + param6: Expr[F6, Source, P6], + param7: Expr[F7, Source, P7] + )(implicit + ev: (P1, P2, P3, P4, P5, P6, P7) <:< A, + typeTag: TypeTag[B1] + ): Expr[F1 :||: F2 :||: F3 :||: F4 :||: F5 :||: F6 :||: F7, Source, B1] = + Expr.FunctionCall7( + param1, + param2, + param3, + param4, + param5, + param6, + param7, + self.narrow[(P1, P2, P3, P4, P5, P6, P7)]: FunctionDef[(P1, P2, P3, P4, P5, P6, P7), B1] + ) + def narrow[C](implicit ev: C <:< A): FunctionDef[C, B] = { val _ = ev self.asInstanceOf[FunctionDef[C, B]] diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 0def47c0b..780b6cb2d 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -1,17 +1,22 @@ package zio.sql +import java.sql.ResultSet import java.time._ import java.util.UUID - import zio.Chunk trait TypeTagModule { - type TypeTagExtension[+A] + type TypeTagExtension[+A] <: Tag[A] with Decodeable[A] + + trait Decodeable[+A] { + def decode[A, DecodingError](column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, A] = ??? + } - sealed trait TypeTag[+A] { + trait Tag[+A] { private[zio] def cast(a: Any): A = a.asInstanceOf[A] } + sealed trait TypeTag[+A] extends Tag[A] object TypeTag { sealed trait NotNull[+A] extends TypeTag[A] @@ -35,8 +40,7 @@ trait TypeTagModule { implicit case object TUUID extends NotNull[UUID] implicit case object TZonedDateTime extends NotNull[ZonedDateTime] sealed case class TDialectSpecific[+A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] - - sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { + sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 3ceaa5986..815d65901 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,9 +1,8 @@ package zio.sql -import java.sql._ import java.io.IOException +import java.sql._ import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset } - import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } @@ -302,6 +301,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { java.util.UUID.fromString(column.fold(resultSet.getString(_), resultSet.getString(_))) ) case TZonedDateTime => + //2013-07-15 08:15:23.5+00 tryDecode[java.time.ZonedDateTime]( java.time.ZonedDateTime .ofInstant( @@ -309,7 +309,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { ZoneId.of(ZoneOffset.UTC.getId) ) ) - case TDialectSpecific(_) => ??? + case TDialectSpecific(t) => t.decode(column, resultSet) case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) } } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 43be5ba0a..830e4bcb5 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,14 +1,165 @@ package zio.sql.postgresql +import java.sql.ResultSet +import java.text.DecimalFormat import java.time._ - +import java.util.Calendar +import org.postgresql.util.PGInterval import zio.sql.{ Jdbc, Renderer } -/** - */ trait PostgresModule extends Jdbc { self => + import TypeTag._ + + override type TypeTagExtension[+A] = PostgresSpecific.PostgresTypeTag[A] + + object PostgresSpecific { + import self.ReadExecutor.DecodingError + trait PostgresTypeTag[+A] extends Tag[A] with Decodeable[A] + object PostgresTypeTag { + implicit case object TInterval extends PostgresTypeTag[Interval] { + override def decode[Interval, DecodingError]( + column: Either[Int, String], + resultSet: ResultSet + ): Either[DecodingError, Interval] = + scala.util + .Try(Interval.fromPgInterval(new PGInterval(column.fold(resultSet.getString(_), resultSet.getString(_))))) + .fold( + _ => Left(DecodingError.UnexpectedNull(column).asInstanceOf[DecodingError]), + r => Right(r.asInstanceOf[Interval]) + ) + } + implicit case object TTimestampz extends PostgresTypeTag[Timestampz] { + override def decode[ZonedDateTime, DecodingError]( + column: Either[Int, String], + resultSet: ResultSet + ): Either[DecodingError, ZonedDateTime] = + scala.util + .Try( + ZonedDateTime + .ofInstant( + column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, + ZoneId.of(ZoneOffset.UTC.getId) + ) + ) + .fold( + _ => Left(DecodingError.UnexpectedNull(column).asInstanceOf[DecodingError]), + r => Right(r.asInstanceOf[ZonedDateTime]) + ) + } + } + + sealed case class Timestampz( + year: Int = 0, + month: Int = 0, + day: Int = 0, + hour: Int = 0, + minute: Int = 0, + second: BigDecimal = 0.0, + timeZone: String = "+00" + ) { + override def toString = + s"""$year, $month, $day, $hour, $minute, $second, '$timeZone'""" + } + + //Based upon https://github.com/tminglei/slick-pg/blob/master/src/main/scala/com/github/tminglei/slickpg/PgDateSupport.scala + sealed case class Interval( + years: Int = 0, + months: Int = 0, + days: Int = 0, + hours: Int = 0, + minutes: Int = 0, + seconds: BigDecimal = 0.0 + ) { + private val secondsFormat = { + val format = new DecimalFormat("0.00####") + val dfs = format.getDecimalFormatSymbols() + dfs.setDecimalSeparator('.') + format.setDecimalFormatSymbols(dfs) + format + } + def milliseconds: Int = (microseconds + (if (microseconds < 0) -500 else 500)) / 1000 + def microseconds: Int = (seconds * 1000000.0).asInstanceOf[Int] + + def +:(cal: Calendar): Calendar = { + cal.add(Calendar.MILLISECOND, milliseconds) + cal.add(Calendar.MINUTE, minutes) + cal.add(Calendar.HOUR, hours) + cal.add(Calendar.DAY_OF_MONTH, days) + cal.add(Calendar.MONTH, months) + cal.add(Calendar.YEAR, years) + cal + } + + def +:(date: java.util.Date): java.util.Date = { + val cal = Calendar.getInstance + cal.setTime(date) + date.setTime((cal +: this).getTime.getTime) + date + } + + def +(other: Interval): Interval = + new Interval( + years + other.years, + months + other.months, + days + other.days, + hours + other.hours, + minutes + other.minutes, + seconds + other.seconds + ) + + def *(factor: Int): Interval = + new Interval( + years * factor, + months * factor, + days * factor, + hours * factor, + minutes * factor, + seconds * factor + ) + + override def toString = { + val secs = secondsFormat.format(seconds) + s"""years => ${years}, months => ${months}, weeks => 0, days => ${days}, hours => ${hours}, mins => ${minutes}, secs => ${secs}""" + } + + def fromPgInterval(interval: PGInterval): Interval = + Interval( + interval.getYears, + interval.getMonths, + interval.getDays, + interval.getHours, + interval.getMinutes, + interval.getSeconds + ) + } + + object Interval { + def apply(interval: String): Interval = fromPgInterval(new PGInterval(interval)) + def fromPgInterval(interval: PGInterval): Interval = + new Interval( + interval.getYears, + interval.getMonths, + interval.getDays, + interval.getHours, + interval.getMinutes, + interval.getSeconds + ) + + def toPgInterval(interval: Interval): PGInterval = + new PGInterval( + interval.years, + interval.months, + interval.days, + interval.hours, + interval.minutes, + interval.seconds.toDouble + ) + } + } object PostgresFunctionDef { + import PostgresSpecific._ + val IsFinite = FunctionDef[Instant, Boolean](FunctionName("isfinite")) val TimeOfDay = FunctionDef[Any, String](FunctionName("timeofday")) val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) @@ -49,6 +200,15 @@ trait PostgresModule extends Jdbc { self => val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) + val MakeDate = FunctionDef[(Int, Int, Int), LocalDate](FunctionName("make_date")) + val MakeInterval = FunctionDef[Interval, Interval](FunctionName("make_interval")) + val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("make_time")) + val MakeTimestamp = + FunctionDef[(Int, Int, Int, Int, Int, Double), LocalDateTime]( + FunctionName("make_timestamp") + ) + val MakeTimestampz = + FunctionDef[Timestampz, ZonedDateTime](FunctionName("make_timestamptz")) } override def renderRead(read: self.Read[_]): String = { @@ -113,8 +273,14 @@ trait PostgresModule extends Jdbc { self => } private[zio] def renderLit[A, B](lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { + import PostgresSpecific.PostgresTypeTag._ import TypeTag._ lit.typeTag match { + case TDialectSpecific(tt) => + tt match { + case tt @ TInterval => render(tt.cast(lit.value)) + case tt @ TTimestampz => render(tt.cast(lit.value)) + } case tt @ TByteArray => render(tt.cast(lit.value)) // todo still broken //something like? render(tt.cast(lit.value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) case tt @ TChar => @@ -137,52 +303,51 @@ trait PostgresModule extends Jdbc { self => case TLong => render(lit.value) //default toString is probably ok case TShort => render(lit.value) //default toString is probably ok case TString => render("'", lit.value, "'") //todo fix escaping - - case _ => render(lit.value) //todo fix add TypeTag.Nullable[_] => + case _ => render(lit.value) //todo fix add TypeTag.Nullable[_] => } } private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { - case Expr.Source(tableName, column) => render(tableName, ".", column.name) - case Expr.Unary(base, op) => + case Expr.Source(tableName, column) => render(tableName, ".", column.name) + case Expr.Unary(base, op) => render(" ", op.symbol) renderExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => renderExpr(base) render(" ", op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => renderExpr(left) render(" ", op.symbol, " ") renderExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => renderExpr(left) render(" ", op.symbol, " ") renderExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => renderExpr(value) renderReadImpl(set) - case lit: Expr.Literal[_] => renderLit(lit) - case Expr.AggregationCall(p, aggregation) => + case lit: Expr.Literal[_] => renderLit(lit) + case Expr.AggregationCall(p, aggregation) => render(aggregation.name.name, "(") renderExpr(p) render(")") - case Expr.ParenlessFunctionCall0(fn) => + case Expr.ParenlessFunctionCall0(fn) => val _ = render(fn.name) - case Expr.FunctionCall0(fn) => + case Expr.FunctionCall0(fn) => render(fn.name.name) render("(") val _ = render(")") - case Expr.FunctionCall1(p, fn) => + case Expr.FunctionCall1(p, fn) => render(fn.name.name, "(") renderExpr(p) render(")") - case Expr.FunctionCall2(p1, p2, fn) => + case Expr.FunctionCall2(p1, p2, fn) => render(fn.name.name, "(") renderExpr(p1) render(",") renderExpr(p2) render(")") - case Expr.FunctionCall3(p1, p2, p3, fn) => + case Expr.FunctionCall3(p1, p2, p3, fn) => render(fn.name.name, "(") renderExpr(p1) render(",") @@ -190,7 +355,7 @@ trait PostgresModule extends Jdbc { self => render(",") renderExpr(p3) render(")") - case Expr.FunctionCall4(p1, p2, p3, p4, fn) => + case Expr.FunctionCall4(p1, p2, p3, p4, fn) => render(fn.name.name, "(") renderExpr(p1) render(",") @@ -200,6 +365,60 @@ trait PostgresModule extends Jdbc { self => render(",") renderExpr(p4) render(")") + case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => + render(function.name.name) + render("(") + renderExpr(param1) + render(",") + renderExpr(param2) + render(",") + renderExpr(param3) + render(",") + renderExpr(param4) + render(",") + renderExpr(param5) + render(")") + case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => + render(function.name.name) + render("(") + renderExpr(param1) + render(",") + renderExpr(param2) + render(",") + renderExpr(param3) + render(",") + renderExpr(param4) + render(",") + renderExpr(param5) + render(",") + renderExpr(param6) + render(")") + case Expr.FunctionCall7( + param1, + param2, + param3, + param4, + param5, + param6, + param7, + function + ) => + render(function.name.name) + render("(") + renderExpr(param1) + render(",") + renderExpr(param2) + render(",") + renderExpr(param3) + render(",") + renderExpr(param4) + render(",") + renderExpr(param5) + render(",") + renderExpr(param6) + render(",") + renderExpr(param7) + render(")") } private[zio] def renderReadImpl[A <: SelectionSet[_]](read: self.Read[_])(implicit render: Renderer): Unit = diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 69791d8c2..9a912006f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -16,6 +16,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import Customers._ import FunctionDef.{ CharLength => _, _ } import PostgresFunctionDef._ + import PostgresSpecific._ private def collectAndCompare( expected: Seq[String], @@ -1066,6 +1067,84 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo("UTF8")) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ ignore //todo fix - select(PgClientEncoding())? + } + @@ ignore, //todo fix - select(PgClientEncoding())? + testM("make_date") { + val query = select(MakeDate(2013, 7, 15)) from customers + + val expected = LocalDate.of(2013, 7, 15) + + val testResult = execute(query).to[LocalDate, LocalDate](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("make_interval") { + def runTest(interval: Interval) = { + val query = select( + MakeInterval(interval) + ) from customers + for { + r <- execute(query).to[Interval, Interval](identity).runCollect + } yield r.head + } + + (for { + t1 <- assertM(runTest(Interval()))(equalTo(Interval())) + t2 <- assertM(runTest(Interval(days = 10)))(equalTo(Interval(days = 10))) + t3 <- assertM( + runTest(Interval(years = 10, months = 2, days = 5, hours = 6, minutes = 20, seconds = 15)) + )( + equalTo(Interval(years = 10, months = 2, days = 5, hours = 6, minutes = 20, seconds = 15)) + ) + } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("make_time") { + val query = select(MakeTime(8, 15, 23.5)) from customers + val expected = LocalTime.parse("08:15:23.500") + val testResult = execute(query).to[LocalTime, LocalTime](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("make_timestamp") { + val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) from customers + val expected = LocalDateTime.parse("2013-07-15T08:15:23.500") + val testResult = execute(query).to[LocalDateTime, LocalDateTime](identity) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("make_timestampz") { + def runTest(tz: Timestampz) = { + val query = select(MakeTimestampz(tz)) from customers + for { + r <- execute(query).to[ZonedDateTime, ZonedDateTime](identity).runCollect + } yield r.head + } + + val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) + + (for { + t1 <- assertM(runTest(Timestampz(2013, 7, 15, 8, 15, 23.5)))( + equalTo(ZonedDateTime.parse("2013-07-15T08:15:23.5+00:00")) + ) + t2 <- assertM(runTest(Timestampz(2020, 11, 21, 19, 10, 25, "+00:00")))( + equalTo(expectedRoundTripTimestamp) + ) + t3 <- assertM(runTest(Timestampz(2020, 11, 21, 15, 10, 25, "-04:00")))(equalTo(expectedRoundTripTimestamp)) + t4 <- assertM(runTest(Timestampz(2020, 11, 22, 2, 10, 25, "+07:00")))(equalTo(expectedRoundTripTimestamp)) + t5 <- assertM(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) + } yield t1 && t2 && t3 && t4 && t5).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } ) @@ timeout(5.minutes) } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 7343dd28f..55e8d3dec 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -12,51 +12,51 @@ trait SqlServerModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.ParenlessFunctionCall0(function) => + case Expr.ParenlessFunctionCall0(function) => val _ = builder.append(function.name) - case Expr.FunctionCall0(function) => + case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -65,7 +65,7 @@ trait SqlServerModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -76,6 +76,51 @@ trait SqlServerModule extends Jdbc { self => builder.append(",") buildExpr(param4) val _ = builder.append(")") + case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + val _ = builder.append(")") + case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + builder.append(",") + buildExpr(param6) + val _ = builder.append(")") + case Expr.FunctionCall7(param1, param2, param3, param4, param5, param6, param7, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + builder.append(",") + buildExpr(param6) + builder.append(",") + buildExpr(param7) + val _ = builder.append(")") } def buildReadString(read: self.Read[_]): Unit = From 17b9640c7ded706856506f6bd0eb8353a7750ba2 Mon Sep 17 00:00:00 2001 From: Brandon Brown Date: Mon, 25 Jan 2021 10:35:35 -0500 Subject: [PATCH 160/673] WIP addressing pr feedback --- core/jvm/src/main/scala/zio/sql/typetag.scala | 6 +-- .../zio/sql/postgresql/PostgresModule.scala | 39 +++++++++++++------ .../zio/sql/postgresql/FunctionDefSpec.scala | 7 ++-- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 780b6cb2d..26cc99dde 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -7,10 +7,10 @@ import zio.Chunk trait TypeTagModule { - type TypeTagExtension[+A] <: Tag[A] with Decodeable[A] + type TypeTagExtension[+A] <: Tag[A] with Decodable[A] - trait Decodeable[+A] { - def decode[A, DecodingError](column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, A] = ??? + trait Decodable[+A] { + def decode[DecodingError](column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, A] } trait Tag[+A] { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 830e4bcb5..f1499a49a 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -14,10 +14,10 @@ trait PostgresModule extends Jdbc { self => object PostgresSpecific { import self.ReadExecutor.DecodingError - trait PostgresTypeTag[+A] extends Tag[A] with Decodeable[A] + trait PostgresTypeTag[+A] extends Tag[A] with Decodable[A] object PostgresTypeTag { implicit case object TInterval extends PostgresTypeTag[Interval] { - override def decode[Interval, DecodingError]( + override def decode[DecodingError]( column: Either[Int, String], resultSet: ResultSet ): Either[DecodingError, Interval] = @@ -25,25 +25,27 @@ trait PostgresModule extends Jdbc { self => .Try(Interval.fromPgInterval(new PGInterval(column.fold(resultSet.getString(_), resultSet.getString(_))))) .fold( _ => Left(DecodingError.UnexpectedNull(column).asInstanceOf[DecodingError]), - r => Right(r.asInstanceOf[Interval]) + r => Right(r) ) } implicit case object TTimestampz extends PostgresTypeTag[Timestampz] { - override def decode[ZonedDateTime, DecodingError]( + override def decode[DecodingError]( column: Either[Int, String], resultSet: ResultSet - ): Either[DecodingError, ZonedDateTime] = + ): Either[DecodingError, Timestampz] = scala.util .Try( - ZonedDateTime - .ofInstant( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, - ZoneId.of(ZoneOffset.UTC.getId) - ) + Timestampz.fromZonedDateTime( + ZonedDateTime + .ofInstant( + column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, + ZoneId.of(ZoneOffset.UTC.getId) + ) + ) ) .fold( _ => Left(DecodingError.UnexpectedNull(column).asInstanceOf[DecodingError]), - r => Right(r.asInstanceOf[ZonedDateTime]) + r => Right(r) ) } } @@ -155,6 +157,19 @@ trait PostgresModule extends Jdbc { self => interval.seconds.toDouble ) } + + object Timestampz { + def fromZonedDateTime(zdt: ZonedDateTime): Timestampz = + Timestampz( + zdt.getYear, + zdt.getMonthValue, + zdt.getDayOfMonth, + zdt.getHour, + zdt.getMinute, + zdt.getSecond, + zdt.getZone.getId + ) + } } object PostgresFunctionDef { @@ -208,7 +223,7 @@ trait PostgresModule extends Jdbc { self => FunctionName("make_timestamp") ) val MakeTimestampz = - FunctionDef[Timestampz, ZonedDateTime](FunctionName("make_timestamptz")) + FunctionDef[Timestampz, Timestampz](FunctionName("make_timestamptz")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 9a912006f..95f26b4d5 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1128,15 +1128,16 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { def runTest(tz: Timestampz) = { val query = select(MakeTimestampz(tz)) from customers for { - r <- execute(query).to[ZonedDateTime, ZonedDateTime](identity).runCollect + r <- execute(query).to[Timestampz, Timestampz](identity).runCollect } yield r.head } - val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) + val expectedRoundTripTimestamp = + Timestampz.fromZonedDateTime(ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId))) (for { t1 <- assertM(runTest(Timestampz(2013, 7, 15, 8, 15, 23.5)))( - equalTo(ZonedDateTime.parse("2013-07-15T08:15:23.5+00:00")) + equalTo(Timestampz.fromZonedDateTime(ZonedDateTime.parse("2013-07-15T08:15:23.5+00:00"))) ) t2 <- assertM(runTest(Timestampz(2020, 11, 21, 19, 10, 25, "+00:00")))( equalTo(expectedRoundTripTimestamp) From 2b2364f8e20d1227b053b86d1cd1650d09c137e7 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 26 Jan 2021 19:07:13 +0100 Subject: [PATCH 161/673] Update sbt-dotty to 0.5.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 77312cb83..62645ca9b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.1") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.24") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") From c15c58d5cd60ffd4aa6c7dedb559537f6f69e39a Mon Sep 17 00:00:00 2001 From: Brandon Brown Date: Thu, 28 Jan 2021 14:29:25 -0500 Subject: [PATCH 162/673] moving decoding error into select module and self typing for typetage --- core/jvm/src/main/scala/zio/sql/ops.scala | 2 +- core/jvm/src/main/scala/zio/sql/select.scala | 24 ++++++++++++++++++- core/jvm/src/main/scala/zio/sql/typetag.scala | 4 ++-- jdbc/src/main/scala/zio/sql/jdbc.scala | 22 ----------------- .../zio/sql/postgresql/PostgresModule.scala | 9 ++++--- 5 files changed, 30 insertions(+), 31 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/ops.scala b/core/jvm/src/main/scala/zio/sql/ops.scala index 8b423730d..aa9e41dd1 100644 --- a/core/jvm/src/main/scala/zio/sql/ops.scala +++ b/core/jvm/src/main/scala/zio/sql/ops.scala @@ -1,6 +1,6 @@ package zio.sql -trait OpsModule extends TypeTagModule { +trait OpsModule extends TypeTagModule { self: SelectModule => sealed trait Operator { val symbol: String diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 649cfe418..ffbdd09cf 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -3,7 +3,6 @@ package zio.sql import scala.language.implicitConversions trait SelectModule { self: ExprModule with TableModule => - sealed case class SelectBuilder[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]) { def from[A1 <: A](table: Table.Aux[A1]): Read.Select[F, A1, B] = @@ -194,4 +193,27 @@ trait SelectModule { self: ExprModule with TableModule => implicit def exprToOrdering[F, A, B](expr: Expr[F, A, B]): Ordering[Expr[F, A, B]] = Asc(expr) } + + sealed trait DecodingError extends Exception { + def message: String + } + + object DecodingError { + sealed case class UnexpectedNull(column: Either[Int, String]) extends DecodingError { + private def label = column.fold(index => index.toString, name => name) + + def message = s"Expected column ${label} to be non-null" + } + sealed case class UnexpectedType(expected: TypeTag[_], actual: Int) extends DecodingError { + def message = s"Expected type ${expected} but found ${actual}" + } + sealed case class MissingColumn(column: Either[Int, String]) extends DecodingError { + private def label = column.fold(index => index.toString, name => name) + + def message = s"The column ${label} does not exist" + } + case object Closed extends DecodingError { + def message = s"The ResultSet has been closed, so decoding is impossible" + } + } } diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 26cc99dde..d29994c38 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -5,12 +5,12 @@ import java.time._ import java.util.UUID import zio.Chunk -trait TypeTagModule { +trait TypeTagModule { self: SelectModule => type TypeTagExtension[+A] <: Tag[A] with Decodable[A] trait Decodable[+A] { - def decode[DecodingError](column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, A] + def decode(column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, A] } trait Tag[+A] { diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 815d65901..d53252eb4 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -193,28 +193,6 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { } } - sealed trait DecodingError extends Exception { - def message: String - } - object DecodingError { - sealed case class UnexpectedNull(column: Either[Int, String]) extends DecodingError { - private def label = column.fold(index => index.toString, name => name) - - def message = s"Expected column ${label} to be non-null" - } - sealed case class UnexpectedType(expected: TypeTag[_], actual: Int) extends DecodingError { - def message = s"Expected type ${expected} but found ${actual}" - } - sealed case class MissingColumn(column: Either[Int, String]) extends DecodingError { - private def label = column.fold(index => index.toString, name => name) - - def message = s"The column ${label} does not exist" - } - case object Closed extends DecodingError { - def message = s"The ResultSet has been closed, so decoding is impossible" - } - } - // TODO: Only support indexes! private[sql] def extractColumn[A]( column: Either[Int, String], diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index f1499a49a..3cfa1a142 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -13,23 +13,22 @@ trait PostgresModule extends Jdbc { self => override type TypeTagExtension[+A] = PostgresSpecific.PostgresTypeTag[A] object PostgresSpecific { - import self.ReadExecutor.DecodingError trait PostgresTypeTag[+A] extends Tag[A] with Decodable[A] object PostgresTypeTag { implicit case object TInterval extends PostgresTypeTag[Interval] { - override def decode[DecodingError]( + override def decode( column: Either[Int, String], resultSet: ResultSet ): Either[DecodingError, Interval] = scala.util .Try(Interval.fromPgInterval(new PGInterval(column.fold(resultSet.getString(_), resultSet.getString(_))))) .fold( - _ => Left(DecodingError.UnexpectedNull(column).asInstanceOf[DecodingError]), + _ => Left(DecodingError.UnexpectedNull(column)), r => Right(r) ) } implicit case object TTimestampz extends PostgresTypeTag[Timestampz] { - override def decode[DecodingError]( + override def decode( column: Either[Int, String], resultSet: ResultSet ): Either[DecodingError, Timestampz] = @@ -44,7 +43,7 @@ trait PostgresModule extends Jdbc { self => ) ) .fold( - _ => Left(DecodingError.UnexpectedNull(column).asInstanceOf[DecodingError]), + _ => Left(DecodingError.UnexpectedNull(column)), r => Right(r) ) } From d3247e76bfea385fe5f0324a66754d4f9d7918bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dejan=20Miji=C4=87?= Date: Sat, 30 Jan 2021 14:22:56 +0100 Subject: [PATCH 163/673] Remove file cleanup --- .github/workflows/clean.yml | 50 ------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 .github/workflows/clean.yml diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml deleted file mode 100644 index ce86ea609..000000000 --- a/.github/workflows/clean.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Clean - -on: push - -jobs: - delete-artifacts: - name: Delete artifacts - runs-on: ubuntu-20.04 - steps: - - name: Delete artifacts - run: | - # Customize those three lines with your repository and credentials: - REPO=${GITHUB_API_URL}/repos/${{ github.repository }} - - # A shortcut to call GitHub API. - ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } - - # A temporary file which receives HTTP response headers. - TMPFILE=/tmp/tmp.$$ - - # An associative array, key: artifact name, value: number of artifacts of that name. - declare -A ARTCOUNT - - # Process all artifacts on this repository, loop on returned "pages". - URL=$REPO/actions/artifacts - while [[ -n "$URL" ]]; do - - # Get current page, get response headers in a temporary file. - JSON=$(ghapi --dump-header $TMPFILE "$URL") - - # Get URL of next page. Will be empty if we are at the last page. - URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*.*//') - rm -f $TMPFILE - - # Number of artifacts on this page: - COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') )) - - # Loop on all artifacts on this page. - for ((i=0; $i < $COUNT; i++)); do - - # Get name of artifact and count instances of this name. - name=$(jq <<<$JSON -r ".artifacts[$i].name?") - ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1)) - - id=$(jq <<<$JSON -r ".artifacts[$i].id?") - size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") )) - printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size - ghapi -X DELETE $REPO/actions/artifacts/$id - done - done From 408c981c0f0b1704ba6f719e63a30d68a1c9ea63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dejan=20Miji=C4=87?= Date: Sat, 30 Jan 2021 14:23:52 +0100 Subject: [PATCH 164/673] Simplify CI --- .github/workflows/ci.yml | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1becdfcf7..f8ff4a8b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,6 @@ name: CI on: pull_request: - branches: ['*'] push: branches: ['master'] release: @@ -22,14 +21,7 @@ jobs: - name: Setup Scala and Java uses: olafurpg/setup-scala@v10 - name: Cache scala dependencies - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - ~/.m2 - ~/.cache - key: sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + uses: coursier/cache-action@v5 - name: Lint code run: sbt check @@ -50,14 +42,7 @@ jobs: with: java-version: ${{ matrix.java }} - name: Cache scala dependencies - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - ~/.m2 - ~/.cache - key: sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + uses: coursier/cache-action@v5 - name: Run tests run: sbt ++${{ matrix.scala }}! test @@ -73,16 +58,7 @@ jobs: - name: Setup Scala and Java uses: olafurpg/setup-scala@v10 - name: Cache scala dependencies - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - ~/.m2 - ~/.cache - key: sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Setup GPG - uses: olafurpg/setup-gpg@v3 + uses: coursier/cache-action@v5 - name: Release artifacts run: sbt ci-release env: From 638cad1c410e90694f1e9e68ce5882a03aa002e1 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Jan 2021 03:01:07 +0100 Subject: [PATCH 165/673] Update scala-collection-compat to 2.4.1 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 2ef7c6131..edf996122 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -195,7 +195,7 @@ object BuildHelper { Seq( ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)), - "org.scala-lang.modules" %% "scala-collection-compat" % "2.3.2" + "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.1" ) }, parallelExecution in Test := true, From c527bb80cc8b84cac1a31e4474c7a86370f2561f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Jan 2021 09:36:58 +0100 Subject: [PATCH 166/673] Update sbt to 1.4.7 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index d91c272d4..0b2e09c5a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.6 +sbt.version=1.4.7 From 38079752b453778b201f84adaa69247a394bbcdf Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 4 Feb 2021 09:13:10 +0100 Subject: [PATCH 167/673] Update testcontainers-scala-oracle-xe to 0.38.9 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a585b3b7c..ec8ea91e0 100644 --- a/build.sbt +++ b/build.sbt @@ -182,7 +182,7 @@ lazy val oracle = project "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.oracle.database.jdbc" % "ojdbc8" % "19.9.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.8" % Test + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % "0.38.9" % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From 2fe94924755172c4f6957dac82090481cd3996e3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 7 Feb 2021 11:21:17 +0100 Subject: [PATCH 168/673] Update mdoc, sbt-mdoc to 2.2.17 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 77312cb83..48d98c318 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.14") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.17") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.6") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") From 54f146d868ed6f61497dfebb3b8902c352d31761 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 10 Feb 2021 05:32:20 +0100 Subject: [PATCH 169/673] Update testcontainers-scala-mysql, ... to 0.38.9 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f39d73fa9..aa55e1d95 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.3" val testcontainersVersion = "1.15.1" -val testcontainersScalaVersion = "0.38.8" +val testcontainersScalaVersion = "0.38.9" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From 17b652aa11310503547734d2d25177a4cc59753c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 10 Feb 2021 05:32:30 +0100 Subject: [PATCH 170/673] Update ojdbc8 to 21.1.0.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f39d73fa9..4a2a23296 100644 --- a/build.sbt +++ b/build.sbt @@ -181,7 +181,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "19.9.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.1.0.0" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test ) ) From 50a95cb871ae32a882c606335a106a4b669f384f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 11 Feb 2021 01:43:17 +0100 Subject: [PATCH 171/673] Update testcontainers-scala-mysql, ... to 0.39.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index aa55e1d95..1d6f99414 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.3" val testcontainersVersion = "1.15.1" -val testcontainersScalaVersion = "0.38.9" +val testcontainersScalaVersion = "0.39.0" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From dfbbaa81a3fb916b84da4cd169bdd1ff5ad28f40 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 11 Feb 2021 22:08:00 +0100 Subject: [PATCH 172/673] Update database-commons, jdbc, mssqlserver, ... to 1.15.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 4ea383fc4..ce07ab736 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "1.0.3" -val testcontainersVersion = "1.15.1" +val testcontainersVersion = "1.15.2" val testcontainersScalaVersion = "0.39.0" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 71b98292a84b29f0645f528674c49efdf7b48261 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 12 Feb 2021 13:33:05 +0100 Subject: [PATCH 173/673] Update sbt-scalajs, scalajs-compiler, ... to 1.5.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4726dfd81..937957ced 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.4.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") From 9bde9080b531e8f60af7c20f5fb6c7ceecab3ef2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 12 Feb 2021 20:56:52 +0100 Subject: [PATCH 174/673] Update sbt-bloop to 1.4.7 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index a4d74e302..bfbb34f99 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.17") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.6") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.7") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From 30185987923d39970440c99238b6fc046921c410 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Fri, 12 Feb 2021 23:53:35 +0100 Subject: [PATCH 175/673] Update zio to 1.0.4-2 --- build.sbt | 2 +- core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala | 2 +- core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala | 2 +- core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala | 2 +- core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala | 2 +- core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 4ea383fc4..14cb33358 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "1.0.3" +val zioVersion = "1.0.4-2" val testcontainersVersion = "1.15.1" val testcontainersScalaVersion = "0.39.0" diff --git a/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala b/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala index 32480a602..d9a9ff93b 100644 --- a/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala @@ -1,7 +1,7 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, suite, test, DefaultRunnableSpec } +import zio.test.{ assert, DefaultRunnableSpec } object ArithmeticOpsSpec extends DefaultRunnableSpec { import ProductSchema._ diff --git a/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala b/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala index 6c7530175..a5068081c 100644 --- a/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala @@ -1,7 +1,7 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, suite, test, DefaultRunnableSpec } +import zio.test.{ assert, DefaultRunnableSpec } object BitwiseOpSpec extends DefaultRunnableSpec { import ProductSchema._ diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 1582bb8d9..f00c6b7db 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -1,7 +1,7 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, suite, test, DefaultRunnableSpec } +import zio.test.{ assert, DefaultRunnableSpec } object GroupByHavingSpec extends DefaultRunnableSpec { diff --git a/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala b/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala index 373ea3cf6..ac9c5d4e3 100644 --- a/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala @@ -1,7 +1,7 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, suite, test, DefaultRunnableSpec } +import zio.test.{ assert, DefaultRunnableSpec } class LogicalOpsSpec extends DefaultRunnableSpec { import ProductSchema._ diff --git a/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala b/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala index a064d917c..9ad907cee 100644 --- a/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala @@ -1,6 +1,6 @@ package zio.sql -import zio.test.{ assert, suite, test, DefaultRunnableSpec } +import zio.test.{ assert, DefaultRunnableSpec } import zio.test.Assertion.anything object PredicateOpSpec extends DefaultRunnableSpec { From dee85bf201029bb9de3e0a19174bed99c8b3a623 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 16 Feb 2021 21:25:29 +0100 Subject: [PATCH 176/673] Update sbt-dotty to 0.5.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ad6abf785..8f31a9695 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.2") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.25") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") From 53546127c07609083661535b4cd2d4dbc14183fb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 17 Feb 2021 03:55:33 +0100 Subject: [PATCH 177/673] Update scala-collection-compat to 2.4.2 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index edf996122..31abdac4d 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -195,7 +195,7 @@ object BuildHelper { Seq( ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)), - "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.1" + "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.2" ) }, parallelExecution in Test := true, From fe20ef9e1096e394b8b2730e5a010309d00c9f53 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 17 Feb 2021 22:12:04 +0100 Subject: [PATCH 178/673] Update mdoc_2.13, sbt-mdoc to 2.2.18 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ad6abf785..32690858d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.17") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.18") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.7") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") From b4757321f0e03c8bdcdf4b561116413573626fea Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 18 Feb 2021 18:38:08 +0100 Subject: [PATCH 179/673] Update sbt-bloop to 1.4.8 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ad6abf785..86e76412e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.17") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.7") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From f93c80c42f84a4be434e98fcbeac1ab642183d9f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 18 Feb 2021 22:34:17 +0100 Subject: [PATCH 180/673] Update postgresql to 42.2.19 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a204f0d9d..cd6affec2 100644 --- a/build.sbt +++ b/build.sbt @@ -202,7 +202,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.18" % Compile, + "org.postgresql" % "postgresql" % "42.2.19" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 44a6e9695b25fcc0d5455d3cb1227a6d04e1f46c Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Tue, 23 Feb 2021 21:29:29 +0100 Subject: [PATCH 181/673] Fix delete signature --- core/jvm/src/main/scala/zio/sql/Sql.scala | 2 +- examples/src/main/scala/zio/sql/Examples.scala | 2 +- project/BuildHelper.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 88458a321..27f5f1f65 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,7 +17,7 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = SelectBuilder(selection) - def deleteFrom[F[_], A, B](table: Table.Source.Aux[F, A, B]): Delete[A] = Delete(table, true) + def deleteFrom[T <: Table](table: T): Delete[table.TableType] = Delete(table, true) def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 1f655cd38..a52b9de85 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -32,7 +32,7 @@ object Examples extends App with ShopSchema with SqlServerModule { // execute(selectWithRefinements).to((_, _)) //delete from users where first_name = 'Terrence' - //val basicDelete = deleteFrom(users).where(fName === "Terrence") + val basicDelete = deleteFrom(users).where(fName === "Terrence") //println(renderDelete(basicDelete)) /* diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index edf996122..6e5b2030e 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -183,7 +183,7 @@ object BuildHelper { name := s"$prjName", scalacOptions := stdOptions, crossScalaVersions := Seq(Scala213, Scala212, Scala211), - scalaVersion in ThisBuild := crossScalaVersions.value.head, + scalaVersion in ThisBuild := Scala212, scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), libraryDependencies ++= { if (isDotty.value) From ff6bc545a603aea30a47ecf7ed3cd08f85e29858 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 24 Feb 2021 15:03:19 +0100 Subject: [PATCH 182/673] Update silencer-lib_2.13.3 to 1.7.3 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index edf996122..d8e221a37 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -188,7 +188,7 @@ object BuildHelper { libraryDependencies ++= { if (isDotty.value) Seq( - ("com.github.ghik" % s"silencer-lib_2.13.3" % "1.7.1" % Provided) + ("com.github.ghik" % s"silencer-lib_2.13.3" % "1.7.3" % Provided) .withDottyCompat(scalaVersion.value) ) else From df3fbb4839bede8444ad29491191fbfce4621369 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 25 Feb 2021 07:02:04 +0100 Subject: [PATCH 183/673] Update testcontainers-scala-mysql to 0.39.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a204f0d9d..5a7c743f1 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.4-2" val testcontainersVersion = "1.15.2" -val testcontainersScalaVersion = "0.39.0" +val testcontainersScalaVersion = "0.39.3" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From 687e7433cc525c60c5e882a18d24696e8e49c604 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 25 Feb 2021 13:31:49 +0100 Subject: [PATCH 184/673] Update testcontainers-scala-oracle-xe, ... to 0.39.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a204f0d9d..5a7c743f1 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.4-2" val testcontainersVersion = "1.15.2" -val testcontainersScalaVersion = "0.39.0" +val testcontainersScalaVersion = "0.39.3" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From d07a02c08f49ceb77b1ce5cda0deecbd32550251 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 27 Feb 2021 03:17:18 +0100 Subject: [PATCH 185/673] Update scala-library to 2.13.5 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index edf996122..6b62005c3 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -10,7 +10,7 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val Scala211 = "2.11.12" + val Scala211 = "2.13.5" val Scala212 = "2.12.12" val Scala213 = "2.13.3" val DottyVersion = "0.27.0-RC1" From e1dfe7d23dab7d314664796064ccf075f188e984 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 27 Feb 2021 21:20:22 +0100 Subject: [PATCH 186/673] Update sbt-scalafix to 0.9.26 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ad6abf785..1dbbf6b73 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,5 +11,5 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.2") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.25") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") From a29717f36c6b3a2c4b22fc3808af96d7872679dd Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 1 Mar 2021 22:24:30 +0100 Subject: [PATCH 187/673] Reenable Delete tests and examples --- README.md | 2 +- examples/src/main/scala/Example1.scala | 2 +- .../src/main/scala/zio/sql/Examples.scala | 2 +- .../scala/zio/sql/postgresql/DeleteSpec.scala | 27 +++++++++++++++++++ ...uleTest.scala => PostgresModuleSpec.scala} | 26 +----------------- project/BuildHelper.scala | 2 +- 6 files changed, 32 insertions(+), 29 deletions(-) create mode 100644 postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala rename postgres/src/test/scala/zio/sql/postgresql/{PostgresModuleTest.scala => PostgresModuleSpec.scala} (92%) diff --git a/README.md b/README.md index 24437ffab..c15129ba1 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Running Reads | :heavy_check_mark: Running Deletes | :heavy_check_mark: Running Updates | :heavy_check_mark: Running Inserts | -Transactions | +Transactions | :white_check_mark: Connection pool | #### Db-specific features: diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index f2c2b8427..2a1ed6b42 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -39,7 +39,7 @@ object Example1 extends Sql { (Arbitrary(age) as "age") ++ (Count(1) as "count") } from table) groupBy age - //val deleted = deleteFrom(table).where(age === 3) + val deleted = deleteFrom(table).where(age === 3) val updated = update(table) diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index a52b9de85..dec1f3b52 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -33,7 +33,7 @@ object Examples extends App with ShopSchema with SqlServerModule { //delete from users where first_name = 'Terrence' val basicDelete = deleteFrom(users).where(fName === "Terrence") - //println(renderDelete(basicDelete)) + println(renderDelete(basicDelete)) /* val deleteFromWithSubquery = deleteFrom(orders).where(fkUserId in { diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala new file mode 100644 index 000000000..c5dd8e3c2 --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -0,0 +1,27 @@ +package zio.sql.postgresql + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +import scala.language.postfixOps + +object DeleteSpec extends PostgresRunnableSpec with ShopSchema { + + import Customers._ + + override def specLayered = suite("Postgres module delete")( + testM("Can delete from single table with a condition") { + val query = deleteFrom(customers) where (verified isNotTrue) + println(renderDelete(query)) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(1)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala similarity index 92% rename from postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala rename to postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 2048d659c..dc8651ab0 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleTest.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -9,7 +9,7 @@ import zio.test._ import scala.language.postfixOps -object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { +object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { import Customers._ import Orders._ @@ -291,29 +291,5 @@ object PostgresModuleTest extends PostgresRunnableSpec with ShopSchema { assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) } - // testM("Can delete all from a single table") { TODO: Does not work on 2.12 yet - // val query = deleteFrom(customers) - // println(renderDelete(query)) - - // val result = execute(query) - - // val assertion = for { - // r <- result - // } yield assert(r)(equalTo(5)) - - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // }, - // testM("Can delete from single table with a condition") { - // val query = deleteFrom(customers) where (verified isNotTrue) - // println(renderDelete(query)) - - // val result = execute(query) - - // val assertion = for { - // r <- result - // } yield assert(r)(equalTo(1)) - - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // } ) } diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 6e5b2030e..edf996122 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -183,7 +183,7 @@ object BuildHelper { name := s"$prjName", scalacOptions := stdOptions, crossScalaVersions := Seq(Scala213, Scala212, Scala211), - scalaVersion in ThisBuild := Scala212, + scalaVersion in ThisBuild := crossScalaVersions.value.head, scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), libraryDependencies ++= { if (isDotty.value) From 09487ac2d22c694f9151ffc0b8fca36a9af78cf6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 1 Mar 2021 23:23:38 +0100 Subject: [PATCH 188/673] Update sbt-scalafix to 0.9.26 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index fe5a4170f..327ef0177 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,5 +11,5 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.25") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") From 8c62fd28c5546444f68225dba35d966b6b786a5f Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Thu, 4 Mar 2021 01:42:30 +0100 Subject: [PATCH 189/673] Merge pull request #404 from jczuchnowski/scala-2.12.13 Update scala to 2.12.13 --- .github/workflows/ci.yml | 2 +- core/jvm/src/main/scala/zio/sql/expr.scala | 3 + .../jvm/src/main/scala/zio/sql/features.scala | 3 + .../scala/zio/sql/mysql/MysqlModule.scala | 81 ++++++++++++++----- .../scala/zio/sql/oracle/OracleModule.scala | 81 ++++++++++++++----- .../zio/sql/postgresql/PostgresModule.scala | 5 +- project/BuildHelper.scala | 23 +----- sbt | 4 +- 8 files changed, 136 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8ff4a8b7..5e1e44172 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.12', '2.13.3'] + scala: ['2.12.13', '2.13.5'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index b8bc1e75d..c429ec0a5 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -2,6 +2,8 @@ package zio.sql import java.time._ +import com.github.ghik.silencer.silent + import scala.language.implicitConversions trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { @@ -431,6 +433,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { object Set { type Aux[F, -A, Value0] = Set[F, A] { type Value = Value0 } + @silent def apply[F: Features.IsSource, A, Value0: TypeTag]( lhs0: Expr[F, A, Value0], rhs0: Expr[_, A, Value0] diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index 1d5ef2ede..0e14680d6 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -1,5 +1,7 @@ package zio.sql +import com.github.ghik.silencer.silent + import scala.annotation.implicitNotFound trait FeaturesModule { @@ -20,6 +22,7 @@ trait FeaturesModule { implicit def AggregatedIsAggregated[A]: IsAggregated[Aggregated[A]] = new IsAggregated[Aggregated[A]] {} + @silent implicit def UnionIsAggregated[A: IsAggregated, B: IsAggregated]: IsAggregated[Union[A, B]] = new IsAggregated[Union[A, B]] {} } diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 581f4d9d7..c502f1e5a 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -12,57 +12,51 @@ trait MysqlModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") buildExpr(right) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall0(function) if function.name.name == "localtime" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) if function.name.name == "localtimestamp" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) if function.name.name == "current_date" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) if function.name.name == "current_timestamp" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) => + case Expr.ParenlessFunctionCall0(functionName) => + val _ = builder.append(functionName.name) + case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) builder.append(",") buildExpr(param2) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -71,7 +65,7 @@ trait MysqlModule extends Jdbc { self => builder.append(",") buildExpr(param3) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1) @@ -82,6 +76,51 @@ trait MysqlModule extends Jdbc { self => builder.append(",") buildExpr(param4) val _ = builder.append(")") + case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + val _ = builder.append(")") + case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + builder.append(",") + buildExpr(param6) + val _ = builder.append(")") + case Expr.FunctionCall7(param1, param2, param3, param4, param5, param6, param7, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + builder.append(",") + buildExpr(param6) + builder.append(",") + buildExpr(param7) + val _ = builder.append(")") } def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index bc8d0465c..152b04098 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -9,57 +9,51 @@ trait OracleModule extends Jdbc { self => } def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { - case Expr.Source(tableName, column) => + case Expr.Source(tableName, column) => val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => + case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base, builder) - case Expr.Property(base, op) => + case Expr.Property(base, op) => buildExpr(base, builder) val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => + case Expr.Binary(left, right, op) => buildExpr(left, builder) builder.append(" ").append(op.symbol).append(" ") buildExpr(right, builder) - case Expr.Relational(left, right, op) => + case Expr.Relational(left, right, op) => buildExpr(left, builder) builder.append(" ").append(op.symbol).append(" ") buildExpr(right, builder) - case Expr.In(value, set) => + case Expr.In(value, set) => buildExpr(value, builder) buildReadString(set, builder) - case Expr.Literal(value) => + case Expr.Literal(value) => val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => + case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") buildExpr(param, builder) val _ = builder.append(")") - case Expr.FunctionCall0(function) if function.name.name == "localtime" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) if function.name.name == "localtimestamp" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) if function.name.name == "current_date" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) if function.name.name == "current_timestamp" => - val _ = builder.append(function.name.name) - case Expr.FunctionCall0(function) => + case Expr.ParenlessFunctionCall0(functionName) => + val _ = builder.append(functionName.name) + case Expr.FunctionCall0(function) => builder.append(function.name.name) builder.append("(") val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => + case Expr.FunctionCall1(param, function) => builder.append(function.name.name) builder.append("(") buildExpr(param, builder) val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => + case Expr.FunctionCall2(param1, param2, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1, builder) builder.append(",") buildExpr(param2, builder) val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => + case Expr.FunctionCall3(param1, param2, param3, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1, builder) @@ -68,7 +62,7 @@ trait OracleModule extends Jdbc { self => builder.append(",") buildExpr(param3, builder) val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => + case Expr.FunctionCall4(param1, param2, param3, param4, function) => builder.append(function.name.name) builder.append("(") buildExpr(param1, builder) @@ -79,6 +73,51 @@ trait OracleModule extends Jdbc { self => builder.append(",") buildExpr(param4, builder) val _ = builder.append(")") + case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1, builder) + builder.append(",") + buildExpr(param2, builder) + builder.append(",") + buildExpr(param3, builder) + builder.append(",") + buildExpr(param4, builder) + builder.append(",") + buildExpr(param5, builder) + val _ = builder.append(")") + case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1, builder) + builder.append(",") + buildExpr(param2, builder) + builder.append(",") + buildExpr(param3, builder) + builder.append(",") + buildExpr(param4, builder) + builder.append(",") + buildExpr(param5, builder) + builder.append(",") + buildExpr(param6, builder) + val _ = builder.append(")") + case Expr.FunctionCall7(param1, param2, param3, param4, param5, param6, param7, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1, builder) + builder.append(",") + buildExpr(param2, builder) + builder.append(",") + buildExpr(param3, builder) + builder.append(",") + buildExpr(param4, builder) + builder.append(",") + buildExpr(param5, builder) + builder.append(",") + buildExpr(param6, builder) + builder.append(",") + buildExpr(param7, builder) + val _ = builder.append(")") } def buildReadString[A <: SelectionSet[_]](read: self.Read[_], builder: StringBuilder): Unit = diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 3cfa1a142..aac51bb4a 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -292,8 +292,9 @@ trait PostgresModule extends Jdbc { self => lit.typeTag match { case TDialectSpecific(tt) => tt match { - case tt @ TInterval => render(tt.cast(lit.value)) - case tt @ TTimestampz => render(tt.cast(lit.value)) + case tt @ TInterval => render(tt.cast(lit.value)) + case tt @ TTimestampz => render(tt.cast(lit.value)) + case _: PostgresSpecific.PostgresTypeTag[_] => ??? } case tt @ TByteArray => render(tt.cast(lit.value)) // todo still broken //something like? render(tt.cast(lit.value).map("\\\\%03o" format _).mkString("E\'", "", "\'")) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 6a5796315..9028563a3 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -10,11 +10,10 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val Scala211 = "2.13.5" - val Scala212 = "2.12.12" - val Scala213 = "2.13.3" + val SilencerVersion = "1.7.3" + val Scala212 = "2.12.13" + val Scala213 = "2.13.5" val DottyVersion = "0.27.0-RC1" - val SilencerVersion = "1.7.1" def buildInfoSettings(packageName: String) = Seq( @@ -113,8 +112,6 @@ object BuildHelper { def crossPlatformSources(scalaVer: String, platform: String, conf: String, baseDir: File, isDotty: Boolean) = CrossVersion.partialVersion(scalaVer) match { - case Some((2, x)) if x <= 11 => - platformSpecificSources(platform, conf, baseDir)("2.11", "2.x") case Some((2, x)) if x >= 12 => platformSpecificSources(platform, conf, baseDir)("2.12+", "2.12", "2.x") case _ if isDotty => @@ -182,7 +179,7 @@ object BuildHelper { def stdSettings(prjName: String) = Seq( name := s"$prjName", scalacOptions := stdOptions, - crossScalaVersions := Seq(Scala213, Scala212, Scala211), + crossScalaVersions := Seq(Scala213, Scala212), scalaVersion in ThisBuild := crossScalaVersions.value.head, scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), libraryDependencies ++= { @@ -204,13 +201,6 @@ object BuildHelper { unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library"), Compile / unmanagedSourceDirectories ++= { CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, x)) if x <= 11 => - Seq( - Seq(file(sourceDirectory.value.getPath + "/main/scala-2.11")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-2.11")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "test").toList.map(f => file(f.getPath + "-2.11")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-2.x")) - ).flatten case Some((2, x)) if x >= 12 => Seq( Seq(file(sourceDirectory.value.getPath + "/main/scala-2.12")), @@ -235,11 +225,6 @@ object BuildHelper { }, Test / unmanagedSourceDirectories ++= { CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, x)) if x <= 11 => - Seq( - Seq(file(sourceDirectory.value.getPath + "/test/scala-2.11")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "test").toList.map(f => file(f.getPath + "-2.x")) - ).flatten case Some((2, x)) if x >= 12 => Seq( Seq(file(sourceDirectory.value.getPath + "/test/scala-2.12")), diff --git a/sbt b/sbt index 11a73fbcf..00bf0d880 100755 --- a/sbt +++ b/sbt @@ -37,8 +37,8 @@ set -o pipefail declare -r sbt_release_version="1.3.13" declare -r sbt_unreleased_version="1.4.0-M1" -declare -r latest_213="2.13.3" -declare -r latest_212="2.12.12" +declare -r latest_213="2.13.5" +declare -r latest_212="2.12.13" declare -r latest_211="2.11.12" declare -r latest_210="2.10.7" declare -r latest_29="2.9.3" From d07734bfb64ac53f5f4e124fa6cac03987d0bde5 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 11:47:45 -0500 Subject: [PATCH 190/673] Code cleanup & connection pool implementation --- .gitignore | 1 + core/jvm/src/main/scala/zio/sql/select.scala | 6 +- .../main/scala/zio/sql/ConnectionPool.scala | 140 ++++++++++++++++++ .../src/main/scala/zio/sql/Renderer.scala | 4 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 47 ++---- jdbc/src/main/scala/zio/sql/package.scala | 3 + .../sql/postgresql/PostgresRunnableSpec.scala | 3 +- 7 files changed, 160 insertions(+), 44 deletions(-) create mode 100644 jdbc/src/main/scala/zio/sql/ConnectionPool.scala rename {core/jvm => jdbc}/src/main/scala/zio/sql/Renderer.scala (84%) create mode 100644 jdbc/src/main/scala/zio/sql/package.scala diff --git a/.gitignore b/.gitignore index 67c0deef0..6eac9ad55 100644 --- a/.gitignore +++ b/.gitignore @@ -409,6 +409,7 @@ project/plugins/project/ metals.sbt .bloop/ project/secret +null # mdoc website/node_modules diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index ffbdd09cf..28654aab5 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -54,10 +54,12 @@ trait SelectModule { self: ExprModule with TableModule => copy(groupBy = groupBy ++ (key :: keys.toList)) } - def having(havingExpr2: Expr[_, A, Boolean]) /*(implicit + def having(havingExpr2: Expr[_, A, Boolean])(implicit ev: Features.IsAggregated[F] - )*/: Select[F, A, B] = + ): Select[F, A, B] = { + val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) + } } sealed case class Union[B <: SelectionSet[_]](left: Read[B], right: Read[B], distinct: Boolean) extends Read[B] { diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala new file mode 100644 index 000000000..d5f3118a9 --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -0,0 +1,140 @@ +package zio.sql + +import java.io.IOException +import java.sql._ + +import zio.stm._ +import zio._ +import zio.duration._ +import zio.blocking._ +import zio.clock._ + +trait ConnectionPool { + + /** + * Retrieves a JDBC [[java.sql.Connection]] as a [[zio.Managed]] resource. + * The managed resource will safely acquire and release the connection, and + * may be interrupted or timed out if necessary. + */ + def connection: Managed[Exception, Connection] +} +object ConnectionPool { + + /** + * Configuration information for the connection pool. + * + * @param url The JDBC connection string. + * @param properties JDBC connection properties (username / password could go here). + * @param poolSize The size of the pool. + * @param queueCapacity The capacity of the queue for connections. When this size is reached, back pressure will block attempts to add more. + * @param retryPolicy The retry policy to use when acquiring connections. + */ + final case class Config( + url: String, + properties: java.util.Properties, + poolSize: Int = 10, + queueCapacity: Int = 1000, + retryPolicy: Schedule[Any, Exception, Any] = Schedule.recurs(20) && Schedule.exponential(10.millis) + ) + + val live: ZLayer[Has[Config] with Blocking with Clock, IOException, Has[ConnectionPool]] = + (for { + config <- ZManaged.service[Config] + blocking <- ZManaged.service[Blocking.Service] + clock <- ZManaged.service[Clock.Service] + queue <- TQueue.bounded[TPromise[Nothing, Connection]](config.queueCapacity).commit.toManaged_ + available <- TRef.make(List.empty[Connection]).commit.toManaged_ + taken <- TRef.make(List.empty[Connection]).commit.toManaged_ + pool = ConnectionPoolLive(queue, available, taken, config, clock, blocking) + _ <- pool.initialize.toManaged_ + _ <- ZManaged.finalizer(pool.close.orDie) + } yield pool).toLayer +} + +final case class ConnectionPoolLive( + queue: TQueue[TPromise[Nothing, Connection]], + available: TRef[List[Connection]], + taken: TRef[List[Connection]], + config: ConnectionPool.Config, + clock: Clock.Service, + blocking: Blocking.Service +) extends ConnectionPool { + + /** + * Closes the connection pool, terminating each connection in parallel. + */ + def close: IO[IOException, Any] = + ZIO.uninterruptible { + available.get.commit.zipWith(taken.get.commit)(_ ++ _).flatMap { all => + ZIO.foreachPar(all) { connection => + blocking.effectBlocking(connection.close()).refineToOrDie[IOException] + } + } + } + + def connection: Managed[Exception, Connection] = + ZManaged.make(tryTake.commit.flatMap { + case Left(promise) => + ZIO.interruptible(promise.await.commit).onInterrupt { + promise.poll.flatMap { + case Some(Right(connection)) => + ZSTM.succeed(release(connection)) + + case _ => ZSTM.succeed(ZIO.unit) + }.commit.flatten + } + + case Right(connection) => + ZIO.succeed(connection) + })(release(_)) + + /** + * Initializes the connection pool. + */ + val initialize: IO[IOException, Unit] = { + val makeConnection = blocking.effectBlocking { + DriverManager.getConnection(config.url, config.properties) + }.refineToOrDie[IOException] + + ZIO + .foreachPar_(1 to config.poolSize) { _ => + ZIO.uninterruptible { + for { + connection <- makeConnection.retry(config.retryPolicy).provide(Has(clock)) + _ <- available.update(connection :: _).commit + } yield connection + } + } + .unit + } + + private def release(connection: Connection): UIO[Any] = + ZIO.uninterruptible { + tryRelease(connection).commit.flatMap { + case Some(promise) => promise.succeed(connection).commit + case None => UIO.unit + } + } + + private def tryRelease(connection: Connection): STM[Nothing, Option[TPromise[Nothing, Connection]]] = + for { + empty <- queue.isEmpty + result <- if (empty) available.update(connection :: _) *> STM.none + else queue.take.map(Some(_)) + } yield result + + private val tryTake: STM[Nothing, Either[TPromise[Nothing, Connection], Connection]] = + for { + headOption <- available.get.map(_.headOption) + either <- headOption match { + case None => + for { + promise <- TPromise.make[Nothing, Connection] + _ <- queue.offer(promise) + } yield Left(promise) + + case Some(connection) => + available.update(_.tail) *> ZSTM.succeed(Right(connection)) + } + } yield either +} diff --git a/core/jvm/src/main/scala/zio/sql/Renderer.scala b/jdbc/src/main/scala/zio/sql/Renderer.scala similarity index 84% rename from core/jvm/src/main/scala/zio/sql/Renderer.scala rename to jdbc/src/main/scala/zio/sql/Renderer.scala index 3b84db1be..aa96cbe1a 100644 --- a/core/jvm/src/main/scala/zio/sql/Renderer.scala +++ b/jdbc/src/main/scala/zio/sql/Renderer.scala @@ -1,6 +1,6 @@ package zio.sql -class Renderer(val builder: StringBuilder) extends AnyVal { +private[sql] class Renderer(val builder: StringBuilder) extends AnyVal { //not using vararg to avoid allocating `Seq`s def apply(s1: Any): Unit = { val _ = builder.append(s1) @@ -18,6 +18,6 @@ class Renderer(val builder: StringBuilder) extends AnyVal { override def toString: String = builder.toString() } -object Renderer { +private[sql] object Renderer { def apply(): Renderer = new Renderer(new StringBuilder) } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index d53252eb4..71b26468b 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,41 +1,12 @@ package zio.sql -import java.io.IOException import java.sql._ import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset } -import zio.{ Chunk, Has, IO, Managed, ZIO, ZLayer, ZManaged } +import zio.{ Chunk, Has, IO, ZIO, ZLayer } import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } trait Jdbc extends zio.sql.Sql with TransactionModule { - type ConnectionPool = Has[ConnectionPool.Service] - object ConnectionPool { - sealed case class Config(url: String, properties: java.util.Properties) - - trait Service { - def connection: Managed[Exception, Connection] - } - - val live: ZLayer[Has[Config] with Blocking, IOException, ConnectionPool] = - ZLayer.fromFunctionManaged[Has[Config] with Blocking, IOException, Service] { env => - val blocking = env.get[Blocking.Service] - val config = env.get[Config] - - // TODO: Make a real connection pool with warmup. - ZManaged.succeed { - new Service { - // TODO: effectBlockingIO should not require Blocking!! - def connection: Managed[Exception, Connection] = - Managed.make( - blocking - .effectBlocking(DriverManager.getConnection(config.url, config.properties)) - .refineToOrDie[IOException] - )(conn => blocking.effectBlocking(conn.close()).orDie) - } - } - } - } - type DeleteExecutor = Has[DeleteExecutor.Service] object DeleteExecutor { trait Service { @@ -43,8 +14,8 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { def executeOn(delete: Delete[_], conn: Connection): IO[Exception, Int] } - val live: ZLayer[ConnectionPool with Blocking, Nothing, DeleteExecutor] = - ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, DeleteExecutor.Service] { (pool, blocking) => + val live: ZLayer[Has[ConnectionPool] with Blocking, Nothing, DeleteExecutor] = + ZLayer.fromServices[ConnectionPool, Blocking.Service, DeleteExecutor.Service] { (pool, blocking) => new Service { def execute(delete: Delete[_]): IO[Exception, Int] = pool.connection.use { conn => executeOn(delete, conn) @@ -66,8 +37,8 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { def executeOn(update: Update[_], conn: Connection): IO[Exception, Int] } - val live: ZLayer[ConnectionPool with Blocking, Nothing, UpdateExecutor] = - ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, UpdateExecutor.Service] { (pool, blocking) => + val live: ZLayer[Has[ConnectionPool] with Blocking, Nothing, UpdateExecutor] = + ZLayer.fromServices[ConnectionPool, Blocking.Service, UpdateExecutor.Service] { (pool, blocking) => new Service { def execute(update: Update[_]): IO[Exception, Int] = pool.connection @@ -93,12 +64,12 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { } val live: ZLayer[ - ConnectionPool with Blocking with ReadExecutor with UpdateExecutor with DeleteExecutor, + Has[ConnectionPool] with Blocking with ReadExecutor with UpdateExecutor with DeleteExecutor, Exception, TransactionExecutor ] = ZLayer.fromServices[ - ConnectionPool.Service, + ConnectionPool, Blocking.Service, ReadExecutor.Service, UpdateExecutor.Service, @@ -149,8 +120,8 @@ trait Jdbc extends zio.sql.Sql with TransactionModule { def executeOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] } - val live: ZLayer[ConnectionPool with Blocking, Nothing, ReadExecutor] = - ZLayer.fromServices[ConnectionPool.Service, Blocking.Service, ReadExecutor.Service] { (pool, blocking) => + val live: ZLayer[Has[ConnectionPool] with Blocking, Nothing, ReadExecutor] = + ZLayer.fromServices[ConnectionPool, Blocking.Service, ReadExecutor.Service] { (pool, blocking) => new Service { // TODO: Allow partial success for nullable columns def execute[A <: SelectionSet[_], Target]( diff --git a/jdbc/src/main/scala/zio/sql/package.scala b/jdbc/src/main/scala/zio/sql/package.scala new file mode 100644 index 000000000..b3e1f0091 --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/package.scala @@ -0,0 +1,3 @@ +package zio + +package object sql {} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 3f655f8e6..8854e1cb8 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -3,9 +3,8 @@ package zio.sql.postgresql import zio.test._ import zio.test.environment.TestEnvironment import java.util.Properties -import zio.sql.TestContainer +import zio.sql.{ ConnectionPool, JdbcRunnableSpec, TestContainer } import zio.Has -import zio.sql.JdbcRunnableSpec trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { From 03018058c062c426e6a8b4c7ae9209513fba0a7a Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 11:51:57 -0500 Subject: [PATCH 191/673] Improvement to blocking behavior --- jdbc/src/main/scala/zio/sql/ConnectionPool.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index d5f3118a9..ba720b8f7 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -63,11 +63,13 @@ final case class ConnectionPoolLive( /** * Closes the connection pool, terminating each connection in parallel. */ - def close: IO[IOException, Any] = + val close: IO[IOException, Any] = ZIO.uninterruptible { available.get.commit.zipWith(taken.get.commit)(_ ++ _).flatMap { all => - ZIO.foreachPar(all) { connection => - blocking.effectBlocking(connection.close()).refineToOrDie[IOException] + blocking.blocking { + ZIO.foreachPar(all) { connection => + ZIO(connection.close()).refineToOrDie[IOException] + } } } } From 8784350bf258f09287d242d2658e5f2067d9b957 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 12:32:08 -0500 Subject: [PATCH 192/673] Cleanup & pull out ConnectionPoolConfig --- .../main/scala/zio/sql/ConnectionPool.scala | 61 +++++++++---------- .../scala/zio/sql/ConnectionPoolConfig.scala | 21 +++++++ .../main/scala/zio/sql/JdbcRunnableSpec.scala | 10 +-- .../zio/sql/mysql/MysqlRunnableSpec.scala | 2 +- .../sql/postgresql/PostgresRunnableSpec.scala | 4 +- 5 files changed, 59 insertions(+), 39 deletions(-) create mode 100644 jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index ba720b8f7..cf4e33077 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -5,7 +5,6 @@ import java.sql._ import zio.stm._ import zio._ -import zio.duration._ import zio.blocking._ import zio.clock._ @@ -21,25 +20,12 @@ trait ConnectionPool { object ConnectionPool { /** - * Configuration information for the connection pool. - * - * @param url The JDBC connection string. - * @param properties JDBC connection properties (username / password could go here). - * @param poolSize The size of the pool. - * @param queueCapacity The capacity of the queue for connections. When this size is reached, back pressure will block attempts to add more. - * @param retryPolicy The retry policy to use when acquiring connections. + * A live layer for `ConnectionPool` that creates a JDBC connection pool + * from the specified connection pool settings. */ - final case class Config( - url: String, - properties: java.util.Properties, - poolSize: Int = 10, - queueCapacity: Int = 1000, - retryPolicy: Schedule[Any, Exception, Any] = Schedule.recurs(20) && Schedule.exponential(10.millis) - ) - - val live: ZLayer[Has[Config] with Blocking with Clock, IOException, Has[ConnectionPool]] = + val live: ZLayer[Has[ConnectionPoolConfig] with Blocking with Clock, IOException, Has[ConnectionPool]] = (for { - config <- ZManaged.service[Config] + config <- ZManaged.service[ConnectionPoolConfig] blocking <- ZManaged.service[Blocking.Service] clock <- ZManaged.service[Clock.Service] queue <- TQueue.bounded[TPromise[Nothing, Connection]](config.queueCapacity).commit.toManaged_ @@ -51,15 +37,38 @@ object ConnectionPool { } yield pool).toLayer } +/** + * A live concurrent connection pool. + * + * Improvements to make: + * + * - A connection may die. If so, it should be reacquired. + * - Someone may try to use a connection forever. If so, we should + * take it away from them. + */ final case class ConnectionPoolLive( queue: TQueue[TPromise[Nothing, Connection]], available: TRef[List[Connection]], taken: TRef[List[Connection]], - config: ConnectionPool.Config, + config: ConnectionPoolConfig, clock: Clock.Service, blocking: Blocking.Service ) extends ConnectionPool { + /** + * Adds a fresh connection to the connection pool. + */ + val addFreshConnection: IO[IOException, Connection] = { + val makeConnection = blocking.effectBlocking { + DriverManager.getConnection(config.url, config.properties) + }.refineToOrDie[IOException] + + for { + connection <- makeConnection.retry(config.retryPolicy).provide(Has(clock)) + _ <- available.update(connection :: _).commit + } yield connection + } + /** * Closes the connection pool, terminating each connection in parallel. */ @@ -93,22 +102,12 @@ final case class ConnectionPoolLive( /** * Initializes the connection pool. */ - val initialize: IO[IOException, Unit] = { - val makeConnection = blocking.effectBlocking { - DriverManager.getConnection(config.url, config.properties) - }.refineToOrDie[IOException] - + val initialize: IO[IOException, Unit] = ZIO .foreachPar_(1 to config.poolSize) { _ => - ZIO.uninterruptible { - for { - connection <- makeConnection.retry(config.retryPolicy).provide(Has(clock)) - _ <- available.update(connection :: _).commit - } yield connection - } + ZIO.uninterruptible(addFreshConnection) } .unit - } private def release(connection: Connection): UIO[Any] = ZIO.uninterruptible { diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala b/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala new file mode 100644 index 000000000..400c6ed1f --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala @@ -0,0 +1,21 @@ +package zio.sql + +import zio.Schedule +import zio.duration._ + +/** + * Configuration information for the connection pool. + * + * @param url The JDBC connection string. + * @param properties JDBC connection properties (username / password could go here). + * @param poolSize The size of the pool. + * @param queueCapacity The capacity of the queue for connections. When this size is reached, back pressure will block attempts to add more. + * @param retryPolicy The retry policy to use when acquiring connections. + */ +final case class ConnectionPoolConfig( + url: String, + properties: java.util.Properties, + poolSize: Int = 10, + queueCapacity: Int = 1000, + retryPolicy: Schedule[Any, Exception, Any] = Schedule.recurs(20) && Schedule.exponential(10.millis) +) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index 5feb2677f..baad8b145 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -4,6 +4,7 @@ import zio.test.environment.TestEnvironment import zio.test.DefaultRunnableSpec import zio.ZLayer import zio.blocking.Blocking +import zio.clock.Clock import zio.Has trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { @@ -14,14 +15,13 @@ trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { with DeleteExecutor with TransactionExecutor - val poolConfigLayer: ZLayer[Blocking, Throwable, Has[ConnectionPool.Config]] + val poolConfigLayer: ZLayer[Blocking, Throwable, Has[ConnectionPoolConfig]] final lazy val executorLayer = { - val connectionPoolLayer = ZLayer.identity[Blocking] >+> poolConfigLayer >>> ConnectionPool.live + val connectionPoolLayer: ZLayer[Blocking with Clock, Throwable, Has[ConnectionPool]] = + ((Blocking.any >+> poolConfigLayer) ++ Clock.any) >>> ConnectionPool.live - (ZLayer.identity[ - Blocking - ] ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie + (Blocking.any ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie } final lazy val jdbcLayer = TestEnvironment.live >+> executorLayer diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index b2bb5c071..da0b7385b 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -18,7 +18,7 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { val poolConfigLayer = TestContainer .mysql() - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + .map(a => Has(ConnectionPoolConfig(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(jdbcLayer) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 8854e1cb8..8dda86e1f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -3,7 +3,7 @@ package zio.sql.postgresql import zio.test._ import zio.test.environment.TestEnvironment import java.util.Properties -import zio.sql.{ ConnectionPool, JdbcRunnableSpec, TestContainer } +import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } import zio.Has trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { @@ -17,7 +17,7 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { val poolConfigLayer = TestContainer .postgres() - .map(a => Has(ConnectionPool.Config(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + .map(a => Has(ConnectionPoolConfig(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(jdbcLayer) From f0f5ead4bc7f14021b4416dba3bdcf6b51eef0e6 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 13:32:56 -0500 Subject: [PATCH 193/673] Reset connections --- .../main/scala/zio/sql/ConnectionPool.scala | 92 +-- .../scala/zio/sql/ExecuteBuilderModule.scala | 186 ++++++ .../scala/zio/sql/JdbcInternalModule.scala | 136 +++++ .../main/scala/zio/sql/JdbcRunnableSpec.scala | 8 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 536 +++--------------- .../zio/sql/postgresql/FunctionDefSpec.scala | 4 +- 6 files changed, 478 insertions(+), 484 deletions(-) create mode 100644 jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala create mode 100644 jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index cf4e33077..b66192de8 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -28,10 +28,9 @@ object ConnectionPool { config <- ZManaged.service[ConnectionPoolConfig] blocking <- ZManaged.service[Blocking.Service] clock <- ZManaged.service[Clock.Service] - queue <- TQueue.bounded[TPromise[Nothing, Connection]](config.queueCapacity).commit.toManaged_ - available <- TRef.make(List.empty[Connection]).commit.toManaged_ - taken <- TRef.make(List.empty[Connection]).commit.toManaged_ - pool = ConnectionPoolLive(queue, available, taken, config, clock, blocking) + queue <- TQueue.bounded[TPromise[Nothing, ResettableConnection]](config.queueCapacity).commit.toManaged_ + available <- TRef.make(List.empty[ResettableConnection]).commit.toManaged_ + pool = ConnectionPoolLive(queue, available, config, clock, blocking) _ <- pool.initialize.toManaged_ _ <- ZManaged.finalizer(pool.close.orDie) } yield pool).toLayer @@ -47,9 +46,8 @@ object ConnectionPool { * take it away from them. */ final case class ConnectionPoolLive( - queue: TQueue[TPromise[Nothing, Connection]], - available: TRef[List[Connection]], - taken: TRef[List[Connection]], + queue: TQueue[TPromise[Nothing, ResettableConnection]], + available: TRef[List[ResettableConnection]], config: ConnectionPoolConfig, clock: Clock.Service, blocking: Blocking.Service @@ -58,9 +56,27 @@ final case class ConnectionPoolLive( /** * Adds a fresh connection to the connection pool. */ - val addFreshConnection: IO[IOException, Connection] = { + val addFreshConnection: IO[IOException, ResettableConnection] = { val makeConnection = blocking.effectBlocking { - DriverManager.getConnection(config.url, config.properties) + val connection = DriverManager.getConnection(config.url, config.properties) + + val autoCommit = connection.getAutoCommit() + val catalog = connection.getCatalog() + val clientInfo = connection.getClientInfo() + val holdability = connection.getHoldability() + val schema = connection.getSchema() + val isolation = connection.getTransactionIsolation() + + val restore: Connection => Unit = connection => { + if (connection.getAutoCommit() != autoCommit) connection.setAutoCommit(autoCommit) + if (connection.getCatalog() ne catalog) connection.setCatalog(catalog) + if (connection.getClientInfo() ne clientInfo) connection.setClientInfo(clientInfo) + if (connection.getHoldability() != holdability) connection.setHoldability(holdability) + if (connection.getSchema() != schema) connection.setSchema(schema) + if (connection.getTransactionIsolation() != isolation) connection.setTransactionIsolation(isolation) + } + + new ResettableConnection(connection, restore) }.refineToOrDie[IOException] for { @@ -74,42 +90,46 @@ final case class ConnectionPoolLive( */ val close: IO[IOException, Any] = ZIO.uninterruptible { - available.get.commit.zipWith(taken.get.commit)(_ ++ _).flatMap { all => + available.get.commit.flatMap { all => blocking.blocking { ZIO.foreachPar(all) { connection => - ZIO(connection.close()).refineToOrDie[IOException] + ZIO(connection.connection.close()).refineToOrDie[IOException] } } } } def connection: Managed[Exception, Connection] = - ZManaged.make(tryTake.commit.flatMap { - case Left(promise) => - ZIO.interruptible(promise.await.commit).onInterrupt { - promise.poll.flatMap { - case Some(Right(connection)) => - ZSTM.succeed(release(connection)) - - case _ => ZSTM.succeed(ZIO.unit) - }.commit.flatten - } + ZManaged + .make(tryTake.commit.flatMap { + case Left(promise) => + ZIO.interruptible(promise.await.commit).onInterrupt { + promise.poll.flatMap { + case Some(Right(connection)) => + ZSTM.succeed(release(connection)) + + case _ => ZSTM.succeed(ZIO.unit) + }.commit.flatten + } - case Right(connection) => - ZIO.succeed(connection) - })(release(_)) + case Right(connection) => + ZIO.succeed(connection) + })(release(_)) + .flatMap(rc => rc.reset.toManaged_.as(rc.connection)) /** * Initializes the connection pool. */ val initialize: IO[IOException, Unit] = - ZIO - .foreachPar_(1 to config.poolSize) { _ => - ZIO.uninterruptible(addFreshConnection) - } - .unit + ZIO.uninterruptible { + ZIO + .foreachPar_(1 to config.poolSize) { _ => + addFreshConnection + } + .unit + } - private def release(connection: Connection): UIO[Any] = + private def release(connection: ResettableConnection): UIO[Any] = ZIO.uninterruptible { tryRelease(connection).commit.flatMap { case Some(promise) => promise.succeed(connection).commit @@ -117,20 +137,22 @@ final case class ConnectionPoolLive( } } - private def tryRelease(connection: Connection): STM[Nothing, Option[TPromise[Nothing, Connection]]] = + private def tryRelease( + connection: ResettableConnection + ): STM[Nothing, Option[TPromise[Nothing, ResettableConnection]]] = for { empty <- queue.isEmpty result <- if (empty) available.update(connection :: _) *> STM.none else queue.take.map(Some(_)) } yield result - private val tryTake: STM[Nothing, Either[TPromise[Nothing, Connection], Connection]] = + private val tryTake: STM[Nothing, Either[TPromise[Nothing, ResettableConnection], ResettableConnection]] = for { headOption <- available.get.map(_.headOption) either <- headOption match { case None => for { - promise <- TPromise.make[Nothing, Connection] + promise <- TPromise.make[Nothing, ResettableConnection] _ <- queue.offer(promise) } yield Left(promise) @@ -139,3 +161,7 @@ final case class ConnectionPoolLive( } } yield either } + +private[sql] final class ResettableConnection(val connection: Connection, resetter: Connection => Unit) { + def reset: UIO[Any] = UIO(resetter(connection)) +} diff --git a/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala b/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala new file mode 100644 index 000000000..775460bcd --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala @@ -0,0 +1,186 @@ +package zio.sql + +import zio._ + +trait ExecuteBuilderModule { self: Jdbc => + + class ExecuteBuilder[Set <: SelectionSet[_], Output](val read: Read.Aux[Output, Set]) { + import zio.stream._ + + def to[A, Target](f: A => Target)(implicit ev: Output <:< (A, Unit)): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, _) = ev(resultType) + + f(a) + })) + + def to[A, B, Target]( + f: (A, B) => Target + )(implicit ev: Output <:< (A, (B, Unit))): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, _)) = ev(resultType) + + f(a, b) + })) + + def to[A, B, C, Target]( + f: (A, B, C) => Target + )(implicit ev: Output <:< (A, (B, (C, Unit)))): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, _))) = ev(resultType) + + f(a, b, c) + })) + + def to[A, B, C, D, Target]( + f: (A, B, C, D) => Target + )(implicit ev: Output <:< (A, (B, (C, (D, Unit))))): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, _)))) = ev(resultType) + + f(a, b, c, d) + })) + + def to[A, B, C, D, E, Target]( + f: (A, B, C, D, E) => Target + )(implicit ev: Output <:< (A, (B, (C, (D, (E, Unit)))))): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, _))))) = ev(resultType) + + f(a, b, c, d, e) + })) + + def to[A, B, C, D, E, F, G, H, Target]( + f: (A, B, C, D, E, F, G, H) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, _)))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h) + })) + + def to[A, B, C, D, E, F, G, H, I, Target]( + f: (A, B, C, D, E, F, G, H, I) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, _))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, _)))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, _))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, _)))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, _))))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, _)))))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Target + )(implicit + ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, _))))))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => Target + )(implicit + ev: Output <:< ( + A, + (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))) + ) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, _)))))))))))))))))) = + ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => Target + )(implicit + ev: Output <:< ( + A, + (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))) + ) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, _))))))))))))))))))) = + ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s) + })) + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Target + )(implicit + ev: Output <:< ( + A, + (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))) + ) + ): ZStream[Has[SqlExecutor], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, _)))))))))))))))))))) = + ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) + })) + } +} diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala new file mode 100644 index 000000000..3127ad4e8 --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -0,0 +1,136 @@ +package zio.sql + +import java.sql._ +import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset } + +import zio.Chunk + +trait JdbcInternalModule { self: Jdbc => + // TODO: Only support indexes! + private[sql] def extractColumn[A]( + column: Either[Int, String], + resultSet: ResultSet, + typeTag: TypeTag[A], + nonNull: Boolean = true + ): Either[DecodingError, A] = { + import TypeTag._ + + val metaData = resultSet.getMetaData() + + def tryDecode[A](decoder: => A)(implicit expectedType: TypeTag[A]): Either[DecodingError, A] = + if (resultSet.isClosed()) Left(DecodingError.Closed) + else { + val columnExists = + column.fold( + index => index >= 1 || index <= metaData.getColumnCount(), + name => + try { + val _ = resultSet.findColumn(name) + true + } catch { case _: SQLException => false } + ) + + if (!columnExists) Left(DecodingError.MissingColumn(column)) + else + try { + val value = decoder + + if (value == null && nonNull) Left(DecodingError.UnexpectedNull(column)) + else Right(value) + } catch { + case _: SQLException => + lazy val columnNames = (1 to metaData.getColumnCount()).toVector.map(metaData.getColumnName(_)) + val columnIndex = column.fold(index => index, name => columnNames.indexOf(name) + 1) + + Left(DecodingError.UnexpectedType(expectedType, metaData.getColumnType(columnIndex))) + } + } + + typeTag match { + case TBigDecimal => tryDecode[BigDecimal](column.fold(resultSet.getBigDecimal(_), resultSet.getBigDecimal(_))) + case TBoolean => tryDecode[Boolean](column.fold(resultSet.getBoolean(_), resultSet.getBoolean(_))) + case TByte => tryDecode[Byte](column.fold(resultSet.getByte(_), resultSet.getByte(_))) + case TByteArray => + tryDecode[Chunk[Byte]](Chunk.fromArray(column.fold(resultSet.getBytes(_), resultSet.getBytes(_)))) + case TChar => tryDecode[Char](column.fold(resultSet.getString(_), resultSet.getString(_)).charAt(0)) + case TDouble => tryDecode[Double](column.fold(resultSet.getDouble(_), resultSet.getDouble(_))) + case TFloat => tryDecode[Float](column.fold(resultSet.getFloat(_), resultSet.getFloat(_))) + case TInstant => + tryDecode[java.time.Instant](column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant()) + case TInt => tryDecode[Int](column.fold(resultSet.getInt(_), resultSet.getInt(_))) + case TLocalDate => + tryDecode[java.time.LocalDate]( + column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalDate() + ) + case TLocalDateTime => + tryDecode[java.time.LocalDateTime]( + column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime() + ) + case TLocalTime => + tryDecode[java.time.LocalTime]( + column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalTime() + ) + case TLong => tryDecode[Long](column.fold(resultSet.getLong(_), resultSet.getLong(_))) + case TOffsetDateTime => + tryDecode[OffsetDateTime]( + column + .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) + .toLocalDateTime() + .atOffset(ZoneOffset.UTC) + ) + case TOffsetTime => + tryDecode[OffsetTime]( + column + .fold(resultSet.getTime(_), resultSet.getTime(_)) + .toLocalTime + .atOffset(ZoneOffset.UTC) + ) + case TShort => tryDecode[Short](column.fold(resultSet.getShort(_), resultSet.getShort(_))) + case TString => tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) + case TUUID => + tryDecode[java.util.UUID]( + java.util.UUID.fromString(column.fold(resultSet.getString(_), resultSet.getString(_))) + ) + case TZonedDateTime => + //2013-07-15 08:15:23.5+00 + tryDecode[java.time.ZonedDateTime]( + java.time.ZonedDateTime + .ofInstant( + column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, + ZoneId.of(ZoneOffset.UTC.getId) + ) + ) + case TDialectSpecific(t) => t.decode(column, resultSet) + case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) + } + } + + private[sql] def getColumns(read: Read[_]): Vector[TypeTag[_]] = + read match { + case Read.Select(selection, _, _, _, _, _, _, _) => + selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { + case t @ ColumnSelection.Constant(_, _) => t.typeTag + case t @ ColumnSelection.Computed(_, _) => t.typeTag + } + case Read.Union(left, _, _) => getColumns(left) + case v @ Read.Literal(_) => Vector(v.typeTag) + } + + private[sql] def unsafeExtractRow[A]( + resultSet: ResultSet, + schema: Vector[(TypeTag[_], Int)] + ): Either[DecodingError, A] = { + val result: Either[DecodingError, Any] = Right(()) + + schema + .foldRight(result) { + case (_, err @ Left(_)) => err // TODO: Accumulate errors + case ((typeTag, index), Right(vs)) => + extractColumn(Left(index), resultSet, typeTag) match { + case Left(err) => Left(err) + case Right(v) => Right((v, vs)) + } + } + .map(_.asInstanceOf[A]) + } +} diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index baad8b145..6ad653375 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -9,11 +9,7 @@ import zio.Has trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { - type JdbcEnvironment = TestEnvironment - with ReadExecutor - with UpdateExecutor - with DeleteExecutor - with TransactionExecutor + type JdbcEnvironment = TestEnvironment with Has[SqlExecutor] val poolConfigLayer: ZLayer[Blocking, Throwable, Has[ConnectionPoolConfig]] @@ -21,7 +17,7 @@ trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { val connectionPoolLayer: ZLayer[Blocking with Clock, Throwable, Has[ConnectionPool]] = ((Blocking.any >+> poolConfigLayer) ++ Clock.any) >>> ConnectionPool.live - (Blocking.any ++ connectionPoolLayer >+> ReadExecutor.live >+> UpdateExecutor.live >+> DeleteExecutor.live >+> TransactionExecutor.live).orDie + (Blocking.any ++ connectionPoolLayer >+> SqlExecutor.live).orDie } final lazy val jdbcLayer = TestEnvironment.live >+> executorLayer diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 71b26468b..83ce02692 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,479 +1,129 @@ package zio.sql import java.sql._ -import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset } -import zio.{ Chunk, Has, IO, ZIO, ZLayer } +import zio.{ Has, IO, ZIO, ZLayer } import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } -trait Jdbc extends zio.sql.Sql with TransactionModule { - type DeleteExecutor = Has[DeleteExecutor.Service] - object DeleteExecutor { - trait Service { - def execute(delete: Delete[_]): IO[Exception, Int] - def executeOn(delete: Delete[_], conn: Connection): IO[Exception, Int] - } - - val live: ZLayer[Has[ConnectionPool] with Blocking, Nothing, DeleteExecutor] = - ZLayer.fromServices[ConnectionPool, Blocking.Service, DeleteExecutor.Service] { (pool, blocking) => - new Service { - def execute(delete: Delete[_]): IO[Exception, Int] = pool.connection.use { conn => - executeOn(delete, conn) - } - def executeOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { - val query = renderDelete(delete) - val statement = conn.createStatement() - statement.executeUpdate(query) - }.refineToOrDie[Exception] - } - } - } - - type UpdateExecutor = Has[UpdateExecutor.Service] - object UpdateExecutor { - trait Service { - def execute(update: Update[_]): IO[Exception, Int] - def executeOn(update: Update[_], conn: Connection): IO[Exception, Int] - } - - val live: ZLayer[Has[ConnectionPool] with Blocking, Nothing, UpdateExecutor] = - ZLayer.fromServices[ConnectionPool, Blocking.Service, UpdateExecutor.Service] { (pool, blocking) => - new Service { - def execute(update: Update[_]): IO[Exception, Int] = - pool.connection - .use(conn => executeOn(update, conn)) - def executeOn(update: Update[_], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { +trait Jdbc extends zio.sql.Sql with TransactionModule with ExecuteBuilderModule with JdbcInternalModule { + trait SqlExecutor { + def delete(delete: Delete[_]): IO[Exception, Int] - val query = renderUpdate(update) + def update(update: Update[_]): IO[Exception, Int] - val statement = conn.createStatement() + def read[A <: SelectionSet[_], Target](read: Read[A])(to: read.ResultType => Target): Stream[Exception, Target] - statement.executeUpdate(query) - - }.refineToOrDie[Exception] - } - } + def transact[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] } - - type TransactionExecutor = Has[TransactionExecutor.Service] - object TransactionExecutor { - trait Service { - def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] - } - - val live: ZLayer[ - Has[ConnectionPool] with Blocking with ReadExecutor with UpdateExecutor with DeleteExecutor, - Exception, - TransactionExecutor - ] = - ZLayer.fromServices[ - ConnectionPool, - Blocking.Service, - ReadExecutor.Service, - UpdateExecutor.Service, - DeleteExecutor.Service, - TransactionExecutor.Service - ] { (pool, blocking, readS, updateS, deleteS) => - new Service { - override def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] = { - def loop(tx: ZTransaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = tx match { - case ZTransaction.Effect(zio) => zio - // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` - // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) - // This works and it is eagerly running the Stream - case ZTransaction.Select(read) => - readS - .executeOn(read.asInstanceOf[Read[SelectionSet[_]]], conn) - .runCollect - .map(a => ZStream.fromIterator(a.iterator)) - case ZTransaction.Update(update) => updateS.executeOn(update, conn) - case ZTransaction.Delete(delete) => deleteS.executeOn(delete, conn) - case ZTransaction.FoldCauseM(tx, k) => - loop(tx, conn).foldCauseM( - cause => loop(k.asInstanceOf[ZTransaction.K[R, E, Any, Any]].onHalt(cause), conn), - success => loop(k.onSuccess(success), conn) - ) - } - - pool.connection.use(conn => - blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> - loop(tx, conn) - .tapBoth( - _ => blocking.effectBlocking(conn.rollback()), - _ => blocking.effectBlocking(conn.commit()) - ) - .asInstanceOf[ZIO[R, E, A]] - ) - } - } - } + object SqlExecutor { + val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlExecutor]] = + (for { + blocking <- ZIO.service[Blocking.Service] + pool <- ZIO.service[ConnectionPool] + } yield SqlExecutorLive(blocking, pool)).toLayer } - def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R with TransactionExecutor, E, A] = - ZIO.accessM[R with TransactionExecutor](_.get.execute(tx)) - - type ReadExecutor = Has[ReadExecutor.Service] - object ReadExecutor { - trait Service { - def execute[A <: SelectionSet[_], Target](read: Read[A])(to: read.ResultType => Target): Stream[Exception, Target] - def executeOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] - } - - val live: ZLayer[Has[ConnectionPool] with Blocking, Nothing, ReadExecutor] = - ZLayer.fromServices[ConnectionPool, Blocking.Service, ReadExecutor.Service] { (pool, blocking) => - new Service { - // TODO: Allow partial success for nullable columns - def execute[A <: SelectionSet[_], Target]( - read: Read[A] - )(to: read.ResultType => Target): Stream[Exception, Target] = - ZStream - .managed(pool.connection) - .flatMap(conn => executeOn(read, conn)) - .map(to) + sealed case class SqlExecutorLive(blocking: Blocking.Service, pool: ConnectionPool) extends SqlExecutor { + def delete(delete: Delete[_]): IO[Exception, Int] = + pool.connection.use(deleteOn(delete, _)) - def executeOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] = - Stream.unwrap { - blocking.effectBlocking { - val schema = getColumns(read).zipWithIndex.map { case (value, index) => - (value, index + 1) - } // SQL is 1-based indexing + def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = + blocking.effectBlocking { + val query = renderDelete(delete) + val statement = conn.createStatement() + statement.executeUpdate(query) + }.refineToOrDie[Exception] - val query = renderRead(read) + def update(update: Update[_]): IO[Exception, Int] = + pool.connection.use(updateOn(update, _)) - val statement = conn.createStatement() + def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] = + blocking.effectBlocking { - val _ = statement.execute(query) // TODO: Check boolean return value + val query = renderUpdate(update) - val resultSet = statement.getResultSet() + val statement = conn.createStatement() - ZStream.unfoldM(resultSet) { rs => - if (rs.next()) { - try unsafeExtractRow[read.ResultType](resultSet, schema) match { - case Left(error) => ZIO.fail(error) - case Right(value) => ZIO.succeed(Some((value, rs))) - } catch { - case e: SQLException => ZIO.fail(e) - } - } else ZIO.succeed(None) - } - - }.refineToOrDie[Exception] - } - - } - } + statement.executeUpdate(query) - // TODO: Only support indexes! - private[sql] def extractColumn[A]( - column: Either[Int, String], - resultSet: ResultSet, - typeTag: TypeTag[A], - nonNull: Boolean = true - ): Either[DecodingError, A] = { - import TypeTag._ + }.refineToOrDie[Exception] - val metaData = resultSet.getMetaData() + def read[A <: SelectionSet[_], Target]( + read: Read[A] + )(to: read.ResultType => Target): Stream[Exception, Target] = + ZStream + .managed(pool.connection) + .flatMap(readOn(read, _)) + .map(to) - def tryDecode[A](decoder: => A)(implicit expectedType: TypeTag[A]): Either[DecodingError, A] = - if (resultSet.isClosed()) Left(DecodingError.Closed) - else { - val columnExists = - column.fold( - index => index >= 1 || index <= metaData.getColumnCount(), - name => - try { - val _ = resultSet.findColumn(name) - true - } catch { case _: SQLException => false } - ) + def readOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] = + Stream.unwrap { + blocking.effectBlocking { + val schema = getColumns(read).zipWithIndex.map { case (value, index) => + (value, index + 1) + } // SQL is 1-based indexing - if (!columnExists) Left(DecodingError.MissingColumn(column)) - else - try { - val value = decoder + val query = renderRead(read) - if (value == null && nonNull) Left(DecodingError.UnexpectedNull(column)) - else Right(value) - } catch { - case _: SQLException => - lazy val columnNames = (1 to metaData.getColumnCount()).toVector.map(metaData.getColumnName(_)) - val columnIndex = column.fold(index => index, name => columnNames.indexOf(name) + 1) + val statement = conn.createStatement() - Left(DecodingError.UnexpectedType(expectedType, metaData.getColumnType(columnIndex))) - } - } + val _ = statement.execute(query) // TODO: Check boolean return value - typeTag match { - case TBigDecimal => tryDecode[BigDecimal](column.fold(resultSet.getBigDecimal(_), resultSet.getBigDecimal(_))) - case TBoolean => tryDecode[Boolean](column.fold(resultSet.getBoolean(_), resultSet.getBoolean(_))) - case TByte => tryDecode[Byte](column.fold(resultSet.getByte(_), resultSet.getByte(_))) - case TByteArray => - tryDecode[Chunk[Byte]](Chunk.fromArray(column.fold(resultSet.getBytes(_), resultSet.getBytes(_)))) - case TChar => tryDecode[Char](column.fold(resultSet.getString(_), resultSet.getString(_)).charAt(0)) - case TDouble => tryDecode[Double](column.fold(resultSet.getDouble(_), resultSet.getDouble(_))) - case TFloat => tryDecode[Float](column.fold(resultSet.getFloat(_), resultSet.getFloat(_))) - case TInstant => - tryDecode[java.time.Instant](column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant()) - case TInt => tryDecode[Int](column.fold(resultSet.getInt(_), resultSet.getInt(_))) - case TLocalDate => - tryDecode[java.time.LocalDate]( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalDate() - ) - case TLocalDateTime => - tryDecode[java.time.LocalDateTime]( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime() - ) - case TLocalTime => - tryDecode[java.time.LocalTime]( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalTime() - ) - case TLong => tryDecode[Long](column.fold(resultSet.getLong(_), resultSet.getLong(_))) - case TOffsetDateTime => - tryDecode[OffsetDateTime]( - column - .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) - .toLocalDateTime() - .atOffset(ZoneOffset.UTC) - ) - case TOffsetTime => - tryDecode[OffsetTime]( - column - .fold(resultSet.getTime(_), resultSet.getTime(_)) - .toLocalTime - .atOffset(ZoneOffset.UTC) - ) - case TShort => tryDecode[Short](column.fold(resultSet.getShort(_), resultSet.getShort(_))) - case TString => tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) - case TUUID => - tryDecode[java.util.UUID]( - java.util.UUID.fromString(column.fold(resultSet.getString(_), resultSet.getString(_))) - ) - case TZonedDateTime => - //2013-07-15 08:15:23.5+00 - tryDecode[java.time.ZonedDateTime]( - java.time.ZonedDateTime - .ofInstant( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, - ZoneId.of(ZoneOffset.UTC.getId) - ) - ) - case TDialectSpecific(t) => t.decode(column, resultSet) - case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) - } - } + val resultSet = statement.getResultSet() - private[sql] def getColumns(read: Read[_]): Vector[TypeTag[_]] = - read match { - case Read.Select(selection, _, _, _, _, _, _, _) => - selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { - case t @ ColumnSelection.Constant(_, _) => t.typeTag - case t @ ColumnSelection.Computed(_, _) => t.typeTag + ZStream.unfoldM(resultSet) { rs => + if (rs.next()) { + try unsafeExtractRow[read.ResultType](resultSet, schema) match { + case Left(error) => ZIO.fail(error) + case Right(value) => ZIO.succeed(Some((value, rs))) + } catch { + case e: SQLException => ZIO.fail(e) + } + } else ZIO.succeed(None) } - case Read.Union(left, _, _) => getColumns(left) - case v @ Read.Literal(_) => Vector(v.typeTag) - } - private[sql] def unsafeExtractRow[A]( - resultSet: ResultSet, - schema: Vector[(TypeTag[_], Int)] - ): Either[DecodingError, A] = { - val result: Either[DecodingError, Any] = Right(()) + }.refineToOrDie[Exception] + } - schema - .foldRight(result) { - case (_, err @ Left(_)) => err // TODO: Accumulate errors - case ((typeTag, index), Right(vs)) => - extractColumn(Left(index), resultSet, typeTag) match { - case Left(err) => Left(err) - case Right(v) => Right((v, vs)) - } + override def transact[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] = { + def loop(tx: ZTransaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = + tx match { + case ZTransaction.Effect(zio) => zio + // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` + // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) + // This works and it is eagerly running the Stream + case ZTransaction.Select(read) => + readOn(read.asInstanceOf[Read[SelectionSet[_]]], conn).runCollect + .map(a => ZStream.fromIterator(a.iterator)) + case ZTransaction.Update(update) => updateOn(update, conn) + case ZTransaction.Delete(delete) => deleteOn(delete, conn) + case ZTransaction.FoldCauseM(tx, k) => + loop(tx, conn).foldCauseM( + cause => loop(k.asInstanceOf[ZTransaction.K[R, E, Any, Any]].onHalt(cause), conn), + success => loop(k.onSuccess(success), conn) + ) } - .map(_.asInstanceOf[A]) - } - } - def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = new ExecuteBuilder(read) - - def execute(delete: Delete[_]): ZIO[DeleteExecutor, Exception, Int] = ZIO.accessM[DeleteExecutor]( - _.get.execute(delete) - ) - - class ExecuteBuilder[Set <: SelectionSet[_], Output](val read: Read.Aux[Output, Set]) { - import zio.stream._ - - def to[A, Target](f: A => Target)(implicit ev: Output <:< (A, Unit)): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, _) = ev(resultType) - - f(a) - })) - - def to[A, B, Target]( - f: (A, B) => Target - )(implicit ev: Output <:< (A, (B, Unit))): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, _)) = ev(resultType) - - f(a, b) - })) - - def to[A, B, C, Target]( - f: (A, B, C) => Target - )(implicit ev: Output <:< (A, (B, (C, Unit)))): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, _))) = ev(resultType) - - f(a, b, c) - })) - - def to[A, B, C, D, Target]( - f: (A, B, C, D) => Target - )(implicit ev: Output <:< (A, (B, (C, (D, Unit))))): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, _)))) = ev(resultType) - - f(a, b, c, d) - })) - - def to[A, B, C, D, E, Target]( - f: (A, B, C, D, E) => Target - )(implicit ev: Output <:< (A, (B, (C, (D, (E, Unit)))))): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, _))))) = ev(resultType) - - f(a, b, c, d, e) - })) - - def to[A, B, C, D, E, F, G, H, Target]( - f: (A, B, C, D, E, F, G, H) => Target - )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, _)))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h) - })) - - def to[A, B, C, D, E, F, G, H, I, Target]( - f: (A, B, C, D, E, F, G, H, I) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, _))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, _)))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, _))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, _)))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, _))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, _)))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, _))))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => Target - )(implicit - ev: Output <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))) + pool.connection.use(conn => + blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> + loop(tx, conn) + .tapBoth( + _ => blocking.effectBlocking(conn.rollback()), + _ => blocking.effectBlocking(conn.commit()) + ) + .asInstanceOf[ZIO[R, E, A]] ) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, _)))))))))))))))))) = - ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r) - })) + } + } - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => Target - )(implicit - ev: Output <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))) - ) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, _))))))))))))))))))) = - ev(resultType) + def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R with Has[SqlExecutor], E, A] = + ZIO.accessM[R with Has[SqlExecutor]](_.get.transact(tx)) - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s) - })) + def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = + new ExecuteBuilder(read) - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Target - )(implicit - ev: Output <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))) - ) - ): ZStream[ReadExecutor, Exception, Target] = - ZStream.unwrap(ZIO.access[ReadExecutor](_.get.execute(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, _)))))))))))))))))))) = - ev(resultType) + def execute(delete: Delete[_]): ZIO[Has[SqlExecutor], Exception, Int] = + ZIO.accessM[Has[SqlExecutor]]( + _.get.delete(delete) + ) - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) - })) - } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 28c6ad877..9f30b8700 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -18,9 +18,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import PostgresFunctionDef._ import PostgresSpecific._ - private def collectAndCompare( + private def collectAndCompare[R, E]( expected: Seq[String], - testResult: ZStream[FunctionDefSpec.ReadExecutor, Exception, String] + testResult: ZStream[R, E, String] ) = { val assertion = for { r <- testResult.runCollect From 339ac1514814ede146e86182b8c27e0cea6cdcb5 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 13:47:07 -0500 Subject: [PATCH 194/673] Code cleanup --- .../scala/zio/sql/ExecuteBuilderModule.scala | 64 +++++----- .../main/scala/zio/sql/JdbcRunnableSpec.scala | 4 +- .../main/scala/zio/sql/SqlExecutorLive.scala | 101 +++++++++++++++ jdbc/src/main/scala/zio/sql/jdbc.scala | 120 +++--------------- 4 files changed, 151 insertions(+), 138 deletions(-) create mode 100644 jdbc/src/main/scala/zio/sql/SqlExecutorLive.scala diff --git a/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala b/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala index 775460bcd..05b14e262 100644 --- a/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala +++ b/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala @@ -7,8 +7,8 @@ trait ExecuteBuilderModule { self: Jdbc => class ExecuteBuilder[Set <: SelectionSet[_], Output](val read: Read.Aux[Output, Set]) { import zio.stream._ - def to[A, Target](f: A => Target)(implicit ev: Output <:< (A, Unit)): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + def to[A, Target](f: A => Target)(implicit ev: Output <:< (A, Unit)): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, _) = ev(resultType) f(a) @@ -16,8 +16,8 @@ trait ExecuteBuilderModule { self: Jdbc => def to[A, B, Target]( f: (A, B) => Target - )(implicit ev: Output <:< (A, (B, Unit))): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + )(implicit ev: Output <:< (A, (B, Unit))): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, _)) = ev(resultType) f(a, b) @@ -25,8 +25,8 @@ trait ExecuteBuilderModule { self: Jdbc => def to[A, B, C, Target]( f: (A, B, C) => Target - )(implicit ev: Output <:< (A, (B, (C, Unit)))): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + )(implicit ev: Output <:< (A, (B, (C, Unit)))): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, _))) = ev(resultType) f(a, b, c) @@ -34,8 +34,8 @@ trait ExecuteBuilderModule { self: Jdbc => def to[A, B, C, D, Target]( f: (A, B, C, D) => Target - )(implicit ev: Output <:< (A, (B, (C, (D, Unit))))): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + )(implicit ev: Output <:< (A, (B, (C, (D, Unit))))): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, _)))) = ev(resultType) f(a, b, c, d) @@ -43,8 +43,8 @@ trait ExecuteBuilderModule { self: Jdbc => def to[A, B, C, D, E, Target]( f: (A, B, C, D, E) => Target - )(implicit ev: Output <:< (A, (B, (C, (D, (E, Unit)))))): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + )(implicit ev: Output <:< (A, (B, (C, (D, (E, Unit)))))): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, _))))) = ev(resultType) f(a, b, c, d, e) @@ -54,8 +54,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, _)))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h) @@ -65,8 +65,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H, I) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, _))))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h, i) @@ -76,8 +76,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H, I, J, K, L) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, _)))))))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h, i, j, k, l) @@ -87,8 +87,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, _))))))))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h, i, j, k, l, m) @@ -98,8 +98,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, _)))))))))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n) @@ -109,8 +109,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, _))))))))))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o) @@ -120,8 +120,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, _)))))))))))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p) @@ -131,8 +131,8 @@ trait ExecuteBuilderModule { self: Jdbc => f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Target )(implicit ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, _))))))))))))))))) = ev(resultType) f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q) @@ -145,8 +145,8 @@ trait ExecuteBuilderModule { self: Jdbc => A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))) ) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, _)))))))))))))))))) = ev(resultType) @@ -160,8 +160,8 @@ trait ExecuteBuilderModule { self: Jdbc => A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))) ) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, _))))))))))))))))))) = ev(resultType) @@ -175,8 +175,8 @@ trait ExecuteBuilderModule { self: Jdbc => A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))) ) - ): ZStream[Has[SqlExecutor], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlExecutor]](_.get.read(read) { resultType => + ): ZStream[Has[SqlDriver], Exception, Target] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, _)))))))))))))))))))) = ev(resultType) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala index 6ad653375..28c2d645b 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala @@ -9,7 +9,7 @@ import zio.Has trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { - type JdbcEnvironment = TestEnvironment with Has[SqlExecutor] + type JdbcEnvironment = TestEnvironment with Has[SqlDriver] val poolConfigLayer: ZLayer[Blocking, Throwable, Has[ConnectionPoolConfig]] @@ -17,7 +17,7 @@ trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { val connectionPoolLayer: ZLayer[Blocking with Clock, Throwable, Has[ConnectionPool]] = ((Blocking.any >+> poolConfigLayer) ++ Clock.any) >>> ConnectionPool.live - (Blocking.any ++ connectionPoolLayer >+> SqlExecutor.live).orDie + (Blocking.any ++ connectionPoolLayer >+> SqlDriver.live).orDie } final lazy val jdbcLayer = TestEnvironment.live >+> executorLayer diff --git a/jdbc/src/main/scala/zio/sql/SqlExecutorLive.scala b/jdbc/src/main/scala/zio/sql/SqlExecutorLive.scala new file mode 100644 index 000000000..4da7c8c2a --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/SqlExecutorLive.scala @@ -0,0 +1,101 @@ +package zio.sql + +import java.sql._ +import zio.{ IO, ZIO } +import zio.blocking.Blocking +import zio.stream.{ Stream, ZStream } + +trait SqlDriverLiveModule { self: Jdbc => + sealed case class SqlDriverLive(blocking: Blocking.Service, pool: ConnectionPool) extends SqlDriver { + def delete(delete: Delete[_]): IO[Exception, Int] = + pool.connection.use(deleteOn(delete, _)) + + def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = + blocking.effectBlocking { + val query = renderDelete(delete) + val statement = conn.createStatement() + statement.executeUpdate(query) + }.refineToOrDie[Exception] + + def update(update: Update[_]): IO[Exception, Int] = + pool.connection.use(updateOn(update, _)) + + def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] = + blocking.effectBlocking { + + val query = renderUpdate(update) + + val statement = conn.createStatement() + + statement.executeUpdate(query) + + }.refineToOrDie[Exception] + + def read[A <: SelectionSet[_], Target]( + read: Read[A] + )(to: read.ResultType => Target): Stream[Exception, Target] = + ZStream + .managed(pool.connection) + .flatMap(readOn(read, _)) + .map(to) + + def readOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] = + Stream.unwrap { + blocking.effectBlocking { + val schema = getColumns(read).zipWithIndex.map { case (value, index) => + (value, index + 1) + } // SQL is 1-based indexing + + val query = renderRead(read) + + val statement = conn.createStatement() + + val _ = statement.execute(query) // TODO: Check boolean return value + + val resultSet = statement.getResultSet() + + ZStream.unfoldM(resultSet) { rs => + if (rs.next()) { + try unsafeExtractRow[read.ResultType](resultSet, schema) match { + case Left(error) => ZIO.fail(error) + case Right(value) => ZIO.succeed(Some((value, rs))) + } catch { + case e: SQLException => ZIO.fail(e) + } + } else ZIO.succeed(None) + } + + }.refineToOrDie[Exception] + } + + override def transact[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] = { + def loop(tx: ZTransaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = + tx match { + case ZTransaction.Effect(zio) => zio + // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` + // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) + // This works and it is eagerly running the Stream + case ZTransaction.Select(read) => + readOn(read.asInstanceOf[Read[SelectionSet[_]]], conn).runCollect + .map(a => ZStream.fromIterator(a.iterator)) + case ZTransaction.Update(update) => updateOn(update, conn) + case ZTransaction.Delete(delete) => deleteOn(delete, conn) + case ZTransaction.FoldCauseM(tx, k) => + loop(tx, conn).foldCauseM( + cause => loop(k.asInstanceOf[ZTransaction.K[R, E, Any, Any]].onHalt(cause), conn), + success => loop(k.onSuccess(success), conn) + ) + } + + pool.connection.use(conn => + blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> + loop(tx, conn) + .tapBoth( + _ => blocking.effectBlocking(conn.rollback()), + _ => blocking.effectBlocking(conn.commit()) + ) + .asInstanceOf[ZIO[R, E, A]] + ) + } + } +} diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 83ce02692..cb620ad39 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,12 +1,16 @@ package zio.sql -import java.sql._ import zio.{ Has, IO, ZIO, ZLayer } import zio.blocking.Blocking -import zio.stream.{ Stream, ZStream } - -trait Jdbc extends zio.sql.Sql with TransactionModule with ExecuteBuilderModule with JdbcInternalModule { - trait SqlExecutor { +import zio.stream.Stream + +trait Jdbc + extends zio.sql.Sql + with TransactionModule + with ExecuteBuilderModule + with JdbcInternalModule + with SqlDriverLiveModule { + trait SqlDriver { def delete(delete: Delete[_]): IO[Exception, Int] def update(update: Update[_]): IO[Exception, Int] @@ -15,114 +19,22 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with ExecuteBuilderModule def transact[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] } - object SqlExecutor { - val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlExecutor]] = + object SqlDriver { + val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlDriver]] = (for { blocking <- ZIO.service[Blocking.Service] pool <- ZIO.service[ConnectionPool] - } yield SqlExecutorLive(blocking, pool)).toLayer - } - sealed case class SqlExecutorLive(blocking: Blocking.Service, pool: ConnectionPool) extends SqlExecutor { - def delete(delete: Delete[_]): IO[Exception, Int] = - pool.connection.use(deleteOn(delete, _)) - - def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { - val query = renderDelete(delete) - val statement = conn.createStatement() - statement.executeUpdate(query) - }.refineToOrDie[Exception] - - def update(update: Update[_]): IO[Exception, Int] = - pool.connection.use(updateOn(update, _)) - - def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { - - val query = renderUpdate(update) - - val statement = conn.createStatement() - - statement.executeUpdate(query) - - }.refineToOrDie[Exception] - - def read[A <: SelectionSet[_], Target]( - read: Read[A] - )(to: read.ResultType => Target): Stream[Exception, Target] = - ZStream - .managed(pool.connection) - .flatMap(readOn(read, _)) - .map(to) - - def readOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] = - Stream.unwrap { - blocking.effectBlocking { - val schema = getColumns(read).zipWithIndex.map { case (value, index) => - (value, index + 1) - } // SQL is 1-based indexing - - val query = renderRead(read) - - val statement = conn.createStatement() - - val _ = statement.execute(query) // TODO: Check boolean return value - - val resultSet = statement.getResultSet() - - ZStream.unfoldM(resultSet) { rs => - if (rs.next()) { - try unsafeExtractRow[read.ResultType](resultSet, schema) match { - case Left(error) => ZIO.fail(error) - case Right(value) => ZIO.succeed(Some((value, rs))) - } catch { - case e: SQLException => ZIO.fail(e) - } - } else ZIO.succeed(None) - } - - }.refineToOrDie[Exception] - } - - override def transact[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] = { - def loop(tx: ZTransaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = - tx match { - case ZTransaction.Effect(zio) => zio - // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` - // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) - // This works and it is eagerly running the Stream - case ZTransaction.Select(read) => - readOn(read.asInstanceOf[Read[SelectionSet[_]]], conn).runCollect - .map(a => ZStream.fromIterator(a.iterator)) - case ZTransaction.Update(update) => updateOn(update, conn) - case ZTransaction.Delete(delete) => deleteOn(delete, conn) - case ZTransaction.FoldCauseM(tx, k) => - loop(tx, conn).foldCauseM( - cause => loop(k.asInstanceOf[ZTransaction.K[R, E, Any, Any]].onHalt(cause), conn), - success => loop(k.onSuccess(success), conn) - ) - } - - pool.connection.use(conn => - blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> - loop(tx, conn) - .tapBoth( - _ => blocking.effectBlocking(conn.rollback()), - _ => blocking.effectBlocking(conn.commit()) - ) - .asInstanceOf[ZIO[R, E, A]] - ) - } + } yield SqlDriverLive(blocking, pool)).toLayer } - def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R with Has[SqlExecutor], E, A] = - ZIO.accessM[R with Has[SqlExecutor]](_.get.transact(tx)) + def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R with Has[SqlDriver], E, A] = + ZIO.accessM[R with Has[SqlDriver]](_.get.transact(tx)) def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = new ExecuteBuilder(read) - def execute(delete: Delete[_]): ZIO[Has[SqlExecutor], Exception, Int] = - ZIO.accessM[Has[SqlExecutor]]( + def execute(delete: Delete[_]): ZIO[Has[SqlDriver], Exception, Int] = + ZIO.accessM[Has[SqlDriver]]( _.get.delete(delete) ) From 015b1e481f7cc5a5b39044f7ee4bc5190c941142 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 14:46:02 -0500 Subject: [PATCH 195/673] Change ZTransaction to use executable encoding --- ...orLive.scala => SqlDriverLiveModule.scala} | 47 ++++------ .../scala/zio/sql/TransactionModule.scala | 92 +++++++++++++++++++ jdbc/src/main/scala/zio/sql/jdbc.scala | 7 +- jdbc/src/main/scala/zio/sql/package.scala | 3 - jdbc/src/main/scala/zio/sql/transaction.scala | 80 ---------------- .../sql/postgresql/PostgresModuleSpec.scala | 4 +- 6 files changed, 114 insertions(+), 119 deletions(-) rename jdbc/src/main/scala/zio/sql/{SqlExecutorLive.scala => SqlDriverLiveModule.scala} (59%) create mode 100644 jdbc/src/main/scala/zio/sql/TransactionModule.scala delete mode 100644 jdbc/src/main/scala/zio/sql/package.scala delete mode 100644 jdbc/src/main/scala/zio/sql/transaction.scala diff --git a/jdbc/src/main/scala/zio/sql/SqlExecutorLive.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala similarity index 59% rename from jdbc/src/main/scala/zio/sql/SqlExecutorLive.scala rename to jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 4da7c8c2a..f2a294545 100644 --- a/jdbc/src/main/scala/zio/sql/SqlExecutorLive.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -6,7 +6,17 @@ import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } trait SqlDriverLiveModule { self: Jdbc => - sealed case class SqlDriverLive(blocking: Blocking.Service, pool: ConnectionPool) extends SqlDriver { + trait SqlDriverCore { + def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] + + def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] + + def readOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] + } + + sealed case class SqlDriverLive(blocking: Blocking.Service, pool: ConnectionPool) + extends SqlDriver + with SqlDriverCore { self => def delete(delete: Delete[_]): IO[Exception, Int] = pool.connection.use(deleteOn(delete, _)) @@ -68,34 +78,11 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] } - override def transact[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] = { - def loop(tx: ZTransaction[R, E, Any], conn: Connection): ZIO[R, E, Any] = - tx match { - case ZTransaction.Effect(zio) => zio - // This does not work because of `org.postgresql.util.PSQLException: This connection has been closed.` - // case Transaction.Select(read) => ZIO.succeed(readS.executeOn(read, conn)) - // This works and it is eagerly running the Stream - case ZTransaction.Select(read) => - readOn(read.asInstanceOf[Read[SelectionSet[_]]], conn).runCollect - .map(a => ZStream.fromIterator(a.iterator)) - case ZTransaction.Update(update) => updateOn(update, conn) - case ZTransaction.Delete(delete) => deleteOn(delete, conn) - case ZTransaction.FoldCauseM(tx, k) => - loop(tx, conn).foldCauseM( - cause => loop(k.asInstanceOf[ZTransaction.K[R, E, Any, Any]].onHalt(cause), conn), - success => loop(k.onSuccess(success), conn) - ) - } - - pool.connection.use(conn => - blocking.effectBlocking(conn.setAutoCommit(false)).refineToOrDie[Exception] *> - loop(tx, conn) - .tapBoth( - _ => blocking.effectBlocking(conn.rollback()), - _ => blocking.effectBlocking(conn.commit()) - ) - .asInstanceOf[ZIO[R, E, A]] - ) - } + override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Exception, A] = + (for { + connection <- pool.connection + _ <- blocking.effectBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception].toManaged_ + a <- tx.run(blocking, Txn(connection, self)) + } yield a).use(ZIO.succeed(_)) } } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala new file mode 100644 index 000000000..ffd9c4d0a --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -0,0 +1,92 @@ +package zio.sql + +import java.sql._ + +import zio._ +import zio.blocking.Blocking + +trait TransactionModule { self: Jdbc => + private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) + + sealed case class ZTransaction[-R, +E, +A](unwrap: ZManaged[(R, Txn), E, A]) { self => + def map[B](f: A => B): ZTransaction[R, E, B] = + ZTransaction(self.unwrap.map(f)) + + def flatMap[R1 <: R, E1 >: E, B](f: A => ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + ZTransaction(self.unwrap.flatMap(a => f(a).unwrap)) + + private[sql] def run(blocking: Blocking.Service, txn: Txn)(implicit + ev: E <:< Exception + ): ZManaged[R, Exception, A] = + for { + r <- ZManaged.environment[R] + a <- self.unwrap + .mapError(ev) + .provide((r, txn)) + .tapBoth( + _ => blocking.effectBlocking(txn.connection.rollback()).refineToOrDie[Exception].toManaged_, + _ => blocking.effectBlocking(txn.connection.commit()).refineToOrDie[Exception].toManaged_ + ) + } yield a + + def zip[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = + zipWith[R1, E1, B, (A, B)](tx)((_, _)) + + def zipWith[R1 <: R, E1 >: E, B, C](tx: ZTransaction[R1, E1, B])(f: (A, B) => C): ZTransaction[R1, E1, C] = + for { + a <- self + b <- tx + } yield f(a, b) + + def *>[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + self.flatMap(_ => tx) + + // named alias for *> + def zipRight[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + self *> tx + + def <*[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + self.flatMap(a => tx.map(_ => a)) + + // named alias for <* + def zipLeft[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + self <* tx + + def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: Cause[E1] => ZTransaction[R1, E1, A1]): ZTransaction[R1, E1, A1] = + ZTransaction(self.unwrap.catchAllCause(cause => f(cause).unwrap)) + } + + object ZTransaction { + def succeed[A](a: => A): ZTransaction[Any, Nothing, A] = fromEffect(ZIO.succeed(a)) + + def fail[E](e: => E): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.fail(e)) + + def halt[E](e: => Cause[E]): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.halt(e)) + + def fromEffect[R, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = + ZTransaction(for { + tuple <- ZManaged.environment[(R, Txn)] + a <- zio.provide(tuple._1).toManaged_ + } yield a) + + private val txn: ZTransaction[Any, Nothing, Txn] = + ZTransaction(ZManaged.environment[(Any, Txn)].map(_._2)) + + def select[A <: SelectionSet[_]]( + read: self.Read[A] + ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = + txn.map { case Txn(connection, coreDriver) => + coreDriver.readOn(read, connection).asInstanceOf[zio.stream.Stream[Exception, A]] + } + + def update(update: self.Update[_]): ZTransaction[Any, Exception, Int] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.updateOn(update, connection)) + } + + def delete(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.deleteOn(delete, connection)) + } + } +} diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index cb620ad39..abdca4ba7 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -17,7 +17,7 @@ trait Jdbc def read[A <: SelectionSet[_], Target](read: Read[A])(to: read.ResultType => Target): Stream[Exception, Target] - def transact[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R, E, A] + def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Exception, A] } object SqlDriver { val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlDriver]] = @@ -27,8 +27,8 @@ trait Jdbc } yield SqlDriverLive(blocking, pool)).toLayer } - def execute[R, E >: Exception, A](tx: ZTransaction[R, E, A]): ZIO[R with Has[SqlDriver], E, A] = - ZIO.accessM[R with Has[SqlDriver]](_.get.transact(tx)) + def execute[R <: Has[SqlDriver], A](tx: ZTransaction[R, Exception, A]): ZIO[R, Exception, A] = + ZIO.accessM[R](_.get.transact(tx)) def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = new ExecuteBuilder(read) @@ -37,5 +37,4 @@ trait Jdbc ZIO.accessM[Has[SqlDriver]]( _.get.delete(delete) ) - } diff --git a/jdbc/src/main/scala/zio/sql/package.scala b/jdbc/src/main/scala/zio/sql/package.scala deleted file mode 100644 index b3e1f0091..000000000 --- a/jdbc/src/main/scala/zio/sql/package.scala +++ /dev/null @@ -1,3 +0,0 @@ -package zio - -package object sql {} diff --git a/jdbc/src/main/scala/zio/sql/transaction.scala b/jdbc/src/main/scala/zio/sql/transaction.scala deleted file mode 100644 index 6c872eda9..000000000 --- a/jdbc/src/main/scala/zio/sql/transaction.scala +++ /dev/null @@ -1,80 +0,0 @@ -package zio.sql - -import zio.{ Cause, ZIO } - -trait TransactionModule { self: SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule => - - type Transaction[+E, +A] = ZTransaction[Any, E, A] - - sealed trait ZTransaction[-R, +E, +A] { self => - import ZTransaction._ - - def map[B](f: A => B): ZTransaction[R, E, B] = - self.flatMap(f andThen ZTransaction.succeed) - - def flatMap[R1 <: R, E1 >: E, B](f: A => ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = - FoldCauseM(self, K[R1, E1, A, B](e => halt(e), f)) - - def zip[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = - zipWith[R1, E1, B, (A, B)](tx)((_, _)) - - def zipWith[R1 <: R, E1 >: E, B, C](tx: ZTransaction[R1, E1, B])(f: (A, B) => C): ZTransaction[R1, E1, C] = - for { - a <- self - b <- tx - } yield f(a, b) - - def *>[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = - self.flatMap(_ => tx) - - // named alias for *> - def zipRight[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = - self *> tx - - def <*[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = - self.flatMap(a => tx.map(_ => a)) - - // named alias for <* - def zipLeft[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = - self <* tx - - def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: E1 => ZTransaction[R1, E1, A1]): ZTransaction[R1, E1, A1] = - FoldCauseM( - self, - K( - (cause: Cause[E1]) => - cause match { - case Cause.Fail(e) => f(e) - case cause => halt(cause) - }, - succeed[A1] - ) - ) - - } - - object ZTransaction { - case class Effect[R, E, A](zio: ZIO[R, E, A]) extends ZTransaction[R, E, A] - case class Select[A <: SelectionSet[_]](read: self.Read[A]) - extends ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] - case class Update(read: self.Update[_]) extends ZTransaction[Any, Exception, Int] - case class Delete(read: self.Delete[_]) extends ZTransaction[Any, Exception, Int] - case class FoldCauseM[R, E, A, B](tx: ZTransaction[R, E, A], k: K[R, E, A, B]) extends ZTransaction[R, E, B] - - case class K[R, E, A, B](onHalt: Cause[E] => ZTransaction[R, E, B], onSuccess: A => ZTransaction[R, E, B]) - - def succeed[A](a: A): ZTransaction[Any, Nothing, A] = Effect(ZIO.succeed(a)) - def fail[E](e: E): ZTransaction[Any, E, Nothing] = Effect(ZIO.fail(e)) - def halt[E](e: Cause[E]): ZTransaction[Any, E, Nothing] = Effect(ZIO.halt(e)) - - def select[A <: SelectionSet[_]]( - read: self.Read[A] - ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = - ZTransaction.Select(read) - def update(update: self.Update[_]): ZTransaction[Any, Exception, Int] = - Update(update) - def delete(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = - Delete(delete) - - } -} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index dc8651ab0..005e2cb02 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -276,7 +276,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(customerId) from customers val result = execute( - ZTransaction.Select(query) *> ZTransaction.Select(query) + ZTransaction.select(query) *> ZTransaction.select(query) ) val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie @@ -286,7 +286,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(customerId) from customers val result = execute( - ZTransaction.Select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.Select(query) + ZTransaction.select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.select(query) ).mapError(_.getMessage) assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) From 1afbc8f93bcbf1c87fa14ceca54c66fdaa2db4c5 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 15:04:30 -0500 Subject: [PATCH 196/673] Make transactions returned managed results --- .../scala/zio/sql/SqlDriverLiveModule.scala | 11 +++--- .../scala/zio/sql/TransactionModule.scala | 35 ++++++++++--------- jdbc/src/main/scala/zio/sql/jdbc.scala | 8 ++--- .../sql/postgresql/PostgresModuleSpec.scala | 13 +++---- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index f2a294545..14e2d533c 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -1,12 +1,13 @@ package zio.sql import java.sql._ -import zio.{ IO, ZIO } + +import zio._ import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } trait SqlDriverLiveModule { self: Jdbc => - trait SqlDriverCore { + private[sql] trait SqlDriverCore { def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] @@ -78,11 +79,11 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] } - override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Exception, A] = - (for { + override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = + for { connection <- pool.connection _ <- blocking.effectBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception].toManaged_ a <- tx.run(blocking, Txn(connection, self)) - } yield a).use(ZIO.succeed(_)) + } yield a } } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index ffd9c4d0a..e398b8280 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -57,6 +57,24 @@ trait TransactionModule { self: Jdbc => } object ZTransaction { + def apply[A <: SelectionSet[_]]( + read: self.Read[A] + ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = + txn.map { case Txn(connection, coreDriver) => + // FIXME: runCollect and feed back into a stream + coreDriver.readOn(read, connection).asInstanceOf[zio.stream.Stream[Exception, A]] + } + + def apply(update: self.Update[_]): ZTransaction[Any, Exception, Int] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.updateOn(update, connection)) + } + + def apply(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.deleteOn(delete, connection)) + } + def succeed[A](a: => A): ZTransaction[Any, Nothing, A] = fromEffect(ZIO.succeed(a)) def fail[E](e: => E): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.fail(e)) @@ -71,22 +89,5 @@ trait TransactionModule { self: Jdbc => private val txn: ZTransaction[Any, Nothing, Txn] = ZTransaction(ZManaged.environment[(Any, Txn)].map(_._2)) - - def select[A <: SelectionSet[_]]( - read: self.Read[A] - ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = - txn.map { case Txn(connection, coreDriver) => - coreDriver.readOn(read, connection).asInstanceOf[zio.stream.Stream[Exception, A]] - } - - def update(update: self.Update[_]): ZTransaction[Any, Exception, Int] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.updateOn(update, connection)) - } - - def delete(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.deleteOn(delete, connection)) - } } } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index abdca4ba7..328fcf3e9 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,6 +1,6 @@ package zio.sql -import zio.{ Has, IO, ZIO, ZLayer } +import zio._ import zio.blocking.Blocking import zio.stream.Stream @@ -17,7 +17,7 @@ trait Jdbc def read[A <: SelectionSet[_], Target](read: Read[A])(to: read.ResultType => Target): Stream[Exception, Target] - def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Exception, A] + def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] } object SqlDriver { val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlDriver]] = @@ -27,8 +27,8 @@ trait Jdbc } yield SqlDriverLive(blocking, pool)).toLayer } - def execute[R <: Has[SqlDriver], A](tx: ZTransaction[R, Exception, A]): ZIO[R, Exception, A] = - ZIO.accessM[R](_.get.transact(tx)) + def execute[R <: Has[SqlDriver], A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = + ZManaged.accessManaged[R](_.get.transact(tx)) def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = new ExecuteBuilder(read) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 005e2cb02..d1ff9365d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -3,7 +3,7 @@ package zio.sql.postgresql import java.time.LocalDate import java.util.UUID -import zio.Cause +import zio._ import zio.test.Assertion._ import zio.test._ @@ -275,9 +275,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { testM("Transactions is returning the last value") { val query = select(customerId) from customers - val result = execute( - ZTransaction.select(query) *> ZTransaction.select(query) - ) + val result = execute( + ZTransaction(query) *> ZTransaction(query) + ).use(ZIO.succeed(_)) + val assertion = assertM(result.flatMap(_.runCollect))(hasSize(Assertion.equalTo(5))).orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) @@ -286,8 +287,8 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(customerId) from customers val result = execute( - ZTransaction.select(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction.select(query) - ).mapError(_.getMessage) + ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) + ).mapError(_.getMessage).use(ZIO.succeed(_)) assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) } From f6ec8012be4ba6f0e247228c4285f4a38b7759e7 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 15:09:35 -0500 Subject: [PATCH 197/673] Restore old behavior around streams in transactions --- jdbc/src/main/scala/zio/sql/TransactionModule.scala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index e398b8280..6f6d65edb 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -4,6 +4,7 @@ import java.sql._ import zio._ import zio.blocking.Blocking +import zio.stream._ trait TransactionModule { self: Jdbc => private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) @@ -60,9 +61,12 @@ trait TransactionModule { self: Jdbc => def apply[A <: SelectionSet[_]]( read: self.Read[A] ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = - txn.map { case Txn(connection, coreDriver) => - // FIXME: runCollect and feed back into a stream - coreDriver.readOn(read, connection).asInstanceOf[zio.stream.Stream[Exception, A]] + txn.flatMap { case Txn(connection, coreDriver) => + // FIXME: Find a way to NOT load the whole result set into memory at once!!! + val stream = + coreDriver.readOn(read, connection).asInstanceOf[Stream[Exception, A]] + + ZTransaction.fromEffect(stream.runCollect.map(Stream.fromIterable(_))) } def apply(update: self.Update[_]): ZTransaction[Any, Exception, Int] = From 8d45314b6a4c3d1c64fddf146436f1a45f8b9b1c Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Thu, 4 Mar 2021 16:54:40 -0500 Subject: [PATCH 198/673] Make remapping into user-defined types compositional --- core/jvm/src/main/scala/zio/sql/select.scala | 250 ++++++++++++++++-- .../scala/zio/sql/ExecuteBuilderModule.scala | 186 ------------- .../scala/zio/sql/JdbcInternalModule.scala | 2 + .../scala/zio/sql/SqlDriverLiveModule.scala | 11 +- .../scala/zio/sql/TransactionModule.scala | 4 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 9 +- .../scala/zio/sql/mysql/MysqlModule.scala | 4 +- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 6 +- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 16 +- .../scala/zio/sql/oracle/OracleModule.scala | 4 +- .../zio/sql/postgresql/PostgresModule.scala | 5 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 172 ++++++------ .../sql/postgresql/PostgresModuleSpec.scala | 20 +- .../zio/sql/sqlserver/SqlServerModule.scala | 2 + 14 files changed, 360 insertions(+), 331 deletions(-) delete mode 100644 jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 28654aab5..38d857bb2 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -5,28 +5,226 @@ import scala.language.implicitConversions trait SelectModule { self: ExprModule with TableModule => sealed case class SelectBuilder[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]) { - def from[A1 <: A](table: Table.Aux[A1]): Read.Select[F, A1, B] = - Read.Select(selection, table, true, Nil) + // [F, Repr, A, B <: SelectionSet.Aux[Repr, A]] + def from[A1 <: A](table: Table.Aux[A1]): Read.Select[F, selection.value.ResultTypeRepr, A1] = { + type B0 = SelectionSet.Aux[selection.value.ResultTypeRepr, A] + val b: B0 = selection.value + + Read.Select(Selection[F, A1, B0](b), table, true, Nil) + } } /** * A `Read[A]` models a selection of a set of values of type `A`. */ - sealed trait Read[+A <: SelectionSet[_]] { self => + sealed trait Read[+Out] { self => type ResultType - def union[A1 >: A <: SelectionSet[_]](that: Read[A1]): Read[A1] = Read.Union(self, that, true) + val mapper: ResultType => Out + + /** + * Maps the [[Read]] query's output to another type by providing a function + * that can transform from the current type to the new type. + */ + def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = + Read.Mapped(self, f) + + def to[A, Target](f: A => Target)(implicit ev: Out <:< (A, Unit)): Read[Target] = + self.map { resultType => + val (a, _) = ev(resultType) + + f(a) + } + + def to[A, B, Target]( + f: (A, B) => Target + )(implicit ev: Out <:< (A, (B, Unit))): Read[Target] = + self.map { resultType => + val (a, (b, _)) = ev(resultType) + + f(a, b) + } + + def to[A, B, C, Target]( + f: (A, B, C) => Target + )(implicit ev: Out <:< (A, (B, (C, Unit)))): Read[Target] = + self.map { resultType => + val (a, (b, (c, _))) = ev(resultType) + + f(a, b, c) + } + + def to[A, B, C, D, Target]( + f: (A, B, C, D) => Target + )(implicit ev: Out <:< (A, (B, (C, (D, Unit))))): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, _)))) = ev(resultType) + + f(a, b, c, d) + } + + def to[A, B, C, D, E, Target]( + f: (A, B, C, D, E) => Target + )(implicit ev: Out <:< (A, (B, (C, (D, (E, Unit)))))): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, _))))) = ev(resultType) + + f(a, b, c, d, e) + } + + def to[A, B, C, D, E, F, G, H, Target]( + f: (A, B, C, D, E, F, G, H) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, _)))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h) + } + + def to[A, B, C, D, E, F, G, H, I, Target]( + f: (A, B, C, D, E, F, G, H, I) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, _))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, _)))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, _))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, _)))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, _))))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, _)))))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Target + )(implicit + ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, _))))))))))))))))) = ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => Target + )(implicit + ev: Out <:< ( + A, + (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))) + ) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, _)))))))))))))))))) = + ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r) + } - def unionAll[A1 >: A <: SelectionSet[_]](that: Read[A1]): Read[A1] = Read.Union(self, that, false) + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => Target + )(implicit + ev: Out <:< ( + A, + (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))) + ) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, _))))))))))))))))))) = + ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s) + } + + def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Target]( + f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Target + )(implicit + ev: Out <:< ( + A, + (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))) + ) + ): Read[Target] = + self.map { resultType => + val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, _)))))))))))))))))))) = + ev(resultType) + + f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) + } + + def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = + Read.Union[ResultType, Out1](self, that, true) + + def unionAll[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = + Read.Union[ResultType, Out1](self, that, false) } object Read { - type Aux[ResultType0, +A <: SelectionSet[_]] = Read[A] { + type Aux[ResultType0, Out] = Read[Out] { type ResultType = ResultType0 } - sealed case class Select[F, A, B <: SelectionSet[A]]( - selection: Selection[F, A, B], + sealed case class Mapped[Repr, Out, Out2](read: Read.Aux[Repr, Out], f: Out => Out2) extends Read[Out2] { + type ResultType = Repr + + val mapper = read.mapper.andThen(f) + } + + sealed case class Select[F, Repr, A]( + selection: Selection[F, A, SelectionSet.Aux[Repr, A]], table: Table.Aux[A], whereExpr: Expr[_, A, Boolean], groupBy: List[Expr[_, A, Any]], @@ -34,46 +232,51 @@ trait SelectModule { self: ExprModule with TableModule => orderBy: List[Ordering[Expr[_, A, Any]]] = Nil, offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql limit: Option[Long] = None - ) extends Read[B] { self => - type ResultType = selection.value.ResultTypeRepr + ) extends Read[Repr] { self => + type ResultType = Repr + + val mapper: Repr => Repr = identity(_) - def where(whereExpr2: Expr[_, A, Boolean]): Select[F, A, B] = + def where(whereExpr2: Expr[_, A, Boolean]): Select[F, Repr, A] = copy(whereExpr = self.whereExpr && whereExpr2) - def limit(n: Long): Select[F, A, B] = copy(limit = Some(n)) + def limit(n: Long): Select[F, Repr, A] = copy(limit = Some(n)) - def offset(n: Long): Select[F, A, B] = copy(offset = Some(n)) + def offset(n: Long): Select[F, Repr, A] = copy(offset = Some(n)) - def orderBy(o: Ordering[Expr[_, A, Any]], os: Ordering[Expr[_, A, Any]]*): Select[F, A, B] = + def orderBy(o: Ordering[Expr[_, A, Any]], os: Ordering[Expr[_, A, Any]]*): Select[F, Repr, A] = copy(orderBy = self.orderBy ++ (o :: os.toList)) def groupBy(key: Expr[_, A, Any], keys: Expr[_, A, Any]*)(implicit ev: Features.IsAggregated[F] - ): Select[F, A, B] = { + ): Select[F, Repr, A] = { val _ = ev copy(groupBy = groupBy ++ (key :: keys.toList)) } def having(havingExpr2: Expr[_, A, Boolean])(implicit ev: Features.IsAggregated[F] - ): Select[F, A, B] = { + ): Select[F, Repr, A] = { val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) } } - sealed case class Union[B <: SelectionSet[_]](left: Read[B], right: Read[B], distinct: Boolean) extends Read[B] { - type ResultType = left.ResultType + sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { + type ResultType = Repr + + val mapper: ResultType => Out = left.mapper } - sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[SelectionSet.Singleton[Any, B]] { + sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { type ResultType = (B, Unit) - def typeTag: TypeTag[B] = implicitly[TypeTag[B]] + val mapper: ResultType => (B, Unit) = identity(_) + def typeTag: TypeTag[B] = implicitly[TypeTag[B]] } - def lit[B: TypeTag](values: B*): Read[SelectionSet.Singleton[Any, B]] = Literal(values.toSeq) + def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) } /** @@ -145,6 +348,11 @@ trait SelectModule { self: ExprModule with TableModule => } object SelectionSet { + type Aux[ResultTypeRepr0, -Source] = + SelectionSet[Source] { + type ResultTypeRepr = ResultTypeRepr0 + } + type Singleton[-Source, A] = Cons[Source, A, Empty] type Empty = Empty.type diff --git a/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala b/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala deleted file mode 100644 index 05b14e262..000000000 --- a/jdbc/src/main/scala/zio/sql/ExecuteBuilderModule.scala +++ /dev/null @@ -1,186 +0,0 @@ -package zio.sql - -import zio._ - -trait ExecuteBuilderModule { self: Jdbc => - - class ExecuteBuilder[Set <: SelectionSet[_], Output](val read: Read.Aux[Output, Set]) { - import zio.stream._ - - def to[A, Target](f: A => Target)(implicit ev: Output <:< (A, Unit)): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, _) = ev(resultType) - - f(a) - })) - - def to[A, B, Target]( - f: (A, B) => Target - )(implicit ev: Output <:< (A, (B, Unit))): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, _)) = ev(resultType) - - f(a, b) - })) - - def to[A, B, C, Target]( - f: (A, B, C) => Target - )(implicit ev: Output <:< (A, (B, (C, Unit)))): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, _))) = ev(resultType) - - f(a, b, c) - })) - - def to[A, B, C, D, Target]( - f: (A, B, C, D) => Target - )(implicit ev: Output <:< (A, (B, (C, (D, Unit))))): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, _)))) = ev(resultType) - - f(a, b, c, d) - })) - - def to[A, B, C, D, E, Target]( - f: (A, B, C, D, E) => Target - )(implicit ev: Output <:< (A, (B, (C, (D, (E, Unit)))))): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, _))))) = ev(resultType) - - f(a, b, c, d, e) - })) - - def to[A, B, C, D, E, F, G, H, Target]( - f: (A, B, C, D, E, F, G, H) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, _)))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h) - })) - - def to[A, B, C, D, E, F, G, H, I, Target]( - f: (A, B, C, D, E, F, G, H, I) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, _))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, _)))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, _))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, _)))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, _))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, _)))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Target - )(implicit - ev: Output <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, _))))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => Target - )(implicit - ev: Output <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))) - ) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, _)))))))))))))))))) = - ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => Target - )(implicit - ev: Output <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))) - ) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, _))))))))))))))))))) = - ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s) - })) - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Target - )(implicit - ev: Output <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))) - ) - ): ZStream[Has[SqlDriver], Exception, Target] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read) { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, _)))))))))))))))))))) = - ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) - })) - } -} diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 3127ad4e8..190e0a0b1 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -107,6 +107,8 @@ trait JdbcInternalModule { self: Jdbc => private[sql] def getColumns(read: Read[_]): Vector[TypeTag[_]] = read match { + case Read.Mapped(read, _) => getColumns(read) + case Read.Select(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 14e2d533c..ae2d301d6 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -12,7 +12,7 @@ trait SqlDriverLiveModule { self: Jdbc => def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] - def readOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] + def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] } sealed case class SqlDriverLive(blocking: Blocking.Service, pool: ConnectionPool) @@ -42,15 +42,14 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] - def read[A <: SelectionSet[_], Target]( + def read[A]( read: Read[A] - )(to: read.ResultType => Target): Stream[Exception, Target] = + ): Stream[Exception, A] = ZStream .managed(pool.connection) .flatMap(readOn(read, _)) - .map(to) - def readOn[A <: SelectionSet[_]](read: Read[A], conn: Connection): Stream[Exception, read.ResultType] = + override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = Stream.unwrap { blocking.effectBlocking { val schema = getColumns(read).zipWithIndex.map { case (value, index) => @@ -74,7 +73,7 @@ trait SqlDriverLiveModule { self: Jdbc => case e: SQLException => ZIO.fail(e) } } else ZIO.succeed(None) - } + }.map(read.mapper) }.refineToOrDie[Exception] } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 6f6d65edb..a18b4bfef 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -58,13 +58,13 @@ trait TransactionModule { self: Jdbc => } object ZTransaction { - def apply[A <: SelectionSet[_]]( + def apply[A]( read: self.Read[A] ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = txn.flatMap { case Txn(connection, coreDriver) => // FIXME: Find a way to NOT load the whole result set into memory at once!!! val stream = - coreDriver.readOn(read, connection).asInstanceOf[Stream[Exception, A]] + coreDriver.readOn[A](read, connection) ZTransaction.fromEffect(stream.runCollect.map(Stream.fromIterable(_))) } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 328fcf3e9..c4a377bb2 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -2,12 +2,11 @@ package zio.sql import zio._ import zio.blocking.Blocking -import zio.stream.Stream +import zio.stream._ trait Jdbc extends zio.sql.Sql with TransactionModule - with ExecuteBuilderModule with JdbcInternalModule with SqlDriverLiveModule { trait SqlDriver { @@ -15,7 +14,7 @@ trait Jdbc def update(update: Update[_]): IO[Exception, Int] - def read[A <: SelectionSet[_], Target](read: Read[A])(to: read.ResultType => Target): Stream[Exception, Target] + def read[A](read: Read[A]): Stream[Exception, A] def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] } @@ -30,8 +29,8 @@ trait Jdbc def execute[R <: Has[SqlDriver], A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = ZManaged.accessManaged[R](_.get.transact(tx)) - def execute[A <: SelectionSet[_]](read: Read[A]): ExecuteBuilder[A, read.ResultType] = - new ExecuteBuilder(read) + def execute[A](read: Read[A]): ZStream[Has[SqlDriver], Exception, A] = + ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read))) def execute(delete: Delete[_]): ZIO[Has[SqlDriver], Exception, Int] = ZIO.accessM[Has[SqlDriver]]( diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index c502f1e5a..58945d58e 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -123,8 +123,10 @@ trait MysqlModule extends Jdbc { self => val _ = builder.append(")") } - def buildReadString[A <: SelectionSet[_]](read: self.Read[_]): Unit = + def buildReadString(read: self.Read[_]): Unit = read match { + case Read.Mapped(read, _) => buildReadString(read) + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index e7b80b007..8a748ae72 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -15,7 +15,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = "ronald" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -28,7 +28,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 0.8414709848078965 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -41,7 +41,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 32.0 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 4ab2f57d5..63072c160 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -55,10 +55,10 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) - } + }) val assertion = for { r <- testResult.runCollect @@ -84,10 +84,10 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4, row._5) - } + }) val assertion = for { r <- testResult.runCollect @@ -112,10 +112,10 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) - } + }) val assertion = for { r <- testResult.runCollect @@ -154,10 +154,10 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")) ) - val result = execute(query) + val result = execute(query .to[String, String, LocalDate, Row] { case row => Row(row._1, row._2, row._3) - } + }) val assertion = for { r <- result.runCollect diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 152b04098..247fc623c 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -120,8 +120,10 @@ trait OracleModule extends Jdbc { self => val _ = builder.append(")") } - def buildReadString[A <: SelectionSet[_]](read: self.Read[_], builder: StringBuilder): Unit = + def buildReadString(read: self.Read[_], builder: StringBuilder): Unit = read match { + case Read.Mapped(read, _) => buildReadString(read, builder) + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 69de66905..d46fb78fc 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -275,7 +275,7 @@ trait PostgresModule extends Jdbc { self => renderExpr(whereExpr) } - def renderSet[A <: SelectionSet[_]](set: List[Set[_, A]])(implicit render: Renderer): Unit = + def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = set match { case head :: tail => renderExpr(head.lhs) @@ -442,8 +442,9 @@ trait PostgresModule extends Jdbc { self => render(")") } - private[zio] def renderReadImpl[A <: SelectionSet[_]](read: self.Read[_])(implicit render: Renderer): Unit = + private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { + case Read.Mapped(read, _) => renderReadImpl(read) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F; type A; type B <: SelectionSet[A] } val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 9f30b8700..e79cf9b15 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -47,7 +47,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "1+2+3" ) - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, testM("concat_ws #2 - combine columns") { @@ -65,7 +65,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "JoseJoseWiggins" ) - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, testM("concat_ws #3 - combine columns and flat values") { @@ -82,7 +82,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person: Jose Wiggins" ) - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, testM("concat_ws #3 - combine function calls together") { @@ -101,7 +101,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Name: Jose and Surname: Wiggins" ) - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, testM("isfinite") { @@ -109,7 +109,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected: Boolean = true - val testResult = execute(query).to[Boolean, Boolean](identity) + val testResult = execute(query.to[Boolean, Boolean](identity)) val assertion = for { r <- testResult.runCollect @@ -122,7 +122,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(Length("hello")) from customers val expected = 5 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -135,7 +135,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "hello " - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -148,7 +148,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = " hello" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -162,7 +162,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.14159 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -175,7 +175,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected: Double = 5 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -188,7 +188,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.141592653589793 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -201,7 +201,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ZioZioZio" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -214,7 +214,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.5235987755982989 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -227,7 +227,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.0986122886681097 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -240,7 +240,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.4711276743037347 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -253,7 +253,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "dcba" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -266,7 +266,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -1.0 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -279,7 +279,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2.718281828459045 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -292,7 +292,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -4.0 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -305,7 +305,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = (54.0, -53.0) - val testResult = execute(query).to[Double, Double, (Double, Double)]((a, b) => (a, b)) + val testResult = execute(query.to[Double, Double, (Double, Double)]((a, b) => (a, b))) val assertion = for { r <- testResult.runCollect @@ -318,7 +318,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.8414709848078965 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -331,7 +331,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.5 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -344,7 +344,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "def" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -355,7 +355,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("timeofday") { val query = select(TimeOfDay()) from customers - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { @@ -370,7 +370,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("localtime") { val query = select(Localtime) from customers - val testResult = execute(query).to[LocalTime, LocalTime](identity) + val testResult = execute(query.to[LocalTime, LocalTime](identity)) val assertion = for { r <- testResult.runCollect @@ -382,7 +382,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val precision = 0 val query = select(LocaltimeWithPrecision(precision)) from customers - val testResult = execute(query).to[LocalTime, LocalTime](identity) + val testResult = execute(query.to[LocalTime, LocalTime](identity)) val assertion = for { r <- testResult.runCollect @@ -393,7 +393,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("localtimestamp") { val query = select(Localtimestamp) from customers - val testResult = execute(query).to[Instant, Instant](identity) + val testResult = execute(query.to[Instant, Instant](identity)) val assertion = for { @@ -409,7 +409,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(LocaltimestampWithPrecision(precision)) from customers - val testResult = execute(query).to[Instant, Instant](identity) + val testResult = execute(query.to[Instant, Instant](identity)) val assertion = for { @@ -423,7 +423,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("now") { val query = select(Now()) from customers - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) val assertion = for { @@ -437,7 +437,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("statement_timestamp") { val query = select(StatementTimestamp()) from customers - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) val assertion = for { @@ -451,7 +451,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("transaction_timestamp") { val query = select(TransactionTimestamp()) from customers - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) val assertion = for { @@ -465,7 +465,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("current_time") { val query = select(CurrentTime) from customers - val testResult = execute(query).to[OffsetTime, OffsetTime](identity) + val testResult = execute(query.to[OffsetTime, OffsetTime](identity)) val assertion = for { @@ -483,7 +483,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "3adbbad1791fbae3ec908894c4963870" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -504,7 +504,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = checkM(genTestString) { (testString) => val query = select(ParseIdent(testString)) from customers - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) for { r <- testResult.runCollect @@ -515,7 +515,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("parseIdent fails with invalid identifier") { val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) from customers - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect.run @@ -529,7 +529,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 11.0 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -542,7 +542,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "A" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -555,7 +555,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = LocalDate.now() - val testResult = execute(query).to[LocalDate, LocalDate](identity) + val testResult = execute(query.to[LocalDate, LocalDate](identity)) val assertion = for { r <- testResult.runCollect @@ -568,7 +568,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "Hi Thomas" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -581,7 +581,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 8.41 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -594,7 +594,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "7fffffff" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -607,7 +607,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "SGVsbG8sIFdvcmxkIQ==" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -620,7 +620,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Chunk.fromArray("Hello, World!".getBytes) - val testResult = execute(query).to[Chunk[Byte], Chunk[Byte]](identity) + val testResult = execute(query.to[Chunk[Byte], Chunk[Byte]](identity)) val assertion = for { r <- testResult.runCollect @@ -633,7 +633,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 42d - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -646,7 +646,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 10.81 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -659,7 +659,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -672,7 +672,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -1 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -685,7 +685,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -698,7 +698,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 343.000000000000000 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -711,7 +711,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -724,7 +724,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -3.0 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -737,7 +737,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "a2x5" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -750,7 +750,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ab" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -763,7 +763,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "de" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -776,7 +776,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.7853981634 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -789,7 +789,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -814,10 +814,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => Customer(id, fname, lname, verified, dob) - ) + )) val assertion = for { r <- testResult.runCollect @@ -830,7 +830,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ronald" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -843,7 +843,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -856,7 +856,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 120 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -869,7 +869,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "RONALD" - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -882,7 +882,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -895,7 +895,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.0000000000051035 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -908,7 +908,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 21d - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -921,7 +921,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 23562d - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -934,7 +934,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 4d - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -947,7 +947,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 28.64788975654116 - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -960,7 +960,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2d - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -973,7 +973,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 120 - val testResult = execute(query).to[Int, Int](identity) + val testResult = execute(query.to[Int, Int](identity)) val assertion = for { r <- testResult.runCollect @@ -984,7 +984,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("random") { val query = select(Random()) from customers - val testResult = execute(query).to[Double, Double](identity) + val testResult = execute(query.to[Double, Double](identity)) val assertion = for { r <- testResult.runCollect @@ -998,7 +998,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") - val result = execute(query).to[String, String](identity) + val result = execute(query.to[String, String](identity)) val assertion = for { r <- result.runCollect @@ -1012,7 +1012,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Seq(6, 8, 4, 5, 4) - val result = execute(query).to[Int, Int](identity) + val result = execute(query.to[Int, Int](identity)) val assertion = for { r <- result.runCollect @@ -1023,15 +1023,15 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("to_timestamp") { val query = select(ToTimestamp(1284352323L)) from customers val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) - val testResult = execute(query).to[ZonedDateTime, ZonedDateTime](identity) + val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) val roundTripQuery = select(createdString ++ createdTimestamp) from customers - val roundTripResults = execute(roundTripQuery).to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { + val roundTripResults = execute(roundTripQuery.to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { case row => (row._1, ZonedDateTime.parse(row._1), row._2) - } + }) val roundTripExpected = List( ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), @@ -1056,9 +1056,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = ("Russe_", "special ::__::") val testResult = - execute(query).to[String, String, (String, String)] { case row => + execute(query.to[String, String, (String, String)] { case row => (row._1, row._2) - } + }) val assertion = for { r <- testResult.runCollect @@ -1071,7 +1071,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(LPad(s, 5, pad)) from customers for { - r <- execute(query).to[String, String](identity).runCollect + r <- execute(query.to[String, String](identity)).runCollect } yield r.head } @@ -1086,7 +1086,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(RPad(s, 5, pad)) from customers for { - r <- execute(query).to[String, String](identity).runCollect + r <- execute(query.to[String, String](identity)).runCollect } yield r.head } @@ -1099,7 +1099,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("pg_client_encoding") { val query = select(PgClientEncoding()) from customers - val testResult = execute(query).to[String, String](identity) + val testResult = execute(query.to[String, String](identity)) val assertion = for { r <- testResult.runCollect @@ -1113,7 +1113,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = LocalDate.of(2013, 7, 15) - val testResult = execute(query).to[LocalDate, LocalDate](identity) + val testResult = execute(query.to[LocalDate, LocalDate](identity)) val assertion = for { r <- testResult.runCollect @@ -1127,7 +1127,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { MakeInterval(interval) ) from customers for { - r <- execute(query).to[Interval, Interval](identity).runCollect + r <- execute(query.to[Interval, Interval](identity)).runCollect } yield r.head } @@ -1144,7 +1144,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("make_time") { val query = select(MakeTime(8, 15, 23.5)) from customers val expected = LocalTime.parse("08:15:23.500") - val testResult = execute(query).to[LocalTime, LocalTime](identity) + val testResult = execute(query.to[LocalTime, LocalTime](identity)) val assertion = for { r <- testResult.runCollect @@ -1155,7 +1155,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("make_timestamp") { val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) from customers val expected = LocalDateTime.parse("2013-07-15T08:15:23.500") - val testResult = execute(query).to[LocalDateTime, LocalDateTime](identity) + val testResult = execute(query.to[LocalDateTime, LocalDateTime](identity)) val assertion = for { r <- testResult.runCollect @@ -1167,7 +1167,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { def runTest(tz: Timestampz) = { val query = select(MakeTimestampz(tz)) from customers for { - r <- execute(query).to[Timestampz, Timestampz](identity).runCollect + r <- execute(query.to[Timestampz, Timestampz](identity)).runCollect } yield r.head } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index d1ff9365d..2cd8d4adb 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -33,10 +33,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4, row._5) - } + }) val assertion = for { r <- testResult.runCollect @@ -89,10 +89,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { // execute(query ++ query ++ query ++ query) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) - } + }) val assertion = for { r <- testResult.runCollect @@ -174,10 +174,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) - } + }) val assertion = for { r <- testResult.runCollect @@ -235,10 +235,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) ) - val result = execute(query) + val result = execute(query .to[String, String, LocalDate, Row] { case row => Row(row._1, row._2, row._3) - } + }) val assertion = for { r <- result.runCollect @@ -261,10 +261,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query) + val testResult = execute(query .to[UUID, String, String, LocalDate, Customer] { case row => Customer(row._1, row._2, row._3, row._4) - } + }) val assertion = for { r <- testResult.runCollect diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 55e8d3dec..dee38d21d 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -125,6 +125,8 @@ trait SqlServerModule extends Jdbc { self => def buildReadString(read: self.Read[_]): Unit = read match { + case Read.Mapped(read, _) => buildReadString(read) + //todo offset (needs orderBy, must use fetch _instead_ of top) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { From a0697c5404814dee809eba522829f341e42ca043 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 7 Mar 2021 21:21:42 +0100 Subject: [PATCH 199/673] Fix formatting --- core/jvm/src/main/scala/zio/sql/select.scala | 23 +++++---- .../scala/zio/sql/JdbcInternalModule.scala | 2 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 22 ++++---- jdbc/src/main/scala/zio/sql/jdbc.scala | 6 +-- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 40 +++++++++------ .../zio/sql/postgresql/PostgresModule.scala | 2 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 10 ++-- .../sql/postgresql/PostgresModuleSpec.scala | 50 +++++++++++-------- .../zio/sql/sqlserver/SqlServerModule.scala | 2 +- 9 files changed, 88 insertions(+), 69 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 38d857bb2..778c1ba02 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -7,7 +7,7 @@ trait SelectModule { self: ExprModule with TableModule => // [F, Repr, A, B <: SelectionSet.Aux[Repr, A]] def from[A1 <: A](table: Table.Aux[A1]): Read.Select[F, selection.value.ResultTypeRepr, A1] = { - type B0 = SelectionSet.Aux[selection.value.ResultTypeRepr, A] + type B0 = SelectionSet.Aux[selection.value.ResultTypeRepr, A] val b: B0 = selection.value Read.Select(Selection[F, A1, B0](b), table, true, Nil) @@ -23,10 +23,10 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: ResultType => Out /** - * Maps the [[Read]] query's output to another type by providing a function - * that can transform from the current type to the new type. - */ - def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = + * Maps the [[Read]] query's output to another type by providing a function + * that can transform from the current type to the new type. + */ + def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = Read.Mapped(self, f) def to[A, Target](f: A => Target)(implicit ev: Out <:< (A, Unit)): Read[Target] = @@ -205,10 +205,10 @@ trait SelectModule { self: ExprModule with TableModule => f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) } - def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = + def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = Read.Union[ResultType, Out1](self, that, true) - def unionAll[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = + def unionAll[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = Read.Union[ResultType, Out1](self, that, false) } @@ -233,7 +233,7 @@ trait SelectModule { self: ExprModule with TableModule => offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql limit: Option[Long] = None ) extends Read[Repr] { self => - type ResultType = Repr + type ResultType = Repr val mapper: Repr => Repr = identity(_) @@ -262,10 +262,11 @@ trait SelectModule { self: ExprModule with TableModule => } } - sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { + sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) + extends Read[Out] { type ResultType = Repr - val mapper: ResultType => Out = left.mapper + val mapper: ResultType => Out = left.mapper } sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { @@ -348,7 +349,7 @@ trait SelectModule { self: ExprModule with TableModule => } object SelectionSet { - type Aux[ResultTypeRepr0, -Source] = + type Aux[ResultTypeRepr0, -Source] = SelectionSet[Source] { type ResultTypeRepr = ResultTypeRepr0 } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 190e0a0b1..886b2747f 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -108,7 +108,7 @@ trait JdbcInternalModule { self: Jdbc => private[sql] def getColumns(read: Read[_]): Vector[TypeTag[_]] = read match { case Read.Mapped(read, _) => getColumns(read) - + case Read.Select(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index ae2d301d6..74c5faeed 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -64,16 +64,18 @@ trait SqlDriverLiveModule { self: Jdbc => val resultSet = statement.getResultSet() - ZStream.unfoldM(resultSet) { rs => - if (rs.next()) { - try unsafeExtractRow[read.ResultType](resultSet, schema) match { - case Left(error) => ZIO.fail(error) - case Right(value) => ZIO.succeed(Some((value, rs))) - } catch { - case e: SQLException => ZIO.fail(e) - } - } else ZIO.succeed(None) - }.map(read.mapper) + ZStream + .unfoldM(resultSet) { rs => + if (rs.next()) { + try unsafeExtractRow[read.ResultType](resultSet, schema) match { + case Left(error) => ZIO.fail(error) + case Right(value) => ZIO.succeed(Some((value, rs))) + } catch { + case e: SQLException => ZIO.fail(e) + } + } else ZIO.succeed(None) + } + .map(read.mapper) }.refineToOrDie[Exception] } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index c4a377bb2..b0366fee0 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -4,11 +4,7 @@ import zio._ import zio.blocking.Blocking import zio.stream._ -trait Jdbc - extends zio.sql.Sql - with TransactionModule - with JdbcInternalModule - with SqlDriverLiveModule { +trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule with SqlDriverLiveModule { trait SqlDriver { def delete(delete: Delete[_]): IO[Exception, Int] diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 63072c160..83029086e 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -55,10 +55,12 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute(query - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - }) + val testResult = execute( + query + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + ) val assertion = for { r <- testResult.runCollect @@ -84,10 +86,12 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute(query - .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4, row._5) - }) + val testResult = execute( + query + .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } + ) val assertion = for { r <- testResult.runCollect @@ -112,10 +116,12 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute(query - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - }) + val testResult = execute( + query + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + ) val assertion = for { r <- testResult.runCollect @@ -154,10 +160,12 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")) ) - val result = execute(query - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - }) + val result = execute( + query + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + ) val assertion = for { r <- result.runCollect diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index d46fb78fc..93402d30e 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -444,7 +444,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { - case Read.Mapped(read, _) => renderReadImpl(read) + case Read.Mapped(read, _) => renderReadImpl(read) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F; type A; type B <: SelectionSet[A] } val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index e79cf9b15..aec170dd7 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -814,10 +814,12 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query - .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => - Customer(id, fname, lname, verified, dob) - )) + val testResult = execute( + query + .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => + Customer(id, fname, lname, verified, dob) + ) + ) val assertion = for { r <- testResult.runCollect diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 2cd8d4adb..4aa6632cf 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -33,10 +33,12 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query - .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4, row._5) - }) + val testResult = execute( + query + .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } + ) val assertion = for { r <- testResult.runCollect @@ -89,10 +91,12 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { // execute(query ++ query ++ query ++ query) - val testResult = execute(query - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - }) + val testResult = execute( + query + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + ) val assertion = for { r <- testResult.runCollect @@ -174,10 +178,12 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - }) + val testResult = execute( + query + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + ) val assertion = for { r <- testResult.runCollect @@ -235,10 +241,12 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) ) - val result = execute(query - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - }) + val result = execute( + query + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + ) val assertion = for { r <- result.runCollect @@ -261,10 +269,12 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - }) + val testResult = execute( + query + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + ) val assertion = for { r <- testResult.runCollect diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index dee38d21d..4242c6e33 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -126,7 +126,7 @@ trait SqlServerModule extends Jdbc { self => def buildReadString(read: self.Read[_]): Unit = read match { case Read.Mapped(read, _) => buildReadString(read) - + //todo offset (needs orderBy, must use fetch _instead_ of top) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { From bc3ea372c2a63991c5173f828780337f13c99772 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 9 Mar 2021 17:22:11 +0100 Subject: [PATCH 200/673] Update zio, zio-streams, zio-test, ... to 1.0.5 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index ff52fbad7..adc6a64e1 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "1.0.4-2" +val zioVersion = "1.0.5" val testcontainersVersion = "1.15.2" val testcontainersScalaVersion = "0.39.3" From bc7a43643b979fffd41e94bf70b8a766797d8fe3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 10 Mar 2021 09:09:18 +0100 Subject: [PATCH 201/673] Update sbt to 1.4.9 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 0b2e09c5a..dbae93bcf 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.7 +sbt.version=1.4.9 From 358678e7ea7bbf719fc2d865263bae96a057b5af Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 11 Mar 2021 13:33:38 +0100 Subject: [PATCH 202/673] Update sbt-ci-release to 1.5.6 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 373813260..7c085c58e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.18") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") From 55477a8eac6cb6312fd11c989b76c93bfa325df1 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 13 Mar 2021 16:46:31 +0100 Subject: [PATCH 203/673] Cleanup tests --- .../zio/sql/postgresql/PostgresModule.scala | 19 +-- .../scala/zio/sql/postgresql/DeleteSpec.scala | 1 - .../zio/sql/postgresql/FunctionDefSpec.scala | 4 - .../sql/postgresql/PostgresModuleSpec.scala | 141 ++++++++---------- 4 files changed, 71 insertions(+), 94 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 93402d30e..3d00da854 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -232,21 +232,18 @@ trait PostgresModule extends Jdbc { self => override def renderRead(read: self.Read[_]): String = { implicit val render: Renderer = Renderer() PostgresRenderModule.renderReadImpl(read) - println(render.toString) render.toString } def renderUpdate(update: Update[_]): String = { implicit val render: Renderer = Renderer() PostgresRenderModule.renderUpdateImpl(update) - println(render.toString) render.toString } override def renderDelete(delete: Delete[_]): String = { implicit val render: Renderer = Renderer() PostgresRenderModule.renderDeleteImpl(delete) - println(render.toString) render.toString } @@ -306,14 +303,14 @@ trait PostgresModule extends Jdbc { self => ) // todo fix `cast` infers correctly but map doesn't work for some reason case tt @ TChar => render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping - case tt @ TInstant => render("TIMESTAMP '", tt.cast(lit.value), "'") //todo test - case tt @ TLocalDate => render(tt.cast(lit.value)) // todo still broken - case tt @ TLocalDateTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TLocalTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TOffsetDateTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TOffsetTime => render(tt.cast(lit.value)) // todo still broken - case tt @ TUUID => render(tt.cast(lit.value)) // todo still broken - case tt @ TZonedDateTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TInstant => render("TIMESTAMP '", tt.cast(lit.value), "'") + case tt @ TLocalDate => render("DATE '", tt.cast(lit.value), "'") + case tt @ TLocalDateTime => render("DATE '", tt.cast(lit.value), "'") + case tt @ TLocalTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TOffsetDateTime => render("DATE '", tt.cast(lit.value), "'") + case tt @ TOffsetTime => render(tt.cast(lit.value)) // todo still broken + case tt @ TUUID => render("'", tt.cast(lit.value), "'") + case tt @ TZonedDateTime => render("DATE '", tt.cast(lit.value), "'") case TByte => render(lit.value) //default toString is probably ok case TBigDecimal => render(lit.value) //default toString is probably ok diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index c5dd8e3c2..cf2bc6289 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -13,7 +13,6 @@ object DeleteSpec extends PostgresRunnableSpec with ShopSchema { override def specLayered = suite("Postgres module delete")( testM("Can delete from single table with a condition") { val query = deleteFrom(customers) where (verified isNotTrue) - println(renderDelete(query)) val result = execute(query) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index aec170dd7..e399fb3a5 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -37,7 +37,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { //note: a plain number (3) would and should not compile val query = select(ConcatWs4("+", "1", "2", "3")) from customers - println(renderRead(query)) val expected = Seq( // note: one for each row "1+2+3", @@ -55,7 +54,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { // note: you can't use customerId here as it is a UUID, hence not a string in our book val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers - println(renderRead(query)) val expected = Seq( "RonaldRonaldRussell", @@ -72,7 +70,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { import Expr._ val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers - println(renderRead(query)) val expected = Seq( "Person: Ronald Russell", @@ -91,7 +88,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select( ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) ) from customers - println(renderRead(query)) val expected = Seq( "Name: Ronald and Surname: Russell", diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 4aa6632cf..222ceb21b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -1,6 +1,6 @@ package zio.sql.postgresql -import java.time.LocalDate +import java.time._ import java.util.UUID import zio._ @@ -11,6 +11,7 @@ import scala.language.postfixOps object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { + import AggregationDef._ import Customers._ import Orders._ @@ -20,8 +21,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (condition) - println(renderRead(query)) - val expected = Seq( Customer( @@ -53,8 +52,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(customerId ++ fName ++ lName ++ dob) from customers - println(renderRead(query)) - val expected = Seq( Customer( @@ -89,8 +86,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) -// execute(query ++ query ++ query ++ query) - val testResult = execute( query .to[UUID, String, String, LocalDate, Customer] { case row => @@ -107,67 +102,64 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { testM("Can select with property unary operator") { customerSelectJoseAssertion(verified isNotTrue) }, -// TODO: uncomment when #311 (rendering literals) will be fixed -// testM("Can select with property binary operator with UUID") { -// customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) -// }, -// testM("Can select with property binary operator with String") { -// customerSelectJoseAssertion(fName === "Jose") -// }, -// testM("Can select with property binary operator with LocalDate") { -// customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) -// }, -// testM("Can select with property binary operator with LocalDateTime") { -// customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) -// }, -// testM("Can select with property binary operator with OffsetDateTime") { -// customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) -// }, -// testM("Can select with property binary operator with ZonedLocalDate") { -// customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) -// }, -// testM("Can select with property binary operator with Instant") { -// customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) -// }, -// testM("Can select with property binary operator with numbers") { -// case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) -// -// val orderDetailQuantity = 3 -// val orderDetailUnitPrice = BigDecimal(80.0) -// val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) -// val query = -// select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice) from orderDetails where (condition) -// -// println(renderRead(query)) -// -// val expected = -// Seq( -// OrderDetails( -// UUID.fromString("763a7c39-833f-4ee8-9939-e80dfdbfc0fc"), -// UUID.fromString("105a2701-ef93-4e25-81ab-8952cc7d9daa"), -// orderDetailQuantity, -// orderDetailUnitPrice -// ) -// ) -// -// val testResult = execute(query) -// .to[UUID, UUID, Int, BigDecimal, OrderDetails] { case row => -// OrderDetails(row._1, row._2, row._3, row._4) -// } -// -// val assertion = for { -// r <- testResult.runCollect -// } yield assert(r)(hasSameElementsDistinct(expected)) -// -// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) -// }, + testM("Can select with property binary operator with UUID") { + customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) + }, + testM("Can select with property binary operator with String") { + customerSelectJoseAssertion(fName === "Jose") + }, + testM("Can select with property binary operator with LocalDate") { + customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) + }, + testM("Can select with property binary operator with LocalDateTime") { + customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) + }, + testM("Can select with property binary operator with OffsetDateTime") { + customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) + }, + testM("Can select with property binary operator with ZonedLocalDate") { + customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) + }, + testM("Can select with property binary operator with Instant") { + customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) + }, + // uncomment when we properly handle Postgres' Money type + // testM("Can select with property binary operator with numbers") { + // case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) + + // val orderDetailQuantity = 3 + // val orderDetailUnitPrice = BigDecimal(80.0) + // val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) + // val query = + // select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice) from orderDetails where (condition) + + // println(renderRead(query)) + + // val expected = + // Seq( + // OrderDetails( + // UUID.fromString("763a7c39-833f-4ee8-9939-e80dfdbfc0fc"), + // UUID.fromString("105a2701-ef93-4e25-81ab-8952cc7d9daa"), + // orderDetailQuantity, + // orderDetailUnitPrice + // ) + // ) + + // val testResult = execute(query.to[UUID, UUID, Int, BigDecimal, OrderDetails] { case row => + // OrderDetails(row._1, row._2, row._3, row._4) + // }) + + // val assertion = for { + // r <- testResult.runCollect + // } yield assert(r)(hasSameElementsDistinct(expected)) + + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // }, testM("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) - println(renderRead(query)) - val expected = Seq( Customer( @@ -191,26 +183,20 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - /* - * This is a failing test for aggregation function. - * Uncomment it when aggregation function handling is fixed. - */ - // testM("Can count rows") { - // val query = select { Count(userId) } from users + testM("Can count rows") { + val query = select(Count(customerId)) from customers - // val expected = 5L + val expected = 5L - // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) + val result = execute(query.to[Long, Long](identity)) - // for { - // r <- result.runCollect - // } yield assert(r.head)(equalTo(expected)) - // }, + for { + r <- result.runCollect + } yield assert(r.head)(equalTo(expected)) + }, testM("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) - println(renderRead(query)) - case class Row(firstName: String, lastName: String, orderDate: LocalDate) val expected = Seq( @@ -259,7 +245,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") - println(renderRead(query)) val expected = Seq( Customer( UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), From 257685e33d1a83ddca087eb20fa37bc9887bd063 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 13 Mar 2021 16:51:38 +0100 Subject: [PATCH 204/673] Change to dot-based query syntax --- .../scala/zio/sql/postgresql/DeleteSpec.scala | 4 +--- .../sql/postgresql/PostgresModuleSpec.scala | 18 +++++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index cf2bc6289..f55160b9b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -4,15 +4,13 @@ import zio.Cause import zio.test.Assertion._ import zio.test._ -import scala.language.postfixOps - object DeleteSpec extends PostgresRunnableSpec with ShopSchema { import Customers._ override def specLayered = suite("Postgres module delete")( testM("Can delete from single table with a condition") { - val query = deleteFrom(customers) where (verified isNotTrue) + val query = deleteFrom(customers).where(verified.isNotTrue) val result = execute(query) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 222ceb21b..7134da3ff 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -19,7 +19,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = - select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (condition) + select(customerId ++ fName ++ lName ++ verified ++ dob).from(customers).where(condition) val expected = Seq( @@ -50,7 +50,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { testM("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob) from customers + val query = select(customerId ++ fName ++ lName ++ dob).from(customers) val expected = Seq( @@ -131,7 +131,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { // val orderDetailUnitPrice = BigDecimal(80.0) // val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) // val query = - // select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice) from orderDetails where (condition) + // select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice).from(orderDetails).where(condition) // println(renderRead(query)) @@ -158,7 +158,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { testM("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) + val query = select(customerId ++ fName ++ lName ++ dob).from(customers).limit(1).offset(1).orderBy(fName) val expected = Seq( @@ -184,7 +184,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("Can count rows") { - val query = select(Count(customerId)) from customers + val query = select(Count(customerId)).from(customers) val expected = 5L @@ -195,7 +195,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo(expected)) }, testM("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate) from (customers join orders).on(fkCustomerId === customerId) + val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) case class Row(firstName: String, lastName: String, orderDate: LocalDate) @@ -243,7 +243,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { testM("Can select using like") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob) from customers where (fName like "Jo%") + val query = select(customerId ++ fName ++ lName ++ dob).from(customers).where(fName like "Jo%") val expected = Seq( Customer( @@ -268,7 +268,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("Transactions is returning the last value") { - val query = select(customerId) from customers + val query = select(customerId).from(customers) val result = execute( ZTransaction(query) *> ZTransaction(query) @@ -279,7 +279,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("Transaction is failing") { - val query = select(customerId) from customers + val query = select(customerId).from(customers) val result = execute( ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) From 85c4857c8d300782657ca1ac740905ee0fa6ce20 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sat, 13 Mar 2021 17:41:12 +0100 Subject: [PATCH 205/673] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c15129ba1..e05e9be00 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Running Deletes | :heavy_check_mark: Running Updates | :heavy_check_mark: Running Inserts | Transactions | :white_check_mark: -Connection pool | +Connection pool | :white_check_mark: #### Db-specific features: From 8faabb555e88bf0c5a6401a31e9de04a130c1894 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 16 Mar 2021 21:10:11 +0100 Subject: [PATCH 206/673] Update sbt-tpolecat to 0.1.17 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 7c085c58e..16df08731 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,4 +12,4 @@ addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") From cfedbf37027b423926c57a3bf852e594c4aaeb13 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 19 Mar 2021 19:43:43 -0700 Subject: [PATCH 207/673] Update codeowners --- .github/CODEOWNERS | 3 --- docs/about/code_of_conduct.md | 1 - 2 files changed, 4 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 58eb3dda6..c1ad1d1ec 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,2 @@ * @zio/zio-sql -.github/workflows/ @softinio @mijicd -build.sbt @softinio @mijicd -project/BuildHelper.scala @softinio @mijicd diff --git a/docs/about/code_of_conduct.md b/docs/about/code_of_conduct.md index 24ddca3c5..7e9df263c 100644 --- a/docs/about/code_of_conduct.md +++ b/docs/about/code_of_conduct.md @@ -23,7 +23,6 @@ The ZIO project is moderated by the Steering Committee team members: - Kai [@neko-kai](https://github.com/neko-kai) - Paul Shirshov [@pshirshov](https://github.com/pshirshov) - Pierre Ricadat [@ghostdogpr](https://github.com/ghostdogpr) -- Salar Rahmanian [@softinio](https://github.com/softinio) - Wiem Zine El Abidine [@wi101](https://github.com/wi101) The ZIO project requires that drastic moderation actions detailed in the code of From f85f4bea25cf9aa05b7566e51fabd444a7f28729 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 23 Mar 2021 11:34:50 +0100 Subject: [PATCH 208/673] Update sbt-ci-release to 1.5.7 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 16df08731..df33fd76d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.18") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") From 6aec4a2874c4e5af7958cca1a9f6a0e0bf3f41a8 Mon Sep 17 00:00:00 2001 From: Tobias Pfeifer Date: Sun, 28 Mar 2021 21:38:39 +0200 Subject: [PATCH 209/673] Add 'format' function to PostgresModule #184 --- .../zio/sql/postgresql/PostgresModule.scala | 6 ++ .../zio/sql/postgresql/FunctionDefSpec.scala | 102 +++++++++++++++++- 2 files changed, 106 insertions(+), 2 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 3d00da854..e78ff2105 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -227,6 +227,12 @@ trait PostgresModule extends Jdbc { self => FunctionDef[Timestampz, Timestampz](FunctionName("make_timestamptz")) val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) + val Format0 = FunctionDef[String, String](FunctionName("format")) // TODO: varargs + val Format1 = FunctionDef[(String, Any), String](FunctionName("format")) + val Format2 = FunctionDef[(String, Any, Any), String](FunctionName("format")) + val Format3 = FunctionDef[(String, Any, Any, Any), String](FunctionName("format")) + val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) + val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index e399fb3a5..5c1d946f7 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -151,7 +151,105 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } + }, + suite("format function")( + testM("format0") { + import Expr._ + + val query = select(Format0("Person")) from customers + + val expected = Seq( + "Person", + "Person", + "Person", + "Person", + "Person" + ) + + val testResult = execute(query.to[String, String](identity)) + collectAndCompare(expected, testResult) + }, + testM("format1") { + import Expr._ + + val query = select(Format1("Person: %s", Customers.fName)) from customers + + val expected = Seq( + "Person: Ronald", + "Person: Terrence", + "Person: Mila", + "Person: Alana", + "Person: Jose" + ) + + val testResult = execute(query.to[String, String](identity)) + collectAndCompare(expected, testResult) + }, + testM("format2") { + import Expr._ + + val query = select(Format2("Person: %s %s", Customers.fName, Customers.lName)) from customers + + val expected = Seq( + "Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" + ) + + val testResult = execute(query.to[String, String](identity)) + collectAndCompare(expected, testResult) + }, + testM("format3") { + import Expr._ + + val query = select(Format3("Person: %s %s with double quoted %I ", Customers.fName, Customers.lName, "identi fier")) from customers + + val expected = Seq( + s"""Person: Ronald Russell with double quoted "identi fier" """, + s"""Person: Terrence Noel with double quoted "identi fier" """, + s"""Person: Mila Paterso with double quoted "identi fier" """, + s"""Person: Alana Murray with double quoted "identi fier" """, + s"""Person: Jose Wiggins with double quoted "identi fier" """ + ) + + val testResult = execute(query.to[String, String](identity)) + collectAndCompare(expected, testResult) + }, + testM("format4") { + import Expr._ + + val query = select(Format4("Person: %s %s with null-literal %L and non-null-literal %L ", Customers.fName, Customers.lName, "FIXME: NULL", "literal")) from customers + + val expected = Seq( + s"""Person: Ronald Russell with null-literal 'FIXME: NULL' and non-null-literal 'literal' """, + s"""Person: Terrence Noel with null-literal 'FIXME: NULL' and non-null-literal 'literal' """, + s"""Person: Mila Paterso with null-literal 'FIXME: NULL' and non-null-literal 'literal' """, + s"""Person: Alana Murray with null-literal 'FIXME: NULL' and non-null-literal 'literal' """, + s"""Person: Jose Wiggins with null-literal 'FIXME: NULL' and non-null-literal 'literal' """ + ) + + val testResult = execute(query.to[String, String](identity)) + collectAndCompare(expected, testResult) + }, + testM("format5") { + import Expr._ + + val query = select(Format5("Person: %s %s with more arguments than placeholders: %I %L ", Customers.fName, Customers.lName, "identifier", Reverse(Customers.fName), "unused")) from customers + + val expected = Seq( + s"""Person: Ronald Russell with more arguments than placeholders: identifier 'dlanoR' """, + s"""Person: Terrence Noel with more arguments than placeholders: identifier 'ecnerreT' """, + s"""Person: Mila Paterso with more arguments than placeholders: identifier 'aliM' """, + s"""Person: Alana Murray with more arguments than placeholders: identifier 'analA' """, + s"""Person: Jose Wiggins with more arguments than placeholders: identifier 'esoJ' """ + ) + + val testResult = execute(query.to[String, String](identity)) + collectAndCompare(expected, testResult) + } + ) ), testM("abs") { val query = select(Abs(-3.14159)) from customers @@ -358,7 +456,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)( matchesRegex( - "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3}" + "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3,4}" ) ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) From b1671e5c1cd87bbfd9751238c75f2d978b56b00e Mon Sep 17 00:00:00 2001 From: Tobias Pfeifer Date: Sun, 28 Mar 2021 22:14:41 +0200 Subject: [PATCH 210/673] fix formatting --- .../zio/sql/postgresql/PostgresModule.scala | 12 ++++----- .../zio/sql/postgresql/FunctionDefSpec.scala | 25 ++++++++++++++++--- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index e78ff2105..9cbdec184 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -227,12 +227,12 @@ trait PostgresModule extends Jdbc { self => FunctionDef[Timestampz, Timestampz](FunctionName("make_timestamptz")) val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) - val Format0 = FunctionDef[String, String](FunctionName("format")) // TODO: varargs - val Format1 = FunctionDef[(String, Any), String](FunctionName("format")) - val Format2 = FunctionDef[(String, Any, Any), String](FunctionName("format")) - val Format3 = FunctionDef[(String, Any, Any, Any), String](FunctionName("format")) - val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) - val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) + val Format0 = FunctionDef[String, String](FunctionName("format")) // TODO: varargs + val Format1 = FunctionDef[(String, Any), String](FunctionName("format")) + val Format2 = FunctionDef[(String, Any, Any), String](FunctionName("format")) + val Format3 = FunctionDef[(String, Any, Any, Any), String](FunctionName("format")) + val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) + val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 5c1d946f7..fb900d8a3 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -204,7 +204,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("format3") { import Expr._ - val query = select(Format3("Person: %s %s with double quoted %I ", Customers.fName, Customers.lName, "identi fier")) from customers + val query = select( + Format3("Person: %s %s with double quoted %I ", Customers.fName, Customers.lName, "identi fier") + ) from customers val expected = Seq( s"""Person: Ronald Russell with double quoted "identi fier" """, @@ -220,7 +222,15 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("format4") { import Expr._ - val query = select(Format4("Person: %s %s with null-literal %L and non-null-literal %L ", Customers.fName, Customers.lName, "FIXME: NULL", "literal")) from customers + val query = select( + Format4( + "Person: %s %s with null-literal %L and non-null-literal %L ", + Customers.fName, + Customers.lName, + "FIXME: NULL", + "literal" + ) + ) from customers val expected = Seq( s"""Person: Ronald Russell with null-literal 'FIXME: NULL' and non-null-literal 'literal' """, @@ -236,7 +246,16 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("format5") { import Expr._ - val query = select(Format5("Person: %s %s with more arguments than placeholders: %I %L ", Customers.fName, Customers.lName, "identifier", Reverse(Customers.fName), "unused")) from customers + val query = select( + Format5( + "Person: %s %s with more arguments than placeholders: %I %L ", + Customers.fName, + Customers.lName, + "identifier", + Reverse(Customers.fName), + "unused" + ) + ) from customers val expected = Seq( s"""Person: Ronald Russell with more arguments than placeholders: identifier 'dlanoR' """, From d60fd1e6c93e6fb1582ec3daf873d043b40a64af Mon Sep 17 00:00:00 2001 From: Tobias Pfeifer Date: Mon, 29 Mar 2021 21:36:43 +0200 Subject: [PATCH 211/673] Verify a statement execution returns a ResultSet #63 --- .../scala/zio/sql/SqlDriverLiveModule.scala | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 74c5faeed..a81b876b4 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -60,22 +60,24 @@ trait SqlDriverLiveModule { self: Jdbc => val statement = conn.createStatement() - val _ = statement.execute(query) // TODO: Check boolean return value - - val resultSet = statement.getResultSet() - - ZStream - .unfoldM(resultSet) { rs => - if (rs.next()) { - try unsafeExtractRow[read.ResultType](resultSet, schema) match { - case Left(error) => ZIO.fail(error) - case Right(value) => ZIO.succeed(Some((value, rs))) - } catch { - case e: SQLException => ZIO.fail(e) - } - } else ZIO.succeed(None) - } - .map(read.mapper) + val hasResultSet = statement.execute(query) + + if (hasResultSet) { + val resultSet = statement.getResultSet() + + ZStream + .unfoldM(resultSet) { rs => + if (rs.next()) { + try unsafeExtractRow[read.ResultType](resultSet, schema) match { + case Left(error) => ZIO.fail(error) + case Right(value) => ZIO.succeed(Some((value, rs))) + } catch { + case e: SQLException => ZIO.fail(e) + } + } else ZIO.succeed(None) + } + .map(read.mapper) + } else ZStream.empty }.refineToOrDie[Exception] } From 6c67485082759217a115db5d1c94f940e12f863a Mon Sep 17 00:00:00 2001 From: Tobias Pfeifer Date: Mon, 29 Mar 2021 21:39:19 +0200 Subject: [PATCH 212/673] Add 'setseed' function to PostgresModule #181 --- .../scala/zio/sql/postgresql/PostgresModule.scala | 10 ++++++++++ .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 14 +++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 3d00da854..8e7b4735c 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -16,6 +16,15 @@ trait PostgresModule extends Jdbc { self => object PostgresSpecific { trait PostgresTypeTag[+A] extends Tag[A] with Decodable[A] object PostgresTypeTag { + implicit case object TVoid extends PostgresTypeTag[Unit] { + override def decode(column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, Unit] = + scala.util + .Try(column.fold(resultSet.getObject(_), resultSet.getObject(_))) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + _ => Right(()) + ) + } implicit case object TInterval extends PostgresTypeTag[Interval] { override def decode( column: Either[Int, String], @@ -227,6 +236,7 @@ trait PostgresModule extends Jdbc { self => FunctionDef[Timestampz, Timestampz](FunctionName("make_timestamptz")) val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) + val SetSeed = FunctionDef[Double, Unit](FunctionName("setseed")) } override def renderRead(read: self.Read[_]): String = { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index e399fb3a5..91951b287 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -989,7 +989,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ ignore, //todo fix need custom rendering? + }, + testM("setseed") { + val query = select(SetSeed(0.12) ++ Random() ++ Random()) from customers + + val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) + val testResult = execute(query.to[Unit, Double, Double, (Double, Double)]((_, b, c) => (b, c))) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.take(2))(equalTo(Chunk(randomTupleForSeed, randomTupleForSeed))) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("Can concat strings with concat function") { val query = select(Concat(fName, lName) as "fullname") from customers From 5e19ec2556bab2d00adbdfd1a7fa742f18a211b2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 29 Mar 2021 22:04:04 +0200 Subject: [PATCH 213/673] Update sbt-scalafix to 0.9.27 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 16df08731..80ef192c3 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,5 +11,5 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.27") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") From 8979704f150e465b630e2f8f3ec06d50725b9fa3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 29 Mar 2021 22:04:07 +0200 Subject: [PATCH 214/673] Update mdoc_2.13, sbt-mdoc to 2.2.19 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 16df08731..59ead0430 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.18") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.19") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6") From 34c09012722684edba4bf629f924ad41c84fd41c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 30 Mar 2021 07:21:58 +0200 Subject: [PATCH 215/673] Update scala-collection-compat to 2.4.3 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 9028563a3..b2c96c5dd 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -192,7 +192,7 @@ object BuildHelper { Seq( ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)), - "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.2" + "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.3" ) }, parallelExecution in Test := true, From f0096bdb0f9a8044379905d01672ea01241a088c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 30 Mar 2021 20:30:40 +0200 Subject: [PATCH 216/673] Update sbt-dotty to 0.5.4 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 16df08731..e170c0242 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.4") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") From 26be067dbb200cfacc26d5f146285bc32cc85a84 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 31 Mar 2021 19:48:59 +0200 Subject: [PATCH 217/673] Update sbt-scalajs, scalajs-compiler, ... to 1.5.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 16df08731..035aaadaa 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") From 784fdd47e438ce38541b3fcd2168260c0f7d743b Mon Sep 17 00:00:00 2001 From: Tobias Pfeifer Date: Sat, 3 Apr 2021 14:40:47 +0200 Subject: [PATCH 218/673] Draft for 'Support select statements without from #323' --- core/jvm/src/main/scala/zio/sql/select.scala | 13 +- .../scala/zio/sql/mysql/MysqlModule.scala | 6 +- .../scala/zio/sql/oracle/OracleModule.scala | 6 +- .../zio/sql/postgresql/PostgresModule.scala | 6 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 154 +++++++++--------- .../zio/sql/sqlserver/SqlServerModule.scala | 6 +- 6 files changed, 107 insertions(+), 84 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 778c1ba02..61912bec7 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -10,7 +10,16 @@ trait SelectModule { self: ExprModule with TableModule => type B0 = SelectionSet.Aux[selection.value.ResultTypeRepr, A] val b: B0 = selection.value - Read.Select(Selection[F, A1, B0](b), table, true, Nil) + Read.Select(Selection[F, A1, B0](b), Some(table), true, Nil) + } + } + object SelectBuilder { + implicit def noTable[F, A >: Any, B <: SelectionSet[A]]( + selectBuilder: SelectBuilder[F, A, B] + ): Read.Select[F, selectBuilder.selection.value.ResultTypeRepr, A] = { + type B0 = SelectionSet.Aux[selectBuilder.selection.value.ResultTypeRepr, A] + val b: B0 = selectBuilder.selection.value + Read.Select(Selection[F, A, B0](b), None, true, Nil) } } @@ -225,7 +234,7 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class Select[F, Repr, A]( selection: Selection[F, A, SelectionSet.Aux[Repr, A]], - table: Table.Aux[A], + table: Option[Table.Aux[A]], whereExpr: Expr[_, A, Boolean], groupBy: List[Expr[_, A, Any]], havingExpr: Expr[_, A, Boolean] = true, diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 58945d58e..59875ec81 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -138,8 +138,10 @@ trait MysqlModule extends Jdbc { self => builder.append("SELECT ") buildSelection(selection.value) - builder.append(" FROM ") - buildTable(table) + table.foreach { t => + builder.append(" FROM ") + buildTable(t) + } whereExpr match { case Expr.Literal(true) => () case _ => diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 247fc623c..1f6f19a37 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -135,8 +135,10 @@ trait OracleModule extends Jdbc { self => builder.append("SELECT ") buildSelection(selection.value, builder) - builder.append(" FROM ") - buildTable(table, builder) + table.foreach { t => + builder.append(" FROM ") + buildTable(t, builder) + } whereExpr match { case Expr.Literal(true) => () case _ => diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 3d00da854..b1c3a5fe1 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -449,8 +449,10 @@ trait PostgresModule extends Jdbc { self => render("SELECT ") renderSelection(selection.value) - render(" FROM ") - renderTable(table) + table.foreach { t => + render(" FROM ") + renderTable(t) + } whereExpr match { case Expr.Literal(true) => () case _ => diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index e399fb3a5..688ef229e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -101,7 +101,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { collectAndCompare(expected, testResult) }, testM("isfinite") { - val query = select(IsFinite(Instant.now)) from customers + val query = select(IsFinite(Instant.now)) val expected: Boolean = true @@ -115,7 +115,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, suite("String functions")( testM("CharLength") { - val query = select(Length("hello")) from customers + val query = select(Length("hello")) val expected = 5 val testResult = execute(query.to[Int, Int](identity)) @@ -127,7 +127,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("ltrim") { - val query = select(Ltrim(" hello ")) from customers + val query = select(Ltrim(" hello ")) val expected = "hello " @@ -140,7 +140,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("rtrim") { - val query = select(Rtrim(" hello ")) from customers + val query = select(Rtrim(" hello ")) val expected = " hello" @@ -154,7 +154,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } ), testM("abs") { - val query = select(Abs(-3.14159)) from customers + val query = select(Abs(-3.14159)) val expected = 3.14159 @@ -167,7 +167,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("log") { - val query = select(Log(2.0, 32.0)) from customers + val query = select(Log(2.0, 32.0)) val expected: Double = 5 @@ -180,7 +180,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("acos") { - val query = select(Acos(-1.0)) from customers + val query = select(Acos(-1.0)) val expected = 3.141592653589793 @@ -193,7 +193,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("repeat") { - val query = select(Repeat("Zio", 3)) from customers + val query = select(Repeat("Zio", 3)) val expected = "ZioZioZio" @@ -206,7 +206,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("asin") { - val query = select(Asin(0.5)) from customers + val query = select(Asin(0.5)) val expected = 0.5235987755982989 @@ -219,7 +219,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("ln") { - val query = select(Ln(3.0)) from customers + val query = select(Ln(3.0)) val expected = 1.0986122886681097 @@ -232,7 +232,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("atan") { - val query = select(Atan(10.0)) from customers + val query = select(Atan(10.0)) val expected = 1.4711276743037347 @@ -245,7 +245,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("reverse") { - val query = select(Reverse("abcd")) from customers + val query = select(Reverse("abcd")) val expected = "dcba" @@ -258,7 +258,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("cos") { - val query = select(Cos(3.141592653589793)) from customers + val query = select(Cos(3.141592653589793)) val expected = -1.0 @@ -271,7 +271,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("exp") { - val query = select(Exp(1.0)) from customers + val query = select(Exp(1.0)) val expected = 2.718281828459045 @@ -284,7 +284,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("floor") { - val query = select(Floor(-3.14159)) from customers + val query = select(Floor(-3.14159)) val expected = -4.0 @@ -297,7 +297,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("ceil") { - val query = select(Ceil(53.7) ++ Ceil(-53.7)) from customers + val query = select(Ceil(53.7) ++ Ceil(-53.7)) val expected = (54.0, -53.0) @@ -310,7 +310,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("sin") { - val query = select(Sin(1.0)) from customers + val query = select(Sin(1.0)) val expected = 0.8414709848078965 @@ -323,7 +323,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("sind") { - val query = select(Sind(30.0)) from customers + val query = select(Sind(30.0)) val expected = 0.5 @@ -336,7 +336,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("split_part") { - val query = select(SplitPart("abc~@~def~@~ghi", "~@~", 2)) from customers + val query = select(SplitPart("abc~@~def~@~ghi", "~@~", 2)) val expected = "def" @@ -349,7 +349,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("timeofday") { - val query = select(TimeOfDay()) from customers + val query = select(TimeOfDay()) val testResult = execute(query.to[String, String](identity)) @@ -364,7 +364,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("localtime") { - val query = select(Localtime) from customers + val query = select(Localtime) val testResult = execute(query.to[LocalTime, LocalTime](identity)) @@ -376,7 +376,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("localtime with precision") { val precision = 0 - val query = select(LocaltimeWithPrecision(precision)) from customers + val query = select(LocaltimeWithPrecision(precision)) val testResult = execute(query.to[LocalTime, LocalTime](identity)) @@ -387,7 +387,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("localtimestamp") { - val query = select(Localtimestamp) from customers + val query = select(Localtimestamp) val testResult = execute(query.to[Instant, Instant](identity)) @@ -403,7 +403,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("localtimestamp with precision") { val precision = 2 - val query = select(LocaltimestampWithPrecision(precision)) from customers + val query = select(LocaltimestampWithPrecision(precision)) val testResult = execute(query.to[Instant, Instant](identity)) @@ -417,7 +417,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("now") { - val query = select(Now()) from customers + val query = select(Now()) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -431,7 +431,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("statement_timestamp") { - val query = select(StatementTimestamp()) from customers + val query = select(StatementTimestamp()) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -445,7 +445,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("transaction_timestamp") { - val query = select(TransactionTimestamp()) from customers + val query = select(TransactionTimestamp()) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -459,7 +459,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("current_time") { - val query = select(CurrentTime) from customers + val query = select(CurrentTime) val testResult = execute(query.to[OffsetTime, OffsetTime](identity)) @@ -475,7 +475,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("md5") { - val query = select(Md5("hello, world!")) from customers + val query = select(Md5("hello, world!")) val expected = "3adbbad1791fbae3ec908894c4963870" @@ -499,7 +499,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield s""""${string1}".${string2}""" val assertion = checkM(genTestString) { (testString) => - val query = select(ParseIdent(testString)) from customers + val query = select(ParseIdent(testString)) val testResult = execute(query.to[String, String](identity)) for { @@ -510,7 +510,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("parseIdent fails with invalid identifier") { - val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) from customers + val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) val testResult = execute(query.to[String, String](identity)) val assertion = for { @@ -521,7 +521,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } ) @@ ignore, testM("sqrt") { - val query = select(Sqrt(121.0)) from customers + val query = select(Sqrt(121.0)) val expected = 11.0 @@ -534,7 +534,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("chr") { - val query = select(Chr(65)) from customers + val query = select(Chr(65)) val expected = "A" @@ -547,7 +547,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("current_date") { - val query = select(CurrentDate) from customers + val query = select(CurrentDate) val expected = LocalDate.now() @@ -560,7 +560,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("initcap") { - val query = select(Initcap("hi THOMAS")) from customers + val query = select(Initcap("hi THOMAS")) val expected = "Hi Thomas" @@ -573,7 +573,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("trim_scale") { - val query = select(TrimScale(8.4100)) from customers + val query = select(TrimScale(8.4100)) val expected = 8.41 @@ -586,7 +586,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("hex") { - val query = select(Hex(2147483647)) from customers + val query = select(Hex(2147483647)) val expected = "7fffffff" @@ -599,7 +599,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("encode") { - val query = select(Encode(Chunk.fromArray("Hello, World!".getBytes), "BASE64")) from customers + val query = select(Encode(Chunk.fromArray("Hello, World!".getBytes), "BASE64")) val expected = "SGVsbG8sIFdvcmxkIQ==" @@ -612,7 +612,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("decode") { - val query = select(Decode("SGVsbG8sIFdvcmxkIQ==", "BASE64")) from customers + val query = select(Decode("SGVsbG8sIFdvcmxkIQ==", "BASE64")) val expected = Chunk.fromArray("Hello, World!".getBytes) @@ -625,7 +625,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("trunc") { - val query = select(Trunc(42.8)) from customers + val query = select(Trunc(42.8)) val expected = 42d @@ -638,7 +638,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("round") { - val query = select(Round(10.8124, 2)) from customers + val query = select(Round(10.8124, 2)) val expected = 10.81 @@ -651,7 +651,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("sign positive") { - val query = select(Sign(3.0)) from customers + val query = select(Sign(3.0)) val expected = 1 @@ -664,7 +664,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("sign negative") { - val query = select(Sign(-3.0)) from customers + val query = select(Sign(-3.0)) val expected = -1 @@ -677,7 +677,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("sign zero") { - val query = select(Sign(0.0)) from customers + val query = select(Sign(0.0)) val expected = 0 @@ -690,7 +690,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("power") { - val query = select(Power(7.0, 3.0)) from customers + val query = select(Power(7.0, 3.0)) val expected = 343.000000000000000 @@ -703,7 +703,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("length") { - val query = select(Length("hello")) from customers + val query = select(Length("hello")) val expected = 5 @@ -716,7 +716,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("mod") { - val query = select(Mod(-15.0, -4.0)) from customers + val query = select(Mod(-15.0, -4.0)) val expected = -3.0 @@ -729,7 +729,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("translate") { - val query = select(Translate("12345", "143", "ax")) from customers + val query = select(Translate("12345", "143", "ax")) val expected = "a2x5" @@ -742,7 +742,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("left") { - val query = select(Left("abcde", 2)) from customers + val query = select(Left("abcde", 2)) val expected = "ab" @@ -755,7 +755,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("right") { - val query = select(Right("abcde", 2)) from customers + val query = select(Right("abcde", 2)) val expected = "de" @@ -768,7 +768,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("radians") { - val query = select(Radians(45.0)) from customers + val query = select(Radians(45.0)) val expected = 0.7853981634 @@ -781,7 +781,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("min_scale") { - val query = select(MinScale(8.4100)) from customers + val query = select(MinScale(8.4100)) val expected = 2 @@ -837,7 +837,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("octet_length") { - val query = select(OctetLength("josé")) from customers + val query = select(OctetLength("josé")) val expected = 5 @@ -850,7 +850,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("ascii") { - val query = select(Ascii("""x""")) from customers + val query = select(Ascii("""x""")) val expected = 120 @@ -863,7 +863,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("upper") { - val query = (select(Upper("ronald")) from customers).limit(1) + val query = (select(Upper("ronald"))).limit(1) val expected = "RONALD" @@ -876,7 +876,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("width_bucket") { - val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) from customers + val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) val expected = 3 @@ -889,7 +889,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("tan") { - val query = select(Tan(0.7853981634)) from customers + val query = select(Tan(0.7853981634)) val expected = 1.0000000000051035 @@ -902,7 +902,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("gcd") { - val query = select(GCD(1071d, 462d)) from customers + val query = select(GCD(1071d, 462d)) val expected = 21d @@ -915,7 +915,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("lcm") { - val query = select(LCM(1071d, 462d)) from customers + val query = select(LCM(1071d, 462d)) val expected = 23562d @@ -928,7 +928,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("cbrt") { - val query = select(CBRT(64.0)) from customers + val query = select(CBRT(64.0)) val expected = 4d @@ -941,7 +941,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("degrees") { - val query = select(Degrees(0.5)) from customers + val query = select(Degrees(0.5)) val expected = 28.64788975654116 @@ -954,7 +954,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("div") { - val query = select(Div(8d, 4d)) from customers + val query = select(Div(8d, 4d)) val expected = 2d @@ -967,7 +967,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("factorial") { - val query = select(Factorial(5)) from customers + val query = select(Factorial(5)) val expected = 120 @@ -980,7 +980,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("random") { - val query = select(Random()) from customers + val query = select(Random()) val testResult = execute(query.to[Double, Double](identity)) @@ -1019,7 +1019,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("to_timestamp") { - val query = select(ToTimestamp(1284352323L)) from customers + val query = select(ToTimestamp(1284352323L)) val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -1066,7 +1066,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("lpad") { def runTest(s: String, pad: String) = { - val query = select(LPad(s, 5, pad)) from customers + val query = select(LPad(s, 5, pad)) for { r <- execute(query.to[String, String](identity)).runCollect @@ -1081,7 +1081,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("rpad") { def runTest(s: String, pad: String) = { - val query = select(RPad(s, 5, pad)) from customers + val query = select(RPad(s, 5, pad)) for { r <- execute(query.to[String, String](identity)).runCollect @@ -1095,7 +1095,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("pg_client_encoding") { - val query = select(PgClientEncoding()) from customers + val query = select(PgClientEncoding()) val testResult = execute(query.to[String, String](identity)) @@ -1107,7 +1107,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } @@ ignore, //todo fix - select(PgClientEncoding())? testM("make_date") { - val query = select(MakeDate(2013, 7, 15)) from customers + val query = select(MakeDate(2013, 7, 15)) val expected = LocalDate.of(2013, 7, 15) @@ -1123,7 +1123,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { def runTest(interval: Interval) = { val query = select( MakeInterval(interval) - ) from customers + ) for { r <- execute(query.to[Interval, Interval](identity)).runCollect } yield r.head @@ -1140,7 +1140,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("make_time") { - val query = select(MakeTime(8, 15, 23.5)) from customers + val query = select(MakeTime(8, 15, 23.5)) val expected = LocalTime.parse("08:15:23.500") val testResult = execute(query.to[LocalTime, LocalTime](identity)) @@ -1151,7 +1151,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("make_timestamp") { - val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) from customers + val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) val expected = LocalDateTime.parse("2013-07-15T08:15:23.500") val testResult = execute(query.to[LocalDateTime, LocalDateTime](identity)) @@ -1163,7 +1163,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("make_timestampz") { def runTest(tz: Timestampz) = { - val query = select(MakeTimestampz(tz)) from customers + val query = select(MakeTimestampz(tz)) for { r <- execute(query.to[Timestampz, Timestampz](identity)).runCollect } yield r.head @@ -1171,7 +1171,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expectedRoundTripTimestamp = Timestampz.fromZonedDateTime(ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId))) - (for { t1 <- assertM(runTest(Timestampz(2013, 7, 15, 8, 15, 23.5)))( equalTo(Timestampz.fromZonedDateTime(ZonedDateTime.parse("2013-07-15T08:15:23.5+00:00"))) @@ -1184,5 +1183,12 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { t5 <- assertM(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) } yield t1 && t2 && t3 && t4 && t5).mapErrorCause(cause => Cause.stackless(cause.untraced)) } + // TODO: make typeCheck(String) compile +// testM("cannot compile a select without from clause if a table source is required") { +// //the following execute only compiles with 'from customers' clause +// execute((select(CharLength(Customers.fName)) from customers).to[Int, Int](identity)) +// val result = typeCheck("execute((select(CharLength(Customers.fName))).to[Int, Int](identity))") +// assertM(result)(isLeft) +// } ) @@ timeout(5.minutes) } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 4242c6e33..680281e08 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -144,8 +144,10 @@ trait SqlServerModule extends Jdbc { self => case None => () } buildSelection(selection.value) - builder.append(" from ") - buildTable(table) + table.foreach { t => + builder.append(" from ") + buildTable(t) + } whereExpr match { case Expr.Literal(true) => () case _ => From ce5281b3df49bc72de1d720442d751a117eee642 Mon Sep 17 00:00:00 2001 From: Regis Kuckaertz Date: Sun, 4 Apr 2021 18:02:30 +0100 Subject: [PATCH 219/673] Provide some more MySQL support --- README.md | 8 +- .../scala/zio/sql/mysql/MysqlModule.scala | 525 +++++++++++------- .../test/scala/zio/sql/mysql/DeleteSpec.scala | 24 + .../scala/zio/sql/mysql/FunctionDefSpec.scala | 68 ++- .../scala/zio/sql/mysql/TransactionSpec.scala | 65 +++ .../scala/zio/sql/postgresql/DeleteSpec.scala | 2 +- 6 files changed, 486 insertions(+), 206 deletions(-) create mode 100644 mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala create mode 100644 mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala diff --git a/README.md b/README.md index e05e9be00..475a6ec73 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ Connection pool | :white_check_mark: Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------| :-------------| :------------- -Render Read | :white_check_mark: | :white_check_mark: | | -Render Delete | :white_check_mark: | | | -Render Update | :white_check_mark: | | | +Render Read | :white_check_mark: | :white_check_mark: | | :white_check_mark: | +Render Delete | :white_check_mark: | | | :white_check_mark: | +Render Update | :white_check_mark: | | | :white_check_mark: | Render Insert | | | | -Functions | :white_check_mark: | | | +Functions | :white_check_mark: | | | :white_check_mark: | Types | | | | Operators | | | | diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 58945d58e..6e935144d 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -1,222 +1,341 @@ package zio.sql.mysql -import zio.sql.Jdbc +import zio.sql.{ Jdbc, Renderer } +import zio.Chunk +import java.time.Year +import java.sql.ResultSet trait MysqlModule extends Jdbc { self => + override type TypeTagExtension[+A] = MysqlSpecific.MysqlTypeTag[A] + + object MysqlSpecific { + trait MysqlTypeTag[+A] extends Tag[A] with Decodable[A] + + object MysqlTypeTag { + implicit case object TYear extends MysqlTypeTag[Year] { + override def decode(column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, Year] = + scala.util + .Try(Year.of(column.fold(resultSet.getByte(_), resultSet.getByte(_)).toInt)) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + r => Right(r) + ) + } + + } + } + object MysqlFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val Crc32 = FunctionDef[String, Long](FunctionName("crc32")) + val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) + val Log2 = FunctionDef[Double, Double](FunctionName("log2")) + val Log10 = FunctionDef[Double, Double](FunctionName("log10")) + val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) } override def renderRead(read: self.Read[_]): String = { - val builder = new StringBuilder + implicit val render: Renderer = Renderer() + MysqlRenderModule.renderReadImpl(read) + render.toString + } + + override def renderDelete(delete: self.Delete[_]): String = { + implicit val render: Renderer = Renderer() + MysqlRenderModule.renderDeleteImpl(delete) + render.toString + } - def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => - val _ = builder.append(" ").append(op.symbol) - buildExpr(base) - case Expr.Property(base, op) => - buildExpr(base) - val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.Relational(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.In(value, set) => - buildExpr(value) - buildReadString(set) - case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => - builder.append(aggregation.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.ParenlessFunctionCall0(functionName) => - val _ = builder.append(functionName.name) - case Expr.FunctionCall0(function) => - builder.append(function.name.name) - builder.append("(") - val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - val _ = builder.append(")") - case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - builder.append(",") - buildExpr(param5) - val _ = builder.append(")") - case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - builder.append(",") - buildExpr(param5) - builder.append(",") - buildExpr(param6) - val _ = builder.append(")") - case Expr.FunctionCall7(param1, param2, param3, param4, param5, param6, param7, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - builder.append(",") - buildExpr(param5) - builder.append(",") - buildExpr(param6) - builder.append(",") - buildExpr(param7) - val _ = builder.append(")") + override def renderUpdate(update: self.Update[_]): String = { + implicit val render: Renderer = Renderer() + MysqlRenderModule.renderUpdateImpl(update) + render.toString + } + + object MysqlRenderModule { + def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { + render("DELETE FROM ") + renderTable(delete.table) + delete.whereExpr match { + case Expr.Literal(true) => () + case _ => + render(" WHERE ") + renderExpr(delete.whereExpr) + } } - def buildReadString(read: self.Read[_]): Unit = - read match { - case Read.Mapped(read, _) => buildReadString(read) + def renderUpdateImpl(update: Update[_])(implicit render: Renderer) = + update match { + case Update(table, set, whereExpr) => + render("UPDATE ") + renderTable(table) + render(" SET ") + renderSet(set) + render(" WHERE ") + renderExpr(whereExpr) + } + def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = + read match { + case Read.Mapped(read, _) => + renderReadImpl(read) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => - object Dummy { - type F - type A - type B <: SelectionSet[A] - } + object Dummy { type F; type A; type B <: SelectionSet[A] } val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] import read._ - builder.append("SELECT ") - buildSelection(selection.value) - builder.append(" FROM ") - buildTable(table) + render("SELECT ") + renderSelection(selection.value) + render(" FROM ") + renderTable(table) whereExpr match { case Expr.Literal(true) => () case _ => - builder.append(" WHERE ") - buildExpr(whereExpr) + render(" WHERE ") + renderExpr(whereExpr) } groupBy match { case _ :: _ => - builder.append(" GROUP BY ") - buildExprList(groupBy) + render(" GROUP BY ") + renderExprList(groupBy) havingExpr match { case Expr.Literal(true) => () case _ => - builder.append(" HAVING ") - buildExpr(havingExpr) + render(" HAVING ") + renderExpr(havingExpr) } case Nil => () } orderBy match { case _ :: _ => - builder.append(" ORDER BY ") - buildOrderingList(orderBy) + render(" ORDER BY ") + renderOrderingList(orderBy) case Nil => () } limit match { - case Some(limit) => - builder.append(" LIMIT ").append(limit) + case Some(limit) => render(" LIMIT ", limit) case None => () } offset match { - case Some(offset) => - val _ = builder.append(" OFFSET ").append(offset) + case Some(offset) => render(" OFFSET ", offset) case None => () } case Read.Union(left, right, distinct) => - buildReadString(left) - builder.append(" UNION ") - if (!distinct) builder.append("ALL ") - buildReadString(right) + renderReadImpl(left) + render(" UNION ") + if (!distinct) render("ALL ") + renderReadImpl(right) case Read.Literal(values) => - val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + render(" (", values.mkString(","), ") ") //todo fix needs escaping } - def buildExprList(expr: List[Expr[_, _, _]]): Unit = - expr match { + private def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = + set match { case head :: tail => - buildExpr(head) - tail match { - case _ :: _ => - builder.append(", ") - buildExprList(tail) - case Nil => () + renderExpr(head.lhs) + render(" = ") + renderExpr(head.rhs) + tail.foreach { setEq => + render(", ") + renderExpr(setEq.lhs) + render(" = ") + renderExpr(setEq.rhs) } - case Nil => () + case Nil => //TODO restrict Update to not allow empty set } - def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = - expr match { - case head :: tail => - head match { - case Ordering.Asc(value) => buildExpr(value) - case Ordering.Desc(value) => - buildExpr(value) - builder.append(" DESC") - } - tail match { - case _ :: _ => - builder.append(", ") - buildOrderingList(tail) - case Nil => () + + private def renderTable(table: Table)(implicit render: Renderer): Unit = + table match { + //The outer reference in this type test cannot be checked at run time?! + case sourceTable: self.Table.Source => + render(sourceTable.name) + case Table.Joined(joinType, left, right, on) => + renderTable(left) + render(joinType match { + case JoinType.Inner => " INNER JOIN " + case JoinType.LeftOuter => " LEFT JOIN " + case JoinType.RightOuter => " RIGHT JOIN " + case JoinType.FullOuter => " OUTER JOIN " + }) + renderTable(right) + render(" ON ") + renderExpr(on) + render(" ") + } + + private def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + case Expr.Source(tableName, column) => render(tableName, ".", column.name) + case Expr.Unary(base, op) => + render(" ", op.symbol) + renderExpr(base) + case Expr.Property(base, op) => + renderExpr(base) + render(" ", op.symbol) + case Expr.Binary(left, right, op) => + renderExpr(left) + render(" ", op.symbol, " ") + renderExpr(right) + case Expr.Relational(left, right, op) => + renderExpr(left) + render(" ", op.symbol, " ") + renderExpr(right) + case Expr.In(value, set) => + renderExpr(value) + renderReadImpl(set) + case lit: Expr.Literal[_] => renderLit(lit) + case Expr.AggregationCall(p, aggregation) => + render(aggregation.name.name, "(") + renderExpr(p) + render(")") + case Expr.ParenlessFunctionCall0(fn) => + val _ = render(fn.name) + case Expr.FunctionCall0(fn) => + render(fn.name.name) + render("(") + val _ = render(")") + case Expr.FunctionCall1(p, fn) => + render(fn.name.name, "(") + renderExpr(p) + render(")") + case Expr.FunctionCall2(p1, p2, fn) => + render(fn.name.name, "(") + renderExpr(p1) + render(",") + renderExpr(p2) + render(")") + case Expr.FunctionCall3(p1, p2, p3, fn) => + render(fn.name.name, "(") + renderExpr(p1) + render(",") + renderExpr(p2) + render(",") + renderExpr(p3) + render(")") + case Expr.FunctionCall4(p1, p2, p3, p4, fn) => + render(fn.name.name, "(") + renderExpr(p1) + render(",") + renderExpr(p2) + render(",") + renderExpr(p3) + render(",") + renderExpr(p4) + render(")") + case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => + render(function.name.name) + render("(") + renderExpr(param1) + render(",") + renderExpr(param2) + render(",") + renderExpr(param3) + render(",") + renderExpr(param4) + render(",") + renderExpr(param5) + render(")") + case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => + render(function.name.name) + render("(") + renderExpr(param1) + render(",") + renderExpr(param2) + render(",") + renderExpr(param3) + render(",") + renderExpr(param4) + render(",") + renderExpr(param5) + render(",") + renderExpr(param6) + render(")") + case Expr.FunctionCall7( + param1, + param2, + param3, + param4, + param5, + param6, + param7, + function + ) => + render(function.name.name) + render("(") + renderExpr(param1) + render(",") + renderExpr(param2) + render(",") + renderExpr(param3) + render(",") + renderExpr(param4) + render(",") + renderExpr(param5) + render(",") + renderExpr(param6) + render(",") + renderExpr(param7) + render(")") + } + + private def renderLit[A, B](lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { + import MysqlSpecific.MysqlTypeTag._ + import TypeTag._ + lit.typeTag match { + case TDialectSpecific(tt) => + tt match { + case tt @ TYear => + render(tt.cast(lit.value)) + case _: MysqlSpecific.MysqlTypeTag[_] => ??? } - case Nil => () + case TByteArray => + render( + lit.value.asInstanceOf[Chunk[Byte]].map("""\%02X""" format _).mkString("x'", "", "'") + ) // todo fix `cast` infers correctly but map doesn't work for some reason + case tt @ TChar => + render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping + case tt @ TInstant => + render("TIMESTAMP '", tt.cast(lit.value), "'") + case tt @ TLocalDate => + render("DATE '", tt.cast(lit.value), "'") + case tt @ TLocalDateTime => + render("DATE '", tt.cast(lit.value), "'") + case tt @ TLocalTime => + render("TIME '", tt.cast(lit.value), "'") + case tt @ TOffsetDateTime => + render("DATE '", tt.cast(lit.value), "'") + case tt @ TOffsetTime => + render("TIME '", tt.cast(lit.value), "'") + case tt @ TUUID => + render("'", tt.cast(lit.value), "'") + case tt @ TZonedDateTime => + render("DATE '", tt.cast(lit.value), "'") + case TByte => + render(lit.value) + case TBigDecimal => + render(lit.value) + case TBoolean => + render(lit.value) + case TDouble => + render(lit.value) + case TFloat => + render(lit.value) + case TInt => + render(lit.value) + case TLong => + render(lit.value) + case TShort => + render(lit.value) + case TString => + render("'", lit.value, "'") //todo fix escaping + case _ => + render(lit.value) //todo fix add TypeTag.Nullable[_] => } + } - def buildSelection[A](selectionSet: SelectionSet[A]): Unit = + private def renderSelection[A](selectionSet: SelectionSet[A])(implicit render: Renderer): Unit = selectionSet match { case cons0 @ SelectionSet.Cons(_, _) => object Dummy { @@ -226,59 +345,65 @@ trait MysqlModule extends Jdbc { self => } val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] import cons._ - buildColumnSelection(head) + renderColumnSelection(head) if (tail != SelectionSet.Empty) { - builder.append(", ") - buildSelection(tail) + render(", ") + renderSelection(tail) } case SelectionSet.Empty => () } - def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = + private def renderColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => - builder.append(value.toString()) //todo fix escaping + render(value) //todo fix escaping name match { - case Some(name) => - val _ = builder.append(" AS ").append(name) + case Some(name) => render(" AS ", name) case None => () } case ColumnSelection.Computed(expr, name) => - buildExpr(expr) + renderExpr(expr) name match { case Some(name) => Expr.exprName(expr) match { - case Some(sourceName) if name != sourceName => - val _ = builder.append(" AS ").append(name) + case Some(sourceName) if name != sourceName => render(" AS ", name) case _ => () } case _ => () //todo what do we do if we don't have a name? } } - def buildTable(table: Table): Unit = - table match { - //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => - val _ = builder.append(sourceTable.name) - case Table.Joined(joinType, left, right, on) => - buildTable(left) - builder.append(joinType match { - case JoinType.Inner => " INNER JOIN " - case JoinType.LeftOuter => " LEFT JOIN " - case JoinType.RightOuter => " RIGHT JOIN " - case JoinType.FullOuter => " OUTER JOIN " - }) - buildTable(right) - builder.append(" ON ") - buildExpr(on) - val _ = builder.append(" ") - } - buildReadString(read) - builder.toString() - } - override def renderDelete(delete: self.Delete[_]): String = ??? + private def renderExprList(expr: List[Expr[_, _, _]])(implicit render: Renderer): Unit = + expr match { + case head :: tail => + renderExpr(head) + tail match { + case _ :: _ => + render(", ") + renderExprList(tail) + case Nil => () + } + case Nil => () + } - override def renderUpdate(update: self.Update[_]): String = ??? + def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = + expr match { + case head :: tail => + head match { + case Ordering.Asc(value) => + renderExpr(value) + case Ordering.Desc(value) => + renderExpr(value) + render(" DESC") + } + tail match { + case _ :: _ => + render(", ") + renderOrderingList(tail) + case Nil => () + } + case Nil => () + } + } } diff --git a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala new file mode 100644 index 000000000..50ae73d95 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala @@ -0,0 +1,24 @@ +package zio.sql.mysql + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +object DeleteSpec extends MysqlRunnableSpec with ShopSchema { + + import Customers._ + + override def specLayered = suite("Postgres module delete")( + testM("Can delete from single table with a condition") { + val query = deleteFrom(customers).where(verified.isNotTrue) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(1)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) +} diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 8a748ae72..70dd9f969 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -8,10 +8,11 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ import FunctionDef._ + import MysqlFunctionDef._ override def specLayered = suite("Mysql FunctionDef")( testM("lower") { - val query = select(Lower("first_name")) from customers limit (1) + val query = select(Lower(fName)) from customers limit (1) val expected = "ronald" @@ -47,6 +48,71 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("crc32") { + val query = select(Crc32("MySQL")) from customers + + val expected = 3259397556L + + val testResult = execute(query.to[Long, Long](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("degrees") { + val query = select(Degrees(Math.PI)) from customers + + val expected = 180d + + val testResult = execute(query.to[Double, Double](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("log2") { + val query = select(Log2(8d)) from customers + + val expected = 3d + + val testResult = execute(query.to[Double, Double](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("log10") { + val query = select(Log10(1000000d)) from customers + + val expected = 6d + + val testResult = execute(query.to[Double, Double](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("pi") { + val query = select(Pi) from customers + + val expected = 3.141593d + + val testResult = execute(query.to[Double, Double](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala new file mode 100644 index 000000000..adac195f0 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -0,0 +1,65 @@ +package zio.sql.mysql + +import java.util.UUID + +import zio._ +import zio.test.Assertion._ +import zio.test._ +import zio.test.TestAspect.sequential +import zio.sql.mysql.MysqlRunnableSpec + +object TransactionSpec extends MysqlRunnableSpec with ShopSchema { + + import Customers._ + + override def specLayered = suite("Postgres module")( + testM("Transaction is returning the last value") { + val query = select(customerId) from customers + + val result = execute( + ZTransaction(query) *> ZTransaction(query) + ).use(ZIO.succeed(_)) + + val assertion = assertM(result.flatMap(_.runCount))(equalTo(5L)).orDie + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction is failing") { + val query = select(customerId) from customers + + val result = execute( + ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) + ).mapError(_.getMessage).use(ZIO.succeed(_)) + + assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction failed and didn't deleted rows") { + val query = select(customerId) from customers + val deleteQuery = deleteFrom(customers).where(verified === false) + + val result = (for { + allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + _ <- execute( + ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) + ).catchAllCause(_ => ZManaged.succeed("continue")) + remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + + assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("Transaction succeeded and deleted rows") { + val query = select(customerId) from customers + val deleteQuery = deleteFrom(customers).where(verified === false) + + val tx = ZTransaction(deleteQuery) + + val result = (for { + allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + _ <- execute(tx) + remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + + assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) @@ sequential +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index f55160b9b..b2982352d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -1,4 +1,4 @@ -package zio.sql.postgresql +package zio.sql.mysql import zio.Cause import zio.test.Assertion._ From c5e80c29cca188c3e41f3dd77d2745515ed0bde5 Mon Sep 17 00:00:00 2001 From: Regis Kuckaertz Date: Sun, 4 Apr 2021 18:04:17 +0100 Subject: [PATCH 220/673] naming --- mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala | 2 +- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala index 50ae73d95..2586cf91d 100644 --- a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala @@ -8,7 +8,7 @@ object DeleteSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ - override def specLayered = suite("Postgres module delete")( + override def specLayered = suite("MySQL module delete")( testM("Can delete from single table with a condition") { val query = deleteFrom(customers).where(verified.isNotTrue) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 70dd9f969..40eec8652 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -10,7 +10,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { import FunctionDef._ import MysqlFunctionDef._ - override def specLayered = suite("Mysql FunctionDef")( + override def specLayered = suite("MySQL FunctionDef")( testM("lower") { val query = select(Lower(fName)) from customers limit (1) From 3f66b2d0100343971e45a33f8be6e66cb44be355 Mon Sep 17 00:00:00 2001 From: Regis Kuckaertz Date: Sun, 4 Apr 2021 18:14:24 +0100 Subject: [PATCH 221/673] woops --- mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala | 1 - postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index adac195f0..eed63da2b 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -6,7 +6,6 @@ import zio._ import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.sequential -import zio.sql.mysql.MysqlRunnableSpec object TransactionSpec extends MysqlRunnableSpec with ShopSchema { diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index b2982352d..f55160b9b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -1,4 +1,4 @@ -package zio.sql.mysql +package zio.sql.postgresql import zio.Cause import zio.test.Assertion._ From f98675e8bf120623ed583e02e3b154819f9856ec Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 5 Apr 2021 01:56:20 +0200 Subject: [PATCH 222/673] Update sbt to 1.5.0 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index dbae93bcf..e67343ae7 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.9 +sbt.version=1.5.0 From 26ea2474be082202a4c7f8667df75640ba20fb7a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 5 Apr 2021 15:32:25 +0200 Subject: [PATCH 223/673] Update sbt-dotty to 0.5.4 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 80ef192c3..ad7dd66d7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.4") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.27") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") From 78c8c6673f6176107539019d564325a42ae54e55 Mon Sep 17 00:00:00 2001 From: Regis Kuckaertz <629976+regiskuckaertz@users.noreply.github.com> Date: Wed, 7 Apr 2021 08:26:20 +0100 Subject: [PATCH 224/673] Update mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala --- mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index eed63da2b..b1e01fe41 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -11,7 +11,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ - override def specLayered = suite("Postgres module")( + override def specLayered = suite("MySQL module")( testM("Transaction is returning the last value") { val query = select(customerId) from customers From 3e00f393cf2d4ac6ca745e40f189d91aff5e41d9 Mon Sep 17 00:00:00 2001 From: Tobias Pfeifer Date: Fri, 9 Apr 2021 19:22:14 +0200 Subject: [PATCH 225/673] test cleanup for mysql FunctionDefSpec --- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 22 ++++++++++++++++--- .../zio/sql/postgresql/FunctionDefSpec.scala | 13 +++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 8a748ae72..29d1b102e 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -11,7 +11,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { override def specLayered = suite("Mysql FunctionDef")( testM("lower") { - val query = select(Lower("first_name")) from customers limit (1) + val query = select(Lower(fName)) from customers limit (1) val expected = "ronald" @@ -23,8 +23,24 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + // FIXME: lower with string literal should not refer to a column name + // See: https://www.w3schools.com/sql/trymysql.asp?filename=trysql_func_mysql_lower + // Uncomment the following test when fixed + // testM("lower with string literal") { + // val query = select(Lower("LOWER")) from customers limit(1) + // + // val expected = "lower" + // + // val testResult = execute(query.to[String, String](identity)) + // + // val assertion = for { + // r <- testResult.runCollect + // } yield assert(r.head)(equalTo(expected)) + // + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + // }, testM("sin") { - val query = select(Sin(1.0)) from customers + val query = select(Sin(1.0)) val expected = 0.8414709848078965 @@ -37,7 +53,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("abs") { - val query = select(Abs(-32.0)) from customers + val query = select(Abs(-32.0)) val expected = 32.0 diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 688ef229e..1ab8eb5aa 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -836,6 +836,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("lower with string literal") { + val query = select(Lower("LOWER")) from customers limit (1) + + val expected = "lower" + + val testResult = execute(query.to[String, String](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("octet_length") { val query = select(OctetLength("josé")) From 0db325ab339d0e148f7229b889f11a29a4324940 Mon Sep 17 00:00:00 2001 From: Tobias Pfeifer Date: Fri, 9 Apr 2021 19:24:06 +0200 Subject: [PATCH 226/673] fix typeCheck test --- .../zio/sql/postgresql/FunctionDefSpec.scala | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 1ab8eb5aa..cd517b28e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1195,13 +1195,19 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { t4 <- assertM(runTest(Timestampz(2020, 11, 22, 2, 10, 25, "+07:00")))(equalTo(expectedRoundTripTimestamp)) t5 <- assertM(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) } yield t1 && t2 && t3 && t4 && t5).mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cannot compile a select without from clause if a table source is required") { + //the following execute only compiles with 'from customers' clause + execute((select(CharLength(Customers.fName)) from customers).to[Int, Int](identity)) + + // imports for Left and Right are necessary to make the typeCheck macro expansion compile + // TODO: clean this up when https://github.com/zio/zio/issues/4927 is resolved + import scala.util.Right + import scala.util.Left + val dummyUsage = zio.ZIO.succeed((Left(()), Right(()))) + + val result = typeCheck("execute((select(CharLength(Customers.fName))).to[Int, Int](identity))") + assertM(dummyUsage *> result)(isLeft) } - // TODO: make typeCheck(String) compile -// testM("cannot compile a select without from clause if a table source is required") { -// //the following execute only compiles with 'from customers' clause -// execute((select(CharLength(Customers.fName)) from customers).to[Int, Int](identity)) -// val result = typeCheck("execute((select(CharLength(Customers.fName))).to[Int, Int](identity))") -// assertM(result)(isLeft) -// } ) @@ timeout(5.minutes) } From 25a51e9cbdc13c48863f767736585d378d2ebbe1 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 15 Apr 2021 10:57:35 +0200 Subject: [PATCH 227/673] Update database-commons, jdbc, mssqlserver, ... to 1.15.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index adc6a64e1..9b6e85b3e 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "1.0.5" -val testcontainersVersion = "1.15.2" +val testcontainersVersion = "1.15.3" val testcontainersScalaVersion = "0.39.3" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 3e1a30d2575fd89d6475364c6b9a17e51d666def Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Apr 2021 13:16:59 +0200 Subject: [PATCH 228/673] Update mysql-connector-java to 8.0.24 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index adc6a64e1..b1c0aa6bd 100644 --- a/build.sbt +++ b/build.sbt @@ -160,7 +160,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.23" % Test, + "mysql" % "mysql-connector-java" % "8.0.24" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) From 627067e48690a888d6743f137511b94af0e79a29 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Apr 2021 14:55:08 +0200 Subject: [PATCH 229/673] Update mdoc, sbt-mdoc to 2.2.20 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 0fb81953a..4e6cc1498 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.19") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.20") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6") From 566013b932dd4e6016655bfcfa0f930fa7a7ca2a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 22 Apr 2021 17:47:27 +0200 Subject: [PATCH 230/673] Update postgresql to 42.2.20 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index adc6a64e1..76164c8af 100644 --- a/build.sbt +++ b/build.sbt @@ -202,7 +202,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.19" % Compile, + "org.postgresql" % "postgresql" % "42.2.20" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From e984c928961d9e243c5ff92365bc493a10b3b697 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 23 Apr 2021 07:29:25 +0200 Subject: [PATCH 231/673] Update zio, zio-streams, zio-test, ... to 1.0.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index adc6a64e1..f1d8296da 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "1.0.5" +val zioVersion = "1.0.7" val testcontainersVersion = "1.15.2" val testcontainersScalaVersion = "0.39.3" From 6a13a2eb4070664b4734fbe605c7821c08621277 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 26 Apr 2021 18:14:28 +0200 Subject: [PATCH 232/673] Update sbt to 1.5.1 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index e67343ae7..f0be67b9f 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.0 +sbt.version=1.5.1 From 93bf78302972c38f6d7a8ae75c54169d71814b7b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 27 Apr 2021 02:00:00 +0200 Subject: [PATCH 233/673] Update zio, zio-streams, zio-test, ... to 1.0.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2bb621799..908734974 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "1.0.5" +val zioVersion = "1.0.7" val testcontainersVersion = "1.15.3" val testcontainersScalaVersion = "0.39.3" From 219169a691f5a0bb64dae04f1cdb4dd067996e49 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 3 May 2021 01:24:49 +0200 Subject: [PATCH 234/673] Update sbt-scoverage to 1.7.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4e6cc1498..7d4eebc28 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.2") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.20") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 0ac430418909d6b481a2992c0995f1011bfc5a30 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 3 May 2021 20:19:34 +0200 Subject: [PATCH 235/673] Refactor build configuration --- build.sbt | 36 +++++----- project/BuildHelper.scala | 148 ++++++++++---------------------------- project/plugins.sbt | 1 - 3 files changed, 56 insertions(+), 129 deletions(-) diff --git a/build.sbt b/build.sbt index dadf5b982..969c63a94 100644 --- a/build.sbt +++ b/build.sbt @@ -55,13 +55,13 @@ stopOracle := stopService(Database.Oracle, streams.value) lazy val root = project .in(file(".")) .settings( - skip in publish := true, + publish / skip := true, unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library") ) .aggregate( coreJVM, coreJS, - docs, + //docs, driver, examples, jdbc, @@ -93,25 +93,25 @@ lazy val coreJS = core.js lazy val coreJVM = core.jvm .settings(dottySettings) -lazy val docs = project - .in(file("zio-sql-docs")) - .settings( - skip.in(publish) := true, - moduleName := "zio-sql-docs", - scalacOptions -= "-Yno-imports", - scalacOptions -= "-Xfatal-warnings", - libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion - ) - ) - .dependsOn(coreJVM) - .enablePlugins(MdocPlugin, DocusaurusPlugin) +// lazy val docs = project +// .in(file("zio-sql-docs")) +// .settings( +// publish / skip := true, +// moduleName := "zio-sql-docs", +// scalacOptions -= "-Yno-imports", +// scalacOptions -= "-Xfatal-warnings", +// libraryDependencies ++= Seq( +// "dev.zio" %% "zio" % zioVersion +// ) +// ) +// .dependsOn(coreJVM) +// .enablePlugins(MdocPlugin, DocusaurusPlugin) lazy val examples = project .in(file("examples")) .settings(stdSettings("examples")) .settings( - skip in publish := true, + publish / skip := true, moduleName := "examples" ) .settings(dottySettings) @@ -182,7 +182,7 @@ lazy val oracle = project "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.oracle.database.jdbc" % "ojdbc8" % "21.1.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test + "com.dimafeng" % "testcontainers-scala-oracle-xe_2.13" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -234,7 +234,7 @@ lazy val test = project .settings(stdSettings("zio-sql-test")) .settings(buildInfoSettings("zio.sql.test")) .settings( - skip in publish := true, + publish / skip := true, libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion, "dev.zio" %% "zio-test" % zioVersion % "test", diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index b2c96c5dd..95dcc8e1a 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -5,7 +5,6 @@ import explicitdeps.ExplicitDepsPlugin.autoImport._ import sbtcrossproject.CrossPlugin.autoImport._ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._ import sbtbuildinfo._ -import dotty.tools.sbtplugin.DottyPlugin.autoImport._ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb @@ -13,7 +12,7 @@ object BuildHelper { val SilencerVersion = "1.7.3" val Scala212 = "2.12.13" val Scala213 = "2.13.5" - val DottyVersion = "0.27.0-RC1" + val ScalaDotty = "3.0.0-RC2" def buildInfoSettings(packageName: String) = Seq( @@ -27,7 +26,8 @@ object BuildHelper { "-encoding", "UTF-8", "-feature", - "-unchecked" + "-unchecked", + "-Xfatal-warnings" ) private val std2xOptions = Seq( @@ -37,8 +37,7 @@ object BuildHelper { "-Yrangepos", "-Xlint:_,-missing-interpolator,-type-parameter-shadow", "-Ywarn-numeric-widen", - "-Ywarn-value-discard", - "-Xfatal-warnings" + "-Ywarn-value-discard" ) private def propertyFlag(property: String, default: Boolean) = @@ -61,13 +60,7 @@ object BuildHelper { ) case Some((2, 13)) => Seq( - "-Wunused:imports", - "-Wvalue-discard", - "-Wunused:patvars", - "-Wunused:privates", - "-Wunused:params", - "-Wvalue-discard", - "-Wdead-code" + "-Ywarn-unused:params,-implicits" ) ++ std2xOptions ++ optimizerOptions(optimize) case Some((2, 12)) => Seq( @@ -87,21 +80,6 @@ object BuildHelper { "-Xmax-classfile-name", "242" ) ++ std2xOptions ++ optimizerOptions(optimize) - case Some((2, 11)) => - Seq( - "-Ypartial-unification", - "-Yno-adapted-args", - "-Ywarn-inaccessible", - "-Ywarn-infer-any", - "-Ywarn-nullary-override", - "-Ywarn-nullary-unit", - "-Xexperimental", - "-Ywarn-unused-import", - "-Xfuture", - "-Xsource:2.13", - "-Xmax-classfile-name", - "242" - ) ++ std2xOptions case _ => Seq.empty } @@ -110,37 +88,39 @@ object BuildHelper { baseDirectory.getParentFile / platform.toLowerCase / "src" / conf / version }.filter(_.exists) - def crossPlatformSources(scalaVer: String, platform: String, conf: String, baseDir: File, isDotty: Boolean) = - CrossVersion.partialVersion(scalaVer) match { - case Some((2, x)) if x >= 12 => - platformSpecificSources(platform, conf, baseDir)("2.12+", "2.12", "2.x") - case _ if isDotty => - platformSpecificSources(platform, conf, baseDir)("2.12+", "dotty") + def crossPlatformSources(scalaVer: String, platform: String, conf: String, baseDir: File) = { + val versions = CrossVersion.partialVersion(scalaVer) match { + case Some((2, 12)) => + List("2.12", "2.11+", "2.12+", "2.11-2.12", "2.12-2.13", "2.x") + case Some((2, 13)) => + List("2.13", "2.11+", "2.12+", "2.13+", "2.12-2.13", "2.x") + case Some((3, 0)) => + List("dotty", "2.11+", "2.12+", "2.13+", "3.x") case _ => Nil } + platformSpecificSources(platform, conf, baseDir)(versions: _*) + } val dottySettings = Seq( - // Keep this consistent with the version in .circleci/config.yml - crossScalaVersions += DottyVersion, + crossScalaVersions += ScalaDotty, scalacOptions ++= { - if (isDotty.value) + if (scalaVersion.value == ScalaDotty) Seq("-noindent") else Seq() }, - libraryDependencies := libraryDependencies.value.map(_.withDottyCompat(scalaVersion.value)), - sources in (Compile, doc) := { + Compile / doc / sources := { val old = (Compile / doc / sources).value - if (isDotty.value) { + if (scalaVersion.value == ScalaDotty) { Nil } else { old } }, - parallelExecution in Test := { + Test / parallelExecution := { val old = (Test / parallelExecution).value - if (isDotty.value) { + if (scalaVersion.value == ScalaDotty) { false } else { old @@ -150,10 +130,10 @@ object BuildHelper { val scalaReflectSettings = Seq( libraryDependencies ++= - (if (isDotty.value) Seq() + (if (scalaVersion.value == ScalaDotty) Seq() else Seq( - "dev.zio" %%% "izumi-reflect" % "0.12.0-M0" + "dev.zio" %%% "izumi-reflect" % "1.1.0" )) ) @@ -162,17 +142,15 @@ object BuildHelper { val platform = crossProjectPlatform.value.identifier val baseDir = baseDirectory.value val scalaVer = scalaVersion.value - val isDot = isDotty.value - crossPlatformSources(scalaVer, platform, "main", baseDir, isDot) + crossPlatformSources(scalaVer, platform, "main", baseDir) }, Test / unmanagedSourceDirectories ++= { val platform = crossProjectPlatform.value.identifier val baseDir = baseDirectory.value val scalaVer = scalaVersion.value - val isDot = isDotty.value - crossPlatformSources(scalaVer, platform, "test", baseDir, isDot) + crossPlatformSources(scalaVer, platform, "test", baseDir) } ) @@ -180,68 +158,23 @@ object BuildHelper { name := s"$prjName", scalacOptions := stdOptions, crossScalaVersions := Seq(Scala213, Scala212), - scalaVersion in ThisBuild := crossScalaVersions.value.head, + ThisBuild / scalaVersion := Scala213,//ScalaDotty, scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), libraryDependencies ++= { - if (isDotty.value) + if (scalaVersion.value == ScalaDotty) Seq( - ("com.github.ghik" % s"silencer-lib_2.13.3" % "1.7.3" % Provided) - .withDottyCompat(scalaVersion.value) + "com.github.ghik" % s"silencer-lib_2.13.5" % "1.7.3" % Provided ) else Seq( ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), - compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)), - "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.3" + compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)) ) }, - parallelExecution in Test := true, + Test / parallelExecution := true, incOptions ~= (_.withLogRecompileOnMacro(false)), autoAPIMappings := true, unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library"), - Compile / unmanagedSourceDirectories ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, x)) if x >= 12 => - Seq( - Seq(file(sourceDirectory.value.getPath + "/main/scala-2.12")), - Seq(file(sourceDirectory.value.getPath + "/main/scala-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "test").toList.map(f => file(f.getPath + "-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-2.x")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-2.12-2.13")) - ).flatten - case _ => - if (isDotty.value) - Seq( - Seq(file(sourceDirectory.value.getPath + "/main/scala-2.12")), - Seq(file(sourceDirectory.value.getPath + "/main/scala-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "test").toList.map(f => file(f.getPath + "-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-dotty")) - ).flatten - else - Nil - } - }, - Test / unmanagedSourceDirectories ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, x)) if x >= 12 => - Seq( - Seq(file(sourceDirectory.value.getPath + "/test/scala-2.12")), - Seq(file(sourceDirectory.value.getPath + "/test/scala-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "test").toList.map(f => file(f.getPath + "-2.x")) - ).flatten - case _ => - if (isDotty.value) - Seq( - Seq(file(sourceDirectory.value.getPath + "/test/scala-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "main").toList.map(f => file(f.getPath + "-2.12+")), - CrossType.Full.sharedSrcDir(baseDirectory.value, "test").toList.map(f => file(f.getPath + "-dotty")) - ).flatten - else - Nil - } - } ) def macroExpansionSettings = Seq( @@ -262,19 +195,14 @@ object BuildHelper { def macroDefinitionSettings = Seq( scalacOptions += "-language:experimental.macros", - libraryDependencies ++= - Seq("org.portable-scala" %%% "portable-scala-reflect" % "1.0.0") ++ { - if (isDotty.value) Seq() - else - Seq( - "org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided", - "org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided" - ) - } - ) - - def testJsSettings = Seq( - libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.0.0-RC5" % Test + libraryDependencies ++= { + if (scalaVersion.value == ScalaDotty) Seq() + else + Seq( + "org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided", + "org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided" + ) + } ) implicit class ModuleHelper(p: Project) { diff --git a/project/plugins.sbt b/project/plugins.sbt index 7d4eebc28..988fbbc7a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.4") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.27") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") From 7804d229acdaed78ef7e0f54c924bc18a3d2e647 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 3 May 2021 20:27:29 +0200 Subject: [PATCH 236/673] Update Dotty version --- build.sbt | 28 ++++++++++++++-------------- project/BuildHelper.scala | 6 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build.sbt b/build.sbt index 969c63a94..7e855ee16 100644 --- a/build.sbt +++ b/build.sbt @@ -61,7 +61,7 @@ lazy val root = project .aggregate( coreJVM, coreJS, - //docs, + docs, driver, examples, jdbc, @@ -93,19 +93,19 @@ lazy val coreJS = core.js lazy val coreJVM = core.jvm .settings(dottySettings) -// lazy val docs = project -// .in(file("zio-sql-docs")) -// .settings( -// publish / skip := true, -// moduleName := "zio-sql-docs", -// scalacOptions -= "-Yno-imports", -// scalacOptions -= "-Xfatal-warnings", -// libraryDependencies ++= Seq( -// "dev.zio" %% "zio" % zioVersion -// ) -// ) -// .dependsOn(coreJVM) -// .enablePlugins(MdocPlugin, DocusaurusPlugin) +lazy val docs = project + .in(file("zio-sql-docs")) + .settings( + publish / skip := true, + moduleName := "zio-sql-docs", + scalacOptions -= "-Yno-imports", + scalacOptions -= "-Xfatal-warnings", + libraryDependencies ++= Seq( + "dev.zio" %% "zio" % zioVersion + ) + ) + .dependsOn(coreJVM) + .enablePlugins(MdocPlugin, DocusaurusPlugin) lazy val examples = project .in(file("examples")) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 95dcc8e1a..9b8f94978 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -12,7 +12,7 @@ object BuildHelper { val SilencerVersion = "1.7.3" val Scala212 = "2.12.13" val Scala213 = "2.13.5" - val ScalaDotty = "3.0.0-RC2" + val ScalaDotty = "3.0.0-RC3" def buildInfoSettings(packageName: String) = Seq( @@ -167,8 +167,8 @@ object BuildHelper { ) else Seq( - ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), - compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)) + ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), + compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)) ) }, Test / parallelExecution := true, From db7a513d5134f2af1e3389102a3a9dba860181e0 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 3 May 2021 20:31:49 +0200 Subject: [PATCH 237/673] Fix formatting --- build.sbt | 16 ++++++++-------- project/BuildHelper.scala | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build.sbt b/build.sbt index 7e855ee16..d909861f9 100644 --- a/build.sbt +++ b/build.sbt @@ -174,14 +174,14 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test", - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.1.0.0" % Test, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-test" % zioVersion % "test", + "dev.zio" %% "zio-test-sbt" % zioVersion % "test", + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.1.0.0" % Test, "com.dimafeng" % "testcontainers-scala-oracle-xe_2.13" % testcontainersScalaVersion % Test ) ) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 9b8f94978..25246b7b2 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -94,9 +94,9 @@ object BuildHelper { List("2.12", "2.11+", "2.12+", "2.11-2.12", "2.12-2.13", "2.x") case Some((2, 13)) => List("2.13", "2.11+", "2.12+", "2.13+", "2.12-2.13", "2.x") - case Some((3, 0)) => + case Some((3, 0)) => List("dotty", "2.11+", "2.12+", "2.13+", "3.x") - case _ => + case _ => Nil } platformSpecificSources(platform, conf, baseDir)(versions: _*) @@ -158,23 +158,23 @@ object BuildHelper { name := s"$prjName", scalacOptions := stdOptions, crossScalaVersions := Seq(Scala213, Scala212), - ThisBuild / scalaVersion := Scala213,//ScalaDotty, + ThisBuild / scalaVersion := Scala213, //ScalaDotty, scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), libraryDependencies ++= { if (scalaVersion.value == ScalaDotty) Seq( - "com.github.ghik" % s"silencer-lib_2.13.5" % "1.7.3" % Provided + "com.github.ghik" % s"silencer-lib_2.13.5" % "1.7.3" % Provided ) else Seq( - ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), - compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)) + ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), + compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)) ) }, Test / parallelExecution := true, incOptions ~= (_.withLogRecompileOnMacro(false)), autoAPIMappings := true, - unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library"), + unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library") ) def macroExpansionSettings = Seq( From 09dc647f744163c14851080f7fa83aeebb9b168d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 4 May 2021 11:29:09 +0200 Subject: [PATCH 238/673] Update sbt-scoverage to 1.7.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 3fa4722c0..c00f06a61 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.20") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From c18fe6d802c5206a75234818e283bc2c3236eb96 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Tue, 4 May 2021 12:02:43 +0200 Subject: [PATCH 239/673] Remove curly braces from examples dsl --- examples/src/main/scala/Example1.scala | 19 ++++++------ .../src/main/scala/zio/sql/Examples.scala | 29 ++++++++++--------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 2a1ed6b42..4771c12a1 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -3,7 +3,8 @@ import zio.sql.Sql object Example1 extends Sql { import ColumnSet._ - def renderRead(read: this.Read[_]): String = ??? + def renderRead(read: this.Read[_]): String = ??? + def renderDelete(delete: this.Delete[_]): String = ??? def renderUpdate(update: Example1.Update[_]): String = ??? @@ -22,22 +23,20 @@ object Example1 extends Sql { import AggregationDef._ val queried = - (select { - ((age + 2) as "age") ++ (name as "name") ++ (Abs(3.0) as "dummy") - } from table) + select(((age + 2) as "age") ++ (name as "name") ++ (Abs(3.0) as "dummy")) + .from(table) .limit(200) .offset(1000) .orderBy(age.descending) val joined = - select { - (age as "age") ++ (age2 as "age2") - } from (table join table2).on(name === name2) + select((age as "age") ++ (age2 as "age2")) + .from(table.join(table2).on(name === name2)) val aggregated = - (select { - (Arbitrary(age) as "age") ++ (Count(1) as "count") - } from table) groupBy age + select((Arbitrary(age) as "age") ++ (Count(1) as "count")) + .from(table) + .groupBy(age) val deleted = deleteFrom(table).where(age === 3) diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index dec1f3b52..2be0017b4 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -10,18 +10,19 @@ object Examples extends App with ShopSchema with SqlServerModule { import this.Users._ //select first_name, last_name from users - val basicSelect = select(fName ++ lName) from users + val basicSelect = + select(fName ++ lName).from(users) println(renderRead(basicSelect)) //select first_name as first, last_name as last from users - val basicSelectWithAliases = select { - (fName as "first") ++ (lName as "last") - } from users + val basicSelectWithAliases = + select((fName as "first") ++ (lName as "last")).from(users) println(renderRead(basicSelectWithAliases)) //select top 2 first_name, last_name from users order by last_name, first_name desc val selectWithRefinements = - (select(fName ++ lName) from users) + select(fName ++ lName) + .from(users) .orderBy(lName, fName.desc) .limit(2) println(renderRead(selectWithRefinements)) @@ -32,7 +33,8 @@ object Examples extends App with ShopSchema with SqlServerModule { // execute(selectWithRefinements).to((_, _)) //delete from users where first_name = 'Terrence' - val basicDelete = deleteFrom(users).where(fName === "Terrence") + val basicDelete = + deleteFrom(users).where(fName === "Terrence") println(renderDelete(basicDelete)) /* @@ -41,9 +43,8 @@ object Examples extends App with ShopSchema with SqlServerModule { }) */ //select first_name, last_name, order_date from users left join orders on users.usr_id = orders.usr_id - val basicJoin = select { - fName ++ lName ++ orderDate - } from (users leftOuter orders).on(fkUserId === userId) + val basicJoin = + select(fName ++ lName ++ orderDate).from(users.leftOuter(orders).on(fkUserId === userId)) println(renderRead(basicJoin)) /* select users.usr_id, first_name, last_name, sum(quantity * unit_price) as "total_spend" @@ -53,20 +54,20 @@ object Examples extends App with ShopSchema with SqlServerModule { group by users.usr_id, first_name, last_name */ val orderValues = - (select { + select( (Arbitrary(userId)) ++ (Arbitrary(fName)) ++ (Arbitrary(lName)) ++ (Sum(quantity * unitPrice) as "total_spend") ++ Sum(Abs(quantity)) - } - from { + ) + .from( users .join(orders) .on(userId === fkUserId) .leftOuter(orderDetails) .on(orderId === fkOrderId) - }) + ) .groupBy(userId, fName /*, lName */ ) //shouldn't compile without lName todo fix #38 println(renderRead(orderValues)) @@ -75,6 +76,6 @@ object Examples extends App with ShopSchema with SqlServerModule { /* * select users.first_name, users.last_name from users where true and users.first_name is not null */ - val withPropertyOp = select(fName ++ lName) from users where (fName isNotNull) + val withPropertyOp = select(fName ++ lName).from(users).where(fName isNotNull) println(renderRead(withPropertyOp)) } From d68577c1dc8417eae39ee9054be7cbcbfcdc4d5a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 10 May 2021 12:59:33 +0200 Subject: [PATCH 240/673] Update sbt to 1.5.2 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index f0be67b9f..19479ba46 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.1 +sbt.version=1.5.2 From 60ff379aff2cc28d4b25087914161c26aee8a766 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 10 May 2021 23:44:17 +0200 Subject: [PATCH 241/673] Update mysql-connector-java to 8.0.25 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d909861f9..d9d1fab11 100644 --- a/build.sbt +++ b/build.sbt @@ -160,7 +160,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.24" % Test, + "mysql" % "mysql-connector-java" % "8.0.25" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) From 7c7bb43cbfe39a2ecd5cebdb326e1f39f425608d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 10 May 2021 23:44:21 +0200 Subject: [PATCH 242/673] Update sbt-scoverage to 1.8.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c00f06a61..07940a8b4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.3") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.0") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.20") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 5216ec72fb1aa5aab604b1209ea4f9118a0137cb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 May 2021 09:10:48 +0200 Subject: [PATCH 243/673] Update testcontainers-scala-oracle-xe_2.13 to 0.39.4 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d9d1fab11..62e5f9f12 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.7" val testcontainersVersion = "1.15.3" -val testcontainersScalaVersion = "0.39.3" +val testcontainersScalaVersion = "0.39.4" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From e494eb3eb89acebd49095a73e02528eb6eaea9f0 Mon Sep 17 00:00:00 2001 From: Pierre Ricadat Date: Thu, 13 May 2021 07:22:07 +0900 Subject: [PATCH 244/673] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 475a6ec73..9c80b3433 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # ZIO SQL -| CI | Discord | -| --- | --- | -| ![CI][badge-ci] | [![badge-discord]][link-discord] | +| Project Stage | CI | Discord | +| --- | --- | --- | +| [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![badge-discord]][link-discord] | ## Current status: pre-0.1 (no release yet) @@ -56,6 +56,8 @@ ZIO SQL does not offer Language Integrated Queries (LINQ) or similar functionali [badge-ci]: https://github.com/zio/zio-sql/workflows/CI/badge.svg [badge-discord]: https://img.shields.io/discord/629491597070827530?logo=discord "chat on discord" [link-discord]: https://discord.gg/2ccFBr4 "Discord" +[Stage]: https://img.shields.io/badge/Project%20Stage-Experimental-yellow.svg +[Stage-Page]: https://github.com/zio/zio/wiki/Project-Stages ## Setup Prerequisites (installed): From e72d2f36c17f95a08371278d5097aabeb0c865ac Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 13 May 2021 06:57:23 +0200 Subject: [PATCH 245/673] Update sbt-jmh to 0.4.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c00f06a61..368803bdd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.20") From 5287bf3254f5df792305fa5529d109cae9d8ae3e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 14 May 2021 11:40:11 +0200 Subject: [PATCH 246/673] Update mdoc, sbt-mdoc to 2.2.21 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c00f06a61..618cfa80a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.3") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.20") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") From e811c7fef79a8afb85cdcfdcbddc171b6c49f9ee Mon Sep 17 00:00:00 2001 From: Nader Ghanbari Date: Fri, 14 May 2021 20:54:27 -0400 Subject: [PATCH 247/673] Move JdbcRunnerSpec to src/test --- build.sbt | 42 ++++--------------- .../scala/zio/sql/JdbcRunnableSpec.scala | 0 2 files changed, 7 insertions(+), 35 deletions(-) rename jdbc/src/{main => test}/scala/zio/sql/JdbcRunnableSpec.scala (100%) diff --git a/build.sbt b/build.sbt index 62e5f9f12..4ceded679 100644 --- a/build.sbt +++ b/build.sbt @@ -68,8 +68,7 @@ lazy val root = project mysql, oracle, postgres, - sqlserver, - test + sqlserver ) lazy val core = crossProject(JSPlatform, JVMPlatform) @@ -139,8 +138,8 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion, "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion, - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -149,13 +148,11 @@ lazy val jdbc = project lazy val mysql = project .in(file("mysql")) + .dependsOn(jdbc % "compile->compile;test->test") .settings(stdSettings("zio-sql-mysql")) .settings(buildInfoSettings("zio.sql.mysql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test", "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, @@ -166,17 +163,14 @@ lazy val mysql = project ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) .settings(dottySettings) - .dependsOn(jdbc) lazy val oracle = project .in(file("oracle")) + .dependsOn(jdbc % "compile->compile;test->test") .settings(stdSettings("zio-sql-oracle")) .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test", "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, @@ -187,17 +181,14 @@ lazy val oracle = project ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) .settings(dottySettings) - .dependsOn(jdbc) lazy val postgres = project .in(file("postgres")) + .dependsOn(jdbc % "compile->compile;test->test") .settings(stdSettings("zio-sql-postgres")) .settings(buildInfoSettings("zio.sql.postgres")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, @@ -208,17 +199,14 @@ lazy val postgres = project ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) .settings(dottySettings) - .dependsOn(jdbc) lazy val sqlserver = project .in(file("sqlserver")) + .dependsOn(jdbc % "compile->compile;test->test") .settings(stdSettings("zio-sql-sqlserver")) .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test", "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, @@ -227,19 +215,3 @@ lazy val sqlserver = project ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) .settings(dottySettings) - .dependsOn(jdbc) - -lazy val test = project - .in(file("test")) - .settings(stdSettings("zio-sql-test")) - .settings(buildInfoSettings("zio.sql.test")) - .settings( - publish / skip := true, - libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" - ) - ) - .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) - .settings(dottySettings) diff --git a/jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala similarity index 100% rename from jdbc/src/main/scala/zio/sql/JdbcRunnableSpec.scala rename to jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala From 6fb1440f0180540222fe399df93327ca7c625329 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 18 May 2021 15:02:47 +0200 Subject: [PATCH 248/673] Update silencer-lib, silencer-lib_2.13.5, ... to 1.7.4 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 25246b7b2..0909ffedf 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -163,7 +163,7 @@ object BuildHelper { libraryDependencies ++= { if (scalaVersion.value == ScalaDotty) Seq( - "com.github.ghik" % s"silencer-lib_2.13.5" % "1.7.3" % Provided + "com.github.ghik" % s"silencer-lib_2.13.5" % "1.7.4" % Provided ) else Seq( From a4582758a833d0ffc9692170a20f78ac78b436b3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 20 May 2021 01:36:40 +0200 Subject: [PATCH 249/673] Update sbt-scoverage to 1.8.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 603e944c7..de0f1e5e3 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 6235b4d34941eb81670c6a3eb78f4485c420ff1d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 20 May 2021 23:18:17 +0200 Subject: [PATCH 250/673] Update sbt-scalafix to 0.9.28 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 603e944c7..66af138d4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,5 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.27") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.28") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") From f00ea89d535be222cc4e62525438ac9413cd3248 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 21 May 2021 17:22:00 +0200 Subject: [PATCH 251/673] Update sbt-tpolecat to 0.1.18 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 603e944c7..eb2d90a02 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.27") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.18") From 584f0902bbf0be61cfec2a8c4c224dd12cb99045 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 22 May 2021 15:41:59 +0200 Subject: [PATCH 252/673] Upgrade scala to 2.13.6 --- .github/workflows/ci.yml | 2 +- project/BuildHelper.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e1e44172..cb378e417 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.13', '2.13.5'] + scala: ['2.12.13', '2.13.6'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 0909ffedf..895a4f900 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -9,9 +9,9 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val SilencerVersion = "1.7.3" + val SilencerVersion = "1.7.4" val Scala212 = "2.12.13" - val Scala213 = "2.13.5" + val Scala213 = "2.13.6" val ScalaDotty = "3.0.0-RC3" def buildInfoSettings(packageName: String) = @@ -163,7 +163,7 @@ object BuildHelper { libraryDependencies ++= { if (scalaVersion.value == ScalaDotty) Seq( - "com.github.ghik" % s"silencer-lib_2.13.5" % "1.7.4" % Provided + "com.github.ghik" % s"silencer-lib_2.13.6" % "1.7.4" % Provided ) else Seq( From 17c5315e0d586a7ff14424e94e895c0c2a5d6579 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 25 May 2021 05:13:13 +0200 Subject: [PATCH 253/673] Update testcontainers-scala-oracle-xe_2.13 to 0.39.5 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 4ceded679..9c9ccb263 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.7" val testcontainersVersion = "1.15.3" -val testcontainersScalaVersion = "0.39.4" +val testcontainersScalaVersion = "0.39.5" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From f02e01a2f4730cf8ba07308daa28cde3d83da7db Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 26 May 2021 22:31:19 +0200 Subject: [PATCH 254/673] Update sbt-tpolecat to 0.1.19 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c32b9a566..b2b8b6992 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.28") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.18") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.19") From 8dca0c55e2537d88a619dbf0c2dfe33eaaafe2b5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 28 May 2021 23:41:45 +0200 Subject: [PATCH 255/673] Update sbt-scoverage to 1.8.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c32b9a566..5dd30acc3 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 9e08f5c0a94332ce9076f790c724b1d0e3c9cda6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 29 May 2021 22:41:53 +0200 Subject: [PATCH 256/673] Update silencer-lib, silencer-lib_2.13.6, ... to 1.7.5 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 895a4f900..e684bad3a 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -163,7 +163,7 @@ object BuildHelper { libraryDependencies ++= { if (scalaVersion.value == ScalaDotty) Seq( - "com.github.ghik" % s"silencer-lib_2.13.6" % "1.7.4" % Provided + "com.github.ghik" % s"silencer-lib_2.13.6" % "1.7.5" % Provided ) else Seq( From 0bfc4dcdcb8c65727801661dcfccf34c3827ace2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 31 May 2021 00:47:25 +0200 Subject: [PATCH 257/673] Update sbt-scalafix to 0.9.29 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c32b9a566..8fec56414 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,5 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.28") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.29") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.18") From 83786854c17e1d7bcc071f646a4ca7fd5dfd4103 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Jun 2021 10:15:24 +0200 Subject: [PATCH 258/673] Update sbt to 1.5.3 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 19479ba46..67d27a1df 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.2 +sbt.version=1.5.3 From e807a55f15f090abea75f16cde99494ace54459e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Jun 2021 10:15:28 +0200 Subject: [PATCH 259/673] Update sbt-jmh to 0.4.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c32b9a566..7e4b4fbb0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") From 08a7c27eb51a519496a0a43a6e94f9312f3e0341 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Jun 2021 17:52:32 +0200 Subject: [PATCH 260/673] Update sbt-scalafix to 0.9.29 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index b2b8b6992..0f42c7da7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,5 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.28") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.29") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.19") From 1e4de5dbd8ebc50adfeda13163f70130beb29bd2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Jun 2021 17:52:38 +0200 Subject: [PATCH 261/673] Update sbt-tpolecat to 0.1.20 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index b2b8b6992..03f6b31b9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.28") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.19") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") From a55f4a2c1eb1583117b96b2bc86e67f2525982bf Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 6 Jun 2021 23:59:12 +0200 Subject: [PATCH 262/673] Update Scala to 2.12.14 --- .github/workflows/ci.yml | 2 +- project/BuildHelper.scala | 4 ++-- sbt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb378e417..1de28805e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.13', '2.13.6'] + scala: ['2.12.14', '2.13.6'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index e684bad3a..74ecfa4be 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -9,8 +9,8 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val SilencerVersion = "1.7.4" - val Scala212 = "2.12.13" + val SilencerVersion = "1.7.5" + val Scala212 = "2.12.14" val Scala213 = "2.13.6" val ScalaDotty = "3.0.0-RC3" diff --git a/sbt b/sbt index 00bf0d880..49660f0c9 100755 --- a/sbt +++ b/sbt @@ -37,8 +37,8 @@ set -o pipefail declare -r sbt_release_version="1.3.13" declare -r sbt_unreleased_version="1.4.0-M1" -declare -r latest_213="2.13.5" -declare -r latest_212="2.12.13" +declare -r latest_213="2.13.6" +declare -r latest_212="2.12.14" declare -r latest_211="2.11.12" declare -r latest_210="2.10.7" declare -r latest_29="2.9.3" From 7cb03c393160234e5a72b03d5a15ce36fb28c172 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 8 Jun 2021 17:22:56 +0200 Subject: [PATCH 263/673] Update sbt-scalajs, scalajs-library, ... to 1.6.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 10f7d9126..212612dd6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") From fcb316a61881fc2ad6caa1403ee2bf96994a3f30 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 14 Jun 2021 10:04:07 +0200 Subject: [PATCH 264/673] Update sbt to 1.5.4 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 67d27a1df..9edb75b77 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.3 +sbt.version=1.5.4 From 5fdb48f4e7d241217de0d99f52fce7c98b443e04 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 16 Jun 2021 19:24:24 +0200 Subject: [PATCH 265/673] Update postgresql to 42.2.22 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9c9ccb263..5b476ed1d 100644 --- a/build.sbt +++ b/build.sbt @@ -193,7 +193,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.20" % Compile, + "org.postgresql" % "postgresql" % "42.2.22" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 15b96508471d50341940f03a01b21617b4c87dc9 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 28 Jun 2021 17:27:44 +0200 Subject: [PATCH 266/673] #218 cross apply outer apply support initial implementation --- build.sbt | 10 +- core/jvm/src/main/scala/zio/sql/table.scala | 35 +++ .../scala/zio/sql/mysql/MysqlModule.scala | 8 + .../scala/zio/sql/oracle/OracleModule.scala | 8 + .../zio/sql/postgresql/PostgresModule.scala | 8 + .../zio/sql/sqlserver/SqlServerModule.scala | 23 +- .../container-license-acceptance.txt | 1 + sqlserver/src/test/resources/db_schema.sql | 53 ++++ .../test/scala/zio/sql/TestContainer.scala | 35 +++ .../scala/zio/sql/sqlserver/DbSchema.scala | 25 ++ .../sql/sqlserver/SqlServerModuleSpec.scala | 274 ++++++++++++++++++ .../sql/sqlserver/SqlServerRunnableSpec.scala | 37 +++ 12 files changed, 512 insertions(+), 5 deletions(-) create mode 100644 sqlserver/src/test/resources/container-license-acceptance.txt create mode 100644 sqlserver/src/test/resources/db_schema.sql create mode 100644 sqlserver/src/test/scala/zio/sql/TestContainer.scala create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala diff --git a/build.sbt b/build.sbt index 9c9ccb263..5ecfc8baf 100644 --- a/build.sbt +++ b/build.sbt @@ -207,10 +207,12 @@ lazy val sqlserver = project .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "com.microsoft.sqlserver" % "mssql-jdbc" % "9.2.1.jre11" % Test, + "com.dimafeng" %% "testcontainers-scala-mssqlserver" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index b044e762f..5f99d4669 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -101,6 +101,13 @@ trait TableModule { self: ExprModule with SelectModule => case object FullOuter extends JoinType } + sealed trait CrossType + + object CrossType { + case object CrossApply extends CrossType + case object OuterApply extends CrossType + } + /** * (left join right) on (...) */ @@ -119,6 +126,12 @@ trait TableModule { self: ExprModule with SelectModule => final def rightOuter[That](that: Table.Aux[That]): Table.JoinBuilder[self.TableType, That] = new Table.JoinBuilder[self.TableType, That](JoinType.RightOuter, self, that) + final def crossApply[F, Cols, TableSelectionType](select: Read.Select[F, Cols, TableSelectionType]): Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols] = + new Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols](CrossType.CrossApply, self, select) + + final def outerApply[F, Cols, TableSelectionType](select: Read.Select[F, Cols, TableSelectionType]): Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols] = + new Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols](CrossType.OuterApply, self, select) + val columnsUntyped: List[Column.Untyped] } @@ -129,6 +142,28 @@ trait TableModule { self: ExprModule with SelectModule => Joined(joinType, left, right, expr) } + case class SelectedTableBuilder[F1, A, B, Cols](crossType: CrossType, left: Table.Aux[A], select: Read.Select[F1, Cols, B]) { + def where[F2](expr: Expr[F2, A with B, Boolean]): Table.Aux[A with B] = + SelectedTable[F1, F2, Cols, A, B](crossType, left, select, expr) + } + + /** + * Table where right side is a selection out of another table. + * TODO do we want to support "table valued function" for sql server and replace Select with a function? + * + * example + * elect(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) + */ + sealed case class SelectedTable[F1, F2, Cols, A, B]( + crossType: CrossType, + left: Table.Aux[A], + select: Read.Select[F1, Cols, B], + expr: Expr[F2, A with B, Boolean]) extends Table { + type TableType = A with B + + val columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ select.table.get.columnsUntyped + } + type Aux[A] = Table { type TableType = A } //you need insanity in your life diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 5a5740207..76599f5b9 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -154,6 +154,14 @@ trait MysqlModule extends Jdbc { self => //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) + case Table.SelectedTable(crossType, left, select, on) => { + // CROSS and OUTER APPLY are only supported in SQL SERVER, so we rewrite them to JOINs + //TODO write tests if thats a safe thing to do + crossType match { + case CrossType.CrossApply => renderTable(Table.Joined(JoinType.Inner, left, select.table.get, on)) + case CrossType.OuterApply => renderTable(Table.Joined(JoinType.LeftOuter, left, select.table.get, on)) + } + } case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 1f6f19a37..69fabc8e7 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -262,6 +262,14 @@ trait OracleModule extends Jdbc { self => //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) + case Table.SelectedTable(crossType, left, select, on) => { + // CROSS and OUTER APPLY are only supported in SQL SERVER, so we rewrite them to JOINs + //TODO write tests if thats a safe thing to do + crossType match { + case CrossType.CrossApply => buildTable(Table.Joined(JoinType.Inner, left, select.table.get, on), builder) + case CrossType.OuterApply => buildTable(Table.Joined(JoinType.LeftOuter, left, select.table.get, on), builder) + } + } case Table.Joined(joinType, left, right, on) => buildTable(left, builder) builder.append(joinType match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 1df2d9efe..968ba98f9 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -586,6 +586,14 @@ trait PostgresModule extends Jdbc { self => table match { //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) + case Table.SelectedTable(crossType, left, select, on) => { + // CROSS and OUTER APPLY are only supported in SQL SERVER, so we rewrite them to JOINs + //TODO write tests if thats a safe thing to do + crossType match { + case CrossType.CrossApply => renderTable(Table.Joined(JoinType.Inner, left, select.table.get, on)) + case CrossType.OuterApply => renderTable(Table.Joined(JoinType.LeftOuter, left, select.table.get, on)) + } + } case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 680281e08..eba68b69b 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -253,11 +253,32 @@ trait SqlServerModule extends Jdbc { self => case _ => () //todo what do we do if we don't have a name? } } - def buildTable(table: Table): Unit = + + def buildTable(table: Table): Unit = table match { //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) + + case Table.SelectedTable(crossType, left, select, on) => { + buildTable(left) + + crossType match { + case CrossType.CrossApply => builder.append(" CROSS APPLY ( ") + case CrossType.OuterApply => builder.append(" OUTER APPLY ( ") + } + + builder.append("SELECT ") + buildSelection(select.selection.value) + builder.append(" FROM ") + buildTable(select.table.get) + builder.append(" WHERE ") + buildExpr(on) + + builder.append(" ) ") + val _ = buildTable(select.table.get) + } + case Table.Joined(joinType, left, right, on) => buildTable(left) builder.append(joinType match { diff --git a/sqlserver/src/test/resources/container-license-acceptance.txt b/sqlserver/src/test/resources/container-license-acceptance.txt new file mode 100644 index 000000000..4051ecdce --- /dev/null +++ b/sqlserver/src/test/resources/container-license-acceptance.txt @@ -0,0 +1 @@ +mcr.microsoft.com/mssql/server:2017-latest \ No newline at end of file diff --git a/sqlserver/src/test/resources/db_schema.sql b/sqlserver/src/test/resources/db_schema.sql new file mode 100644 index 000000000..0ca11b619 --- /dev/null +++ b/sqlserver/src/test/resources/db_schema.sql @@ -0,0 +1,53 @@ +create table customers +( + id varchar(36) not null primary key, + first_name varchar(255) not null, + last_name varchar(255) not null, + verified bit not null, + dob date not null +); + +create table orders +( + id varchar(36) not null primary key, + customer_id varchar(36) not null, + order_date date not null +); + +insert into customers + (id, first_name, last_name, verified, dob) +values + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 0, '1983-01-05'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', 0, '1999-11-02'), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', 0, '1990-11-16'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', 0, '1995-11-12'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', 1, '1987-03-23'); + +insert into orders + (id, customer_id, order_date) +values + ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-03-25'), + ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-06-04'), + ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-08-19'), + ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-08-30'), + ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-03-07'), + ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', '2020-03-19'), + ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2020-05-11'), + ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-02-21'), + ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-05-06'), + ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-02-11'), + ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-10-12'), + ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-01-29'), + ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-02-10'), + ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-09-27'), + ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2018-11-13'), + ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2020-01-15'), + ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2018-07-10'), + ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-08-01'), + ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-12-08'), + ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-11-04'), + ('2c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2018-10-14'), + ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05'), + ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23'), + ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14'), + ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); \ No newline at end of file diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/TestContainer.scala new file mode 100644 index 000000000..a6b5bb36e --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/TestContainer.scala @@ -0,0 +1,35 @@ +package zio.sql + +import com.dimafeng.testcontainers.SingleContainer +import com.dimafeng.testcontainers.MSSQLServerContainer +import org.testcontainers.utility.DockerImageName +import zio._ +import zio.blocking.{ effectBlocking, Blocking } + +object TestContainer { + + def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = + ZManaged.make { + effectBlocking { + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + + def postgres(imageName: String = "mcr.microsoft.com/mssql/server:2017-latest"): ZLayer[Blocking, Throwable, Has[MSSQLServerContainer]] = + ZManaged.make { + effectBlocking { + val c = new MSSQLServerContainer( + dockerImageName = DockerImageName.parse(imageName) + ).configure { a => + a.withInitScript("db_schema.sql") + () + } + c.start() + c + } + } { container => + effectBlocking(container.stop()).orDie + }.toLayer + +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala new file mode 100644 index 000000000..fd869df13 --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -0,0 +1,25 @@ +package zio.sql.sqlserver + +import zio.sql.Jdbc + +trait DbSchema extends Jdbc { self => + import self.ColumnSet._ + + object Customers { + + val customers = + (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) + .table("customers") + + val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = + customers.columns + + val z = Cons(Column[Int]("1"), Cons(Column[Int]("2"), Empty)).table("whoo") + } + + object Orders { + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + } +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala new file mode 100644 index 000000000..e1da6b374 --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -0,0 +1,274 @@ +package zio.sql.sqlserver + +import java.time._ +import java.util.UUID + +import zio._ +import zio.test.Assertion._ +import zio.test._ + +import zio.test.TestAspect.ignore +import zio.test.TestAspect.sequential + +import scala.language.postfixOps + +object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { + + import AggregationDef._ + import Customers._ + import Orders._ + + private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { + case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) + + val query = + select(customerId ++ fName ++ lName ++ verified ++ dob).from(customers).where(condition) + + val expected = + Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + false, + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute( + query + .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } + ) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + + override def specLayered = suite("MSSQL Server module")( + testM("Can select from single table") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob).from(customers) + + val expected = + Seq( + Customer( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("1983-01-05") + ), + Customer( + UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), + "Terrence", + "Noel", + LocalDate.parse("1999-11-02") + ), + Customer( + UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), + "Mila", + "Paterso", + LocalDate.parse("1990-11-16") + ), + Customer( + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + "Alana", + "Murray", + LocalDate.parse("1995-11-12") + ), + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute( + query + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + ) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + //TODO fix tests -> they were just copy pasted from postgres module to find bugs + testM("Can select with property unary operator") { + customerSelectJoseAssertion(verified isNotTrue) + } @@ ignore, + testM("Can select with property binary operator with UUID") { + customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) + } @@ ignore, + testM("Can select with property binary operator with String") { + customerSelectJoseAssertion(fName === "Jose") + } @@ ignore, + testM("Can select with property binary operator with LocalDate") { + customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) + } @@ ignore, + testM("Can select with property binary operator with LocalDateTime") { + customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) + } @@ ignore, + testM("Can select with property binary operator with OffsetDateTime") { + customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) + } @@ ignore, + testM("Can select with property binary operator with ZonedLocalDate") { + customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) + } @@ ignore, + testM("Can select with property binary operator with Instant") { + customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) + } @@ ignore, + testM("Can select from single table with limit, offset and order by") { + case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) + + val query = select(customerId ++ fName ++ lName ++ dob).from(customers).limit(1).offset(1).orderBy(fName) + + val expected = + Seq( + Customer( + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), + "Jose", + "Wiggins", + LocalDate.parse("1987-03-23") + ) + ) + + val testResult = execute( + query + .to[UUID, String, String, LocalDate, Customer] { case row => + Customer(row._1, row._2, row._3, row._4) + } + ) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } @@ ignore, + testM("Can count rows") { + val query = select(Count(customerId)).from(customers) + + val expected = 5L + + val result = execute(query.to[Long, Long](identity)) + + for { + r <- result.runCollect + } yield assert(r.head)(equalTo(expected)) + }, + testM("cross apply") { + val query = select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) + + val result = execute( + query + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + + + //TODO SHOULD NOT COMPILE because orderDate is not selected in "tabled valued function" select(orderId).from(orders) + // possible solution is to need to extract "orderId" column out of orders and create a new table + // select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderId).from(orders)).where(fkCustomerId === customerId)) + }, + testM("outer apply") { + val query = select(fName ++ lName ++ orderDate).from(customers.outerApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) + + val _ = query + ??? + } @@ ignore, + testM("Can select from joined tables (inner join)") { + val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) + + val result = execute( + query + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + + ) @@ sequential +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala new file mode 100644 index 000000000..0d72ae32f --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -0,0 +1,37 @@ +package zio.sql.sqlserver + +import zio.test._ +import zio.test.environment.TestEnvironment +import java.util.Properties +import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } +import zio.Has + +trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { + + def autoCommit: Boolean = true + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + val poolConfigLayer = TestContainer + .postgres() + .map(a => + Has( + ConnectionPoolConfig( + url = a.get.jdbcUrl, + properties = connProperties(a.get.username, a.get.password), + autoCommit = autoCommit + ) + ) + ) + + override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + specLayered.provideCustomLayerShared(jdbcLayer) + + def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + +} From 4720495accf16138a6f8b30bb5015c90ffe2a6d6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 3 Jul 2021 05:24:46 +0200 Subject: [PATCH 267/673] Update sbt-scalajs-crossproject to 1.1.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 212612dd6..e4cae9445 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") From 2d307591db976e21ac614aba425f631ad4799c5b Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 3 Jul 2021 11:51:40 +0200 Subject: [PATCH 268/673] #218 created sql server specific table --- core/jvm/src/main/scala/zio/sql/table.scala | 46 ++----- .../scala/zio/sql/mysql/MysqlModule.scala | 10 +- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 13 ++ .../scala/zio/sql/oracle/OracleModule.scala | 9 +- .../zio/sql/postgresql/PostgresModule.scala | 22 ++-- .../zio/sql/postgresql/FunctionDefSpec.scala | 26 ++++ .../zio/sql/sqlserver/SqlServerModule.scala | 78 +++++++++++- .../scala/zio/sql/sqlserver/DbSchema.scala | 2 - .../sql/sqlserver/SqlServerModuleSpec.scala | 114 +++++++++--------- 9 files changed, 193 insertions(+), 127 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 5f99d4669..cda823419 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -101,13 +101,6 @@ trait TableModule { self: ExprModule with SelectModule => case object FullOuter extends JoinType } - sealed trait CrossType - - object CrossType { - case object CrossApply extends CrossType - case object OuterApply extends CrossType - } - /** * (left join right) on (...) */ @@ -126,44 +119,22 @@ trait TableModule { self: ExprModule with SelectModule => final def rightOuter[That](that: Table.Aux[That]): Table.JoinBuilder[self.TableType, That] = new Table.JoinBuilder[self.TableType, That](JoinType.RightOuter, self, that) - final def crossApply[F, Cols, TableSelectionType](select: Read.Select[F, Cols, TableSelectionType]): Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols] = - new Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols](CrossType.CrossApply, self, select) - - final def outerApply[F, Cols, TableSelectionType](select: Read.Select[F, Cols, TableSelectionType]): Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols] = - new Table.SelectedTableBuilder[F, self.TableType, TableSelectionType, Cols](CrossType.OuterApply, self, select) - val columnsUntyped: List[Column.Untyped] } + type TableExtension[+A] <: Table.TableEx + object Table { + trait TableEx { + def columnsUntyped: List[Column.Untyped] + } + class JoinBuilder[A, B](joinType: JoinType, left: Table.Aux[A], right: Table.Aux[B]) { def on[F](expr: Expr[F, A with B, Boolean]): Table.Aux[A with B] = Joined(joinType, left, right, expr) } - case class SelectedTableBuilder[F1, A, B, Cols](crossType: CrossType, left: Table.Aux[A], select: Read.Select[F1, Cols, B]) { - def where[F2](expr: Expr[F2, A with B, Boolean]): Table.Aux[A with B] = - SelectedTable[F1, F2, Cols, A, B](crossType, left, select, expr) - } - - /** - * Table where right side is a selection out of another table. - * TODO do we want to support "table valued function" for sql server and replace Select with a function? - * - * example - * elect(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) - */ - sealed case class SelectedTable[F1, F2, Cols, A, B]( - crossType: CrossType, - left: Table.Aux[A], - select: Read.Select[F1, Cols, B], - expr: Expr[F2, A with B, Boolean]) extends Table { - type TableType = A with B - - val columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ select.table.get.columnsUntyped - } - type Aux[A] = Table { type TableType = A } //you need insanity in your life @@ -201,5 +172,10 @@ trait TableModule { self: ExprModule with SelectModule => val columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ right.columnsUntyped } + + sealed case class DialectSpecificTable[A](tableExtension: TableExtension[A]) extends Table { + + val columnsUntyped: List[Column.Untyped] = tableExtension.columnsUntyped + } } } diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 76599f5b9..d87029ded 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -32,6 +32,7 @@ trait MysqlModule extends Jdbc { self => val Log2 = FunctionDef[Double, Double](FunctionName("log2")) val Log10 = FunctionDef[Double, Double](FunctionName("log10")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) + val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) } override def renderRead(read: self.Read[_]): String = { @@ -154,14 +155,7 @@ trait MysqlModule extends Jdbc { self => //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) - case Table.SelectedTable(crossType, left, select, on) => { - // CROSS and OUTER APPLY are only supported in SQL SERVER, so we rewrite them to JOINs - //TODO write tests if thats a safe thing to do - crossType match { - case CrossType.CrossApply => renderTable(Table.Joined(JoinType.Inner, left, select.table.get, on)) - case CrossType.OuterApply => renderTable(Table.Joined(JoinType.LeftOuter, left, select.table.get, on)) - } - } + case Table.DialectSpecificTable(tableExtension) => ??? case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 11fbd2e59..6119e8c64 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -118,6 +118,19 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("bit_length") { + val query = select(BitLength("hello")) + + val expected = 40 + + val testResult = execute(query.to[Int, Int](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("pi") { val query = select(Pi) from customers diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 69fabc8e7..599030f1d 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -262,14 +262,7 @@ trait OracleModule extends Jdbc { self => //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.SelectedTable(crossType, left, select, on) => { - // CROSS and OUTER APPLY are only supported in SQL SERVER, so we rewrite them to JOINs - //TODO write tests if thats a safe thing to do - crossType match { - case CrossType.CrossApply => buildTable(Table.Joined(JoinType.Inner, left, select.table.get, on), builder) - case CrossType.OuterApply => buildTable(Table.Joined(JoinType.LeftOuter, left, select.table.get, on), builder) - } - } + case Table.DialectSpecificTable(tableExtension) => ??? case Table.Joined(joinType, left, right, on) => buildTable(left, builder) builder.append(joinType match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 968ba98f9..91f592bcd 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -1,12 +1,13 @@ package zio.sql.postgresql +import org.postgresql.util.PGInterval +import zio.Chunk +import zio.sql.{ Jdbc, Renderer } + import java.sql.ResultSet import java.text.DecimalFormat import java.time._ import java.util.Calendar -import org.postgresql.util.PGInterval -import zio.Chunk -import zio.sql.{ Jdbc, Renderer } trait PostgresModule extends Jdbc { self => import TypeTag._ @@ -243,6 +244,8 @@ trait PostgresModule extends Jdbc { self => val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) val SetSeed = FunctionDef[Double, Unit](FunctionName("setseed")) + val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) } override def renderRead(read: self.Read[_]): String = { @@ -585,16 +588,9 @@ trait PostgresModule extends Jdbc { self => def renderTable(table: Table)(implicit render: Renderer): Unit = table match { //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => render(sourceTable.name) - case Table.SelectedTable(crossType, left, select, on) => { - // CROSS and OUTER APPLY are only supported in SQL SERVER, so we rewrite them to JOINs - //TODO write tests if thats a safe thing to do - crossType match { - case CrossType.CrossApply => renderTable(Table.Joined(JoinType.Inner, left, select.table.get, on)) - case CrossType.OuterApply => renderTable(Table.Joined(JoinType.LeftOuter, left, select.table.get, on)) - } - } - case Table.Joined(joinType, left, right, on) => + case sourceTable: self.Table.Source => render(sourceTable.name) + case Table.DialectSpecificTable(tableExtension) => ??? + case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { case JoinType.Inner => " INNER JOIN " diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 95cf7b1ed..2b6834c19 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -152,6 +152,32 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("bit_length") { + val query = select(BitLength("hello")) + + val expected = 40 + + val testResult = execute(query.to[Int, Int](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("pi") { + val query = select(Pi) + + val expected = 3.141592653589793 + + val testResult = execute(query.to[Double, Double](identity)) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, suite("format function")( testM("format0") { import Expr._ diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index eba68b69b..654ffc13f 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -2,8 +2,75 @@ package zio.sql.sqlserver import zio.sql.Jdbc +import scala.language.implicitConversions + trait SqlServerModule extends Jdbc { self => + import self.ColumnSet._ + + override type TableExtension[+A] = SqlServerSpecific.SqlServerTable[A] + + object SqlServerSpecific { + import SqlServerTable._ + + sealed trait SqlServerTable[+A] extends Table.TableEx + + object SqlServerTable { + + sealed case class SelectedTable[F1, F2, Cols, A, B](crossType: CrossType, left: Table.Aux[A], select: Read.Select[F1, Cols, B], expr: Expr[_, A with B, Boolean]) extends SqlServerTable[A with B] { self => + + def where(whereExpr: Expr[F1 :||: F2, A with B, Boolean]) : SelectedTable[F1, F2, Cols, A, B] = self.copy(expr = whereExpr) + + def columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ select.table.get.columnsUntyped + } + + implicit def tableSourceToSelectedBuilder[ColumnsRepr[_], Cols](table: Table.Source.Aux_[ColumnsRepr, Cols]) : SelectedTableBuilder[ColumnsRepr, Cols] = + new SelectedTableBuilder(table) + + sealed case class SelectedTableBuilder[ColumnsRepr[_], Cols](table: Table.Source.Aux_[ColumnsRepr, Cols]) { self => + + final def crossApply[F1, F2, Cols, SelectTableType](select: Read.Select[F1, Cols, SelectTableType]): SelectedTable[F1, F2, Cols, table.TableType, SelectTableType] = + SelectedTable(CrossType.CrossApply, table, select, Expr.literal(false)) + + final def outerApply[F1, F2, Cols, SelectTableType](select: Read.Select[F1, Cols, SelectTableType]): SelectedTable[F1, F2, Cols, table.TableType, SelectTableType] = + SelectedTable(CrossType.OuterApply, table, select, Expr.literal(false)) + } + } + + val crossApplyExample = select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(customerId === fkCustomerId).toTable) + + sealed trait CrossType + object CrossType { + case object CrossApply extends CrossType + case object OuterApply extends CrossType + } + + val customers = + (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) + .table("customers") + + val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = + customers.columns + + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + + //JOIN + val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) + // SELECT customers.first_name, customers.last_name, orders.order_date + // FROM customers + // INNER JOIN orders + // ON orders.customer_id = customers.id + + // SELECT customers.first_name, customers.last_name, orders.order_date FROM customers + // CROSS APPLY + // ( + // SELECT order_date from orders + // WHERE orders.customer_id = customers.id + // ) + } + override def renderDelete(delete: Delete[_]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 override def renderUpdate(update: self.Update[_]): String = ??? @@ -260,12 +327,13 @@ trait SqlServerModule extends Jdbc { self => case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.SelectedTable(crossType, left, select, on) => { - buildTable(left) + case Table.DialectSpecificTable(table) => table match { + case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => { + buildTable(left) crossType match { - case CrossType.CrossApply => builder.append(" CROSS APPLY ( ") - case CrossType.OuterApply => builder.append(" OUTER APPLY ( ") + case SqlServerSpecific.CrossType.CrossApply => builder.append(" CROSS APPLY ( ") + case SqlServerSpecific.CrossType.OuterApply => builder.append(" OUTER APPLY ( ") } builder.append("SELECT ") @@ -277,6 +345,8 @@ trait SqlServerModule extends Jdbc { self => builder.append(" ) ") val _ = buildTable(select.table.get) + } + } case Table.Joined(joinType, left, right, on) => diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index fd869df13..94a87ee2e 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -13,8 +13,6 @@ trait DbSchema extends Jdbc { self => val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = customers.columns - - val z = Cons(Column[Int]("1"), Cons(Column[Int]("2"), Empty)).table("whoo") } object Orders { diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index e1da6b374..5fda1b40c 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -166,63 +166,63 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { r <- result.runCollect } yield assert(r.head)(equalTo(expected)) }, - testM("cross apply") { - val query = select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) - - case class Row(firstName: String, lastName: String, orderDate: LocalDate) - - val expected = Seq( - Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) - ) - - val result = execute( - query - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - } - ) - - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - - - //TODO SHOULD NOT COMPILE because orderDate is not selected in "tabled valued function" select(orderId).from(orders) - // possible solution is to need to extract "orderId" column out of orders and create a new table - // select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderId).from(orders)).where(fkCustomerId === customerId)) - }, - testM("outer apply") { - val query = select(fName ++ lName ++ orderDate).from(customers.outerApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) - - val _ = query - ??? - } @@ ignore, + // testM("cross apply") { + // val query = select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) + + // case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + // val expected = Seq( + // Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + // Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + // Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + // Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + // Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + // Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + // Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + // Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + // Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + // Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + // Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + // Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + // Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + // Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + // Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + // Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + // Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + // Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + // Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + // Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + // Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + // Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + // Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + // Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + // Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + // ) + + // val result = execute( + // query + // .to[String, String, LocalDate, Row] { case row => + // Row(row._1, row._2, row._3) + // } + // ) + + // val assertion = for { + // r <- result.runCollect + // } yield assert(r)(hasSameElementsDistinct(expected)) + + // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + + + // //TODO SHOULD NOT COMPILE because orderDate is not selected in "tabled valued function" select(orderId).from(orders) + // // possible solution is to need to extract "orderId" column out of orders and create a new table + // // select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderId).from(orders)).where(fkCustomerId === customerId)) + // }, + // testM("outer apply") { + // val query = select(fName ++ lName ++ orderDate).from(customers.outerApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) + + // val _ = query + // ??? + // } @@ ignore, testM("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) From ba9df06366f733339c49d67fcecc3b751af915c4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 6 Jul 2021 19:26:55 +0200 Subject: [PATCH 269/673] Update postgresql to 42.2.23 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5b476ed1d..61fc7c994 100644 --- a/build.sbt +++ b/build.sbt @@ -193,7 +193,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.22" % Compile, + "org.postgresql" % "postgresql" % "42.2.23" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 4067e859bb72872e9962d3f962bd0e83019ea33e Mon Sep 17 00:00:00 2001 From: eqk Date: Thu, 1 Jul 2021 17:21:21 +0300 Subject: [PATCH 270/673] rederDelete for SqlServer --- README.md | 2 +- build.sbt | 10 +- .../zio/sql/sqlserver/SqlServerModule.scala | 515 +++++++++--------- .../container-license-acceptance.txt | 1 + sqlserver/src/test/resources/shop_schema.sql | 193 +++++++ .../test/scala/zio/sql/TestContainer.scala | 34 ++ .../scala/zio/sql/sqlserver/DeleteSpec.scala | 24 + .../scala/zio/sql/sqlserver/ReadSpec.scala | 47 ++ .../scala/zio/sql/sqlserver/ShopSchema.scala | 46 ++ .../sql/sqlserver/SqlServerRunnableSpec.scala | 38 ++ 10 files changed, 660 insertions(+), 250 deletions(-) create mode 100644 sqlserver/src/test/resources/container-license-acceptance.txt create mode 100644 sqlserver/src/test/resources/shop_schema.sql create mode 100644 sqlserver/src/test/scala/zio/sql/TestContainer.scala create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/DeleteSpec.scala create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/ReadSpec.scala create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/ShopSchema.scala create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala diff --git a/README.md b/README.md index 9c80b3433..2c65b16f7 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Connection pool | :white_check_mark: Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------| :-------------| :------------- Render Read | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -Render Delete | :white_check_mark: | | | :white_check_mark: | +Render Delete | :white_check_mark: | :white_check_mark: | | :white_check_mark: | Render Update | :white_check_mark: | | | :white_check_mark: | Render Insert | | | | Functions | :white_check_mark: | | | :white_check_mark: | diff --git a/build.sbt b/build.sbt index 9c9ccb263..ea8765cb4 100644 --- a/build.sbt +++ b/build.sbt @@ -207,10 +207,12 @@ lazy val sqlserver = project .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "com.microsoft.sqlserver" % "mssql-jdbc" % "9.2.1.jre8", + "com.dimafeng" %% "testcontainers-scala-mssqlserver" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 680281e08..6558a70e7 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -1,277 +1,302 @@ package zio.sql.sqlserver +import scala.annotation.tailrec + import zio.sql.Jdbc trait SqlServerModule extends Jdbc { self => - override def renderDelete(delete: Delete[_]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 + override def renderDelete(delete: self.Delete[_]): String = { + implicit val builder: StringBuilder = new StringBuilder + + builder.append("delete from ") + buildTable(delete.table) + delete.whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" where ") + buildExpr(delete.whereExpr) + } + + builder.toString() + } + override def renderUpdate(update: self.Update[_]): String = ??? override def renderRead(read: self.Read[_]): String = { - val builder = new StringBuilder + implicit val builder: StringBuilder = new StringBuilder - def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) - case Expr.Unary(base, op) => - val _ = builder.append(" ").append(op.symbol) - buildExpr(base) - case Expr.Property(base, op) => - buildExpr(base) - val _ = builder.append(" ").append(op.symbol) - case Expr.Binary(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.Relational(left, right, op) => - buildExpr(left) - builder.append(" ").append(op.symbol).append(" ") - buildExpr(right) - case Expr.In(value, set) => - buildExpr(value) - buildReadString(set) - case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping - case Expr.AggregationCall(param, aggregation) => - builder.append(aggregation.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.ParenlessFunctionCall0(function) => - val _ = builder.append(function.name) - case Expr.FunctionCall0(function) => - builder.append(function.name.name) - builder.append("(") - val _ = builder.append(")") - case Expr.FunctionCall1(param, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param) - val _ = builder.append(")") - case Expr.FunctionCall2(param1, param2, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - val _ = builder.append(")") - case Expr.FunctionCall3(param1, param2, param3, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - val _ = builder.append(")") - case Expr.FunctionCall4(param1, param2, param3, param4, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - val _ = builder.append(")") - case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - builder.append(",") - buildExpr(param5) - val _ = builder.append(")") - case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - builder.append(",") - buildExpr(param5) - builder.append(",") - buildExpr(param6) - val _ = builder.append(")") - case Expr.FunctionCall7(param1, param2, param3, param4, param5, param6, param7, function) => - builder.append(function.name.name) - builder.append("(") - buildExpr(param1) - builder.append(",") - buildExpr(param2) - builder.append(",") - buildExpr(param3) - builder.append(",") - buildExpr(param4) - builder.append(",") - buildExpr(param5) - builder.append(",") - buildExpr(param6) - builder.append(",") - buildExpr(param7) - val _ = builder.append(")") - } + buildReadString(read) + builder.toString() + } - def buildReadString(read: self.Read[_]): Unit = - read match { - case Read.Mapped(read, _) => buildReadString(read) + private def buildExpr[A, B](expr: self.Expr[_, A, B])(implicit builder: StringBuilder): Unit = expr match { + case Expr.Source(tableName, column) => + val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Unary(base, op) => + val _ = builder.append(" ").append(op.symbol) + buildExpr(base) + // TODO remove when bit typetag will be added + case Expr.Property(base, op) if op == PropertyOp.IsNotTrue => + buildExpr(base) + val _ = builder.append(" ").append("= 0") + case Expr.Property(base, op) if op == PropertyOp.IsTrue => + buildExpr(base) + val _ = builder.append(" ").append("= 1") + case Expr.Property(base, op) => + buildExpr(base) + val _ = builder.append(" ").append(op.symbol) + case Expr.Binary(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.Relational(left, right, op) => + buildExpr(left) + builder.append(" ").append(op.symbol).append(" ") + buildExpr(right) + case Expr.In(value, set) => + buildExpr(value) + buildReadString(set) + case Expr.Literal(value) => + val _ = builder.append(value.toString) //todo fix escaping + case Expr.AggregationCall(param, aggregation) => + builder.append(aggregation.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.ParenlessFunctionCall0(function) => + val _ = builder.append(function.name) + case Expr.FunctionCall0(function) => + builder.append(function.name.name) + builder.append("(") + val _ = builder.append(")") + case Expr.FunctionCall1(param, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param) + val _ = builder.append(")") + case Expr.FunctionCall2(param1, param2, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + val _ = builder.append(")") + case Expr.FunctionCall3(param1, param2, param3, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + val _ = builder.append(")") + case Expr.FunctionCall4(param1, param2, param3, param4, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + val _ = builder.append(")") + case Expr.FunctionCall5(param1, param2, param3, param4, param5, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + val _ = builder.append(")") + case Expr.FunctionCall6(param1, param2, param3, param4, param5, param6, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + builder.append(",") + buildExpr(param6) + val _ = builder.append(")") + case Expr.FunctionCall7(param1, param2, param3, param4, param5, param6, param7, function) => + builder.append(function.name.name) + builder.append("(") + buildExpr(param1) + builder.append(",") + buildExpr(param2) + builder.append(",") + buildExpr(param3) + builder.append(",") + buildExpr(param4) + builder.append(",") + buildExpr(param5) + builder.append(",") + buildExpr(param6) + builder.append(",") + buildExpr(param7) + val _ = builder.append(")") + } - //todo offset (needs orderBy, must use fetch _instead_ of top) - case read0 @ Read.Select(_, _, _, _, _, _, _, _) => - object Dummy { - type F - type A - type B <: SelectionSet[A] - } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] - import read._ + def buildReadString(read: self.Read[_])(implicit builder: StringBuilder): Unit = read match { + case Read.Mapped(read, _) => buildReadString(read) - builder.append("select ") - limit match { - case Some(limit) => - builder.append("top ").append(limit).append(" ") - case None => () - } - buildSelection(selection.value) - table.foreach { t => - builder.append(" from ") - buildTable(t) - } - whereExpr match { + //todo offset (needs orderBy, must use fetch _instead_ of top) + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + object Dummy { + type F + type A + type B <: SelectionSet[A] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + import read._ + + builder.append("select ") + limit match { + case Some(limit) => + builder.append("top ").append(limit).append(" ") + case None => () + } + buildSelection(selection.value) + table.foreach { t => + builder.append(" from ") + buildTable(t) + } + whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" where ") + buildExpr(whereExpr) + } + groupBy match { + case _ :: _ => + builder.append(" group by ") + buildExprList(groupBy) + + havingExpr match { case Expr.Literal(true) => () case _ => - builder.append(" where ") - buildExpr(whereExpr) + builder.append(" having ") + buildExpr(havingExpr) } - groupBy match { - case _ :: _ => - builder.append(" group by ") - buildExprList(groupBy) + case Nil => () + } + orderBy match { + case _ :: _ => + builder.append(" order by ") + buildOrderingList(orderBy) + case Nil => () + } - havingExpr match { - case Expr.Literal(true) => () - case _ => - builder.append(" having ") - buildExpr(havingExpr) - } - case Nil => () - } - orderBy match { - case _ :: _ => - builder.append(" order by ") - buildOrderingList(orderBy) - case Nil => () - } + case Read.Union(left, right, distinct) => + buildReadString(left) + builder.append(" union ") + if (!distinct) builder.append("all ") + buildReadString(right) - case Read.Union(left, right, distinct) => - buildReadString(left) - builder.append(" union ") - if (!distinct) builder.append("all ") - buildReadString(right) + case Read.Literal(values) => + val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + } - case Read.Literal(values) => - val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + @tailrec + private def buildExprList(expr: List[Expr[_, _, _]])(implicit builder: StringBuilder): Unit = expr match { + case head :: tail => + buildExpr(head) + tail match { + case _ :: _ => + builder.append(", ") + buildExprList(tail) + case Nil => () } + case Nil => () + } - def buildExprList(expr: List[Expr[_, _, _]]): Unit = - expr match { - case head :: tail => - buildExpr(head) - tail match { - case _ :: _ => - builder.append(", ") - buildExprList(tail) - case Nil => () - } - case Nil => () + @tailrec + private def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit builder: StringBuilder): Unit = expr match { + case head :: tail => + head match { + case Ordering.Asc(value) => buildExpr(value) + case Ordering.Desc(value) => + buildExpr(value) + builder.append(" desc") } - def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = - expr match { - case head :: tail => - head match { - case Ordering.Asc(value) => buildExpr(value) - case Ordering.Desc(value) => - buildExpr(value) - builder.append(" desc") - } - tail match { - case _ :: _ => - builder.append(", ") - buildOrderingList(tail) - case Nil => () - } - case Nil => () + tail match { + case _ :: _ => + builder.append(", ") + buildOrderingList(tail) + case Nil => () } + case Nil => () + } - def buildSelection(selectionSet: SelectionSet[_]): Unit = - selectionSet match { - case cons0 @ SelectionSet.Cons(_, _) => - object Dummy { - type Source - type A - type B <: SelectionSet[Source] - } - val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] - import cons._ - buildColumnSelection(head) - if (tail != SelectionSet.Empty) { - builder.append(", ") - buildSelection(tail) - } - case SelectionSet.Empty => () + @tailrec + private def buildSelection(selectionSet: SelectionSet[_])(implicit builder: StringBuilder): Unit = selectionSet match { + case cons0 @ SelectionSet.Cons(_, _) => + object Dummy { + type Source + type A + type B <: SelectionSet[Source] + } + val cons = cons0.asInstanceOf[SelectionSet.Cons[Dummy.Source, Dummy.A, Dummy.B]] + import cons._ + buildColumnSelection(head) + if (tail != SelectionSet.Empty) { + builder.append(", ") + buildSelection(tail) } + case SelectionSet.Empty => () + } - def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = - columnSelection match { - case ColumnSelection.Constant(value, name) => - builder.append(value.toString()) //todo fix escaping - name match { - case Some(name) => + private def buildColumnSelection[A, B]( + columnSelection: ColumnSelection[A, B] + )(implicit builder: StringBuilder): Unit = columnSelection match { + case ColumnSelection.Constant(value, name) => + builder.append(value.toString) //todo fix escaping + name match { + case Some(name) => + val _ = builder.append(" as ").append(name) + case None => () + } + case ColumnSelection.Computed(expr, name) => + buildExpr(expr) + name match { + case Some(name) => + Expr.exprName(expr) match { + case Some(sourceName) if name != sourceName => val _ = builder.append(" as ").append(name) - case None => () - } - case ColumnSelection.Computed(expr, name) => - buildExpr(expr) - name match { - case Some(name) => - Expr.exprName(expr) match { - case Some(sourceName) if name != sourceName => - val _ = builder.append(" as ").append(name) - case _ => () - } - case _ => () //todo what do we do if we don't have a name? + case _ => () } + case _ => () //todo what do we do if we don't have a name? } - def buildTable(table: Table): Unit = - table match { - //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => - val _ = builder.append(sourceTable.name) - case Table.Joined(joinType, left, right, on) => - buildTable(left) - builder.append(joinType match { - case JoinType.Inner => " inner join " - case JoinType.LeftOuter => " left join " - case JoinType.RightOuter => " right join " - case JoinType.FullOuter => " outer join " - }) - buildTable(right) - builder.append(" on ") - buildExpr(on) - val _ = builder.append(" ") - } - buildReadString(read) - builder.toString() + } + + private def buildTable(table: Table)(implicit builder: StringBuilder): Unit = table match { + //The outer reference in this type test cannot be checked at run time?! + case sourceTable: self.Table.Source => + val _ = builder.append(sourceTable.name) + case Table.Joined(joinType, left, right, on) => + buildTable(left) + builder.append(joinType match { + case JoinType.Inner => " inner join " + case JoinType.LeftOuter => " left join " + case JoinType.RightOuter => " right join " + case JoinType.FullOuter => " outer join " + }) + buildTable(right) + builder.append(" on ") + buildExpr(on) + val _ = builder.append(" ") } } diff --git a/sqlserver/src/test/resources/container-license-acceptance.txt b/sqlserver/src/test/resources/container-license-acceptance.txt new file mode 100644 index 000000000..3b2af1bcb --- /dev/null +++ b/sqlserver/src/test/resources/container-license-acceptance.txt @@ -0,0 +1 @@ +mcr.microsoft.com/azure-sql-edge:latest diff --git a/sqlserver/src/test/resources/shop_schema.sql b/sqlserver/src/test/resources/shop_schema.sql new file mode 100644 index 000000000..9b567223d --- /dev/null +++ b/sqlserver/src/test/resources/shop_schema.sql @@ -0,0 +1,193 @@ +create table customers +( + id uniqueidentifier not null primary key, + first_name varchar(32) not null, + last_name varchar(32) not null, + verified bit not null, + dob date not null, + created_timestamp_string varchar(32) not null, + created_timestamp datetime default CURRENT_TIMESTAMP +); + +create table orders +( + id uniqueidentifier not null primary key, + customer_id uniqueidentifier not null, + order_date date not null +); + +create table products +( + id uniqueidentifier not null primary key, + name varchar(32), + description varchar(128) not null, + image_url varchar(256) +); + +create table product_prices +( + product_id uniqueidentifier not null, + effective date not null, + price money not null +); + +create table order_details +( + order_id uniqueidentifier not null, + product_id uniqueidentifier not null, + quantity integer not null, + unit_price money not null +); + +insert into customers + (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) +values + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 1, '1983-01-05', '2020-11-21T19:10:25', '2020-11-21 19:10:25'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', 1, '1999-11-02', '2020-11-21T15:10:25', '2020-11-21 15:10:25'), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', 1, '1990-11-16', '2020-11-22T02:10:25', '2020-11-22 02:10:25'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', 1, '1995-11-12', '2020-11-21T12:10:25', '2020-11-21 12:10:25'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', 0, '1987-03-23', '2020-11-21T19:10:25', '2020-11-21 19:10:25'); + +insert into products + (id, name, description, image_url) +values + ('7368ABF4-AED2-421F-B426-1725DE756895', 'Thermometer', 'Make sure you don''t have a fever (could be covid!)', 'https://images.pexels.com/photos/3987152/pexels-photo-3987152.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('4C770002-4C8F-455A-96FF-36A8186D5290', 'Slippers', 'Keep your feet warm this winter', 'https://images.pexels.com/photos/1989843/pexels-photo-1989843.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('05182725-F5C8-4FD6-9C43-6671E179BF55', 'Mouse Pad', 'Who uses these anyway?', 'https://images.pexels.com/photos/3944396/pexels-photo-3944396.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', 'Pants', 'Avoid a lawsuit, wear pants to work today!', 'https://images.pexels.com/photos/52518/jeans-pants-blue-shop-52518.jpeg?cs=srgb&dl=blue-jeans-clothes-shopping-52518.jpg&fm=jpg'), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', 'Nail File', 'Keep those nails looking good', 'https://images.pexels.com/photos/3997373/pexels-photo-3997373.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('D5137D3A-894A-4109-9986-E982541B434F', 'Teddy Bear', 'Because sometimes you just need something to hug', 'https://images.pexels.com/photos/1019471/stuffed-bear-teddy-child-girl-1019471.jpeg?cs=srgb&dl=closeup-photography-of-brown-teddy-bear-1019471.jpg&fm=jpg'); + +insert into product_prices + (product_id, effective, price) +values + ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), + ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), + ('7368ABF4-AED2-421F-B426-1725DE756895', '2020-01-01', 12.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2018-01-01', 20.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2019-01-01', 22.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2020-01-01', 22.00), + ('05182725-F5C8-4FD6-9C43-6671E179BF55', '2018-01-01', 2.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2018-01-01', 70.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2019-01-01', 74.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2020-01-01', 80.00), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2018-01-01', 5.00), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2019-01-01', 6.00), + ('D5137D3A-894A-4109-9986-E982541B434F', '2018-01-01', 50.00), + ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00); + +insert into orders + (id, customer_id, order_date) +values + ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-03-25'), + ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-06-04'), + ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-08-19'), + ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-08-30'), + ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-03-07'), + ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', '2020-03-19'), + ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2020-05-11'), + ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-02-21'), + ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-05-06'), + ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-02-11'), + ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-10-12'), + ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-01-29'), + ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-02-10'), + ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-09-27'), + ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2018-11-13'), + ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2020-01-15'), + ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2018-07-10'), + ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-08-01'), + ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-12-08'), + ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-11-04'), + ('2c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2018-10-14'), + ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05'), + ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23'), + ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14'), + ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); + +insert into order_details + (order_id, product_id, quantity, unit_price) +values + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.90), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 9.09), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 11.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 10.00), + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 11.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 12.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 12.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', '4C770002-4C8F-455A-96FF-36A8186D5290', 5, 18.18), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 18.18), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 20.00), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 2.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '05182725-F5C8-4FD6-9C43-6671E179BF55', 3, 2.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 4, 74.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 72.72), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 80.00), + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 67.27), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 67.27), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 80.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 5, 74.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 70.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 80.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 6, 74.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 4, 4.54), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 6.00), + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('401C7AB1-41CF-4756-8AF5-BE25CF2AE67B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 5.45), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 5, 6.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', 'D5137D3A-894A-4109-9986-E982541B434F', 4, 50.00), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 55.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/TestContainer.scala new file mode 100644 index 000000000..3ed8fd9f0 --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/TestContainer.scala @@ -0,0 +1,34 @@ +package zio.sql + +import org.testcontainers.utility.DockerImageName +import com.dimafeng.testcontainers.{MSSQLServerContainer, SingleContainer} +import zio.{Has, Tag, ZLayer, ZManaged} +import zio.blocking.{Blocking, effectBlocking} + +object TestContainer { + def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = + ZManaged.make { + effectBlocking { + c.start() + c + } + }(container => effectBlocking(container.stop()).orDie).toLayer + + def mssql(imageName: String = "mcr.microsoft.com/azure-sql-edge:latest"): ZLayer[Blocking, Throwable, Has[MSSQLServerContainer]] = + ZManaged.make { + effectBlocking { + val c = new MSSQLServerContainer( + dockerImageName = DockerImageName.parse(imageName) + .asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") + ).configure { a => + a.withInitScript("shop_schema.sql") + () + } + + c.start() + c + } + } { container => + effectBlocking(container.stop()).orDie + }.toLayer +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DeleteSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DeleteSpec.scala new file mode 100644 index 000000000..1049f4b4c --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DeleteSpec.scala @@ -0,0 +1,24 @@ +package zio.sql.sqlserver + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +object DeleteSpec extends SqlServerRunnableSpec with ShopSchema { + + import Customers._ + + override def specLayered = suite("SqlServer module delete")( + testM("Can delete from single table with a condition") { + val query = deleteFrom(customers).where(verified.isNotTrue) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(1)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/ReadSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/ReadSpec.scala new file mode 100644 index 000000000..82658e84a --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/ReadSpec.scala @@ -0,0 +1,47 @@ +package zio.sql.sqlserver +import zio.Cause +import zio.test.Assertion.equalTo +import zio.test.assert + +object ReadSpec extends SqlServerRunnableSpec with ShopSchema { + + import Customers._ + + override def specLayered = suite("SqlServer module read")( + suite("Can handle bit type properly")( + testM("handle isTrue to 1 bit type"){ + + import AggregationDef._ + + val query = + select(Count(customerId)) + .from(customers) + .where(verified.isTrue) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r._1)(equalTo(4L)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)).runHead.map(_.get) + }, + testM("handle isNotTrue to 0 bit type"){ + import AggregationDef._ + + val query = + select(Count(customerId)) + .from(customers) + .where(verified.isNotTrue) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r._1)(equalTo(1L)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)).runHead.map(_.get) + } + ) + ) +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/ShopSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/ShopSchema.scala new file mode 100644 index 000000000..d277e98df --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/ShopSchema.scala @@ -0,0 +1,46 @@ +package zio.sql.sqlserver + +import zio.sql.Jdbc + +trait ShopSchema extends Jdbc { self => + import self.ColumnSet._ + + object Customers { + //https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string + val customers = + (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( + "verified" + ) ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) + .table("customers") + + val customerId :*: dob :*: fName :*: lName :*: verified :*: createdString :*: createdTimestamp :*: _ = + customers.columns + } + object Orders { + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + } + object Products { + val products = + (uuid("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") + + val productId :*: description :*: imageURL :*: _ = products.columns + } + object ProductPrices { + val productPrices = + (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + + val fkProductId :*: effective :*: price :*: _ = productPrices.columns + } + + object OrderDetails { + val orderDetails = + (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")) + .table( + "order_details" + ) + + val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + } +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala new file mode 100644 index 000000000..f42a8a41c --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -0,0 +1,38 @@ +package zio.sql.sqlserver + +import java.util.Properties + +import zio.Has +import zio.sql.{ConnectionPoolConfig, JdbcRunnableSpec, TestContainer} +import zio.test._ +import zio.test.environment.TestEnvironment + +trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { + + def autoCommit: Boolean = true + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + val poolConfigLayer = TestContainer + .mssql() + .map(a => + Has( + ConnectionPoolConfig( + url = a.get.jdbcUrl, + properties = connProperties(a.get.username, a.get.password), + autoCommit = autoCommit + ) + ) + ) + + override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + specLayered.provideCustomLayerShared(jdbcLayer) + + def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + +} From 3c979aa2f961bedfdd4092347f7da65278b002dd Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 9 Jul 2021 00:44:53 +0200 Subject: [PATCH 271/673] Update sbt-scalafmt to 2.4.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 212612dd6..ed2e045d8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") From 937cf4c7583f5b611c81f573054574ca05384353 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 9 Jul 2021 15:02:48 +0200 Subject: [PATCH 272/673] #475 still WIP, just little cleanups --- core/jvm/src/main/scala/zio/sql/select.scala | 1 - .../zio/sql/sqlserver/SqlServerModule.scala | 134 ++++++++++++------ 2 files changed, 90 insertions(+), 45 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 61912bec7..6d6864087 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -5,7 +5,6 @@ import scala.language.implicitConversions trait SelectModule { self: ExprModule with TableModule => sealed case class SelectBuilder[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]) { - // [F, Repr, A, B <: SelectionSet.Aux[Repr, A]] def from[A1 <: A](table: Table.Aux[A1]): Read.Select[F, selection.value.ResultTypeRepr, A1] = { type B0 = SelectionSet.Aux[selection.value.ResultTypeRepr, A] val b: B0 = selection.value diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 654ffc13f..012c16446 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -11,64 +11,110 @@ trait SqlServerModule extends Jdbc { self => override type TableExtension[+A] = SqlServerSpecific.SqlServerTable[A] object SqlServerSpecific { - import SqlServerTable._ - sealed trait SqlServerTable[+A] extends Table.TableEx + sealed trait SqlServerTable[+A] extends Table.TableEx object SqlServerTable { - sealed case class SelectedTable[F1, F2, Cols, A, B](crossType: CrossType, left: Table.Aux[A], select: Read.Select[F1, Cols, B], expr: Expr[_, A with B, Boolean]) extends SqlServerTable[A with B] { self => + sealed case class SelectedTable[F1, F2, ColumnsRepr[_], Cols, A, B]( + crossType: CrossType, + left: Table.Source.Aux[ColumnsRepr, A, Cols], + //tableValuedFuctnion : TableValuedFunction ??? + select: Read.Select[F1, Cols, B], + expr: Expr[_, A with B, Boolean] + ) extends SqlServerTable[A with B] { self => - def where(whereExpr: Expr[F1 :||: F2, A with B, Boolean]) : SelectedTable[F1, F2, Cols, A, B] = self.copy(expr = whereExpr) + // def where(whereExpr: Expr[F1 :||: F2, A with B, Boolean]): SelectedTable[F1, F2, ColumnsRepr, Cols, A, B] = + // self.copy(expr = whereExpr) def columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ select.table.get.columnsUntyped } - implicit def tableSourceToSelectedBuilder[ColumnsRepr[_], Cols](table: Table.Source.Aux_[ColumnsRepr, Cols]) : SelectedTableBuilder[ColumnsRepr, Cols] = + implicit def tableSourceToSelectedBuilder[ColumnsRepr[_], A, Cols]( + table: Table.Source.Aux[ColumnsRepr, A, Cols] + ): SelectedTableBuilder[ColumnsRepr, A, Cols] = new SelectedTableBuilder(table) - sealed case class SelectedTableBuilder[ColumnsRepr[_], Cols](table: Table.Source.Aux_[ColumnsRepr, Cols]) { self => + sealed case class SelectedTableBuilder[ColumnsRepr[_], A, Cols](table: Table.Source.Aux[ColumnsRepr, A, Cols]) { + self => + + /** + * Instead of Read.Select we need to accept some 'TableValuedFunction' which would: + * (or we could accept Select and turn it into TableValuedFunction - but we need to make sure only sensible things compile) + * - contain selection, table and optionally where clause + * - create new Table of type B created out of columns in select.selection + * - where clause need to access Table.Aux[A] and origin select.Table to create Expr. + */ + final def crossApply[F1, F2, SelectionCols, SelectTableType]( + select: Read.Select[F1, SelectionCols, SelectTableType] + ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = { + + select.selection.value.selectionsUntyped.map(_.asInstanceOf[ColumnSelection[_, _]]).map { + case t @ ColumnSelection.Constant(value, _) => t.typeTag + case t @ ColumnSelection.Computed(expr, _) => expr + } + + val b: SelectionSet.Aux[select.selection.value.ResultTypeRepr, SelectTableType] = select.selection.value + + val z = b.selections + + val _ = b + val _ = z + + select.table.get.columnsUntyped match { + case head :: next => + val columnName = head.name + val typeTag = head.typeTag + val _ = columnName + val _ = typeTag + ??? + case Nil => ??? + } - final def crossApply[F1, F2, Cols, SelectTableType](select: Read.Select[F1, Cols, SelectTableType]): SelectedTable[F1, F2, Cols, table.TableType, SelectTableType] = - SelectedTable(CrossType.CrossApply, table, select, Expr.literal(false)) + ??? + } - final def outerApply[F1, F2, Cols, SelectTableType](select: Read.Select[F1, Cols, SelectTableType]): SelectedTable[F1, F2, Cols, table.TableType, SelectTableType] = - SelectedTable(CrossType.OuterApply, table, select, Expr.literal(false)) + final def outerApply[F1, F2, SelectTableType]( + select: Read.Select[F1, Cols, SelectTableType] + ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = + SelectedTable[F1, F2, ColumnsRepr, Cols, A, SelectTableType]( + CrossType.OuterApply, + table, + select, + Expr.literal(false) + ) } } - val crossApplyExample = select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(customerId === fkCustomerId).toTable) - - sealed trait CrossType + sealed trait CrossType object CrossType { case object CrossApply extends CrossType case object OuterApply extends CrossType } - val customers = - (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) - .table("customers") - - val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = - customers.columns - - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - - //JOIN - val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) - // SELECT customers.first_name, customers.last_name, orders.order_date - // FROM customers - // INNER JOIN orders - // ON orders.customer_id = customers.id - - // SELECT customers.first_name, customers.last_name, orders.order_date FROM customers - // CROSS APPLY - // ( - // SELECT order_date from orders - // WHERE orders.customer_id = customers.id - // ) + object QueriesExamples { + + val customers = + (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) + .table("customers") + + val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = + customers.columns + + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + + //JOIN example + val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) + + // Cross Apply example + // import SqlServerTable._ + // val crossApplyExample = select(fName ++ lName ++ orderDate ++ fkCustomerId).from(customers.crossApply(select(orderDate).from(orders).where(customerId === fkCustomerId))) + + + val q = select(orderDate).from(orders).where(fkCustomerId === "") + } } override def renderDelete(delete: Delete[_]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 @@ -324,18 +370,19 @@ trait SqlServerModule extends Jdbc { self => def buildTable(table: Table): Unit = table match { //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => + case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.DialectSpecificTable(table) => table match { - case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => { - buildTable(left) + case Table.DialectSpecificTable(table) => + table match { + case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => + buildTable(left) crossType match { case SqlServerSpecific.CrossType.CrossApply => builder.append(" CROSS APPLY ( ") case SqlServerSpecific.CrossType.OuterApply => builder.append(" OUTER APPLY ( ") } - + builder.append("SELECT ") buildSelection(select.selection.value) builder.append(" FROM ") @@ -345,9 +392,8 @@ trait SqlServerModule extends Jdbc { self => builder.append(" ) ") val _ = buildTable(select.table.get) + } - - } case Table.Joined(joinType, left, right, on) => buildTable(left) From a56e44437d379b4077834c1f0ec529d409624609 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 12 Jul 2021 15:42:19 +0200 Subject: [PATCH 273/673] Update sbt to 1.5.5 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 9edb75b77..10fd9eee0 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.4 +sbt.version=1.5.5 From 068b082da3f3b922391bb8f333a98c48bb8fc9fc Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Jul 2021 00:41:18 +0200 Subject: [PATCH 274/673] Update mysql-connector-java to 8.0.26 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5b476ed1d..a675f963d 100644 --- a/build.sbt +++ b/build.sbt @@ -157,7 +157,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.25" % Test, + "mysql" % "mysql-connector-java" % "8.0.26" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) From 77e12c63596469eb150a225c0aa1d8cea5b0ca77 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Jul 2021 21:50:37 +0200 Subject: [PATCH 275/673] Update database-commons, jdbc, mssqlserver, ... to 1.16.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5b476ed1d..ec51e9e0a 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "1.0.7" -val testcontainersVersion = "1.15.3" +val testcontainersVersion = "1.16.0" val testcontainersScalaVersion = "0.39.5" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 2010049c93c9aa63a49505bc4a75d6c0a0d09e8e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 22 Jul 2021 15:21:26 +0200 Subject: [PATCH 276/673] Update mdoc, sbt-mdoc to 2.2.22 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 212612dd6..d6e680de9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") From a738798670c283d8d6a01969ee3c19769b0b03b4 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 25 Jul 2021 17:24:34 +0200 Subject: [PATCH 277/673] Make ZIO a Provided dependency --- build.sbt | 32 ++++++++++++++++++++++---------- project/BuildHelper.scala | 21 --------------------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/build.sbt b/build.sbt index 5b476ed1d..3ccc75074 100644 --- a/build.sbt +++ b/build.sbt @@ -78,10 +78,10 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .settings(buildInfoSettings("zio.sql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -111,7 +111,11 @@ lazy val examples = project .settings(stdSettings("examples")) .settings( publish / skip := true, - moduleName := "examples" + moduleName := "examples", + libraryDependencies ++= Seq( + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided + ) ) .settings(dottySettings) .dependsOn(sqlserver) @@ -122,9 +126,9 @@ lazy val driver = project .settings(buildInfoSettings("zio.sql.driver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-test" % zioVersion % "test", - "dev.zio" %% "zio-test-sbt" % zioVersion % "test" + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -136,8 +140,8 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) @@ -153,6 +157,8 @@ lazy val mysql = project .settings(buildInfoSettings("zio.sql.mysql")) .settings( libraryDependencies ++= Seq( + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, @@ -171,6 +177,8 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, @@ -189,6 +197,8 @@ lazy val postgres = project .settings(buildInfoSettings("zio.sql.postgres")) .settings( libraryDependencies ++= Seq( + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, @@ -207,6 +217,8 @@ lazy val sqlserver = project .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 74ecfa4be..f85e8ca12 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -128,15 +128,6 @@ object BuildHelper { } ) - val scalaReflectSettings = Seq( - libraryDependencies ++= - (if (scalaVersion.value == ScalaDotty) Seq() - else - Seq( - "dev.zio" %%% "izumi-reflect" % "1.1.0" - )) - ) - lazy val crossProjectSettings = Seq( Compile / unmanagedSourceDirectories ++= { val platform = crossProjectPlatform.value.identifier @@ -193,18 +184,6 @@ object BuildHelper { } ) - def macroDefinitionSettings = Seq( - scalacOptions += "-language:experimental.macros", - libraryDependencies ++= { - if (scalaVersion.value == ScalaDotty) Seq() - else - Seq( - "org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided", - "org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided" - ) - } - ) - implicit class ModuleHelper(p: Project) { def module: Project = p.in(file(p.id)).settings(stdSettings(p.id)) } From 75a269b34db604bda8b93711d7b11846c8424e77 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 30 Jul 2021 09:54:22 +0200 Subject: [PATCH 278/673] added more tables to sql server db test schema --- .../zio/sql/sqlserver/SqlServerModule.scala | 18 --- sqlserver/src/test/resources/db_schema.sql | 141 +++++++++++++++++- 2 files changed, 140 insertions(+), 19 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 012c16446..31faf4f43 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -53,24 +53,6 @@ trait SqlServerModule extends Jdbc { self => case t @ ColumnSelection.Constant(value, _) => t.typeTag case t @ ColumnSelection.Computed(expr, _) => expr } - - val b: SelectionSet.Aux[select.selection.value.ResultTypeRepr, SelectTableType] = select.selection.value - - val z = b.selections - - val _ = b - val _ = z - - select.table.get.columnsUntyped match { - case head :: next => - val columnName = head.name - val typeTag = head.typeTag - val _ = columnName - val _ = typeTag - ??? - case Nil => ??? - } - ??? } diff --git a/sqlserver/src/test/resources/db_schema.sql b/sqlserver/src/test/resources/db_schema.sql index 0ca11b619..676a107c5 100644 --- a/sqlserver/src/test/resources/db_schema.sql +++ b/sqlserver/src/test/resources/db_schema.sql @@ -14,6 +14,30 @@ create table orders order_date date not null ); +create table products +( + id varchar(36) not null primary key, + name varchar(255), + description varchar(255) not null, + image_url varchar(255) +); + +create table product_prices +( + product_id varchar(36) not null, + effective date not null, + price money not null +); + +create table order_details +( + order_id varchar(36) not null, + product_id varchar(36) not null, + quantity int not null, + unit_price money not null +); + + insert into customers (id, first_name, last_name, verified, dob) values @@ -50,4 +74,119 @@ values ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05'), ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23'), ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14'), - ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); \ No newline at end of file + ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); + +insert into products + (id, name, description, image_url) +values + ('7368ABF4-AED2-421F-B426-1725DE756895', 'Thermometer', 'Make sure you don''t have a fever (could be covid!)', 'https://images.pexels.com/photos/3987152/pexels-photo-3987152.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('4C770002-4C8F-455A-96FF-36A8186D5290', 'Slippers', 'Keep your feet warm this winter', 'https://images.pexels.com/photos/1989843/pexels-photo-1989843.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('05182725-F5C8-4FD6-9C43-6671E179BF55', 'Mouse Pad', 'Who uses these anyway?', 'https://images.pexels.com/photos/3944396/pexels-photo-3944396.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', 'Pants', 'Avoid a lawsuit, wear pants to work today!', 'https://images.pexels.com/photos/52518/jeans-pants-blue-shop-52518.jpeg?cs=srgb&dl=blue-jeans-clothes-shopping-52518.jpg&fm=jpg'), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', 'Nail File', 'Keep those nails looking good', 'https://images.pexels.com/photos/3997373/pexels-photo-3997373.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), + ('D5137D3A-894A-4109-9986-E982541B434F', 'Teddy Bear', 'Because sometimes you just need something to hug', 'https://images.pexels.com/photos/1019471/stuffed-bear-teddy-child-girl-1019471.jpeg?cs=srgb&dl=closeup-photography-of-brown-teddy-bear-1019471.jpg&fm=jpg'); + +insert into product_prices + (product_id, effective, price) +values + ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), + ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), + ('7368ABF4-AED2-421F-B426-1725DE756895', '2020-01-01', 12.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2018-01-01', 20.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2019-01-01', 22.00), + ('4C770002-4C8F-455A-96FF-36A8186D5290', '2020-01-01', 22.00), + ('05182725-F5C8-4FD6-9C43-6671E179BF55', '2018-01-01', 2.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2018-01-01', 70.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2019-01-01', 74.00), + ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2020-01-01', 80.00), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2018-01-01', 5.00), + ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2019-01-01', 6.00), + ('D5137D3A-894A-4109-9986-E982541B434F', '2018-01-01', 50.00), + ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00); + +insert into order_details + (order_id, product_id, quantity, unit_price) +values + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.90), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 9.09), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 11.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 10.00), + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 11.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 12.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 12.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', '4C770002-4C8F-455A-96FF-36A8186D5290', 5, 18.18), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 18.18), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 20.00), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), + ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 2.00), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '05182725-F5C8-4FD6-9C43-6671E179BF55', 3, 2.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 4, 74.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 72.72), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 80.00), + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 67.27), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 67.27), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), + ('618AA21F-700B-4CA7-933C-67066CF4CD97', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), + ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 80.00), + ('876B6034-B33C-4497-81EE-B4E8742164C2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 5, 74.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 70.00), + ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 80.00), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 6, 74.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), + ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 4, 4.54), + ('9022DD0D-06D6-4A43-9121-2993FC7712A1', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('38D66D44-3CFA-488A-AC77-30277751418F', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('7B2627D5-0150-44DF-9171-3462E20797EE', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 6.00), + ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('742D45A0-E81A-41CE-95AD-55B4CABBA258', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('606DA090-DD33-4A77-8746-6ED0E8443AB2', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.00), + ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('401C7AB1-41CF-4756-8AF5-BE25CF2AE67B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 5.45), + ('5011D206-8EFF-42C4-868E-F1A625E1F186', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), + ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 5, 6.00), + ('A243FA42-817A-44EC-8B67-22193D212D82', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), + ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', 'D5137D3A-894A-4109-9986-E982541B434F', 4, 50.00), + ('9473A0BC-396A-4936-96B0-3EEA922AF36B', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 55.00), + ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), + ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), + ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), + ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); From 11c8a6c7e7d4d6126e028f99fe4a88b5a881db82 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 30 Jul 2021 13:20:31 +0200 Subject: [PATCH 279/673] bunch of todos --- core/jvm/src/main/scala/zio/sql/newtypes.scala | 6 +++++- core/jvm/src/main/scala/zio/sql/select.scala | 16 ++++++++++++++++ core/jvm/src/main/scala/zio/sql/table.scala | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/newtypes.scala b/core/jvm/src/main/scala/zio/sql/newtypes.scala index dcfcb4c5e..61d5ebbc8 100644 --- a/core/jvm/src/main/scala/zio/sql/newtypes.scala +++ b/core/jvm/src/main/scala/zio/sql/newtypes.scala @@ -3,7 +3,11 @@ package zio.sql trait NewtypesModule { type ColumnName = String - type TableName = String + sealed trait TableName + object TableName { + final case class Source(name: String) extends TableName + case object Derived extends TableName + } sealed case class FunctionName(name: String) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 6d6864087..7fb3b5e36 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -30,6 +30,11 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: ResultType => Out + type Repr[TableType] + type TableType + + val columns: Repr[_ <: TableType] + /** * Maps the [[Read]] query's output to another type by providing a function * that can transform from the current type to the new type. @@ -270,11 +275,18 @@ trait SelectModule { self: ExprModule with TableModule => } } + //TODO change type Read.Repr to ColumnsRepr sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { type ResultType = Repr val mapper: ResultType => Out = left.mapper + + //TODO left has type Expr[T1, String], right has Expr[T2, String], Repr is Expr[T1 with T2, String] + type Repr[TableType] = left.Repr[left.TableType with right.TableType] + + //TODO turn the name columns into indexed columns so they can apply to either left hand or right hand side + val columns: Repr[left.TableType with right.TableType] = left.columns.asInstanceOf } sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { @@ -283,6 +295,10 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: ResultType => (B, Unit) = identity(_) def typeTag: TypeTag[B] = implicitly[TypeTag[B]] + + type Repr[TableType] = (Expr[Features.Source, TableType, B], Unit) + + val columns: Repr[TableType] = (Expr.Source(TableName.Derived, Column[B]("1")), ()) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index cda823419..9eec16d02 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -84,6 +84,8 @@ trait TableModule { self: ExprModule with SelectModule => def unapply[A, B](tuple: (A, B)): Some[(A, B)] = Some(tuple) } + // turn column into seald trait + // with "named" and "indexed" subtypes sealed case class Column[A: TypeTag](name: String) { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } From efe159ceb66669d2ec96f56c11cc13069559fed2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 4 Aug 2021 01:39:36 +0200 Subject: [PATCH 280/673] Update sbt-scalajs, scalajs-compiler, ... to 1.7.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 2bc4ccce5..d7c01f543 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") From fa653475f28bc74043b4c997ac18904a336d46f6 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 9 Aug 2021 09:49:05 +0200 Subject: [PATCH 281/673] resolved todos made code compile --- core/jvm/src/main/scala/zio/sql/expr.scala | 3 +- .../jvm/src/main/scala/zio/sql/newtypes.scala | 7 ++-- core/jvm/src/main/scala/zio/sql/select.scala | 36 +++++++++++++------ core/jvm/src/main/scala/zio/sql/table.scala | 14 +++++--- .../scala/zio/sql/JdbcInternalModule.scala | 2 +- .../scala/zio/sql/mysql/MysqlModule.scala | 7 +++- .../scala/zio/sql/oracle/OracleModule.scala | 9 +++-- .../zio/sql/postgresql/PostgresModule.scala | 8 ++++- .../zio/sql/sqlserver/SqlServerModule.scala | 18 ++++++++-- 9 files changed, 78 insertions(+), 26 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index c429ec0a5..f84b5d1e6 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -118,7 +118,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { - case Expr.Source(_, c) => Some(c.name) + //TODO what to do with indexed column??? + case Expr.Source(_, c @ Column.Named(name)) => Some(name) case _ => None } diff --git a/core/jvm/src/main/scala/zio/sql/newtypes.scala b/core/jvm/src/main/scala/zio/sql/newtypes.scala index 61d5ebbc8..4cbe2777b 100644 --- a/core/jvm/src/main/scala/zio/sql/newtypes.scala +++ b/core/jvm/src/main/scala/zio/sql/newtypes.scala @@ -1,14 +1,17 @@ package zio.sql +import scala.language.implicitConversions + trait NewtypesModule { type ColumnName = String sealed trait TableName object TableName { - final case class Source(name: String) extends TableName + sealed case class Source(name: String) extends TableName case object Derived extends TableName + + implicit def strToTable(tableName: String) : TableName = TableName.Source(tableName) } sealed case class FunctionName(name: String) - } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 7fb3b5e36..5259fbe9d 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -30,10 +30,10 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: ResultType => Out - type Repr[TableType] + type ColumnsRepr[TableType] type TableType - val columns: Repr[_ <: TableType] + val columns: ColumnsRepr[_ <: TableType] /** * Maps the [[Read]] query's output to another type by providing a function @@ -218,8 +218,13 @@ trait SelectModule { self: ExprModule with TableModule => f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) } - def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = - Read.Union[ResultType, Out1](self, that, true) + // def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = + // Read.Union[ResultType, Out1](self, that, true) + + //TODO check union logic + def union[Out1 >: Out, ThatResultType](that: Read.Aux[ThatResultType, Out1]): Read.Aux[self.ResultType with ThatResultType, Out1] = + ??? + //Read.Union[self.ResultType with that.ResultType, Out with Out1](self, that, true) def unionAll[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = Read.Union[ResultType, Out1](self, that, false) @@ -234,6 +239,10 @@ trait SelectModule { self: ExprModule with TableModule => type ResultType = Repr val mapper = read.mapper.andThen(f) + + type ColumnsRepr[TableType] + + val columns: ColumnsRepr[_ <: TableType] = ??? } sealed case class Select[F, Repr, A]( @@ -273,20 +282,27 @@ trait SelectModule { self: ExprModule with TableModule => val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) } + + type ColumnsRepr[TableType] + + val columns: ColumnsRepr[_ <: TableType] = ??? } - //TODO change type Read.Repr to ColumnsRepr + // TODO what to do with distinct? sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { type ResultType = Repr val mapper: ResultType => Out = left.mapper - //TODO left has type Expr[T1, String], right has Expr[T2, String], Repr is Expr[T1 with T2, String] - type Repr[TableType] = left.Repr[left.TableType with right.TableType] + //TODO left has type Expr[T1, String], right has Expr[T2, String], ColumnsRepr is Expr[T1 with T2, String] + //type ColumnsRepr[TableType] = left.ColumnsRepr[left.TableType with right.TableType] + type ColumnsRepr[TableType] = Expr[Features.Union[left.ColumnsRepr[left.TableType], right.ColumnsRepr[right.TableType]], + TableType, left.ColumnsRepr[left.TableType] with right.ColumnsRepr[right.TableType]] //TODO turn the name columns into indexed columns so they can apply to either left hand or right hand side - val columns: Repr[left.TableType with right.TableType] = left.columns.asInstanceOf + val columns: ColumnsRepr[left.TableType with right.TableType] = //left.columns.asInstanceOf + ??? // Expr.Source(TàbleName.Derived, ) } sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { @@ -296,9 +312,9 @@ trait SelectModule { self: ExprModule with TableModule => def typeTag: TypeTag[B] = implicitly[TypeTag[B]] - type Repr[TableType] = (Expr[Features.Source, TableType, B], Unit) + type ColumnsRepr[TableType] = (Expr[Features.Source, TableType, B], Unit) - val columns: Repr[TableType] = (Expr.Source(TableName.Derived, Column[B]("1")), ()) + val columns: ColumnsRepr[TableType] = (Expr.Source(TableName.Derived, Column.Indexed(1)), ()) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 9eec16d02..729f95110 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -74,7 +74,7 @@ trait TableModule { self: ExprModule with SelectModule => def offsetDateTime(name: String): Singleton[OffsetDateTime] = singleton[OffsetDateTime](name) def offsetTime(name: String): Singleton[OffsetTime] = singleton[OffsetTime](name) def short(name: String): Singleton[Short] = singleton[Short](name) - def singleton[A: TypeTag](name: String): Singleton[A] = Cons(Column[A](name), Empty) + def singleton[A: TypeTag](name: String): Singleton[A] = Cons(Column.Named[A](name), Empty) def string(name: String): Singleton[String] = singleton[String](name) def uuid(name: String): Singleton[UUID] = singleton[UUID](name) def zonedDateTime(name: String): Singleton[ZonedDateTime] = singleton[ZonedDateTime](name) @@ -84,13 +84,17 @@ trait TableModule { self: ExprModule with SelectModule => def unapply[A, B](tuple: (A, B)): Some[(A, B)] = Some(tuple) } - // turn column into seald trait - // with "named" and "indexed" subtypes - sealed case class Column[A: TypeTag](name: String) { - def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + sealed trait Column[A]{ + def typeTag: TypeTag[A] } object Column { + sealed case class Named[A: TypeTag](columnName: String) extends Column[A] { + def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + } + sealed case class Indexed[A: TypeTag](index: Int) extends Column[A] { + def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + } type Untyped = Column[_] } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 886b2747f..e48a49ab5 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -115,7 +115,7 @@ trait JdbcInternalModule { self: Jdbc => case t @ ColumnSelection.Computed(_, _) => t.typeTag } case Read.Union(left, _, _) => getColumns(left) - case v @ Read.Literal(_) => Vector(v.typeTag) + case v @ Read.Literal(_) => scala.collection.immutable.Vector(v.typeTag) } private[sql] def unsafeExtractRow[A]( diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index d87029ded..b386fde35 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -171,7 +171,12 @@ trait MysqlModule extends Jdbc { self => } private def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { - case Expr.Source(tableName, column) => render(tableName, ".", column.name) + case Expr.Source(table, column) => { + (table, column) match { + case (TableName.Source(tableName), Column.Named(columnName)) => render(tableName, ".", columnName) + case _ => () + } + } case Expr.Unary(base, op) => render(" ", op.symbol) renderExpr(base) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 599030f1d..c3f699352 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -9,8 +9,13 @@ trait OracleModule extends Jdbc { self => } def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Source(table, column) => { + (table, column) match { + case (TableName.Source(tableName), Column.Named(columnName)) => + val _ = builder.append(tableName).append(".").append(columnName) + case _ => () + } + } case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base, builder) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 91f592bcd..656fe4406 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -345,7 +345,13 @@ trait PostgresModule extends Jdbc { self => } private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { - case Expr.Source(tableName, column) => render(tableName, ".", column.name) + case Expr.Source(table, column) => { + (table, column) match { + case (TableName.Source(tableName), Column.Named(columnName)) => + render(tableName, ".", columnName) + case _ => () + } + } case Expr.Unary(base, op) => render(" ", op.symbol) renderExpr(base) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 31faf4f43..0f404cc2f 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -94,8 +94,14 @@ trait SqlServerModule extends Jdbc { self => // import SqlServerTable._ // val crossApplyExample = select(fName ++ lName ++ orderDate ++ fkCustomerId).from(customers.crossApply(select(orderDate).from(orders).where(customerId === fkCustomerId))) + //val qq = select(Expr.Literal("hello")).union(select(orderId).from(orders)) - val q = select(orderDate).from(orders).where(fkCustomerId === "") + // select(orderId).from(orders).union(select(Expr.Literal(1))) + + //val x = select(orderId).from(orders).union(select(orderDate).from(orders)) + val xx = select(orderId).from(orders).union(select(fkCustomerId).from(orders)) + + val q = select(orderId ++ orderDate).from(orders).where(fkCustomerId === "") } } @@ -106,9 +112,15 @@ trait SqlServerModule extends Jdbc { self => override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder + //TODO check def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(tableName, column) => - val _ = builder.append(tableName).append(".").append(column.name) + case Expr.Source(table, column) => { + (table, column) match { + case (TableName.Source(tableName), Column.Named(columnName)) => + val _ = builder.append(tableName).append(".").append(columnName) + case _ => () + } + } case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) From 33fbf68d8ee4f1287d94d8c920dc630e530dd528 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 27 Aug 2021 22:48:48 +0200 Subject: [PATCH 282/673] conversion between selectionSet to columnSet --- .../jvm/src/main/scala/zio/sql/newtypes.scala | 6 +- core/jvm/src/main/scala/zio/sql/select.scala | 186 ++++++++++++------ core/jvm/src/main/scala/zio/sql/table.scala | 5 +- .../scala/zio/sql/mysql/MysqlModule.scala | 2 +- .../scala/zio/sql/oracle/OracleModule.scala | 2 +- .../zio/sql/postgresql/PostgresModule.scala | 2 +- .../zio/sql/sqlserver/SqlServerModule.scala | 30 +-- 7 files changed, 157 insertions(+), 76 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/newtypes.scala b/core/jvm/src/main/scala/zio/sql/newtypes.scala index 4cbe2777b..fb96f2cd3 100644 --- a/core/jvm/src/main/scala/zio/sql/newtypes.scala +++ b/core/jvm/src/main/scala/zio/sql/newtypes.scala @@ -5,10 +5,12 @@ import scala.language.implicitConversions trait NewtypesModule { type ColumnName = String - sealed trait TableName + sealed trait TableName { + def name: String + } object TableName { sealed case class Source(name: String) extends TableName - case object Derived extends TableName + sealed case class Derived(name: String) extends TableName implicit def strToTable(tableName: String) : TableName = TableName.Source(tableName) } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 5259fbe9d..58d4329b3 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -2,23 +2,29 @@ package zio.sql import scala.language.implicitConversions + trait SelectModule { self: ExprModule with TableModule => - sealed case class SelectBuilder[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]) { - def from[A1 <: A](table: Table.Aux[A1]): Read.Select[F, selection.value.ResultTypeRepr, A1] = { - type B0 = SelectionSet.Aux[selection.value.ResultTypeRepr, A] - val b: B0 = selection.value + sealed case class SelectBuilder[F, Source, B <: SelectionSet[Source]](selection: Selection[F, Source, B]) { + + def from[Source0 <: Source](table: Table.Aux[Source0]) + (implicit ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail]): Read.Select[F, selection.value.ResultTypeRepr, Source0] = { + type B0 = SelectionSet.ConsAux[selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail] + val b: B0 = selection.value.asInstanceOf[B0] - Read.Select(Selection[F, A1, B0](b), Some(table), true, Nil) + Read.Select(Selection[F, Source0, B0](b), Some(table), true, Nil) } } + object SelectBuilder { - implicit def noTable[F, A >: Any, B <: SelectionSet[A]]( - selectBuilder: SelectBuilder[F, A, B] - ): Read.Select[F, selectBuilder.selection.value.ResultTypeRepr, A] = { - type B0 = SelectionSet.Aux[selectBuilder.selection.value.ResultTypeRepr, A] - val b: B0 = selectBuilder.selection.value - Read.Select(Selection[F, A, B0](b), None, true, Nil) + implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( + selectBuilder: SelectBuilder[F, Source, B] + )(implicit ev: B <:< SelectionSet.Cons[Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] + ): Read.Select[F, selectBuilder.selection.value.ResultTypeRepr, Source] = { + type B0 = SelectionSet.ConsAux[selectBuilder.selection.value.ResultTypeRepr, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] + val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] + + Read.Select(Selection[F, Source, B0](b), None, true, Nil) } } @@ -30,10 +36,15 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: ResultType => Out - type ColumnsRepr[TableType] - type TableType + type ColumnHead + type ColumnTail <: ColumnSet + + type CS <: ColumnSet.Cons[ColumnHead, ColumnTail] + type ColumnsRepr[X] - val columns: ColumnsRepr[_ <: TableType] + val columnSet : CS + + def asTable(tableName: TableName): columnSet.TableSource = columnSet.table(tableName) /** * Maps the [[Read]] query's output to another type by providing a function @@ -218,13 +229,8 @@ trait SelectModule { self: ExprModule with TableModule => f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) } - // def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = - // Read.Union[ResultType, Out1](self, that, true) - - //TODO check union logic - def union[Out1 >: Out, ThatResultType](that: Read.Aux[ThatResultType, Out1]): Read.Aux[self.ResultType with ThatResultType, Out1] = - ??? - //Read.Union[self.ResultType with that.ResultType, Out with Out1](self, that, true) + def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = + Read.Union[ResultType, Out1](self, that, true) def unionAll[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = Read.Union[ResultType, Out1](self, that, false) @@ -240,18 +246,23 @@ trait SelectModule { self: ExprModule with TableModule => val mapper = read.mapper.andThen(f) - type ColumnsRepr[TableType] + override type ColumnHead = read.ColumnHead + override type ColumnTail = read.ColumnTail + + override type CS = read.CS + + override val columnSet : CS = read.columnSet - val columns: ColumnsRepr[_ <: TableType] = ??? + override type ColumnsRepr[X] = read.ColumnsRepr[X] } - sealed case class Select[F, Repr, A]( - selection: Selection[F, A, SelectionSet.Aux[Repr, A]], - table: Option[Table.Aux[A]], - whereExpr: Expr[_, A, Boolean], - groupBy: List[Expr[_, A, Any]], - havingExpr: Expr[_, A, Boolean] = true, - orderBy: List[Ordering[Expr[_, A, Any]]] = Nil, + sealed case class Select[F, Repr, Source]( + selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, _, _ <: SelectionSet[Source]]], + table: Option[Table.Aux[Source]], + whereExpr: Expr[_, Source, Boolean], + groupBy: List[Expr[_, Source, Any]], + havingExpr: Expr[_, Source, Boolean] = true, + orderBy: List[Ordering[Expr[_, Source, Any]]] = Nil, offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql limit: Option[Long] = None ) extends Read[Repr] { self => @@ -259,52 +270,59 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: Repr => Repr = identity(_) - def where(whereExpr2: Expr[_, A, Boolean]): Select[F, Repr, A] = + def where(whereExpr2: Expr[_, Source, Boolean]): Select[F, Repr, Source] = copy(whereExpr = self.whereExpr && whereExpr2) - def limit(n: Long): Select[F, Repr, A] = copy(limit = Some(n)) + def limit(n: Long): Select[F, Repr, Source] = copy(limit = Some(n)) - def offset(n: Long): Select[F, Repr, A] = copy(offset = Some(n)) + def offset(n: Long): Select[F, Repr, Source] = copy(offset = Some(n)) - def orderBy(o: Ordering[Expr[_, A, Any]], os: Ordering[Expr[_, A, Any]]*): Select[F, Repr, A] = + def orderBy(o: Ordering[Expr[_, Source, Any]], os: Ordering[Expr[_, Source, Any]]*): Select[F, Repr, Source] = copy(orderBy = self.orderBy ++ (o :: os.toList)) - def groupBy(key: Expr[_, A, Any], keys: Expr[_, A, Any]*)(implicit + def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit ev: Features.IsAggregated[F] - ): Select[F, Repr, A] = { + ): Select[F, Repr, Source] = { val _ = ev copy(groupBy = groupBy ++ (key :: keys.toList)) } - def having(havingExpr2: Expr[_, A, Boolean])(implicit + def having(havingExpr2: Expr[_, Source, Boolean])(implicit ev: Features.IsAggregated[F] - ): Select[F, Repr, A] = { + ): Select[F, Repr, Source] = { val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) } - type ColumnsRepr[TableType] + override type ColumnHead = selection.value.ColumnHead + override type ColumnTail = selection.value.ColumnTail - val columns: ColumnsRepr[_ <: TableType] = ??? + override val columnSet : CS = selection.value.columnSet(0) + + override type CS = selection.value.CS + + override type ColumnsRepr[X] = selection.value.ColumnsRepr[X] } - // TODO what to do with distinct? sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { type ResultType = Repr val mapper: ResultType => Out = left.mapper - //TODO left has type Expr[T1, String], right has Expr[T2, String], ColumnsRepr is Expr[T1 with T2, String] - //type ColumnsRepr[TableType] = left.ColumnsRepr[left.TableType with right.TableType] - type ColumnsRepr[TableType] = Expr[Features.Union[left.ColumnsRepr[left.TableType], right.ColumnsRepr[right.TableType]], - TableType, left.ColumnsRepr[left.TableType] with right.ColumnsRepr[right.TableType]] + //TODO union is allowed only if two selection are of the same column names and the same column types + override type ColumnHead = left.ColumnHead + override type ColumnTail = left.ColumnTail + + override type CS = left.CS + + override val columnSet : CS = left.columnSet - //TODO turn the name columns into indexed columns so they can apply to either left hand or right hand side - val columns: ColumnsRepr[left.TableType with right.TableType] = //left.columns.asInstanceOf - ??? // Expr.Source(TàbleName.Derived, ) + override type ColumnsRepr[X] = left.ColumnsRepr[X] } + // QUESITON doesn't literal need to have a name of a column? + // EXAMPLE select * from (select '1' as up) as x sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { type ResultType = (B, Unit) @@ -312,9 +330,14 @@ trait SelectModule { self: ExprModule with TableModule => def typeTag: TypeTag[B] = implicitly[TypeTag[B]] - type ColumnsRepr[TableType] = (Expr[Features.Source, TableType, B], Unit) + override type ColumnHead = B + override type ColumnTail = ColumnSet.Empty - val columns: ColumnsRepr[TableType] = (Expr.Source(TableName.Derived, Column.Indexed(1)), ()) + override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] + + override val columnSet : CS = ColumnSet.Cons(Column.Indexed[ColumnHead](1), ColumnSet.Empty) + + override type ColumnsRepr[X] = (Expr.Source[TableName.Derived, Column.Indexed[ColumnHead]], Unit) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) @@ -359,18 +382,32 @@ trait SelectModule { self: ExprModule with TableModule => computedOption(expr, Some(name)) } - sealed trait ColumnSelection[-A, +B] { + sealed trait ColumnSelection[-Source, +ColumnType] { + type ColumnType0 <: ColumnType + def name: Option[ColumnName] + + def toColumn(index: Int) : Column[ColumnType] } object ColumnSelection { - sealed case class Constant[A: TypeTag](value: A, name: Option[ColumnName]) extends ColumnSelection[Any, A] { - def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + sealed case class Constant[ColumnType: TypeTag](value: ColumnType, name: Option[ColumnName]) extends ColumnSelection[Any, ColumnType] { + def typeTag: TypeTag[ColumnType] = implicitly[TypeTag[ColumnType]] + + def toColumn(index: Int) : Column[ColumnType] = name match { + case Some(value) => Column.Named(value) + case None => Column.Indexed(index) + } } - sealed case class Computed[F, A, B](expr: Expr[F, A, B], name: Option[ColumnName]) extends ColumnSelection[A, B] { - def typeTag: TypeTag[B] = Expr.typeTagOf(expr) + sealed case class Computed[F, Source, ColumnType](expr: Expr[F, Source, ColumnType], name: Option[ColumnName]) extends ColumnSelection[Source, ColumnType] { + implicit def typeTag: TypeTag[ColumnType] = Expr.typeTagOf(expr) + + def toColumn(index: Int) : Column[ColumnType] = name match { + case Some(value) => Column.Named(value) + case None => Column.Indexed(index) + } } } @@ -378,9 +415,18 @@ trait SelectModule { self: ExprModule with TableModule => type SelectionsRepr[Source1, T] type ResultTypeRepr - + type Append[Source1, That <: SelectionSet[Source1]] <: SelectionSet[Source1] + type ColumnHead + type ColumnTail <: ColumnSet + type SelectionTail <: SelectionSet[Source] + + type CS <: ColumnSet + def columnSet(startingIndex: Int) : CS + + type ColumnsRepr[X] + def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] def selectionsUntyped: List[ColumnSelection[Source, _]] @@ -394,12 +440,25 @@ trait SelectModule { self: ExprModule with TableModule => type ResultTypeRepr = ResultTypeRepr0 } + type ConsAux[ResultTypeRepr0, -Source, A, B <: SelectionSet[Source]] = + SelectionSet.Cons[Source, A, B] { + type ResultTypeRepr = ResultTypeRepr0 + } + type Singleton[-Source, A] = Cons[Source, A, Empty] type Empty = Empty.type case object Empty extends SelectionSet[Any] { + override type ColumnHead = Unit + override type ColumnTail = ColumnSet.Empty + override type SelectionTail = SelectionSet.Empty + + override type CS = ColumnSet.Empty + override def columnSet(startingIndex: Int) : CS = ColumnSet.Empty + + override type ColumnsRepr[X] = Unit override type SelectionsRepr[Source1, T] = Unit override type ResultTypeRepr = Unit @@ -411,12 +470,23 @@ trait SelectModule { self: ExprModule with TableModule => override def selectionsUntyped: List[ColumnSelection[Any, _]] = Nil - def selections[Source1 <: Any, T]: SelectionsRepr[Source1, T] = () + override def selections[Source1 <: Any, T]: SelectionsRepr[Source1, T] = () } sealed case class Cons[-Source, A, B <: SelectionSet[Source]](head: ColumnSelection[Source, A], tail: B) extends SelectionSet[Source] { self => + override type ColumnHead = A + override type ColumnTail = tail.CS + override type SelectionTail = B + + override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] + + override def columnSet(startingIndex: Int) : CS = + ColumnSet.Cons[ColumnHead, ColumnTail](head.toColumn(startingIndex), tail.columnSet(startingIndex + 1))//.asInstanceOf + + override type ColumnsRepr[X] = (Expr[Features.Source, X, A], tail.ColumnsRepr[X]) + override type SelectionsRepr[Source1, T] = (ColumnSelection[Source1, A], tail.SelectionsRepr[Source1, T]) override type ResultTypeRepr = (A, tail.ResultTypeRepr) @@ -429,7 +499,7 @@ trait SelectModule { self: ExprModule with TableModule => override def selectionsUntyped: List[ColumnSelection[Source, _]] = head :: tail.selectionsUntyped - def selections[Source1 <: Source, T]: SelectionsRepr[Source1, T] = (head, tail.selections[Source1, T]) + override def selections[Source1 <: Source, T]: SelectionsRepr[Source1, T] = (head, tail.selections[Source1, T]) } } diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 729f95110..ca58034a5 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -21,6 +21,8 @@ trait TableModule { self: ExprModule with SelectModule => } object ColumnSet { + type ConsAux[Head, Tail <: ColumnSet, TableType, ColumnsRepr0[TableType]] = ColumnSet.Cons[Head, Tail] { type ColumnsRepr = ColumnsRepr0[TableType] } + type Empty = Empty.type type :*:[A, B <: ColumnSet] = Cons[A, B] type Singleton[A] = Cons[A, Empty] @@ -39,6 +41,7 @@ trait TableModule { self: ExprModule with SelectModule => sealed case class Cons[A, B <: ColumnSet](head: Column[A], tail: B) extends ColumnSet { self => type ColumnsRepr[T] = (Expr[Features.Source, T, A], tail.ColumnsRepr[T]) type Append[That <: ColumnSet] = Cons[A, tail.Append[That]] + type TableSource = Table.Source.Aux_[ColumnsRepr, A :*: B] override def ++[That <: ColumnSet](that: That): Append[That] = Cons(head, tail ++ that) @@ -84,7 +87,7 @@ trait TableModule { self: ExprModule with SelectModule => def unapply[A, B](tuple: (A, B)): Some[(A, B)] = Some(tuple) } - sealed trait Column[A]{ + sealed trait Column[+A]{ def typeTag: TypeTag[A] } diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index b386fde35..8cc4a3275 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -173,7 +173,7 @@ trait MysqlModule extends Jdbc { self => private def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Source(table, column) => { (table, column) match { - case (TableName.Source(tableName), Column.Named(columnName)) => render(tableName, ".", columnName) + case (tableName: TableName, Column.Named(columnName)) => render(tableName, ".", columnName) case _ => () } } diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index c3f699352..89dffc1ae 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -11,7 +11,7 @@ trait OracleModule extends Jdbc { self => def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { case Expr.Source(table, column) => { (table, column) match { - case (TableName.Source(tableName), Column.Named(columnName)) => + case (tableName: TableName, Column.Named(columnName)) => val _ = builder.append(tableName).append(".").append(columnName) case _ => () } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 656fe4406..c797619c8 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -347,7 +347,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Source(table, column) => { (table, column) match { - case (TableName.Source(tableName), Column.Named(columnName)) => + case (tableName: TableName, Column.Named(columnName)) => render(tableName, ".", columnName) case _ => () } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 0f404cc2f..810fda5a1 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -76,17 +76,28 @@ trait SqlServerModule extends Jdbc { self => object QueriesExamples { - val customers = - (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) - .table("customers") + val x: Cons[java.util.UUID, Singleton[String]] = uuid("id") ++ string("first_name") + + // val customers = + // (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) + // .table("customers") + // val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = + // customers.columns + + val customers: Table.Source{type Repr[X] = (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,java.util.UUID], (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,String], (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,String], Unit))); type Cols = SqlServerModule.this.ColumnSet.Cons[java.util.UUID,SqlServerModule.this.ColumnSet.Cons[String,SqlServerModule.this.ColumnSet.Cons[String,SqlServerModule.this.ColumnSet.Empty.type]]]} = + (uuid("id") ++ string("first_name") ++ string("last_name")).table("customers") - val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = - customers.columns + val customerId :*: fName :*: lName :*: _ = customers.columns val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + // val derived = //: Table.Source{type Repr[X] = (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,_$1], _1.type#columnSet.tail.ColumnsRepr[X]); type Cols = SqlServerModule.this.ColumnSet.Cons[_$1,_1.type#selection.value.tail.CS]}( forSome { type _$1; val _1: Read.Select[Features.Union[Features.Source,Features.Source],(UUID, (String, Unit)),customers.TableType]; val stabilizer$1: SelectBuilder[Features.Union[Features.Source,Features.Source],customers.TableType,SelectionSet.Cons[customers.TableType,UUID,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]]] }) + // select(customerId ++ fName).from(customers).asTable("derivedCustomers") + + // val e = select(fName ++ lName).from(customers).asTable(TableName.Source("derivedCustomers")) + //JOIN example val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) @@ -94,12 +105,7 @@ trait SqlServerModule extends Jdbc { self => // import SqlServerTable._ // val crossApplyExample = select(fName ++ lName ++ orderDate ++ fkCustomerId).from(customers.crossApply(select(orderDate).from(orders).where(customerId === fkCustomerId))) - //val qq = select(Expr.Literal("hello")).union(select(orderId).from(orders)) - - // select(orderId).from(orders).union(select(Expr.Literal(1))) - - //val x = select(orderId).from(orders).union(select(orderDate).from(orders)) - val xx = select(orderId).from(orders).union(select(fkCustomerId).from(orders)) + // val xx = select(orderId ++ Selection.constant("hello")).from(orders).union(select(fkCustomerId ++ Selection.constant("world")).from(orders)) val q = select(orderId ++ orderDate).from(orders).where(fkCustomerId === "") } @@ -116,7 +122,7 @@ trait SqlServerModule extends Jdbc { self => def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { case Expr.Source(table, column) => { (table, column) match { - case (TableName.Source(tableName), Column.Named(columnName)) => + case (tableName: TableName, Column.Named(columnName)) => val _ = builder.append(tableName).append(".").append(columnName) case _ => () } From d4009994647f8b66060071ea375baeb1883cdcaf Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 28 Aug 2021 11:59:07 +0200 Subject: [PATCH 283/673] added head and tail type parameters to selection so information is not forgotten --- core/jvm/src/main/scala/zio/sql/select.scala | 24 +-- .../scala/zio/sql/mysql/MysqlModule.scala | 10 +- .../scala/zio/sql/oracle/OracleModule.scala | 12 +- .../zio/sql/postgresql/PostgresModule.scala | 10 +- .../zio/sql/sqlserver/SqlServerModule.scala | 157 +++++++++--------- 5 files changed, 112 insertions(+), 101 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 58d4329b3..97d39a57f 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -8,7 +8,7 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class SelectBuilder[F, Source, B <: SelectionSet[Source]](selection: Selection[F, Source, B]) { def from[Source0 <: Source](table: Table.Aux[Source0]) - (implicit ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail]): Read.Select[F, selection.value.ResultTypeRepr, Source0] = { + (implicit ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail]): Read.Select[F, selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail] = { type B0 = SelectionSet.ConsAux[selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail] val b: B0 = selection.value.asInstanceOf[B0] @@ -20,7 +20,7 @@ trait SelectModule { self: ExprModule with TableModule => implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( selectBuilder: SelectBuilder[F, Source, B] )(implicit ev: B <:< SelectionSet.Cons[Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] - ): Read.Select[F, selectBuilder.selection.value.ResultTypeRepr, Source] = { + ): Read.Select[F, selectBuilder.selection.value.ResultTypeRepr, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] = { type B0 = SelectionSet.ConsAux[selectBuilder.selection.value.ResultTypeRepr, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] @@ -44,7 +44,7 @@ trait SelectModule { self: ExprModule with TableModule => val columnSet : CS - def asTable(tableName: TableName): columnSet.TableSource = columnSet.table(tableName) + def asTable(tableName: TableName): columnSet.TableSource = columnSet.table(tableName) /** * Maps the [[Read]] query's output to another type by providing a function @@ -256,8 +256,8 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnsRepr[X] = read.ColumnsRepr[X] } - sealed case class Select[F, Repr, Source]( - selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, _, _ <: SelectionSet[Source]]], + sealed case class Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]]( + selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], table: Option[Table.Aux[Source]], whereExpr: Expr[_, Source, Boolean], groupBy: List[Expr[_, Source, Any]], @@ -270,26 +270,26 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: Repr => Repr = identity(_) - def where(whereExpr2: Expr[_, Source, Boolean]): Select[F, Repr, Source] = + def where(whereExpr2: Expr[_, Source, Boolean]): Select[F, Repr, Source, Head, Tail] = copy(whereExpr = self.whereExpr && whereExpr2) - def limit(n: Long): Select[F, Repr, Source] = copy(limit = Some(n)) + def limit(n: Long): Select[F, Repr, Source, Head, Tail] = copy(limit = Some(n)) - def offset(n: Long): Select[F, Repr, Source] = copy(offset = Some(n)) + def offset(n: Long): Select[F, Repr, Source, Head, Tail] = copy(offset = Some(n)) - def orderBy(o: Ordering[Expr[_, Source, Any]], os: Ordering[Expr[_, Source, Any]]*): Select[F, Repr, Source] = + def orderBy(o: Ordering[Expr[_, Source, Any]], os: Ordering[Expr[_, Source, Any]]*): Select[F, Repr, Source, Head, Tail] = copy(orderBy = self.orderBy ++ (o :: os.toList)) def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit ev: Features.IsAggregated[F] - ): Select[F, Repr, Source] = { + ): Select[F, Repr, Source, Head, Tail] = { val _ = ev copy(groupBy = groupBy ++ (key :: keys.toList)) } def having(havingExpr2: Expr[_, Source, Boolean])(implicit ev: Features.IsAggregated[F] - ): Select[F, Repr, Source] = { + ): Select[F, Repr, Source, Head, Tail] = { val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) } @@ -498,7 +498,7 @@ trait SelectModule { self: ExprModule with TableModule => Cons[Source1, A, tail.Append[Source1, That]](head, tail ++ that) override def selectionsUntyped: List[ColumnSelection[Source, _]] = head :: tail.selectionsUntyped - + override def selections[Source1 <: Source, T]: SelectionsRepr[Source1, T] = (head, tail.selections[Source1, T]) } } diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 8cc4a3275..5b135ffd8 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -81,8 +81,14 @@ trait MysqlModule extends Jdbc { self => case Read.Mapped(read, _) => renderReadImpl(read) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => - object Dummy { type F; type A; type B <: SelectionSet[A] } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + object Dummy { + type F + type Repr + type Source + type Head + type Tail <: SelectionSet[Source] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.Repr, Dummy.Source, Dummy.Head, Dummy.Tail]] import read._ render("SELECT ") diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 89dffc1ae..ea479c27d 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -131,11 +131,13 @@ trait OracleModule extends Jdbc { self => case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { - type F - type A - type B <: SelectionSet[A] - } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + type F + type Repr + type Source + type Head + type Tail <: SelectionSet[Source] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.Repr, Dummy.Source, Dummy.Head, Dummy.Tail]] import read._ builder.append("SELECT ") diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index c797619c8..020044260 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -468,8 +468,14 @@ trait PostgresModule extends Jdbc { self => read match { case Read.Mapped(read, _) => renderReadImpl(read) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => - object Dummy { type F; type A; type B <: SelectionSet[A] } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + object Dummy { + type F + type Repr + type Source + type Head + type Tail <: SelectionSet[Source] + } + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.Repr, Dummy.Source, Dummy.Head, Dummy.Tail]] import read._ render("SELECT ") diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 810fda5a1..8aef0836f 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -2,8 +2,6 @@ package zio.sql.sqlserver import zio.sql.Jdbc -import scala.language.implicitConversions - trait SqlServerModule extends Jdbc { self => import self.ColumnSet._ @@ -14,59 +12,55 @@ trait SqlServerModule extends Jdbc { self => sealed trait SqlServerTable[+A] extends Table.TableEx - object SqlServerTable { - - sealed case class SelectedTable[F1, F2, ColumnsRepr[_], Cols, A, B]( - crossType: CrossType, - left: Table.Source.Aux[ColumnsRepr, A, Cols], - //tableValuedFuctnion : TableValuedFunction ??? - select: Read.Select[F1, Cols, B], - expr: Expr[_, A with B, Boolean] - ) extends SqlServerTable[A with B] { self => - - // def where(whereExpr: Expr[F1 :||: F2, A with B, Boolean]): SelectedTable[F1, F2, ColumnsRepr, Cols, A, B] = - // self.copy(expr = whereExpr) - - def columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ select.table.get.columnsUntyped - } - - implicit def tableSourceToSelectedBuilder[ColumnsRepr[_], A, Cols]( - table: Table.Source.Aux[ColumnsRepr, A, Cols] - ): SelectedTableBuilder[ColumnsRepr, A, Cols] = - new SelectedTableBuilder(table) - - sealed case class SelectedTableBuilder[ColumnsRepr[_], A, Cols](table: Table.Source.Aux[ColumnsRepr, A, Cols]) { - self => - - /** - * Instead of Read.Select we need to accept some 'TableValuedFunction' which would: - * (or we could accept Select and turn it into TableValuedFunction - but we need to make sure only sensible things compile) - * - contain selection, table and optionally where clause - * - create new Table of type B created out of columns in select.selection - * - where clause need to access Table.Aux[A] and origin select.Table to create Expr. - */ - final def crossApply[F1, F2, SelectionCols, SelectTableType]( - select: Read.Select[F1, SelectionCols, SelectTableType] - ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = { - - select.selection.value.selectionsUntyped.map(_.asInstanceOf[ColumnSelection[_, _]]).map { - case t @ ColumnSelection.Constant(value, _) => t.typeTag - case t @ ColumnSelection.Computed(expr, _) => expr - } - ??? - } - - final def outerApply[F1, F2, SelectTableType]( - select: Read.Select[F1, Cols, SelectTableType] - ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = - SelectedTable[F1, F2, ColumnsRepr, Cols, A, SelectTableType]( - CrossType.OuterApply, - table, - select, - Expr.literal(false) - ) - } - } + // object SqlServerTable { + + // sealed case class SelectedTable[F1, F2, ColumnsRepr[_], Cols, A, B]( + // crossType: CrossType, + // left: Table.Source.Aux[ColumnsRepr, A, Cols], + // //tableValuedFuctnion : TableValuedFunction ??? + // select: Read.Select[F1, Cols, B], + // expr: Expr[_, A with B, Boolean] + // ) extends SqlServerTable[A with B] { self => + + // // def where(whereExpr: Expr[F1 :||: F2, A with B, Boolean]): SelectedTable[F1, F2, ColumnsRepr, Cols, A, B] = + // // self.copy(expr = whereExpr) + + // def columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ select.table.get.columnsUntyped + // } + + // implicit def tableSourceToSelectedBuilder[ColumnsRepr[_], A, Cols]( + // table: Table.Source.Aux[ColumnsRepr, A, Cols] + // ): SelectedTableBuilder[ColumnsRepr, A, Cols] = + // new SelectedTableBuilder(table) + + // sealed case class SelectedTableBuilder[ColumnsRepr[_], A, Cols](table: Table.Source.Aux[ColumnsRepr, A, Cols]) { + // self => + + // /** + // * Instead of Read.Select we need to accept some 'TableValuedFunction' which would: + // * (or we could accept Select and turn it into TableValuedFunction - but we need to make sure only sensible things compile) + // * - contain selection, table and optionally where clause + // * - create new Table of type B created out of columns in select.selection + // * - where clause need to access Table.Aux[A] and origin select.Table to create Expr. + // */ + // final def crossApply[F1, F2, SelectionCols, SelectTableType]( + // select: Read.Select[F1, SelectionCols, SelectTableType] + // ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = { + + // ??? + // } + + // final def outerApply[F1, F2, SelectTableType]( + // select: Read.Select[F1, Cols, SelectTableType] + // ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = + // SelectedTable[F1, F2, ColumnsRepr, Cols, A, SelectTableType]( + // CrossType.OuterApply, + // table, + // select, + // Expr.literal(false) + // ) + // } + // } sealed trait CrossType object CrossType { @@ -84,8 +78,7 @@ trait SqlServerModule extends Jdbc { self => // val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = // customers.columns - val customers: Table.Source{type Repr[X] = (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,java.util.UUID], (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,String], (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,String], Unit))); type Cols = SqlServerModule.this.ColumnSet.Cons[java.util.UUID,SqlServerModule.this.ColumnSet.Cons[String,SqlServerModule.this.ColumnSet.Cons[String,SqlServerModule.this.ColumnSet.Empty.type]]]} = - (uuid("id") ++ string("first_name") ++ string("last_name")).table("customers") + val customers = (uuid("id") ++ string("first_name") ++ string("last_name")).table("customers") val customerId :*: fName :*: lName :*: _ = customers.columns @@ -93,10 +86,12 @@ trait SqlServerModule extends Jdbc { self => val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - // val derived = //: Table.Source{type Repr[X] = (SqlServerModule.this.Expr[SqlServerModule.this.Features.Source,X,_$1], _1.type#columnSet.tail.ColumnsRepr[X]); type Cols = SqlServerModule.this.ColumnSet.Cons[_$1,_1.type#selection.value.tail.CS]}( forSome { type _$1; val _1: Read.Select[Features.Union[Features.Source,Features.Source],(UUID, (String, Unit)),customers.TableType]; val stabilizer$1: SelectBuilder[Features.Union[Features.Source,Features.Source],customers.TableType,SelectionSet.Cons[customers.TableType,UUID,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]]] }) - // select(customerId ++ fName).from(customers).asTable("derivedCustomers") + val derived = + select(customerId ++ fName).from(customers).asTable("derivedCustomers") + + val derivedId :*: derivedName = derived.columns - // val e = select(fName ++ lName).from(customers).asTable(TableName.Source("derivedCustomers")) + val e = select(fName ++ lName).from(customers).asTable(TableName.Source("derivedCustomers")) //JOIN example val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) @@ -244,10 +239,12 @@ trait SqlServerModule extends Jdbc { self => case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F - type A - type B <: SelectionSet[A] + type Repr + type Source + type Head + type Tail <: SelectionSet[Source] } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.A, Dummy.B]] + val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.Repr, Dummy.Source, Dummy.Head, Dummy.Tail]] import read._ builder.append("select ") @@ -373,27 +370,27 @@ trait SqlServerModule extends Jdbc { self => case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.DialectSpecificTable(table) => - table match { - case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => - buildTable(left) + case Table.DialectSpecificTable(table) => + // table match { + // case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => + // buildTable(left) - crossType match { - case SqlServerSpecific.CrossType.CrossApply => builder.append(" CROSS APPLY ( ") - case SqlServerSpecific.CrossType.OuterApply => builder.append(" OUTER APPLY ( ") - } + // crossType match { + // case SqlServerSpecific.CrossType.CrossApply => builder.append(" CROSS APPLY ( ") + // case SqlServerSpecific.CrossType.OuterApply => builder.append(" OUTER APPLY ( ") + // } - builder.append("SELECT ") - buildSelection(select.selection.value) - builder.append(" FROM ") - buildTable(select.table.get) - builder.append(" WHERE ") - buildExpr(on) + // builder.append("SELECT ") + // buildSelection(select.selection.value) + // builder.append(" FROM ") + // buildTable(select.table.get) + // builder.append(" WHERE ") + // buildExpr(on) - builder.append(" ) ") - val _ = buildTable(select.table.get) + // builder.append(" ) ") + // val _ = buildTable(select.table.get) - } + // } case Table.Joined(joinType, left, right, on) => buildTable(left) From 8f84eb0125dcbd21b1ffbe7c17e3701e83d10a9c Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 28 Aug 2021 13:08:26 +0200 Subject: [PATCH 284/673] cleanup --- core/jvm/src/main/scala/zio/sql/select.scala | 18 ++---------------- core/jvm/src/main/scala/zio/sql/table.scala | 2 -- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 97d39a57f..dc174a18e 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -40,11 +40,10 @@ trait SelectModule { self: ExprModule with TableModule => type ColumnTail <: ColumnSet type CS <: ColumnSet.Cons[ColumnHead, ColumnTail] - type ColumnsRepr[X] val columnSet : CS - def asTable(tableName: TableName): columnSet.TableSource = columnSet.table(tableName) + def asTable(tableName: TableName): columnSet.TableSource = columnSet.table(tableName) /** * Maps the [[Read]] query's output to another type by providing a function @@ -252,8 +251,6 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = read.CS override val columnSet : CS = read.columnSet - - override type ColumnsRepr[X] = read.ColumnsRepr[X] } sealed case class Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]]( @@ -300,8 +297,6 @@ trait SelectModule { self: ExprModule with TableModule => override val columnSet : CS = selection.value.columnSet(0) override type CS = selection.value.CS - - override type ColumnsRepr[X] = selection.value.ColumnsRepr[X] } sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) @@ -317,8 +312,6 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = left.CS override val columnSet : CS = left.columnSet - - override type ColumnsRepr[X] = left.ColumnsRepr[X] } // QUESITON doesn't literal need to have a name of a column? @@ -336,8 +329,6 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] override val columnSet : CS = ColumnSet.Cons(Column.Indexed[ColumnHead](1), ColumnSet.Empty) - - override type ColumnsRepr[X] = (Expr.Source[TableName.Derived, Column.Indexed[ColumnHead]], Unit) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) @@ -425,8 +416,6 @@ trait SelectModule { self: ExprModule with TableModule => type CS <: ColumnSet def columnSet(startingIndex: Int) : CS - type ColumnsRepr[X] - def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] def selectionsUntyped: List[ColumnSelection[Source, _]] @@ -458,7 +447,6 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = ColumnSet.Empty override def columnSet(startingIndex: Int) : CS = ColumnSet.Empty - override type ColumnsRepr[X] = Unit override type SelectionsRepr[Source1, T] = Unit override type ResultTypeRepr = Unit @@ -483,10 +471,8 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] override def columnSet(startingIndex: Int) : CS = - ColumnSet.Cons[ColumnHead, ColumnTail](head.toColumn(startingIndex), tail.columnSet(startingIndex + 1))//.asInstanceOf + ColumnSet.Cons[ColumnHead, ColumnTail](head.toColumn(startingIndex), tail.columnSet(startingIndex + 1)) - override type ColumnsRepr[X] = (Expr[Features.Source, X, A], tail.ColumnsRepr[X]) - override type SelectionsRepr[Source1, T] = (ColumnSelection[Source1, A], tail.SelectionsRepr[Source1, T]) override type ResultTypeRepr = (A, tail.ResultTypeRepr) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index ca58034a5..4cb22af26 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -21,8 +21,6 @@ trait TableModule { self: ExprModule with SelectModule => } object ColumnSet { - type ConsAux[Head, Tail <: ColumnSet, TableType, ColumnsRepr0[TableType]] = ColumnSet.Cons[Head, Tail] { type ColumnsRepr = ColumnsRepr0[TableType] } - type Empty = Empty.type type :*:[A, B <: ColumnSet] = Cons[A, B] type Singleton[A] = Cons[A, Empty] From 829f1bf178241f37b32382640bb8d3be58ebc602 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 31 Aug 2021 11:58:30 +0200 Subject: [PATCH 285/673] Update ojdbc8 to 21.3.0.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index fd2c90b42..bb2d9322a 100644 --- a/build.sbt +++ b/build.sbt @@ -183,7 +183,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.1.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.3.0.0" % Test, "com.dimafeng" % "testcontainers-scala-oracle-xe_2.13" % testcontainersScalaVersion % Test ) ) From bee3445127155584b82bf1405ac7cbb27faf51ed Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 13 Sep 2021 09:44:23 +0200 Subject: [PATCH 286/673] added abstract selection and subselect builder --- core/jvm/src/main/scala/zio/sql/Sql.scala | 9 + core/jvm/src/main/scala/zio/sql/select.scala | 165 +++++++++++++++---- 2 files changed, 138 insertions(+), 36 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 27f5f1f65..c0bf565f0 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,6 +17,15 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = SelectBuilder(selection) + // def select(selection: AbstractSelection): SelectBuilder[selection.F, selection.A, selection.B] = + // SelectBuilder(selection) + + // def subselect[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B] = + // SubselectBuilder(selection) + + def subselect[ParentTable](selection: AbstractSelection): SubselectBuilder[selection.F, selection.Source, selection.B, ParentTable] = + SubselectBuilder(selection) + def deleteFrom[T <: Table](table: T): Delete[table.TableType] = Delete(table, true) def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index dc174a18e..58dc6c519 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -2,32 +2,104 @@ package zio.sql import scala.language.implicitConversions - trait SelectModule { self: ExprModule with TableModule => - sealed case class SelectBuilder[F, Source, B <: SelectionSet[Source]](selection: Selection[F, Source, B]) { - - def from[Source0 <: Source](table: Table.Aux[Source0]) - (implicit ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail]): Read.Select[F, selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail] = { - type B0 = SelectionSet.ConsAux[selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail] + sealed case class SelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: Selection[F0, Source, B]) { + + def from[Source0 <: Source](table: Table.Aux[Source0])(implicit + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] + ): Read.Select[ + F0, + selection.value.ResultTypeRepr, + Source0, + selection.value.ColumnHead, + selection.value.SelectionTail + ] = { + type B0 = SelectionSet.ConsAux[ + selection.value.ResultTypeRepr, + Source0, + selection.value.ColumnHead, + selection.value.SelectionTail + ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Select(Selection[F, Source0, B0](b), Some(table), true, Nil) + Read.Select(Selection[F0, Source0, B0](b), Some(table), true, Nil) } } object SelectBuilder { implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( selectBuilder: SelectBuilder[F, Source, B] - )(implicit ev: B <:< SelectionSet.Cons[Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] - ): Read.Select[F, selectBuilder.selection.value.ResultTypeRepr, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] = { - type B0 = SelectionSet.ConsAux[selectBuilder.selection.value.ResultTypeRepr, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail] + )(implicit + ev: B <:< SelectionSet.Cons[ + Source, + selectBuilder.selection.value.ColumnHead, + selectBuilder.selection.value.SelectionTail + ] + ): Read.Select[ + F, + selectBuilder.selection.value.ResultTypeRepr, + Source, + selectBuilder.selection.value.ColumnHead, + selectBuilder.selection.value.SelectionTail + ] = { + type B0 = SelectionSet.ConsAux[ + selectBuilder.selection.value.ResultTypeRepr, + Source, + selectBuilder.selection.value.ColumnHead, + selectBuilder.selection.value.SelectionTail + ] val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] Read.Select(Selection[F, Source, B0](b), None, true, Nil) } } + // select customers.id, customers.first_name, customers.last_name, orders.order_date + // from customers + // cross apply ( + // Select top 1 * + // from orders + // where orders.customer_id = customers.id + // order by orders.order_date DESC + // ) orders + // order by orders.order_date desc + + // Source == orders, ParentTable == customers + sealed case class SubselectBuilder[F, Source, B <: SelectionSet[Source], ParentTable]( + abstractSelection: AbstractSelection + ) { + + // type arguments [Source, SubselectBuilder.this.abstractSelection.value.ColumnHead, SubselectBuilder.this.abstractSelection.value.SelectionTail] + // do not conform to class Cons's type parameter bounds [-Source,A,B <: SelectModule.this.SelectionSet[Source]] + // def from[Source0](table: Table.Aux[Source0])(implicit + // ev: B <:< SelectionSet.Cons[Source, abstractSelection.value.ColumnHead, abstractSelection.value.SelectionTail], + // ev2: Source <:< Source0 with ParentTable + // ): Read.Select[ + // F, + // abstractSelection.value.ResultTypeRepr, + // Source0, + // abstractSelection.value.ColumnHead, + // abstractSelection.value.SelectionTail + // ] = { + // type B0 = SelectionSet.ConsAux[ + // abstractSelection.value.ResultTypeRepr, + // Source0, + // abstractSelection.value.ColumnHead, + // abstractSelection.value.SelectionTail + // ] + // val b: B0 = abstractSelection.value.asInstanceOf[B0] + + // //Read.Select(Selection[F, Source0, B0](b), Some(table), true, Nil) + // val _ = table + // val _ = b + // ??? + // } + } + + // select(orderId ++ productId ++ unitPrice).from(orderDetails).where(unitPrice > subselect[orderDetails.TableType](avg(unitPrice2)).from(orderDetails2).where(productId === productId2)) + //final case class SubSelect[F, -From, +Value](select: Select[F, (Value, Unit), From with _, Value, SelectionSet.Empty]) extends Expr[F, From, Value] + /** * A `Read[A]` models a selection of a set of values of type `A`. */ @@ -36,12 +108,12 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: ResultType => Out - type ColumnHead + type ColumnHead type ColumnTail <: ColumnSet type CS <: ColumnSet.Cons[ColumnHead, ColumnTail] - val columnSet : CS + val columnSet: CS def asTable(tableName: TableName): columnSet.TableSource = columnSet.table(tableName) @@ -250,7 +322,7 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = read.CS - override val columnSet : CS = read.columnSet + override val columnSet: CS = read.columnSet } sealed case class Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]]( @@ -274,7 +346,10 @@ trait SelectModule { self: ExprModule with TableModule => def offset(n: Long): Select[F, Repr, Source, Head, Tail] = copy(offset = Some(n)) - def orderBy(o: Ordering[Expr[_, Source, Any]], os: Ordering[Expr[_, Source, Any]]*): Select[F, Repr, Source, Head, Tail] = + def orderBy( + o: Ordering[Expr[_, Source, Any]], + os: Ordering[Expr[_, Source, Any]]* + ): Select[F, Repr, Source, Head, Tail] = copy(orderBy = self.orderBy ++ (o :: os.toList)) def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit @@ -294,11 +369,14 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnHead = selection.value.ColumnHead override type ColumnTail = selection.value.ColumnTail - override val columnSet : CS = selection.value.columnSet(0) + override val columnSet: CS = selection.value.columnSet(0) override type CS = selection.value.CS } + // select(orderId ++ productId ++ unitPrice).from(orderDetails).where(unitPrice > subselect[orderDetails.TableType](avg(unitPrice2)).from(orderDetails2).where(productId === productId2)) + // final case class SubSelect[F, -From, +Value](select: Select[F, (Value, Unit), From with _, Value, SelectionSet.Empty]) extends Expr[F, From, Value] + sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { type ResultType = Repr @@ -311,7 +389,7 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = left.CS - override val columnSet : CS = left.columnSet + override val columnSet: CS = left.columnSet } // QUESITON doesn't literal need to have a name of a column? @@ -328,12 +406,25 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] - override val columnSet : CS = ColumnSet.Cons(Column.Indexed[ColumnHead](1), ColumnSet.Empty) + override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead](1), ColumnSet.Empty) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) } + sealed trait AbstractSelection { + type F + type Source + type B <: SelectionSet[Source] + + type ColumnHead + type SelectionTail <: SelectionSet[Source] + + // type arguments [Source0, SubselectBuilder.this.abstractSelection.value.ColumnHead, SubselectBuilder.this.abstractSelection.value.SelectionTail] + // do not conform to class Cons's type parameter bounds [-Source,A,B <: SelectModule.this.SelectionSet[Source]] + val value1 : B = ??? + } + /** * A columnar selection of `B` from a source `A`, modeled as `A => B`. */ @@ -353,7 +444,7 @@ trait SelectModule { self: ExprModule with TableModule => import SelectionSet.{ Cons, Empty } import ColumnSelection._ - val empty: Selection[Any, Any, Empty] = Selection(Empty) + // val empty: Selection[Any, Any, Empty] = Selection(Empty) def constantOption[A: TypeTag](value: A, option: Option[ColumnName]): Selection[Any, Any, Cons[Any, A, Empty]] = Selection(Cons(Constant(value, option), Empty)) @@ -378,26 +469,28 @@ trait SelectModule { self: ExprModule with TableModule => def name: Option[ColumnName] - def toColumn(index: Int) : Column[ColumnType] + def toColumn(index: Int): Column[ColumnType] } object ColumnSelection { - sealed case class Constant[ColumnType: TypeTag](value: ColumnType, name: Option[ColumnName]) extends ColumnSelection[Any, ColumnType] { + sealed case class Constant[ColumnType: TypeTag](value: ColumnType, name: Option[ColumnName]) + extends ColumnSelection[Any, ColumnType] { def typeTag: TypeTag[ColumnType] = implicitly[TypeTag[ColumnType]] - def toColumn(index: Int) : Column[ColumnType] = name match { + def toColumn(index: Int): Column[ColumnType] = name match { case Some(value) => Column.Named(value) - case None => Column.Indexed(index) + case None => Column.Indexed(index) } } - sealed case class Computed[F, Source, ColumnType](expr: Expr[F, Source, ColumnType], name: Option[ColumnName]) extends ColumnSelection[Source, ColumnType] { + sealed case class Computed[F, Source, ColumnType](expr: Expr[F, Source, ColumnType], name: Option[ColumnName]) + extends ColumnSelection[Source, ColumnType] { implicit def typeTag: TypeTag[ColumnType] = Expr.typeTagOf(expr) - def toColumn(index: Int) : Column[ColumnType] = name match { + def toColumn(index: Int): Column[ColumnType] = name match { case Some(value) => Column.Named(value) - case None => Column.Indexed(index) + case None => Column.Indexed(index) } } } @@ -406,7 +499,7 @@ trait SelectModule { self: ExprModule with TableModule => type SelectionsRepr[Source1, T] type ResultTypeRepr - + type Append[Source1, That <: SelectionSet[Source1]] <: SelectionSet[Source1] type ColumnHead @@ -414,7 +507,7 @@ trait SelectModule { self: ExprModule with TableModule => type SelectionTail <: SelectionSet[Source] type CS <: ColumnSet - def columnSet(startingIndex: Int) : CS + def columnSet(startingIndex: Int): CS def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] @@ -440,12 +533,12 @@ trait SelectModule { self: ExprModule with TableModule => case object Empty extends SelectionSet[Any] { - override type ColumnHead = Unit - override type ColumnTail = ColumnSet.Empty + override type ColumnHead = Unit + override type ColumnTail = ColumnSet.Empty override type SelectionTail = SelectionSet.Empty override type CS = ColumnSet.Empty - override def columnSet(startingIndex: Int) : CS = ColumnSet.Empty + override def columnSet(startingIndex: Int): CS = ColumnSet.Empty override type SelectionsRepr[Source1, T] = Unit @@ -464,15 +557,15 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class Cons[-Source, A, B <: SelectionSet[Source]](head: ColumnSelection[Source, A], tail: B) extends SelectionSet[Source] { self => - override type ColumnHead = A - override type ColumnTail = tail.CS + override type ColumnHead = A + override type ColumnTail = tail.CS override type SelectionTail = B - + override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] - override def columnSet(startingIndex: Int) : CS = + override def columnSet(startingIndex: Int): CS = ColumnSet.Cons[ColumnHead, ColumnTail](head.toColumn(startingIndex), tail.columnSet(startingIndex + 1)) - + override type SelectionsRepr[Source1, T] = (ColumnSelection[Source1, A], tail.SelectionsRepr[Source1, T]) override type ResultTypeRepr = (A, tail.ResultTypeRepr) @@ -484,7 +577,7 @@ trait SelectModule { self: ExprModule with TableModule => Cons[Source1, A, tail.Append[Source1, That]](head, tail ++ that) override def selectionsUntyped: List[ColumnSelection[Source, _]] = head :: tail.selectionsUntyped - + override def selections[Source1 <: Source, T]: SelectionsRepr[Source1, T] = (head, tail.selections[Source1, T]) } } From 862dc5f5243e1f6659820b34ed790fb3bdb41250 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 22 Sep 2021 22:35:58 +0200 Subject: [PATCH 287/673] Update sbt-ci-release to 1.5.9 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ce77ca9b5..dc0a41004 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.29") From e07f8156aa6fbc5ae9feb6ac3f189b3ace0c62ce Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 23 Sep 2021 15:09:17 +0200 Subject: [PATCH 288/673] Update postgresql to 42.2.24 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index fd2c90b42..6989dbbd8 100644 --- a/build.sbt +++ b/build.sbt @@ -203,7 +203,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.23" % Compile, + "org.postgresql" % "postgresql" % "42.2.24" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 5a512a75aa53658bc61e456f06c03a44ba74de33 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 21 Oct 2021 14:21:26 +0200 Subject: [PATCH 289/673] add subselect partially applied and subselect builder --- core/jvm/src/main/scala/zio/sql/Sql.scala | 15 +- core/jvm/src/main/scala/zio/sql/select.scala | 155 ++++++++++++------ .../scala/zio/sql/JdbcInternalModule.scala | 2 + .../scala/zio/sql/mysql/MysqlModule.scala | 2 + .../scala/zio/sql/oracle/OracleModule.scala | 2 + .../zio/sql/postgresql/PostgresModule.scala | 1 + .../zio/sql/sqlserver/SqlServerModule.scala | 23 ++- 7 files changed, 136 insertions(+), 64 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index c0bf565f0..380953681 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -15,16 +15,15 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu * SELECT ARBITRARY(age), COUNT(*) FROM person GROUP BY age */ def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = - SelectBuilder(selection) + SelectBuilder(selection) - // def select(selection: AbstractSelection): SelectBuilder[selection.F, selection.A, selection.B] = - // SelectBuilder(selection) + // selection.Source (aka A) <:< ParentTable with from[Source0] + def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] - // def subselect[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B] = - // SubselectBuilder(selection) - - def subselect[ParentTable](selection: AbstractSelection): SubselectBuilder[selection.F, selection.Source, selection.B, ParentTable] = - SubselectBuilder(selection) + final class SubselectPartiallyApplied[ParentTable](val dummy: Boolean = true) { + def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = + SubselectBuilder(selection) + } def deleteFrom[T <: Table](table: T): Delete[table.TableType] = Delete(table, true) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 58dc6c519..8a806205b 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -23,7 +23,10 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Select(Selection[F0, Source0, B0](b), Some(table), true, Nil) + val x: Read.Select[F0, selection.value.ResultTypeRepr, Source0,selection.value.ColumnHead,selection.value.SelectionTail] = + Read.Select(Selection[F0, Source0, B0](b), Some(table), true, Nil) + + x } } @@ -65,41 +68,40 @@ trait SelectModule { self: ExprModule with TableModule => // ) orders // order by orders.order_date desc - // Source == orders, ParentTable == customers + + // Source == customers with orders, + // ParentTable == customers, + // Source0 = orders + + //ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] sealed case class SubselectBuilder[F, Source, B <: SelectionSet[Source], ParentTable]( - abstractSelection: AbstractSelection + selection: Selection[F, Source, B] ) { + def from[Source0](table: Table.Aux[Source0])(implicit + // ev2: Source <:< Source0 with ParentTable, + ev: B <:< SelectionSet.Cons[Source, selection.value.ColumnHead, selection.value.SelectionTail] + ): + Read.Subselect[ + F, + selection.value.ResultTypeRepr, + Source, + Source0, + selection.value.ColumnHead, + selection.value.SelectionTail + ] = { + type B0 = SelectionSet.ConsAux[ + selection.value.ResultTypeRepr, + Source, + selection.value.ColumnHead, + selection.value.SelectionTail + ] + val b: B0 = selection.value.asInstanceOf[B0] - // type arguments [Source, SubselectBuilder.this.abstractSelection.value.ColumnHead, SubselectBuilder.this.abstractSelection.value.SelectionTail] - // do not conform to class Cons's type parameter bounds [-Source,A,B <: SelectModule.this.SelectionSet[Source]] - // def from[Source0](table: Table.Aux[Source0])(implicit - // ev: B <:< SelectionSet.Cons[Source, abstractSelection.value.ColumnHead, abstractSelection.value.SelectionTail], - // ev2: Source <:< Source0 with ParentTable - // ): Read.Select[ - // F, - // abstractSelection.value.ResultTypeRepr, - // Source0, - // abstractSelection.value.ColumnHead, - // abstractSelection.value.SelectionTail - // ] = { - // type B0 = SelectionSet.ConsAux[ - // abstractSelection.value.ResultTypeRepr, - // Source0, - // abstractSelection.value.ColumnHead, - // abstractSelection.value.SelectionTail - // ] - // val b: B0 = abstractSelection.value.asInstanceOf[B0] - - // //Read.Select(Selection[F, Source0, B0](b), Some(table), true, Nil) - // val _ = table - // val _ = b - // ??? - // } + // Read.Subselect[F,selection.value.ResultTypeRepr, Source, Source0,selection.value.ColumnHead,selection.value.SelectionTail] = + Read.Subselect(Selection[F, Source, B0](b), Some(table), true) + } } - // select(orderId ++ productId ++ unitPrice).from(orderDetails).where(unitPrice > subselect[orderDetails.TableType](avg(unitPrice2)).from(orderDetails2).where(productId === productId2)) - //final case class SubSelect[F, -From, +Value](select: Select[F, (Value, Unit), From with _, Value, SelectionSet.Empty]) extends Expr[F, From, Value] - /** * A `Read[A]` models a selection of a set of values of type `A`. */ @@ -313,9 +315,9 @@ trait SelectModule { self: ExprModule with TableModule => } sealed case class Mapped[Repr, Out, Out2](read: Read.Aux[Repr, Out], f: Out => Out2) extends Read[Out2] { - type ResultType = Repr + override type ResultType = Repr - val mapper = read.mapper.andThen(f) + override val mapper = read.mapper.andThen(f) override type ColumnHead = read.ColumnHead override type ColumnTail = read.ColumnTail @@ -329,15 +331,15 @@ trait SelectModule { self: ExprModule with TableModule => selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], table: Option[Table.Aux[Source]], whereExpr: Expr[_, Source, Boolean], - groupBy: List[Expr[_, Source, Any]], + groupBy: List[Expr[_, Source, Any]] = Nil, havingExpr: Expr[_, Source, Boolean] = true, orderBy: List[Ordering[Expr[_, Source, Any]]] = Nil, offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql limit: Option[Long] = None ) extends Read[Repr] { self => - type ResultType = Repr + override type ResultType = Repr - val mapper: Repr => Repr = identity(_) + override val mapper: Repr => Repr = identity(_) def where(whereExpr2: Expr[_, Source, Boolean]): Select[F, Repr, Source, Head, Tail] = copy(whereExpr = self.whereExpr && whereExpr2) @@ -374,14 +376,72 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = selection.value.CS } - // select(orderId ++ productId ++ unitPrice).from(orderDetails).where(unitPrice > subselect[orderDetails.TableType](avg(unitPrice2)).from(orderDetails2).where(productId === productId2)) - // final case class SubSelect[F, -From, +Value](select: Select[F, (Value, Unit), From with _, Value, SelectionSet.Empty]) extends Expr[F, From, Value] + // firstName ++ lastName + // Read.Select[Features.Union[Features.Source, Features.Source], (String, (String, Unit)), customers.TableType, String, SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] = + + //TODO add support for Expr + // select(orderId ++ productId ++ unitPrice) + // .from(orderDetails) + // .where(unitPrice > subselect[orderDetails.TableType](avg(unitPrice2)) + // .from(orderDetails2).where(productId === productId2)) + + // final case class SubSelect[F, -Source, -Subsource, +Value](select: Select[F, (Value, Unit), Subsource, Value, _]) extends Expr[F, From, Value] + + // Cons[-Source, A, B <: SelectionSet[Source]] + sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( + selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], + table: Option[Table.Aux[Subsource]], + whereExpr: Expr[_, Source, Boolean], + groupBy: List[Expr[_, Source, Any]] = Nil, + havingExpr: Expr[_, Source, Boolean] = true, + orderBy: List[Ordering[Expr[_, Source, Any]]] = Nil, + offset: Option[Long] = None, + limit: Option[Long] = None + ) extends Read[Repr] { self => + + def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = + copy(whereExpr = self.whereExpr && whereExpr2) + + def limit(n: Long): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(limit = Some(n)) + + def offset(n: Long): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(offset = Some(n)) + + def orderBy( + o: Ordering[Expr[_, Source, Any]], + os: Ordering[Expr[_, Source, Any]]* + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = + copy(orderBy = self.orderBy ++ (o :: os.toList)) + + def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit + ev: Features.IsAggregated[F] + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { + val _ = ev + copy(groupBy = groupBy ++ (key :: keys.toList)) + } + + def having(havingExpr2: Expr[_, Source, Boolean])(implicit + ev: Features.IsAggregated[F] + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { + val _ = ev + copy(havingExpr = self.havingExpr && havingExpr2) + } + override type ResultType = Repr + + override val mapper: Repr => Repr = identity(_) + + override type ColumnHead = selection.value.ColumnHead + override type ColumnTail = selection.value.ColumnTail + + override val columnSet: CS = selection.value.columnSet(0) + + override type CS = selection.value.CS + } sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { - type ResultType = Repr + override type ResultType = Repr - val mapper: ResultType => Out = left.mapper + override val mapper: ResultType => Out = left.mapper //TODO union is allowed only if two selection are of the same column names and the same column types override type ColumnHead = left.ColumnHead @@ -397,7 +457,7 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { type ResultType = (B, Unit) - val mapper: ResultType => (B, Unit) = identity(_) + override val mapper: ResultType => (B, Unit) = identity(_) def typeTag: TypeTag[B] = implicitly[TypeTag[B]] @@ -412,19 +472,6 @@ trait SelectModule { self: ExprModule with TableModule => def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) } - sealed trait AbstractSelection { - type F - type Source - type B <: SelectionSet[Source] - - type ColumnHead - type SelectionTail <: SelectionSet[Source] - - // type arguments [Source0, SubselectBuilder.this.abstractSelection.value.ColumnHead, SubselectBuilder.this.abstractSelection.value.SelectionTail] - // do not conform to class Cons's type parameter bounds [-Source,A,B <: SelectModule.this.SelectionSet[Source]] - val value1 : B = ??? - } - /** * A columnar selection of `B` from a source `A`, modeled as `A => B`. */ diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index e48a49ab5..1a432c5dc 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -109,6 +109,8 @@ trait JdbcInternalModule { self: Jdbc => read match { case Read.Mapped(read, _) => getColumns(read) + case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? + case Read.Select(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 5b135ffd8..9ef5030cd 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -80,6 +80,8 @@ trait MysqlModule extends Jdbc { self => read match { case Read.Mapped(read, _) => renderReadImpl(read) + + case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index ea479c27d..c7af2c7fb 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -129,6 +129,8 @@ trait OracleModule extends Jdbc { self => read match { case Read.Mapped(read, _) => buildReadString(read, builder) + case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? + case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 020044260..91cdbe4db 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -467,6 +467,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { case Read.Mapped(read, _) => renderReadImpl(read) + case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 8aef0836f..fc7b2b6ec 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -90,19 +90,36 @@ trait SqlServerModule extends Jdbc { self => select(customerId ++ fName).from(customers).asTable("derivedCustomers") val derivedId :*: derivedName = derived.columns + + // Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] + val ww: Read.Select[Features.Union[Features.Source, Features.Source], (String, (String, Unit)), customers.TableType, String, SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] = + select(fName ++ lName).from(customers) val e = select(fName ++ lName).from(customers).asTable(TableName.Source("derivedCustomers")) //JOIN example val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) + + val xq = fName ++ lName ++ orderDate // Cross Apply example // import SqlServerTable._ // val crossApplyExample = select(fName ++ lName ++ orderDate ++ fkCustomerId).from(customers.crossApply(select(orderDate).from(orders).where(customerId === fkCustomerId))) - // val xx = select(orderId ++ Selection.constant("hello")).from(orders).union(select(fkCustomerId ++ Selection.constant("world")).from(orders)) + // cannot prove orders <:< orders with customers + + // SubselectBuilder[Features.Source,orders.TableType,SelectionSet.Cons[orders.TableType,LocalDate,SelectionSet.Empty],customers.TableType] + val xwe = subselect[customers.TableType](orderDate) - val q = select(orderId ++ orderDate).from(orders).where(fkCustomerId === "") + // Read.Subselect[F,(LocalDate, (String, Unit)),orders.TableType with customers.TableType, orders.TableType, LocalDate,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] + val xw = subselect[orders.TableType](orderDate ++ fName).from(orders) //.where(customerId === fkCustomerId) + // Read.Subselect[F, (LocalDate, (String, Unit)),orders.TableType with customers.TableType, orders.TableType, LocalDate,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] + val xww = subselect[customers.TableType](orderDate ++ fName).from(orders) //.where(customerId === fkCustomerId) + + // SelectBuilder[F,orders.TableType with customers.TableType, SelectionSet.Cons[orders.TableType with customers.TableType, LocalDate,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]]] + val xwx = select(orderDate ++ fName)//.from(orders) //.where(customerId === fkCustomerId) + + //select(orderDate ++ fName).from(orders) } } @@ -235,6 +252,8 @@ trait SqlServerModule extends Jdbc { self => read match { case Read.Mapped(read, _) => buildReadString(read) + case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? + //todo offset (needs orderBy, must use fetch _instead_ of top) case read0 @ Read.Select(_, _, _, _, _, _, _, _) => object Dummy { From 21274aa9e6dce59d7f66cbdfc50cccfb230c13c4 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 26 Oct 2021 16:02:10 +0200 Subject: [PATCH 290/673] some written cross apply outer apply in terms of asTable and subselect --- core/jvm/src/main/scala/zio/sql/Sql.scala | 3 +- core/jvm/src/main/scala/zio/sql/select.scala | 73 +++--- core/jvm/src/main/scala/zio/sql/table.scala | 22 +- .../zio/sql/sqlserver/SqlServerModule.scala | 226 +++++++++--------- 4 files changed, 170 insertions(+), 154 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 380953681..8b89c17f6 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,10 +17,9 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = SelectBuilder(selection) - // selection.Source (aka A) <:< ParentTable with from[Source0] def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] - final class SubselectPartiallyApplied[ParentTable](val dummy: Boolean = true) { + final class SubselectPartiallyApplied[ParentTable] { def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = SubselectBuilder(selection) } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 8a806205b..f180cc9c9 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -23,10 +23,7 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - val x: Read.Select[F0, selection.value.ResultTypeRepr, Source0,selection.value.ColumnHead,selection.value.SelectionTail] = - Read.Select(Selection[F0, Source0, B0](b), Some(table), true, Nil) - - x + Read.Select(Selection[F0, Source0, B0](b), Some(table), true, Nil) } } @@ -54,51 +51,43 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] - Read.Select(Selection[F, Source, B0](b), None, true, Nil) + Read.Select(Selection[F, Source, B0](b), None, true) } } - // select customers.id, customers.first_name, customers.last_name, orders.order_date - // from customers - // cross apply ( - // Select top 1 * - // from orders - // where orders.customer_id = customers.id - // order by orders.order_date DESC - // ) orders - // order by orders.order_date desc - - - // Source == customers with orders, - // ParentTable == customers, + // Source == customers with orders, + // ParentTable == customers, // Source0 = orders - - //ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] sealed case class SubselectBuilder[F, Source, B <: SelectionSet[Source], ParentTable]( selection: Selection[F, Source, B] ) { def from[Source0](table: Table.Aux[Source0])(implicit - // ev2: Source <:< Source0 with ParentTable, - ev: B <:< SelectionSet.Cons[Source, selection.value.ColumnHead, selection.value.SelectionTail] - ): - Read.Subselect[ + ev1: Source0 with ParentTable <:< Source, + ev2: B <:< SelectionSet.Cons[Source, selection.value.ColumnHead, selection.value.SelectionTail] + ): Read.Subselect[ F, selection.value.ResultTypeRepr, - Source, + Source with ParentTable, Source0, selection.value.ColumnHead, selection.value.SelectionTail ] = { type B0 = SelectionSet.ConsAux[ selection.value.ResultTypeRepr, - Source, + Source with ParentTable, selection.value.ColumnHead, selection.value.SelectionTail ] - val b: B0 = selection.value.asInstanceOf[B0] + val b: B0 = selection.value.asInstanceOf[B0] - // Read.Subselect[F,selection.value.ResultTypeRepr, Source, Source0,selection.value.ColumnHead,selection.value.SelectionTail] = - Read.Subselect(Selection[F, Source, B0](b), Some(table), true) + //TODO + // 1. Read.Select is almost identical to Read.Subselect, get rid of duplication + // 2. Create subselect Expr, so subselects in where clause are possible + // 3. Try to translate cross apply to sql query + // 4. Check ColumnSet.Cons#tableType[TableType] + // 5. change subselect[table.TableType] to some better name? + // 6. Read.Literal = what is a TableType of a Table derived from Literal "selection" ? + Read.Subselect(Selection[F, Source with ParentTable, B0](b), Some(table), true) } } @@ -112,12 +101,13 @@ trait SelectModule { self: ExprModule with TableModule => type ColumnHead type ColumnTail <: ColumnSet + type TableType type CS <: ColumnSet.Cons[ColumnHead, ColumnTail] val columnSet: CS - def asTable(tableName: TableName): columnSet.TableSource = columnSet.table(tableName) + def asTable(tableName: TableName): columnSet.TableSource[TableType] = columnSet.tableOfType[TableType](tableName) /** * Maps the [[Read]] query's output to another type by providing a function @@ -317,6 +307,8 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class Mapped[Repr, Out, Out2](read: Read.Aux[Repr, Out], f: Out => Out2) extends Read[Out2] { override type ResultType = Repr + override type TableType = read.TableType + override val mapper = read.mapper.andThen(f) override type ColumnHead = read.ColumnHead @@ -339,6 +331,8 @@ trait SelectModule { self: ExprModule with TableModule => ) extends Read[Repr] { self => override type ResultType = Repr + override type TableType = Source + override val mapper: Repr => Repr = identity(_) def where(whereExpr2: Expr[_, Source, Boolean]): Select[F, Repr, Source, Head, Tail] = @@ -376,18 +370,14 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = selection.value.CS } - // firstName ++ lastName - // Read.Select[Features.Union[Features.Source, Features.Source], (String, (String, Unit)), customers.TableType, String, SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] = - - //TODO add support for Expr + // TODO add support for Expr // select(orderId ++ productId ++ unitPrice) // .from(orderDetails) // .where(unitPrice > subselect[orderDetails.TableType](avg(unitPrice2)) // .from(orderDetails2).where(productId === productId2)) - // final case class SubSelect[F, -Source, -Subsource, +Value](select: Select[F, (Value, Unit), Subsource, Value, _]) extends Expr[F, From, Value] + //final case class SubSelect[F, -Source, -Subsource, +Value](select: Select[F, (Value, Unit), Subsource, Value, _]) extends Expr[F, From, Value] - // Cons[-Source, A, B <: SelectionSet[Source]] sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], table: Option[Table.Aux[Subsource]], @@ -395,10 +385,12 @@ trait SelectModule { self: ExprModule with TableModule => groupBy: List[Expr[_, Source, Any]] = Nil, havingExpr: Expr[_, Source, Boolean] = true, orderBy: List[Ordering[Expr[_, Source, Any]]] = Nil, - offset: Option[Long] = None, + offset: Option[Long] = None, limit: Option[Long] = None ) extends Read[Repr] { self => + override type TableType = Source + def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(whereExpr = self.whereExpr && whereExpr2) @@ -441,6 +433,8 @@ trait SelectModule { self: ExprModule with TableModule => extends Read[Out] { override type ResultType = Repr + override type TableType = left.TableType with right.TableType + override val mapper: ResultType => Out = left.mapper //TODO union is allowed only if two selection are of the same column names and the same column types @@ -457,6 +451,9 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { type ResultType = (B, Unit) + //TODO what is a TableType of a Table derived from Literal selection ? + override type TableType = B + override val mapper: ResultType => (B, Unit) = identity(_) def typeTag: TypeTag[B] = implicitly[TypeTag[B]] @@ -491,7 +488,7 @@ trait SelectModule { self: ExprModule with TableModule => import SelectionSet.{ Cons, Empty } import ColumnSelection._ - // val empty: Selection[Any, Any, Empty] = Selection(Empty) + // val empty: Selection[Any, Any, Empty] = Selection(Empty) def constantOption[A: TypeTag](value: A, option: Option[ColumnName]): Selection[Any, Any, Cons[Any, A, Empty]] = Selection(Cons(Constant(value, option), Empty)) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 4cb22af26..916a5594f 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -39,7 +39,7 @@ trait TableModule { self: ExprModule with SelectModule => sealed case class Cons[A, B <: ColumnSet](head: Column[A], tail: B) extends ColumnSet { self => type ColumnsRepr[T] = (Expr[Features.Source, T, A], tail.ColumnsRepr[T]) type Append[That <: ColumnSet] = Cons[A, tail.Append[That]] - type TableSource = Table.Source.Aux_[ColumnsRepr, A :*: B] + type TableSource[TableType] = Table.Source.Aux[ColumnsRepr, TableType, A :*: B] override def ++[That <: ColumnSet](that: That): Append[That] = Cons(head, tail ++ that) @@ -53,7 +53,17 @@ trait TableModule { self: ExprModule with SelectModule => val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) val columns: ColumnsRepr[TableType] = mkColumns[TableType](name0) val columnsUntyped: List[Column.Untyped] = self.columnsUntyped + } + def tableOfType[TT](name0: TableName): Table.Source.Aux[ColumnsRepr, TT, A :*: B] = + new Table.Source { + override type TableType = TT + type Repr[C] = ColumnsRepr[C] + type Cols = A :*: B + val name: TableName = name0 + val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) + val columns: ColumnsRepr[TableType] = mkColumns[TableType](name0) + val columnsUntyped: List[Column.Untyped] = self.columnsUntyped } override protected def mkColumns[T](name: TableName): ColumnsRepr[T] = @@ -85,7 +95,7 @@ trait TableModule { self: ExprModule with SelectModule => def unapply[A, B](tuple: (A, B)): Some[(A, B)] = Some(tuple) } - sealed trait Column[+A]{ + sealed trait Column[+A] { def typeTag: TypeTag[A] } @@ -93,7 +103,7 @@ trait TableModule { self: ExprModule with SelectModule => sealed case class Named[A: TypeTag](columnName: String) extends Column[A] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } - sealed case class Indexed[A: TypeTag](index: Int) extends Column[A] { + sealed case class Indexed[A: TypeTag](index: Int) extends Column[A] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } type Untyped = Column[_] @@ -181,8 +191,10 @@ trait TableModule { self: ExprModule with SelectModule => } sealed case class DialectSpecificTable[A](tableExtension: TableExtension[A]) extends Table { - - val columnsUntyped: List[Column.Untyped] = tableExtension.columnsUntyped + + override type TableType = A + + override val columnsUntyped: List[Column.Untyped] = tableExtension.columnsUntyped } } } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index fc7b2b6ec..8aa5b85ba 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -12,72 +12,63 @@ trait SqlServerModule extends Jdbc { self => sealed trait SqlServerTable[+A] extends Table.TableEx - // object SqlServerTable { - - // sealed case class SelectedTable[F1, F2, ColumnsRepr[_], Cols, A, B]( - // crossType: CrossType, - // left: Table.Source.Aux[ColumnsRepr, A, Cols], - // //tableValuedFuctnion : TableValuedFunction ??? - // select: Read.Select[F1, Cols, B], - // expr: Expr[_, A with B, Boolean] - // ) extends SqlServerTable[A with B] { self => - - // // def where(whereExpr: Expr[F1 :||: F2, A with B, Boolean]): SelectedTable[F1, F2, ColumnsRepr, Cols, A, B] = - // // self.copy(expr = whereExpr) - - // def columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ select.table.get.columnsUntyped - // } - - // implicit def tableSourceToSelectedBuilder[ColumnsRepr[_], A, Cols]( - // table: Table.Source.Aux[ColumnsRepr, A, Cols] - // ): SelectedTableBuilder[ColumnsRepr, A, Cols] = - // new SelectedTableBuilder(table) - - // sealed case class SelectedTableBuilder[ColumnsRepr[_], A, Cols](table: Table.Source.Aux[ColumnsRepr, A, Cols]) { - // self => - - // /** - // * Instead of Read.Select we need to accept some 'TableValuedFunction' which would: - // * (or we could accept Select and turn it into TableValuedFunction - but we need to make sure only sensible things compile) - // * - contain selection, table and optionally where clause - // * - create new Table of type B created out of columns in select.selection - // * - where clause need to access Table.Aux[A] and origin select.Table to create Expr. - // */ - // final def crossApply[F1, F2, SelectionCols, SelectTableType]( - // select: Read.Select[F1, SelectionCols, SelectTableType] - // ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = { - - // ??? - // } - - // final def outerApply[F1, F2, SelectTableType]( - // select: Read.Select[F1, Cols, SelectTableType] - // ): SelectedTable[F1, F2, ColumnsRepr, Cols, table.TableType, SelectTableType] = - // SelectedTable[F1, F2, ColumnsRepr, Cols, A, SelectTableType]( - // CrossType.OuterApply, - // table, - // select, - // Expr.literal(false) - // ) - // } - // } - - sealed trait CrossType - object CrossType { - case object CrossApply extends CrossType - case object OuterApply extends CrossType + object SqlServerTable { + + import scala.language.implicitConversions + + sealed trait CrossType + object CrossType { + case object CrossApply extends CrossType + case object OuterApply extends CrossType + } + + sealed case class SelectedTable[A, B]( + crossType: CrossType, + left: Table.Aux[A], + right: Table.Aux[B] + ) extends SqlServerTable[A with B] { self => + + def columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ right.columnsUntyped + } + + implicit def tableSourceToSelectedBuilder[A]( + table: Table.Aux[A] + ): SelectedTableBuilder[A] = + new SelectedTableBuilder(table) + + sealed case class SelectedTableBuilder[A](left: Table.Aux[A]) { + self => + + final def crossApply[B]( + right: Table.Aux[B] + ): Table.Aux[A with B] = { + + val tableExtension = SelectedTable( + CrossType.CrossApply, + left, + right + ) + + new Table.DialectSpecificTable(tableExtension) + } + + final def outerApply[B]( + right: Table.Aux[B] + ): Table.Aux[A with B] = { + + val tableExtension = SelectedTable( + CrossType.OuterApply, + left, + right + ) + + new Table.DialectSpecificTable(tableExtension) + } + } } object QueriesExamples { - val x: Cons[java.util.UUID, Singleton[String]] = uuid("id") ++ string("first_name") - - // val customers = - // (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) - // .table("customers") - // val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = - // customers.columns - val customers = (uuid("id") ++ string("first_name") ++ string("last_name")).table("customers") val customerId :*: fName :*: lName :*: _ = customers.columns @@ -86,40 +77,58 @@ trait SqlServerModule extends Jdbc { self => val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - val derived = - select(customerId ++ fName).from(customers).asTable("derivedCustomers") + val derived = + select(customerId ++ fName).from(customers).asTable("derivedCustomers") val derivedId :*: derivedName = derived.columns - // Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] - val ww: Read.Select[Features.Union[Features.Source, Features.Source], (String, (String, Unit)), customers.TableType, String, SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] = - select(fName ++ lName).from(customers) - + //AS TABLE example val e = select(fName ++ lName).from(customers).asTable(TableName.Source("derivedCustomers")) + // select customers.id, customers.first_name, customers.last_name, orders.order_date + // from customers + // cross apply ( + // Select top 1 * + // from orders + // where orders.customer_id = customers.id + // order by orders.order_date DESC + // ) orders + // order by orders.order_date desc + + // TODO waht about select(fName ++ lName ++ orderDate ++ fkCustomerId).from(customers).crossApply(....) -> so everything is not inside from clause + + //Cross Apply example + import SqlServerTable._ + val crossApplyExample = select(fName ++ lName ++ orderDate ++ fkCustomerId) + .from( + customers + .crossApply( + subselect[customers.TableType](orderDate) + .from(orders) + .where(customerId === fkCustomerId) + .asTable("orders") + ) + ) + //JOIN example val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) - val xq = fName ++ lName ++ orderDate - - // Cross Apply example - // import SqlServerTable._ - // val crossApplyExample = select(fName ++ lName ++ orderDate ++ fkCustomerId).from(customers.crossApply(select(orderDate).from(orders).where(customerId === fkCustomerId))) - - // cannot prove orders <:< orders with customers - - // SubselectBuilder[Features.Source,orders.TableType,SelectionSet.Cons[orders.TableType,LocalDate,SelectionSet.Empty],customers.TableType] - val xwe = subselect[customers.TableType](orderDate) - - // Read.Subselect[F,(LocalDate, (String, Unit)),orders.TableType with customers.TableType, orders.TableType, LocalDate,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] - val xw = subselect[orders.TableType](orderDate ++ fName).from(orders) //.where(customerId === fkCustomerId) - // Read.Subselect[F, (LocalDate, (String, Unit)),orders.TableType with customers.TableType, orders.TableType, LocalDate,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]] - val xww = subselect[customers.TableType](orderDate ++ fName).from(orders) //.where(customerId === fkCustomerId) - - // SelectBuilder[F,orders.TableType with customers.TableType, SelectionSet.Cons[orders.TableType with customers.TableType, LocalDate,SelectionSet.Cons[customers.TableType,String,SelectionSet.Empty]]] - val xwx = select(orderDate ++ fName)//.from(orders) //.where(customerId === fkCustomerId) - - //select(orderDate ++ fName).from(orders) + // SEBSELECT example + val xwe = subselect[orders.TableType](orderDate).from(customers) + + // SUBSELECT another example + // ev1: Source0 with ParentTable <:< Source, + // orders.TableType with customers.TabelType <:< orders.TableType with customers.TableType + val xww = subselect[customers.TableType](orderDate ++ fName).from(orders).where(customerId === fkCustomerId) + val xwwx = subselect[customers.TableType](orderDate ++ fName) + .from(orders) + .where(customerId === fkCustomerId) + .asTable("orders2") + + // ev1: Source0 with ParentTable <:< Source, + // orders.TableType with customers.TabelType <:< orders.TableType + val qqqqq = + subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ordersx") } } @@ -132,13 +141,12 @@ trait SqlServerModule extends Jdbc { self => //TODO check def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Source(table, column) => { + case Expr.Source(table, column) => (table, column) match { - case (tableName: TableName, Column.Named(columnName)) => + case (tableName: TableName, Column.Named(columnName)) => val _ = builder.append(tableName).append(".").append(columnName) - case _ => () + case _ => () } - } case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) buildExpr(base) @@ -389,27 +397,27 @@ trait SqlServerModule extends Jdbc { self => case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.DialectSpecificTable(table) => - // table match { - // case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => - // buildTable(left) + case Table.DialectSpecificTable(table) => + // table match { + // case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => + // buildTable(left) - // crossType match { - // case SqlServerSpecific.CrossType.CrossApply => builder.append(" CROSS APPLY ( ") - // case SqlServerSpecific.CrossType.OuterApply => builder.append(" OUTER APPLY ( ") - // } + // crossType match { + // case SqlServerSpecific.CrossType.CrossApply => builder.append(" CROSS APPLY ( ") + // case SqlServerSpecific.CrossType.OuterApply => builder.append(" OUTER APPLY ( ") + // } - // builder.append("SELECT ") - // buildSelection(select.selection.value) - // builder.append(" FROM ") - // buildTable(select.table.get) - // builder.append(" WHERE ") - // buildExpr(on) + // builder.append("SELECT ") + // buildSelection(select.selection.value) + // builder.append(" FROM ") + // buildTable(select.table.get) + // builder.append(" WHERE ") + // buildExpr(on) - // builder.append(" ) ") - // val _ = buildTable(select.table.get) + // builder.append(" ) ") + // val _ = buildTable(select.table.get) - // } + // } case Table.Joined(joinType, left, right, on) => buildTable(left) From 9140805a5f480613ca32a6da8aa62bd944dcef24 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 2 Nov 2021 04:38:04 +0100 Subject: [PATCH 291/673] Update silencer-lib, silencer-lib_2.13.6, ... to 1.7.7 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index f85e8ca12..51c53dffa 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -154,7 +154,7 @@ object BuildHelper { libraryDependencies ++= { if (scalaVersion.value == ScalaDotty) Seq( - "com.github.ghik" % s"silencer-lib_2.13.6" % "1.7.5" % Provided + "com.github.ghik" % s"silencer-lib_2.13.6" % "1.7.7" % Provided ) else Seq( From ff9c43d58041767a8184542f23d1726b3d60e67e Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 13 Nov 2021 22:33:08 +0100 Subject: [PATCH 292/673] added derived table and cross apply test --- core/jvm/src/main/scala/zio/sql/Sql.scala | 15 +- core/jvm/src/main/scala/zio/sql/expr.scala | 7 +- .../jvm/src/main/scala/zio/sql/newtypes.scala | 13 +- core/jvm/src/main/scala/zio/sql/select.scala | 138 +++------- core/jvm/src/main/scala/zio/sql/table.scala | 200 +++++++++++---- .../scala/zio/sql/JdbcInternalModule.scala | 4 +- .../scala/zio/sql/mysql/MysqlModule.scala | 7 +- .../scala/zio/sql/oracle/OracleModule.scala | 8 +- .../zio/sql/postgresql/PostgresModule.scala | 9 +- .../zio/sql/sqlserver/SqlServerModule.scala | 240 ++++++++++++------ .../sql/sqlserver/SqlServerModuleSpec.scala | 121 ++++----- 11 files changed, 448 insertions(+), 314 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 8b89c17f6..7c64ca88d 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -1,6 +1,7 @@ package zio.sql -trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule { self => +trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule { + self => /* * (SELECT *, "foo", table.a + table.b AS sum... FROM table WHERE cond) UNION (SELECT ... FROM table) @@ -15,13 +16,16 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu * SELECT ARBITRARY(age), COUNT(*) FROM person GROUP BY age */ def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = - SelectBuilder(selection) + SelectBuilder(selection) def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] - final class SubselectPartiallyApplied[ParentTable] { - def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = - SubselectBuilder(selection) + //TODO decide if this should be removed...parentTable is here only to derive type + def subselectFrom[ParentTable, F, Source, B <: SelectionSet[Source]]( + parentTable: Table.Aux[ParentTable] + )(selection: Selection[F, Source, B]) = { + val _ = parentTable + SubselectBuilder[F, Source, B, ParentTable](selection) } def deleteFrom[T <: Table](table: T): Delete[table.TableType] = Delete(table, true) @@ -33,5 +37,4 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def renderRead(read: self.Read[_]): String def renderUpdate(update: self.Update[_]): String - } diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index f84b5d1e6..40ccb9f6c 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -118,7 +118,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { - //TODO what to do with indexed column??? case Expr.Source(_, c @ Column.Named(name)) => Some(name) case _ => None } @@ -128,6 +127,12 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = Selection.computedOption(expr, exprName(expr)) + //TODO needed by suqueries in where clauses + implicit def selectionToExpr[F, A, B](subselect: Read.Subselect[F, _, A, A, B, SelectionSet.Empty]) : Expr[F, A, B] = + Expr.Subselect(subselect) + + sealed case class Subselect[F, A, B](subselect: Read.Subselect[F, _, A, A, B, SelectionSet.Empty]) extends Expr[F, A, B] + sealed case class Source[A, B] private[sql] (tableName: TableName, column: Column[B]) extends InvariantExpr[Features.Source, A, B] { def typeTag: TypeTag[B] = column.typeTag diff --git a/core/jvm/src/main/scala/zio/sql/newtypes.scala b/core/jvm/src/main/scala/zio/sql/newtypes.scala index fb96f2cd3..fb07e2f8f 100644 --- a/core/jvm/src/main/scala/zio/sql/newtypes.scala +++ b/core/jvm/src/main/scala/zio/sql/newtypes.scala @@ -1,19 +1,10 @@ package zio.sql -import scala.language.implicitConversions - trait NewtypesModule { type ColumnName = String - sealed trait TableName { - def name: String - } - object TableName { - sealed case class Source(name: String) extends TableName - sealed case class Derived(name: String) extends TableName - - implicit def strToTable(tableName: String) : TableName = TableName.Source(tableName) - } + //TODO we could use zio-prelude new types + type TableName = String sealed case class FunctionName(name: String) } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index f180cc9c9..f42f23451 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -23,7 +23,7 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Select(Selection[F0, Source0, B0](b), Some(table), true, Nil) + Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true, Nil) } } @@ -51,13 +51,15 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] - Read.Select(Selection[F, Source, B0](b), None, true) + Read.Subselect(Selection[F, Source, B0](b), None, true) } } - // Source == customers with orders, - // ParentTable == customers, - // Source0 = orders + final class SubselectPartiallyApplied[ParentTable] { + def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = + SubselectBuilder(selection) + } + sealed case class SubselectBuilder[F, Source, B <: SelectionSet[Source], ParentTable]( selection: Selection[F, Source, B] ) { @@ -80,13 +82,6 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - //TODO - // 1. Read.Select is almost identical to Read.Subselect, get rid of duplication - // 2. Create subselect Expr, so subselects in where clause are possible - // 3. Try to translate cross apply to sql query - // 4. Check ColumnSet.Cons#tableType[TableType] - // 5. change subselect[table.TableType] to some better name? - // 6. Read.Literal = what is a TableType of a Table derived from Literal "selection" ? Read.Subselect(Selection[F, Source with ParentTable, B0](b), Some(table), true) } } @@ -96,18 +91,18 @@ trait SelectModule { self: ExprModule with TableModule => */ sealed trait Read[+Out] { self => type ResultType + type DerivedTableType val mapper: ResultType => Out type ColumnHead type ColumnTail <: ColumnSet - type TableType type CS <: ColumnSet.Cons[ColumnHead, ColumnTail] val columnSet: CS - def asTable(tableName: TableName): columnSet.TableSource[TableType] = columnSet.tableOfType[TableType](tableName) + def asTable(name: TableName): Table.DerivedTable[Read[Out]] /** * Maps the [[Read]] query's output to another type by providing a function @@ -304,79 +299,22 @@ trait SelectModule { self: ExprModule with TableModule => type ResultType = ResultType0 } - sealed case class Mapped[Repr, Out, Out2](read: Read.Aux[Repr, Out], f: Out => Out2) extends Read[Out2] { + sealed case class Mapped[Repr, Out, Out2](read: Read.Aux[Repr, Out], f: Out => Out2) extends Read[Out2] { self => override type ResultType = Repr - override type TableType = read.TableType - override val mapper = read.mapper.andThen(f) override type ColumnHead = read.ColumnHead override type ColumnTail = read.ColumnTail - override type CS = read.CS override val columnSet: CS = read.columnSet - } - - sealed case class Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]]( - selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], - table: Option[Table.Aux[Source]], - whereExpr: Expr[_, Source, Boolean], - groupBy: List[Expr[_, Source, Any]] = Nil, - havingExpr: Expr[_, Source, Boolean] = true, - orderBy: List[Ordering[Expr[_, Source, Any]]] = Nil, - offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql - limit: Option[Long] = None - ) extends Read[Repr] { self => - override type ResultType = Repr - - override type TableType = Source - - override val mapper: Repr => Repr = identity(_) - - def where(whereExpr2: Expr[_, Source, Boolean]): Select[F, Repr, Source, Head, Tail] = - copy(whereExpr = self.whereExpr && whereExpr2) - - def limit(n: Long): Select[F, Repr, Source, Head, Tail] = copy(limit = Some(n)) - - def offset(n: Long): Select[F, Repr, Source, Head, Tail] = copy(offset = Some(n)) - - def orderBy( - o: Ordering[Expr[_, Source, Any]], - os: Ordering[Expr[_, Source, Any]]* - ): Select[F, Repr, Source, Head, Tail] = - copy(orderBy = self.orderBy ++ (o :: os.toList)) - def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit - ev: Features.IsAggregated[F] - ): Select[F, Repr, Source, Head, Tail] = { - val _ = ev - copy(groupBy = groupBy ++ (key :: keys.toList)) - } - - def having(havingExpr2: Expr[_, Source, Boolean])(implicit - ev: Features.IsAggregated[F] - ): Select[F, Repr, Source, Head, Tail] = { - val _ = ev - copy(havingExpr = self.havingExpr && havingExpr2) - } - - override type ColumnHead = selection.value.ColumnHead - override type ColumnTail = selection.value.ColumnTail - - override val columnSet: CS = selection.value.columnSet(0) - - override type CS = selection.value.CS + override def asTable(name: TableName): Table.DerivedTable[Mapped[Repr, Out, Out2]] = + Table.DerivedTable(self, name) } - // TODO add support for Expr - // select(orderId ++ productId ++ unitPrice) - // .from(orderDetails) - // .where(unitPrice > subselect[orderDetails.TableType](avg(unitPrice2)) - // .from(orderDetails2).where(productId === productId2)) - - //final case class SubSelect[F, -Source, -Subsource, +Value](select: Select[F, (Value, Unit), Subsource, Value, _]) extends Expr[F, From, Value] + type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], @@ -385,14 +323,13 @@ trait SelectModule { self: ExprModule with TableModule => groupBy: List[Expr[_, Source, Any]] = Nil, havingExpr: Expr[_, Source, Boolean] = true, orderBy: List[Ordering[Expr[_, Source, Any]]] = Nil, - offset: Option[Long] = None, + offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql limit: Option[Long] = None ) extends Read[Repr] { self => - override type TableType = Source - + //TODO check if I need copy(whereExpr = self.whereExpr && whereExpr2) def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = - copy(whereExpr = self.whereExpr && whereExpr2) + copy(whereExpr = whereExpr2) def limit(n: Long): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(limit = Some(n)) @@ -417,6 +354,9 @@ trait SelectModule { self: ExprModule with TableModule => val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) } + + override def asTable(name: TableName): Table.DerivedTable[Subselect[F, Repr, Source, Subsource, Head, Tail]] = Table.DerivedTable(self, name) + override type ResultType = Repr override val mapper: Repr => Repr = identity(_) @@ -424,16 +364,16 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnHead = selection.value.ColumnHead override type ColumnTail = selection.value.ColumnTail - override val columnSet: CS = selection.value.columnSet(0) + override val columnSet: CS = selection.value.columnSet override type CS = selection.value.CS } sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) - extends Read[Out] { + extends Read[Out] { self => override type ResultType = Repr - override type TableType = left.TableType with right.TableType + //override type TableType = left.TableType override val mapper: ResultType => Out = left.mapper @@ -444,15 +384,13 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = left.CS override val columnSet: CS = left.columnSet - } - // QUESITON doesn't literal need to have a name of a column? - // EXAMPLE select * from (select '1' as up) as x - sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { - type ResultType = (B, Unit) + override def asTable(name: TableName): Table.DerivedTable[Union[Repr, Out]] = Table.DerivedTable(self, name) + } - //TODO what is a TableType of a Table derived from Literal selection ? - override type TableType = B + // TODO add name to literal selection - e.g. select '1' as one + sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { self => + override type ResultType = (B, Unit) override val mapper: ResultType => (B, Unit) = identity(_) @@ -463,7 +401,9 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] - override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead](1), ColumnSet.Empty) + override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead](), ColumnSet.Empty) + + override def asTable(name: TableName): Table.DerivedTable[Literal[B]] = Table.DerivedTable(self, name) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) @@ -513,7 +453,7 @@ trait SelectModule { self: ExprModule with TableModule => def name: Option[ColumnName] - def toColumn(index: Int): Column[ColumnType] + def toColumn: Column[ColumnType] } object ColumnSelection { @@ -522,9 +462,9 @@ trait SelectModule { self: ExprModule with TableModule => extends ColumnSelection[Any, ColumnType] { def typeTag: TypeTag[ColumnType] = implicitly[TypeTag[ColumnType]] - def toColumn(index: Int): Column[ColumnType] = name match { + def toColumn: Column[ColumnType] = name match { case Some(value) => Column.Named(value) - case None => Column.Indexed(index) + case None => Column.Indexed() } } @@ -532,9 +472,9 @@ trait SelectModule { self: ExprModule with TableModule => extends ColumnSelection[Source, ColumnType] { implicit def typeTag: TypeTag[ColumnType] = Expr.typeTagOf(expr) - def toColumn(index: Int): Column[ColumnType] = name match { + def toColumn: Column[ColumnType] = name match { case Some(value) => Column.Named(value) - case None => Column.Indexed(index) + case None => Column.Indexed() } } } @@ -551,7 +491,7 @@ trait SelectModule { self: ExprModule with TableModule => type SelectionTail <: SelectionSet[Source] type CS <: ColumnSet - def columnSet(startingIndex: Int): CS + def columnSet: CS def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] @@ -582,7 +522,7 @@ trait SelectModule { self: ExprModule with TableModule => override type SelectionTail = SelectionSet.Empty override type CS = ColumnSet.Empty - override def columnSet(startingIndex: Int): CS = ColumnSet.Empty + override def columnSet: CS = ColumnSet.Empty override type SelectionsRepr[Source1, T] = Unit @@ -607,8 +547,8 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] - override def columnSet(startingIndex: Int): CS = - ColumnSet.Cons[ColumnHead, ColumnTail](head.toColumn(startingIndex), tail.columnSet(startingIndex + 1)) + override def columnSet: CS = + ColumnSet.Cons[ColumnHead, ColumnTail](head.toColumn, tail.columnSet) override type SelectionsRepr[Source1, T] = (ColumnSelection[Source1, A], tail.SelectionsRepr[Source1, T]) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 916a5594f..749431745 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -17,7 +17,10 @@ trait TableModule { self: ExprModule with SelectModule => def columnsUntyped: List[Column.Untyped] - protected def mkColumns[T](name: TableName): ColumnsRepr[T] + // TODO figure out how to make Column equality well defined + def contains[A](column: Column[A]): Boolean + + def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] } object ColumnSet { @@ -25,49 +28,56 @@ trait TableModule { self: ExprModule with SelectModule => type :*:[A, B <: ColumnSet] = Cons[A, B] type Singleton[A] = Cons[A, Empty] + type ConsAux[A, B <: ColumnSet, ColumnsRepr0[_]] = ColumnSet.Cons[A, B] { + type ColumnsRepr[C] = ColumnsRepr0[C] + } + + type Aux[ColumnsRepr0] = ColumnSet { + type ColumnsRepr = ColumnsRepr0 + } + case object Empty extends ColumnSet { - type ColumnsRepr[_] = Unit - type Append[That <: ColumnSet] = That + override type ColumnsRepr[T] = Unit + override type Append[That <: ColumnSet] = That override def ++[That <: ColumnSet](that: That): Append[That] = that override def columnsUntyped: List[Column.Untyped] = Nil - override protected def mkColumns[T](name: TableName): ColumnsRepr[T] = () + override def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] = () + + override def contains[A](column: Column[A]): Boolean = false } sealed case class Cons[A, B <: ColumnSet](head: Column[A], tail: B) extends ColumnSet { self => - type ColumnsRepr[T] = (Expr[Features.Source, T, A], tail.ColumnsRepr[T]) - type Append[That <: ColumnSet] = Cons[A, tail.Append[That]] - type TableSource[TableType] = Table.Source.Aux[ColumnsRepr, TableType, A :*: B] + + override type ColumnsRepr[T] = (Expr[Features.Source, T, A], tail.ColumnsRepr[T]) + override type Append[That <: ColumnSet] = Cons[A, tail.Append[That]] override def ++[That <: ColumnSet](that: That): Append[That] = Cons(head, tail ++ that) override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped - def table(name0: TableName): Table.Source.Aux_[ColumnsRepr, A :*: B] = + def table(name0: TableName): Table.Aux_[ColumnsRepr, A, B] = new Table.Source { - type Repr[C] = ColumnsRepr[C] - type Cols = A :*: B - val name: TableName = name0 - val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) - val columns: ColumnsRepr[TableType] = mkColumns[TableType](name0) - val columnsUntyped: List[Column.Untyped] = self.columnsUntyped - } + override type ColumnHead = A + override type ColumnTail = B - def tableOfType[TT](name0: TableName): Table.Source.Aux[ColumnsRepr, TT, A :*: B] = - new Table.Source { - override type TableType = TT - type Repr[C] = ColumnsRepr[C] - type Cols = A :*: B - val name: TableName = name0 - val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) - val columns: ColumnsRepr[TableType] = mkColumns[TableType](name0) - val columnsUntyped: List[Column.Untyped] = self.columnsUntyped + override val name: TableName = name0 + override val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) + + override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr] = self + + override def columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { + def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] = Expr.Source(name0, column) + } } - override protected def mkColumns[T](name: TableName): ColumnsRepr[T] = - (Expr.Source(name, head), tail.mkColumns(name)) + override def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] = + (columnToExpr.toExpr(head), tail.makeColumns(columnToExpr)) + + override def contains[A](column: Column[A]): Boolean = + head == column || tail.contains(column) } def bigDecimal(name: String): Singleton[BigDecimal] = singleton[BigDecimal](name) @@ -103,9 +113,11 @@ trait TableModule { self: ExprModule with SelectModule => sealed case class Named[A: TypeTag](columnName: String) extends Column[A] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } - sealed case class Indexed[A: TypeTag](index: Int) extends Column[A] { + + sealed case class Indexed[A: TypeTag]() extends Column[A] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } + type Untyped = Column[_] } @@ -118,12 +130,18 @@ trait TableModule { self: ExprModule with SelectModule => case object FullOuter extends JoinType } - /** - * (left join right) on (...) - */ + trait ColumnToExpr[TableType] { + def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] + } + sealed trait Table { self => type TableType + type Cols = ColumnSet.Cons[ColumnHead, ColumnTail] + + type ColumnHead + type ColumnTail <: ColumnSet + final def fullOuter[That](that: Table.Aux[That]): Table.JoinBuilder[self.TableType, That] = new Table.JoinBuilder[self.TableType, That](JoinType.FullOuter, self, that) @@ -136,16 +154,16 @@ trait TableModule { self: ExprModule with SelectModule => final def rightOuter[That](that: Table.Aux[That]): Table.JoinBuilder[self.TableType, That] = new Table.JoinBuilder[self.TableType, That](JoinType.RightOuter, self, that) - val columnsUntyped: List[Column.Untyped] - } + final val subselect: SubselectPartiallyApplied[TableType] = new SubselectPartiallyApplied[TableType] - type TableExtension[+A] <: Table.TableEx + final def columns = columnSet.makeColumns[TableType](columnToExpr) - object Table { + val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] - trait TableEx { - def columnsUntyped: List[Column.Untyped] - } + def columnToExpr: ColumnToExpr[TableType] + } + + object Table { class JoinBuilder[A, B](joinType: JoinType, left: Table.Aux[A], right: Table.Aux[B]) { def on[F](expr: Expr[F, A with B, Boolean]): Table.Aux[A with B] = @@ -154,47 +172,123 @@ trait TableModule { self: ExprModule with SelectModule => type Aux[A] = Table { type TableType = A } - //you need insanity in your life + type Aux_[ColumnsRepr[_], A, B <: ColumnSet] = Table.Source { + type ColumnHead = A + type ColumnTail = B + def columnSet: ColumnSet.ConsAux[A, B, ColumnsRepr] + } + + // Absence of "Insanity" trait causes following known problems: + // * in db modules + // - The outer reference in this type test cannot be checked at run time?! + // case sourceTable: self.Table.Source => + // * compiletime error in updating of table like + // - update(table).set(age, age + 2)... trait Insanity { def ahhhhhhhhhhhhh[A]: A } + sealed trait Source extends Table with Insanity { - type Repr[_] - type Cols + val name: TableName val columnSchema: ColumnSchema[Cols] - val columns: Repr[TableType] override def ahhhhhhhhhhhhh[A]: A = ??? //don't remove or it'll break } + object Source { - type Aux_[F[_], B] = Table.Source { - type Repr[X] = F[X] - type Cols = B + + type Aux__[FF[_, _], Head, Tail] = Table.Source { + type Repr = FF[_, _] + + type ColumnHead = Head + + type ColumnTail = Tail } - type Aux[F[_], A, B] = Table.Source { - type Repr[X] = F[X] - type TableType = A - type Cols = B + + type Aux_[FF[_], B] = Table.Source { + type Repr = FF[TableType] + type Cols = B + } + + type Aux[B] = Table.Source { + type Cols = B } } - sealed case class Joined[F, A, B]( + sealed case class Joined[FF, A, B]( joinType: JoinType, left: Table.Aux[A], right: Table.Aux[B], - on: Expr[F, A with B, Boolean] + on: Expr[FF, A with B, Boolean] ) extends Table { - type TableType = left.TableType with right.TableType - val columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ right.columnsUntyped + override type TableType = left.TableType with right.TableType + + override type ColumnHead = left.ColumnHead + override type ColumnTail = + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail]] + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = + left.columnSet ++ right.columnSet + + override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { + def toExpr[C](column: Column[C]): Expr[Features.Source, TableType, C] = + if (left.columnSet.contains(column)) + left.columnToExpr.toExpr(column) + else + right.columnToExpr.toExpr(column) + } + } + + object Joined { + type Aux[Left, Right] = Table { type TableType = Left with Right } + } + + sealed case class DerivedTable[+R <: Read[_]](read: R, name: TableName) extends Table { self => + + override type TableType = read.DerivedTableType + + override type ColumnHead = read.ColumnHead + override type ColumnTail = read.ColumnTail + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = read.columnSet + + override def columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { + def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] = + Expr.Source(name, column) + } + } + + object DerivedTable { + type Aux[R <: Read[_], A] = DerivedTable[R] { + type TableType = A + } } sealed case class DialectSpecificTable[A](tableExtension: TableExtension[A]) extends Table { override type TableType = A - override val columnsUntyped: List[Column.Untyped] = tableExtension.columnsUntyped + override type ColumnHead = tableExtension.ColumnHead + override type ColumnTail = tableExtension.ColumnTail + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = tableExtension.columnSet + + override def columnToExpr: ColumnToExpr[TableType] = tableExtension.columnToExpr + } + + trait TableEx[A] { + + type ColumnHead + type ColumnTail <: ColumnSet + + def columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] + + def columnToExpr: ColumnToExpr[A] } } + + type TableExtension[A] <: Table.TableEx[A] + } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 1a432c5dc..19ad29c40 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -109,9 +109,7 @@ trait JdbcInternalModule { self: Jdbc => read match { case Read.Mapped(read, _) => getColumns(read) - case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? - - case Read.Select(selection, _, _, _, _, _, _, _) => + case Read.Subselect(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag case t @ ColumnSelection.Computed(_, _) => t.typeTag diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 9ef5030cd..53527769b 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -81,8 +81,7 @@ trait MysqlModule extends Jdbc { self => case Read.Mapped(read, _) => renderReadImpl(read) - case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? - case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -160,10 +159,11 @@ trait MysqlModule extends Jdbc { self => private def renderTable(table: Table)(implicit render: Renderer): Unit = table match { + case Table.DialectSpecificTable(tableExtension) => ??? //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) - case Table.DialectSpecificTable(tableExtension) => ??? + case Table.DerivedTable(read, name) => ??? case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { @@ -179,6 +179,7 @@ trait MysqlModule extends Jdbc { self => } private def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + case Expr.Subselect(subselect) => case Expr.Source(table, column) => { (table, column) match { case (tableName: TableName, Column.Named(columnName)) => render(tableName, ".", columnName) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index c7af2c7fb..a174d1d3a 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -9,6 +9,7 @@ trait OracleModule extends Jdbc { self => } def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { + case Expr.Subselect(subselect) => case Expr.Source(table, column) => { (table, column) match { case (tableName: TableName, Column.Named(columnName)) => @@ -129,9 +130,7 @@ trait OracleModule extends Jdbc { self => read match { case Read.Mapped(read, _) => buildReadString(read, builder) - case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? - - case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -268,10 +267,11 @@ trait OracleModule extends Jdbc { self => } def buildTable(table: Table, builder: StringBuilder): Unit = table match { + case Table.DialectSpecificTable(tableExtension) => ??? //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.DialectSpecificTable(tableExtension) => ??? + case Table.DerivedTable(read, name) => ??? case Table.Joined(joinType, left, right, on) => buildTable(left, builder) builder.append(joinType match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 91cdbe4db..f49478810 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -345,6 +345,7 @@ trait PostgresModule extends Jdbc { self => } private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + case Expr.Subselect(subselect) => ??? case Expr.Source(table, column) => { (table, column) match { case (tableName: TableName, Column.Named(columnName)) => @@ -467,8 +468,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { case Read.Mapped(read, _) => renderReadImpl(read) - case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? - case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -476,7 +476,7 @@ trait PostgresModule extends Jdbc { self => type Head type Tail <: SelectionSet[Source] } - val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.Repr, Dummy.Source, Dummy.Head, Dummy.Tail]] + val read = read0.asInstanceOf[Read.Subselect[Dummy.F, Dummy.Repr, Dummy.Source, Dummy.Source, Dummy.Head, Dummy.Tail]] import read._ render("SELECT ") @@ -600,9 +600,10 @@ trait PostgresModule extends Jdbc { self => def renderTable(table: Table)(implicit render: Renderer): Unit = table match { + case Table.DialectSpecificTable(tableExtension) => ??? //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) - case Table.DialectSpecificTable(tableExtension) => ??? + case Table.DerivedTable(read, name) => ??? case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 8aa5b85ba..d237368e5 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -6,11 +6,11 @@ trait SqlServerModule extends Jdbc { self => import self.ColumnSet._ - override type TableExtension[+A] = SqlServerSpecific.SqlServerTable[A] + override type TableExtension[A] = SqlServerSpecific.SqlServerTable[A] object SqlServerSpecific { - sealed trait SqlServerTable[+A] extends Table.TableEx + sealed trait SqlServerTable[A] extends Table.TableEx[A] object SqlServerTable { @@ -22,28 +22,41 @@ trait SqlServerModule extends Jdbc { self => case object OuterApply extends CrossType } - sealed case class SelectedTable[A, B]( + private[SqlServerModule] sealed case class CrossOuterApplyTable[A, B]( crossType: CrossType, left: Table.Aux[A], right: Table.Aux[B] ) extends SqlServerTable[A with B] { self => - def columnsUntyped: List[Column.Untyped] = left.columnsUntyped ++ right.columnsUntyped + override type ColumnHead = left.ColumnHead + override type ColumnTail = + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail]] + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = + left.columnSet ++ right.columnSet + + override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { + def toExpr[C](column: Column[C]): Expr[Features.Source, A with B, C] = + if (left.columnSet.contains(column)) + left.columnToExpr.toExpr(column) + else + right.columnToExpr.toExpr(column) + } } implicit def tableSourceToSelectedBuilder[A]( table: Table.Aux[A] - ): SelectedTableBuilder[A] = - new SelectedTableBuilder(table) + ): CrossOuterApplyTableBuilder[A] = + new CrossOuterApplyTableBuilder(table) - sealed case class SelectedTableBuilder[A](left: Table.Aux[A]) { + sealed case class CrossOuterApplyTableBuilder[A](left: Table.Aux[A]) { self => - final def crossApply[B]( - right: Table.Aux[B] - ): Table.Aux[A with B] = { + final def crossApply( + right: Table.DerivedTable[Read[_]] + ): Table.DialectSpecificTable[A with right.TableType] = { - val tableExtension = SelectedTable( + val tableExtension = CrossOuterApplyTable[A, right.TableType]( CrossType.CrossApply, left, right @@ -52,11 +65,11 @@ trait SqlServerModule extends Jdbc { self => new Table.DialectSpecificTable(tableExtension) } - final def outerApply[B]( - right: Table.Aux[B] - ): Table.Aux[A with B] = { + final def outerApply( + right: Table.DerivedTable[Read[_]] + ): Table.DialectSpecificTable[A with right.TableType] = { - val tableExtension = SelectedTable( + val tableExtension = CrossOuterApplyTable[A, right.TableType]( CrossType.OuterApply, left, right @@ -73,62 +86,146 @@ trait SqlServerModule extends Jdbc { self => val customerId :*: fName :*: lName :*: _ = customers.columns + val q = customers.columns + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + val orderDetails = (uuid("orderId") ++ uuid("product_id") ++ int("quantity") ++ double("unit_price")).table("order_details") + + val orderDetailsId :*: productId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + + // ---------------- + val derived = - select(customerId ++ fName).from(customers).asTable("derivedCustomers") + select(customerId ++ fName).from(customers).asTable("derived") - val derivedId :*: derivedName = derived.columns + val derivedId :*: derivedName :*: _ = derived.columns //AS TABLE example - val e = select(fName ++ lName).from(customers).asTable(TableName.Source("derivedCustomers")) - - // select customers.id, customers.first_name, customers.last_name, orders.order_date - // from customers - // cross apply ( - // Select top 1 * - // from orders - // where orders.customer_id = customers.id - // order by orders.order_date DESC - // ) orders - // order by orders.order_date desc - - // TODO waht about select(fName ++ lName ++ orderDate ++ fkCustomerId).from(customers).crossApply(....) -> so everything is not inside from clause - - //Cross Apply example - import SqlServerTable._ - val crossApplyExample = select(fName ++ lName ++ orderDate ++ fkCustomerId) + val e = select(fName ++ lName).from(customers).asTable("derived") + + val ppp = select(orderId ++ fkCustomerId).from(orders).asTable("derived") + + val orders2 = select(orderDate).from(orders).asTable("derived") + + val wwq = select(fName ++ lName) + .from(customers) + + val pok1 = customers.subselect(orderDate ++ fName).from(orders).where(customerId === fkCustomerId) + + val xwe22 = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId) + + val pok = + subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") + val ordersTable = + subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") + + val orderDateColumn :*: _ = ordersTable.columns + + /* + select customers.id, customers.first_name, customers.last_name, ooo.order_date, ooo.id + from + customers + cross apply ( + select order_date + from orders + where orders.customer_id = customers.id + ) ooo + */ + + // Cross Apply example + import SqlServerTable._ + + + /*TODO + 1. which one do we need ? + * table.subquery(select) + * subselect[TableType](select) + * subselectFrom(parentTable)(query) + 2. rename those subqueries to correlated subqueries, add suppost for normal subqueries (ones which does not access parent table) + 3. add support for correlated subquery in where clause when accessing the same table + 4. correlated subqueries in selections / where clauses + 5. translate DerivedTable also for postgres, Oracle, Mysql + 6. add test for outer apply and real cross apply + */ + + select(customerId ++ fName ++ lName) + .from(customers + .crossApply( + subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") + ) + ) + + val newOrdersTable = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") + + val localdate :*: _ = newOrdersTable.columns + + val crossApplyExample2 = select(customerId ++ fName ++ lName ++ localdate) .from( customers .crossApply( - subselect[customers.TableType](orderDate) - .from(orders) - .where(customerId === fkCustomerId) - .asTable("orders") + newOrdersTable ) ) - //JOIN example - val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) + val crossApplyExample3 = select(customerId ++ fName ++ lName) + .from( + customers + .crossApply( + subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") + ) + ) - // SEBSELECT example - val xwe = subselect[orders.TableType](orderDate).from(customers) + val crossApplyExample4Alt = select(customerId ++ fName ++ lName) + .from( + customers + .crossApply( + customers.subselect(orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") + ) + ) + + val newtable = + customers + .subselect(customerId ++ fName ++ lName ++ orderDate) + .from(orders) + .where(customerId === fkCustomerId) + .asTable("") + + val dCustomerId :*: dfName :*: dflName :*: dOrderDate :*: _ = newtable.columns + + val crossApplyExample4 = select(dCustomerId ++ dfName ++ dflName ++ dOrderDate) + .from(newtable) + + + // //JOIN example + val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) - // SUBSELECT another example - // ev1: Source0 with ParentTable <:< Source, - // orders.TableType with customers.TabelType <:< orders.TableType with customers.TableType + // // SUBSELECT another example val xww = subselect[customers.TableType](orderDate ++ fName).from(orders).where(customerId === fkCustomerId) val xwwx = subselect[customers.TableType](orderDate ++ fName) .from(orders) .where(customerId === fkCustomerId) - .asTable("orders2") + .asTable("") - // ev1: Source0 with ParentTable <:< Source, - // orders.TableType with customers.TabelType <:< orders.TableType val qqqqq = - subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ordersx") + subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") + + + //TODO + // // ========= CORRELATED SUBQUERY + + // // select order_id, product_id, unit_price from order_details od + // // where unit_price > (select avg(unit_price) from order_details where od.product_id = product_id) + + // val customUUID = java.util.UUID.fromString("48ce2e6e-7258-413f-942f-01eb21acd979") + + // val re = select(AggregationDef.Avg(unitPrice)).from(orderDetails).where(productId === customUUID) + + // select(orderDetailsId ++ productId ++ unitPrice) + // .from(orderDetails) + // .where(unitPrice > select(AggregationDef.Avg(unitPrice)).from(orderDetails).where(productId === ???)) } } @@ -139,8 +236,8 @@ trait SqlServerModule extends Jdbc { self => override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder - //TODO check def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { + case Expr.Subselect(subselect) => ??? case Expr.Source(table, column) => (table, column) match { case (tableName: TableName, Column.Named(columnName)) => @@ -260,10 +357,8 @@ trait SqlServerModule extends Jdbc { self => read match { case Read.Mapped(read, _) => buildReadString(read) - case Read.Subselect(selection, table, whereExpr, _, _, _, _, _) => ??? - //todo offset (needs orderBy, must use fetch _instead_ of top) - case read0 @ Read.Select(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -393,31 +488,30 @@ trait SqlServerModule extends Jdbc { self => def buildTable(table: Table): Unit = table match { - //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => - val _ = builder.append(sourceTable.name) - case Table.DialectSpecificTable(table) => - // table match { - // case SqlServerSpecific.SqlServerTable.SelectedTable(crossType, left, select, on) => - // buildTable(left) + case Table.DerivedTable(read, name) => { + builder.append(renderRead(read)) - // crossType match { - // case SqlServerSpecific.CrossType.CrossApply => builder.append(" CROSS APPLY ( ") - // case SqlServerSpecific.CrossType.OuterApply => builder.append(" OUTER APPLY ( ") - // } + builder.append(" ) ") + val _ = builder.append(name) + } + + case sourceTable: self.Table.Source => + val _ = builder.append(sourceTable.name) - // builder.append("SELECT ") - // buildSelection(select.selection.value) - // builder.append(" FROM ") - // buildTable(select.table.get) - // builder.append(" WHERE ") - // buildExpr(on) + case Table.DialectSpecificTable(tableExtension) => + tableExtension match { + case SqlServerSpecific.SqlServerTable.CrossOuterApplyTable(crossType, left, derivedTable) => { + buildTable(left) - // builder.append(" ) ") - // val _ = buildTable(select.table.get) + crossType match { + case SqlServerSpecific.SqlServerTable.CrossType.CrossApply => builder.append(" cross apply ( ") + case SqlServerSpecific.SqlServerTable.CrossType.OuterApply => builder.append(" outer apply ( ") + } - // } + val _ = buildTable(derivedTable) + } + } case Table.Joined(joinType, left, right, on) => buildTable(left) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 5fda1b40c..3aa04ed17 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -166,63 +166,70 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { r <- result.runCollect } yield assert(r.head)(equalTo(expected)) }, - // testM("cross apply") { - // val query = select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) - - // case class Row(firstName: String, lastName: String, orderDate: LocalDate) - - // val expected = Seq( - // Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - // Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - // Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - // Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - // Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - // Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - // Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - // Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - // Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - // Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - // Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - // Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - // Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - // Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - // Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - // Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - // Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - // Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - // Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - // Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - // Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - // Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - // Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - // Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - // Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) - // ) - - // val result = execute( - // query - // .to[String, String, LocalDate, Row] { case row => - // Row(row._1, row._2, row._3) - // } - // ) - - // val assertion = for { - // r <- result.runCollect - // } yield assert(r)(hasSameElementsDistinct(expected)) - - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - - - // //TODO SHOULD NOT COMPILE because orderDate is not selected in "tabled valued function" select(orderId).from(orders) - // // possible solution is to need to extract "orderId" column out of orders and create a new table - // // select(fName ++ lName ++ orderDate).from(customers.crossApply(select(orderId).from(orders)).where(fkCustomerId === customerId)) - // }, - // testM("outer apply") { - // val query = select(fName ++ lName ++ orderDate).from(customers.outerApply(select(orderDate).from(orders)).where(fkCustomerId === customerId)) - - // val _ = query - // ??? - // } @@ ignore, + /** + * select customers.first_name, customers.last_name, ooo.order_date + * from customers + * cross apply ( + * select order_date + * from orders + * where orders.customer_id = customers.id + * ) ooo + */ + testM("cross apply") { + import SqlServerSpecific.SqlServerTable._ + + val subquery = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") + + val orderDateDerived :*: _ = subquery.columns + + val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) + + case class Row(firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), + Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), + Row("Alana", "Murray", LocalDate.parse("2019-08-19")), + Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), + Row("Alana", "Murray", LocalDate.parse("2020-05-11")), + Row("Alana", "Murray", LocalDate.parse("2019-02-21")), + Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), + Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), + Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), + Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), + Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), + Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), + Row("Alana", "Murray", LocalDate.parse("2018-11-13")), + Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), + Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), + Row("Alana", "Murray", LocalDate.parse("2019-12-08")), + Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), + Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), + Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), + Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) + + val result = execute( + query + .to[String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("outer apply") { + ??? + } @@ ignore, testM("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) From ea19a1b5ab396fd52577f39098064877fb53cd30 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 14 Nov 2021 19:08:34 +0100 Subject: [PATCH 293/673] fixed tests for mssql server and added test for correlated subquery in where clause --- core/jvm/src/main/scala/zio/sql/expr.scala | 10 +- .../jvm/src/main/scala/zio/sql/newtypes.scala | 2 +- core/jvm/src/main/scala/zio/sql/select.scala | 2 - core/jvm/src/main/scala/zio/sql/table.scala | 2 +- .../scala/zio/sql/JdbcInternalModule.scala | 4 +- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 18 +-- .../scala/zio/sql/oracle/OracleModule.scala | 31 ++-- .../zio/sql/sqlserver/SqlServerModule.scala | 120 ++++++++-------- sqlserver/src/test/resources/db_schema.sql | 10 +- .../test/scala/zio/sql/TestContainer.scala | 4 +- .../scala/zio/sql/sqlserver/DbSchema.scala | 11 ++ .../sql/sqlserver/SqlServerModuleSpec.scala | 134 ++++++++++++++---- 12 files changed, 223 insertions(+), 125 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index bc054c9c5..7d43c6667 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -126,12 +126,14 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = Selection.computedOption(expr, exprName(expr)) - //TODO needed by suqueries in where clauses - implicit def selectionToExpr[F, A, B](subselect: Read.Subselect[F, _, A, A, B, SelectionSet.Empty]): Expr[F, A, B] = + implicit def selectionToExpr[F, Repr, Source, Subsource, Head]( + subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] + ): Expr[F, Source, Head] = Expr.Subselect(subselect) - sealed case class Subselect[F, A, B](subselect: Read.Subselect[F, _, A, A, B, SelectionSet.Empty]) - extends Expr[F, A, B] + sealed case class Subselect[F, Repr, Source, Subsource, Head]( + subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] + ) extends Expr[F, Source, Head] sealed case class Source[A, B] private[sql] (tableName: TableName, column: Column[B]) extends InvariantExpr[Features.Source, A, B] { diff --git a/core/jvm/src/main/scala/zio/sql/newtypes.scala b/core/jvm/src/main/scala/zio/sql/newtypes.scala index fb07e2f8f..5e9ba4fa5 100644 --- a/core/jvm/src/main/scala/zio/sql/newtypes.scala +++ b/core/jvm/src/main/scala/zio/sql/newtypes.scala @@ -4,7 +4,7 @@ trait NewtypesModule { type ColumnName = String //TODO we could use zio-prelude new types - type TableName = String + type TableName = String sealed case class FunctionName(name: String) } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 984141582..b21432121 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -91,7 +91,6 @@ trait SelectModule { self: ExprModule with TableModule => */ sealed trait Read[+Out] { self => type ResultType - type DerivedTableType val mapper: ResultType => Out @@ -327,7 +326,6 @@ trait SelectModule { self: ExprModule with TableModule => limit: Option[Long] = None ) extends Read[Repr] { self => - //TODO check if I need copy(whereExpr = self.whereExpr && whereExpr2) def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(whereExpr = whereExpr2) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 58dc4e368..b4837227e 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -223,7 +223,7 @@ trait TableModule { self: ExprModule with SelectModule => sealed case class DerivedTable[+R <: Read[_]](read: R, name: TableName) extends Table { self => - override type TableType = read.DerivedTableType + //override type TableType = read.DerivedTableType override type ColumnHead = read.ColumnHead override type ColumnTail = read.ColumnTail diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 19ad29c40..d8da0c9ca 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -114,8 +114,8 @@ trait JdbcInternalModule { self: Jdbc => case t @ ColumnSelection.Constant(_, _) => t.typeTag case t @ ColumnSelection.Computed(_, _) => t.typeTag } - case Read.Union(left, _, _) => getColumns(left) - case v @ Read.Literal(_) => scala.collection.immutable.Vector(v.typeTag) + case Read.Union(left, _, _) => getColumns(left) + case v @ Read.Literal(_) => scala.collection.immutable.Vector(v.typeTag) } private[sql] def unsafeExtractRow[A]( diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 6119e8c64..6df3651a5 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -118,19 +118,19 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("bit_length") { - val query = select(BitLength("hello")) + testM("bit_length") { + val query = select(BitLength("hello")) - val expected = 40 + val expected = 40 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to[Int, Int](identity)) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("pi") { val query = select(Pi) from customers diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index a174d1d3a..a019bf2e7 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -9,13 +9,12 @@ trait OracleModule extends Jdbc { self => } def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { - case Expr.Subselect(subselect) => - case Expr.Source(table, column) => { - (table, column) match { - case (tableName: TableName, Column.Named(columnName)) => - val _ = builder.append(tableName).append(".").append(columnName) - case _ => () - } + case Expr.Subselect(subselect) => + case Expr.Source(table, column) => + (table, column) match { + case (tableName: TableName, Column.Named(columnName)) => + val _ = builder.append(tableName).append(".").append(columnName) + case _ => () } case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) @@ -132,12 +131,12 @@ trait OracleModule extends Jdbc { self => case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { - type F - type Repr - type Source - type Head - type Tail <: SelectionSet[Source] - } + type F + type Repr + type Source + type Head + type Tail <: SelectionSet[Source] + } val read = read0.asInstanceOf[Read.Select[Dummy.F, Dummy.Repr, Dummy.Source, Dummy.Head, Dummy.Tail]] import read._ @@ -269,10 +268,10 @@ trait OracleModule extends Jdbc { self => table match { case Table.DialectSpecificTable(tableExtension) => ??? //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => + case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.DerivedTable(read, name) => ??? - case Table.Joined(joinType, left, right, on) => + case Table.DerivedTable(read, name) => ??? + case Table.Joined(joinType, left, right, on) => buildTable(left, builder) builder.append(joinType match { case JoinType.Inner => " INNER JOIN " diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index d237368e5..29bbe7a02 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -32,11 +32,11 @@ trait SqlServerModule extends Jdbc { self => override type ColumnTail = left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail]] - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source, A with B, C] = + def toExpr[C](column: Column[C]): Expr[Features.Source, A with B, C] = if (left.columnSet.contains(column)) left.columnToExpr.toExpr(column) else @@ -92,7 +92,8 @@ trait SqlServerModule extends Jdbc { self => val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - val orderDetails = (uuid("orderId") ++ uuid("product_id") ++ int("quantity") ++ double("unit_price")).table("order_details") + val orderDetails = + (uuid("orderId") ++ uuid("product_id") ++ int("quantity") ++ double("unit_price")).table("order_details") val orderDetailsId :*: productId :*: quantity :*: unitPrice :*: _ = orderDetails.columns @@ -101,7 +102,7 @@ trait SqlServerModule extends Jdbc { self => val derived = select(customerId ++ fName).from(customers).asTable("derived") - val derivedId :*: derivedName :*: _ = derived.columns + val derivedId :*: derivedName :*: _ = derived.columns //AS TABLE example val e = select(fName ++ lName).from(customers).asTable("derived") @@ -124,44 +125,36 @@ trait SqlServerModule extends Jdbc { self => val orderDateColumn :*: _ = ordersTable.columns - /* - select customers.id, customers.first_name, customers.last_name, ooo.order_date, ooo.id - from - customers - cross apply ( - select order_date - from orders - where orders.customer_id = customers.id - ) ooo - */ - // Cross Apply example - import SqlServerTable._ - + import SqlServerTable._ /*TODO 1. which one do we need ? - * table.subquery(select) - * subselect[TableType](select) - * subselectFrom(parentTable)(query) + * table.subquery(select) + * subselect[TableType](select) + * subselectFrom(parentTable)(query) 2. rename those subqueries to correlated subqueries, add suppost for normal subqueries (ones which does not access parent table) - 3. add support for correlated subquery in where clause when accessing the same table - 4. correlated subqueries in selections / where clauses + 5. translate DerivedTable also for postgres, Oracle, Mysql 6. add test for outer apply and real cross apply - */ + */ select(customerId ++ fName ++ lName) - .from(customers - .crossApply( - subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") - ) + .from( + customers + .crossApply( + subselect[customers.TableType](orderDate) + .from(orders) + .where(customerId === fkCustomerId) + .asTable("derived") + ) ) - val newOrdersTable = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") + val newOrdersTable = + subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") val localdate :*: _ = newOrdersTable.columns - + val crossApplyExample2 = select(customerId ++ fName ++ lName ++ localdate) .from( customers @@ -186,7 +179,7 @@ trait SqlServerModule extends Jdbc { self => ) ) - val newtable = + val newtable = customers .subselect(customerId ++ fName ++ lName ++ orderDate) .from(orders) @@ -198,7 +191,6 @@ trait SqlServerModule extends Jdbc { self => val crossApplyExample4 = select(dCustomerId ++ dfName ++ dflName ++ dOrderDate) .from(newtable) - // //JOIN example val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) @@ -212,20 +204,6 @@ trait SqlServerModule extends Jdbc { self => val qqqqq = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - - //TODO - // // ========= CORRELATED SUBQUERY - - // // select order_id, product_id, unit_price from order_details od - // // where unit_price > (select avg(unit_price) from order_details where od.product_id = product_id) - - // val customUUID = java.util.UUID.fromString("48ce2e6e-7258-413f-942f-01eb21acd979") - - // val re = select(AggregationDef.Avg(unitPrice)).from(orderDetails).where(productId === customUUID) - - // select(orderDetailsId ++ productId ++ unitPrice) - // .from(orderDetails) - // .where(unitPrice > select(AggregationDef.Avg(unitPrice)).from(orderDetails).where(productId === ???)) } } @@ -237,7 +215,10 @@ trait SqlServerModule extends Jdbc { self => val builder = new StringBuilder def buildExpr[A, B](expr: self.Expr[_, A, B]): Unit = expr match { - case Expr.Subselect(subselect) => ??? + case Expr.Subselect(subselect) => + builder.append(" (") + builder.append(renderRead(subselect)) + val _ = builder.append(") ") case Expr.Source(table, column) => (table, column) match { case (tableName: TableName, Column.Named(columnName)) => @@ -249,7 +230,13 @@ trait SqlServerModule extends Jdbc { self => buildExpr(base) case Expr.Property(base, op) => buildExpr(base) - val _ = builder.append(" ").append(op.symbol) + val symbol = op match { + case PropertyOp.IsNull => "is null" + case PropertyOp.IsNotNull => "is not null" + case PropertyOp.IsTrue => "= 1" + case PropertyOp.IsNotTrue => "= 0" + } + val _ = builder.append(" ").append(symbol) case Expr.Binary(left, right, op) => buildExpr(left) builder.append(" ").append(op.symbol).append(" ") @@ -261,8 +248,23 @@ trait SqlServerModule extends Jdbc { self => case Expr.In(value, set) => buildExpr(value) buildReadString(set) - case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping + case literal @ Expr.Literal(value) => + val lit = literal.typeTag match { + case TypeTag.TLocalDateTime => + value + .asInstanceOf[java.time.LocalDateTime] + .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) + case TypeTag.TZonedDateTime => + value + .asInstanceOf[java.time.ZonedDateTime] + .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) + case TypeTag.TOffsetDateTime => + value + .asInstanceOf[java.time.OffsetDateTime] + .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) + case _ => value.toString + } + val _ = builder.append(s"'${lit}'") case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") @@ -489,28 +491,26 @@ trait SqlServerModule extends Jdbc { self => def buildTable(table: Table): Unit = table match { - case Table.DerivedTable(read, name) => { - builder.append(renderRead(read)) + case Table.DerivedTable(read, name) => + builder.append(" ( ") + builder.append(renderRead(read)) + builder.append(" ) ") + val _ = builder.append(name) - builder.append(" ) ") - val _ = builder.append(name) - } - - case sourceTable: self.Table.Source => + case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) case Table.DialectSpecificTable(tableExtension) => tableExtension match { - case SqlServerSpecific.SqlServerTable.CrossOuterApplyTable(crossType, left, derivedTable) => { + case SqlServerSpecific.SqlServerTable.CrossOuterApplyTable(crossType, left, derivedTable) => buildTable(left) crossType match { - case SqlServerSpecific.SqlServerTable.CrossType.CrossApply => builder.append(" cross apply ( ") - case SqlServerSpecific.SqlServerTable.CrossType.OuterApply => builder.append(" outer apply ( ") + case SqlServerSpecific.SqlServerTable.CrossType.CrossApply => builder.append(" cross apply ") + case SqlServerSpecific.SqlServerTable.CrossType.OuterApply => builder.append(" outer apply ") } val _ = buildTable(derivedTable) - } } case Table.Joined(joinType, left, right, on) => diff --git a/sqlserver/src/test/resources/db_schema.sql b/sqlserver/src/test/resources/db_schema.sql index 676a107c5..b25d1ec11 100644 --- a/sqlserver/src/test/resources/db_schema.sql +++ b/sqlserver/src/test/resources/db_schema.sql @@ -41,11 +41,11 @@ create table order_details insert into customers (id, first_name, last_name, verified, dob) values - ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 0, '1983-01-05'), - ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', 0, '1999-11-02'), - ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', 0, '1990-11-16'), - ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', 0, '1995-11-12'), - ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', 1, '1987-03-23'); + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 1, '1983-01-05'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', 1, '1999-11-02'), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', 1, '1990-11-16'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', 1, '1995-11-12'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', 0, '1987-03-23'); insert into orders (id, customer_id, order_date) diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/TestContainer.scala index a6b5bb36e..bedf1dbc7 100644 --- a/sqlserver/src/test/scala/zio/sql/TestContainer.scala +++ b/sqlserver/src/test/scala/zio/sql/TestContainer.scala @@ -16,7 +16,9 @@ object TestContainer { } }(container => effectBlocking(container.stop()).orDie).toLayer - def postgres(imageName: String = "mcr.microsoft.com/mssql/server:2017-latest"): ZLayer[Blocking, Throwable, Has[MSSQLServerContainer]] = + def postgres( + imageName: String = "mcr.microsoft.com/mssql/server:2017-latest" + ): ZLayer[Blocking, Throwable, Has[MSSQLServerContainer]] = ZManaged.make { effectBlocking { val c = new MSSQLServerContainer( diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 94a87ee2e..3cbfe873c 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -20,4 +20,15 @@ trait DbSchema extends Jdbc { self => val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns } + + object OrderDetails { + val orderDetails = + (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ double("unit_price")).table("order_details") + + val orderDetailsId :*: productId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + + val orderDetailsDerived = select(orderDetailsId ++ productId ++ unitPrice).from(orderDetails).asTable("derived") + + val derivedOrderId :*: derivedProductId :*: derivedUnitPrice :*: _ = orderDetailsDerived.columns + } } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index b2243d344..d31378e92 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -14,6 +14,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { import AggregationDef._ import Customers._ import Orders._ + import OrderDetails._ private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) @@ -99,31 +100,30 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - //TODO fix tests -> they were just copy pasted from postgres module to find bugs testM("Can select with property unary operator") { customerSelectJoseAssertion(verified isNotTrue) - } @@ ignore, + }, testM("Can select with property binary operator with UUID") { customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) - } @@ ignore, + }, testM("Can select with property binary operator with String") { customerSelectJoseAssertion(fName === "Jose") - } @@ ignore, + }, testM("Can select with property binary operator with LocalDate") { customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) - } @@ ignore, + }, testM("Can select with property binary operator with LocalDateTime") { customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) - } @@ ignore, + }, testM("Can select with property binary operator with OffsetDateTime") { customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) - } @@ ignore, + }, testM("Can select with property binary operator with ZonedLocalDate") { customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) - } @@ ignore, + }, testM("Can select with property binary operator with Instant") { customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) - } @@ ignore, + }, testM("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) @@ -132,10 +132,10 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val expected = Seq( Customer( - UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), - "Jose", - "Wiggins", - LocalDate.parse("1987-03-23") + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + "Alana", + "Murray", + LocalDate.parse("1995-11-12") ) ) @@ -151,7 +151,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { } yield assert(r)(hasSameElementsDistinct(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ ignore, + }, testM("Can count rows") { val query = select(Count(customerId)).from(customers) @@ -163,16 +163,102 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { r <- result.runCollect } yield assert(r.head)(equalTo(expected)) }, - /** - * select customers.first_name, customers.last_name, ooo.order_date - * from customers - * cross apply ( - * select order_date - * from orders - * where orders.customer_id = customers.id - * ) ooo - */ - testM("cross apply") { + testM("correlated subquery in where clause") { + + /** + * select derived.order_id, derived.product_id, derived.unit_price from order_details derived + * where derived.unit_price > (select avg(order_details.unit_price) from order_details where derived.product_id = order_details.product_id) + */ + + val query = select(derivedOrderId ++ derivedProductId ++ derivedUnitPrice) + .from(orderDetailsDerived) + .where( + derivedUnitPrice > subselect[orderDetailsDerived.TableType](AggregationDef.Avg(unitPrice)) + .from(orderDetails) + .where(productId === derivedProductId) + ) + + case class Row(orderId: UUID, productId: UUID, unitPrice: Double) + + object Row { + def apply(orderId: String, productId: String, unitPrice: Double): Row = + new Row(UUID.fromString(orderId), UUID.fromString(productId), unitPrice) + } + + val expected = Seq( + Row("d4e77298-d829-4e36-a6a0-902403f4b7d3", "05182725-f5c8-4fd6-9c43-6671e179bf55", 2.0), + Row("d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7", "05182725-f5c8-4fd6-9c43-6671e179bf55", 2.0), + Row("04912093-cc2e-46ac-b64c-1bd7bb7758c3", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("9022dd0d-06d6-4a43-9121-2993fc7712a1", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("38d66d44-3cfa-488a-ac77-30277751418f", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("7b2627d5-0150-44df-9171-3462e20797ee", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("9473a0bc-396a-4936-96b0-3eea922af36b", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 80.0), + Row("618aa21f-700b-4ca7-933c-67066cf4cd97", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("fd0fa8d4-e1a0-4369-be07-945450db5d36", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 80.0), + Row("876b6034-b33c-4497-81ee-b4e8742164c2", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("91caa28a-a5fe-40d7-979c-bd6a128d0418", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("763a7c39-833f-4ee8-9939-e80dfdbfc0fc", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 80.0), + Row("5011d206-8eff-42c4-868e-f1a625e1f186", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("0a48ffb0-ec61-4147-af56-fc4dbca8de0a", "105a2701-ef93-4e25-81ab-8952cc7d9daa", 74.0), + Row("04912093-cc2e-46ac-b64c-1bd7bb7758c3", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("9022dd0d-06d6-4a43-9121-2993fc7712a1", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("38d66d44-3cfa-488a-ac77-30277751418f", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("618aa21f-700b-4ca7-933c-67066cf4cd97", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("fd0fa8d4-e1a0-4369-be07-945450db5d36", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("876b6034-b33c-4497-81ee-b4e8742164c2", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("91caa28a-a5fe-40d7-979c-bd6a128d0418", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("763a7c39-833f-4ee8-9939-e80dfdbfc0fc", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("5011d206-8eff-42c4-868e-f1a625e1f186", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("0a48ffb0-ec61-4147-af56-fc4dbca8de0a", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("5883cb62-d792-4ee3-acbc-fe85b6baa998", "4c770002-4c8f-455a-96ff-36a8186d5290", 22.0), + Row("9022dd0d-06d6-4a43-9121-2993fc7712a1", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("38d66d44-3cfa-488a-ac77-30277751418f", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("7b2627d5-0150-44df-9171-3462e20797ee", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("62cd4109-3e5d-40cc-8188-3899fc1f8bdf", "7368abf4-aed2-421f-b426-1725de756895", 10.9), + Row("9473a0bc-396a-4936-96b0-3eea922af36b", "7368abf4-aed2-421f-b426-1725de756895", 12.0), + Row("618aa21f-700b-4ca7-933c-67066cf4cd97", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("fd0fa8d4-e1a0-4369-be07-945450db5d36", "7368abf4-aed2-421f-b426-1725de756895", 12.0), + Row("876b6034-b33c-4497-81ee-b4e8742164c2", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("91caa28a-a5fe-40d7-979c-bd6a128d0418", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("763a7c39-833f-4ee8-9939-e80dfdbfc0fc", "7368abf4-aed2-421f-b426-1725de756895", 12.0), + Row("5011d206-8eff-42c4-868e-f1a625e1f186", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("0a48ffb0-ec61-4147-af56-fc4dbca8de0a", "7368abf4-aed2-421f-b426-1725de756895", 11.0), + Row("5883cb62-d792-4ee3-acbc-fe85b6baa998", "7368abf4-aed2-421f-b426-1725de756895", 12.0), + Row("9473a0bc-396a-4936-96b0-3eea922af36b", "d5137d3a-894a-4109-9986-e982541b434f", 55.0), + Row("5883cb62-d792-4ee3-acbc-fe85b6baa998", "d5137d3a-894a-4109-9986-e982541b434f", 55.0), + Row("04912093-cc2e-46ac-b64c-1bd7bb7758c3", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0), + Row("9022dd0d-06d6-4a43-9121-2993fc7712a1", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0), + Row("38d66d44-3cfa-488a-ac77-30277751418f", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0), + Row("7b2627d5-0150-44df-9171-3462e20797ee", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0), + Row("91caa28a-a5fe-40d7-979c-bd6a128d0418", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0), + Row("5011d206-8eff-42c4-868e-f1a625e1f186", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0), + Row("0a48ffb0-ec61-4147-af56-fc4dbca8de0a", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0) + ) + + val result = execute( + query + .to[UUID, UUID, Double, Row] { case row => + Row(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cross apply 1") { + + /** + * select customers.first_name, customers.last_name, ooo.order_date + * from customers + * cross apply ( + * select order_date + * from orders + * where orders.customer_id = customers.id + * ) ooo + */ import SqlServerSpecific.SqlServerTable._ val subquery = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") From 4a5afbfbac21cb6f11cbd3c95a38446d2ba29697 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 14 Nov 2021 20:35:28 +0100 Subject: [PATCH 294/673] added expr selection and derived table translations to other DBs --- .../scala/zio/sql/mysql/MysqlModule.scala | 9 +- .../scala/zio/sql/oracle/OracleModule.scala | 9 +- .../zio/sql/postgresql/PostgresModule.scala | 13 +- .../zio/sql/sqlserver/SqlServerModule.scala | 130 +------------ .../scala/zio/sql/sqlserver/DbSchema.scala | 16 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 182 ++++++++++++++---- 6 files changed, 185 insertions(+), 174 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 5d95b9190..e22fe2b72 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -164,7 +164,11 @@ trait MysqlModule extends Jdbc { self => //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) - case Table.DerivedTable(read, name) => ??? + case Table.DerivedTable(read, name) => + render(" ( ") + renderRead(read) + render(" ) ") + render(name) case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { @@ -181,6 +185,9 @@ trait MysqlModule extends Jdbc { self => private def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Subselect(subselect) => + render(" (") + renderRead(subselect) + render(") ") case Expr.Source(table, column) => (table, column) match { case (tableName: TableName, Column.Named(columnName)) => render(tableName, ".", columnName) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index a019bf2e7..fbbce7bc4 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -10,6 +10,9 @@ trait OracleModule extends Jdbc { self => def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { case Expr.Subselect(subselect) => + builder.append(" (") + builder.append(renderRead(subselect)) + val _ = builder.append(") ") case Expr.Source(table, column) => (table, column) match { case (tableName: TableName, Column.Named(columnName)) => @@ -270,7 +273,11 @@ trait OracleModule extends Jdbc { self => //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.DerivedTable(read, name) => ??? + case Table.DerivedTable(read, name) => + builder.append(" ( ") + builder.append(renderRead(read)) + builder.append(" ) ") + val _ = builder.append(name) case Table.Joined(joinType, left, right, on) => buildTable(left, builder) builder.append(joinType match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index b31138ba5..f64a5b0d4 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -345,7 +345,10 @@ trait PostgresModule extends Jdbc { self => } private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { - case Expr.Subselect(subselect) => ??? + case Expr.Subselect(subselect) => + render(" (") + renderRead(subselect) + render(") ") case Expr.Source(table, column) => (table, column) match { case (tableName: TableName, Column.Named(columnName)) => @@ -600,10 +603,14 @@ trait PostgresModule extends Jdbc { self => def renderTable(table: Table)(implicit render: Renderer): Unit = table match { - case Table.DialectSpecificTable(tableExtension) => ??? + case Table.DialectSpecificTable(tableExtension) => //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) - case Table.DerivedTable(read, name) => ??? + case Table.DerivedTable(read, name) => + render(" ( ") + renderRead(read) + render(" ) ") + render(name) case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 29bbe7a02..e1312e750 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -4,8 +4,6 @@ import zio.sql.Jdbc trait SqlServerModule extends Jdbc { self => - import self.ColumnSet._ - override type TableExtension[A] = SqlServerSpecific.SqlServerTable[A] object SqlServerSpecific { @@ -80,131 +78,9 @@ trait SqlServerModule extends Jdbc { self => } } - object QueriesExamples { - - val customers = (uuid("id") ++ string("first_name") ++ string("last_name")).table("customers") - - val customerId :*: fName :*: lName :*: _ = customers.columns - - val q = customers.columns - - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - - val orderDetails = - (uuid("orderId") ++ uuid("product_id") ++ int("quantity") ++ double("unit_price")).table("order_details") - - val orderDetailsId :*: productId :*: quantity :*: unitPrice :*: _ = orderDetails.columns - - // ---------------- - - val derived = - select(customerId ++ fName).from(customers).asTable("derived") - - val derivedId :*: derivedName :*: _ = derived.columns - - //AS TABLE example - val e = select(fName ++ lName).from(customers).asTable("derived") - - val ppp = select(orderId ++ fkCustomerId).from(orders).asTable("derived") - - val orders2 = select(orderDate).from(orders).asTable("derived") - - val wwq = select(fName ++ lName) - .from(customers) - - val pok1 = customers.subselect(orderDate ++ fName).from(orders).where(customerId === fkCustomerId) - - val xwe22 = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId) - - val pok = - subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") - val ordersTable = - subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") - - val orderDateColumn :*: _ = ordersTable.columns - - // Cross Apply example - import SqlServerTable._ - - /*TODO - 1. which one do we need ? - * table.subquery(select) - * subselect[TableType](select) - * subselectFrom(parentTable)(query) - 2. rename those subqueries to correlated subqueries, add suppost for normal subqueries (ones which does not access parent table) - - 5. translate DerivedTable also for postgres, Oracle, Mysql - 6. add test for outer apply and real cross apply - */ - - select(customerId ++ fName ++ lName) - .from( - customers - .crossApply( - subselect[customers.TableType](orderDate) - .from(orders) - .where(customerId === fkCustomerId) - .asTable("derived") - ) - ) - - val newOrdersTable = - subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") - - val localdate :*: _ = newOrdersTable.columns - - val crossApplyExample2 = select(customerId ++ fName ++ lName ++ localdate) - .from( - customers - .crossApply( - newOrdersTable - ) - ) - - val crossApplyExample3 = select(customerId ++ fName ++ lName) - .from( - customers - .crossApply( - subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - ) - ) - - val crossApplyExample4Alt = select(customerId ++ fName ++ lName) - .from( - customers - .crossApply( - customers.subselect(orderDate).from(orders).where(customerId === fkCustomerId).asTable("derived") - ) - ) - - val newtable = - customers - .subselect(customerId ++ fName ++ lName ++ orderDate) - .from(orders) - .where(customerId === fkCustomerId) - .asTable("") - - val dCustomerId :*: dfName :*: dflName :*: dOrderDate :*: _ = newtable.columns - - val crossApplyExample4 = select(dCustomerId ++ dfName ++ dflName ++ dOrderDate) - .from(newtable) - - // //JOIN example - val joinQuery = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(customerId === fkCustomerId)) - - // // SUBSELECT another example - val xww = subselect[customers.TableType](orderDate ++ fName).from(orders).where(customerId === fkCustomerId) - val xwwx = subselect[customers.TableType](orderDate ++ fName) - .from(orders) - .where(customerId === fkCustomerId) - .asTable("") - - val qqqqq = - subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - - } + /*TODO + 1. translate DerivedTable also for postgres, Oracle, Mysql + */ } override def renderDelete(delete: Delete[_]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 3cbfe873c..6105dcea1 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -5,7 +5,7 @@ import zio.sql.Jdbc trait DbSchema extends Jdbc { self => import self.ColumnSet._ - object Customers { + object DbSchema { val customers = (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) @@ -13,15 +13,11 @@ trait DbSchema extends Jdbc { self => val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = customers.columns - } - object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - } - object OrderDetails { val orderDetails = (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ double("unit_price")).table("order_details") @@ -30,5 +26,15 @@ trait DbSchema extends Jdbc { self => val orderDetailsDerived = select(orderDetailsId ++ productId ++ unitPrice).from(orderDetails).asTable("derived") val derivedOrderId :*: derivedProductId :*: derivedUnitPrice :*: _ = orderDetailsDerived.columns + + val orderDateDerivedTable = customers + .subselect(orderDate) + .from(orders) + .limit(1) + .where(customerId === fkCustomerId) + .orderBy(Ordering.Desc(orderDate)) + .asTable("derived") + + val orderDateDerived :*: _ = orderDateDerivedTable.columns } } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index d31378e92..803b380ea 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -2,7 +2,7 @@ package zio.sql.sqlserver import zio._ import zio.test.Assertion._ -import zio.test.TestAspect.{ ignore, sequential } +import zio.test.TestAspect.sequential import zio.test._ import java.time._ @@ -12,9 +12,7 @@ import scala.language.postfixOps object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { import AggregationDef._ - import Customers._ - import Orders._ - import OrderDetails._ + import DbSchema._ private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) @@ -248,7 +246,55 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cross apply 1") { + testM("cross apply - top 1 order_date") { + + /** + * select customers.id, customers.first_name, customers.last_name, derived.order_date + * from customers + * cross apply ( + * select top 1 order_date + * from orders + * where orders.customer_id = customers.id + * order by orders.order_date DESC + * ) derived + * order by derived.order_date desc + */ + + case class Row(id: UUID, firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row(UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), "Alana", "Murray", LocalDate.parse("2020-05-11")), + Row(UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), "Mila", "Paterso", LocalDate.parse("2020-04-30")), + Row(UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), "Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("2020-03-19") + ), + Row(UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), "Jose", "Wiggins", LocalDate.parse("2020-01-15")) + ) + import SqlServerSpecific.SqlServerTable._ + + val query = + select(customerId ++ fName ++ lName ++ orderDateDerived) + .from(customers.crossApply(orderDateDerivedTable)) + .orderBy(Ordering.Desc(orderDateDerived)) + + val result = execute( + query + .to[UUID, String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3, row._4) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cross apply with subselect") { /** * select customers.first_name, customers.last_name, ooo.order_date @@ -267,52 +313,85 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) - case class Row(firstName: String, lastName: String, orderDate: LocalDate) + val result = execute( + query + .to[String, String, LocalDate, CustomerAndDateRow] { case row => + CustomerAndDateRow(row._1, row._2, row._3) + } + ) - val expected = Seq( - Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cross apply with subquery") { + import SqlServerSpecific.SqlServerTable._ + val subquery = + customers.subselect(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") + + val orderDateDerived :*: _ = subquery.columns + + val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) + + val result = execute( + query + .to[String, String, LocalDate, CustomerAndDateRow] { case row => + CustomerAndDateRow(row._1, row._2, row._3) + } ) + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("cross apply with subselect from") { + import SqlServerSpecific.SqlServerTable._ + val subquery = + subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") + + val orderDateDerived :*: _ = subquery.columns + + val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) + val result = execute( query - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) + .to[String, String, LocalDate, CustomerAndDateRow] { case row => + CustomerAndDateRow(row._1, row._2, row._3) } ) val assertion = for { r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) + } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, testM("outer apply") { - ??? - } @@ ignore, + import SqlServerSpecific.SqlServerTable._ + val subquery = + subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") + + val orderDateDerived :*: _ = subquery.columns + + val query = select(fName ++ lName ++ orderDateDerived).from(customers.outerApply(subquery)) + + val result = execute( + query + .to[String, String, LocalDate, CustomerAndDateRow] { case row => + CustomerAndDateRow(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) @@ -360,4 +439,33 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential + + case class CustomerAndDateRow(firstName: String, lastName: String, orderDate: LocalDate) + private val crossOuterApplyExpected = Seq( + CustomerAndDateRow("Ronald", "Russell", LocalDate.parse("2019-03-25")), + CustomerAndDateRow("Ronald", "Russell", LocalDate.parse("2018-06-04")), + CustomerAndDateRow("Alana", "Murray", LocalDate.parse("2019-08-19")), + CustomerAndDateRow("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + CustomerAndDateRow("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + CustomerAndDateRow("Ronald", "Russell", LocalDate.parse("2020-03-19")), + CustomerAndDateRow("Alana", "Murray", LocalDate.parse("2020-05-11")), + CustomerAndDateRow("Alana", "Murray", LocalDate.parse("2019-02-21")), + CustomerAndDateRow("Ronald", "Russell", LocalDate.parse("2018-05-06")), + CustomerAndDateRow("Mila", "Paterso", LocalDate.parse("2019-02-11")), + CustomerAndDateRow("Terrence", "Noel", LocalDate.parse("2019-10-12")), + CustomerAndDateRow("Ronald", "Russell", LocalDate.parse("2019-01-29")), + CustomerAndDateRow("Terrence", "Noel", LocalDate.parse("2019-02-10")), + CustomerAndDateRow("Ronald", "Russell", LocalDate.parse("2019-09-27")), + CustomerAndDateRow("Alana", "Murray", LocalDate.parse("2018-11-13")), + CustomerAndDateRow("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + CustomerAndDateRow("Terrence", "Noel", LocalDate.parse("2018-07-10")), + CustomerAndDateRow("Mila", "Paterso", LocalDate.parse("2019-08-01")), + CustomerAndDateRow("Alana", "Murray", LocalDate.parse("2019-12-08")), + CustomerAndDateRow("Mila", "Paterso", LocalDate.parse("2019-11-04")), + CustomerAndDateRow("Mila", "Paterso", LocalDate.parse("2018-10-14")), + CustomerAndDateRow("Terrence", "Noel", LocalDate.parse("2020-04-05")), + CustomerAndDateRow("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + CustomerAndDateRow("Terrence", "Noel", LocalDate.parse("2019-05-14")), + CustomerAndDateRow("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) } From 6d42e9528f9b049bb173eb92f4279eb3e3510157 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 14 Nov 2021 21:05:51 +0100 Subject: [PATCH 295/673] fixed where clause bug --- core/jvm/src/main/scala/zio/sql/Sql.scala | 3 ++- core/jvm/src/main/scala/zio/sql/select.scala | 7 +----- core/jvm/src/main/scala/zio/sql/table.scala | 2 -- .../zio/sql/sqlserver/SqlServerModule.scala | 24 ++++++++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 7c64ca88d..d99453451 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -20,10 +20,11 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] - //TODO decide if this should be removed...parentTable is here only to derive type def subselectFrom[ParentTable, F, Source, B <: SelectionSet[Source]]( parentTable: Table.Aux[ParentTable] )(selection: Selection[F, Source, B]) = { + // parentTable value is here to infer parent table type parameter when doing subqueries + // e.g. subselectFrom(customers)(orderDate).from(orders).where(customers.id == orders.id)) val _ = parentTable SubselectBuilder[F, Source, B, ParentTable](selection) } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index b21432121..2a5a5e6d1 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -327,7 +327,7 @@ trait SelectModule { self: ExprModule with TableModule => ) extends Read[Repr] { self => def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = - copy(whereExpr = whereExpr2) + copy(whereExpr = self.whereExpr && whereExpr2) def limit(n: Long): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(limit = Some(n)) @@ -372,11 +372,8 @@ trait SelectModule { self: ExprModule with TableModule => extends Read[Out] { self => override type ResultType = Repr - //override type TableType = left.TableType - override val mapper: ResultType => Out = left.mapper - //TODO union is allowed only if two selection are of the same column names and the same column types override type ColumnHead = left.ColumnHead override type ColumnTail = left.ColumnTail @@ -427,8 +424,6 @@ trait SelectModule { self: ExprModule with TableModule => import ColumnSelection._ import SelectionSet.{ Cons, Empty } - // val empty: Selection[Any, Any, Empty] = Selection(Empty) - def constantOption[A: TypeTag](value: A, option: Option[ColumnName]): Selection[Any, Any, Cons[Any, A, Empty]] = Selection(Cons(Constant(value, option), Empty)) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index b4837227e..8cfb1cfd8 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -223,8 +223,6 @@ trait TableModule { self: ExprModule with SelectModule => sealed case class DerivedTable[+R <: Read[_]](read: R, name: TableName) extends Table { self => - //override type TableType = read.DerivedTableType - override type ColumnHead = read.ColumnHead override type ColumnTail = read.ColumnTail diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index e1312e750..8ab3868c5 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -77,10 +77,6 @@ trait SqlServerModule extends Jdbc { self => } } } - - /*TODO - 1. translate DerivedTable also for postgres, Oracle, Mysql - */ } override def renderDelete(delete: Delete[_]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 @@ -126,21 +122,31 @@ trait SqlServerModule extends Jdbc { self => buildReadString(set) case literal @ Expr.Literal(value) => val lit = literal.typeTag match { + case TypeTag.TBoolean => + //MSSQL server variant of true/false + if (value.asInstanceOf[Boolean]) { + "0 = 0" + } else { + "0 = 1" + } case TypeTag.TLocalDateTime => - value + val x = value .asInstanceOf[java.time.LocalDateTime] .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) + s"'$x'" case TypeTag.TZonedDateTime => - value + val x = value .asInstanceOf[java.time.ZonedDateTime] .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) + s"'$x'" case TypeTag.TOffsetDateTime => - value + val x = value .asInstanceOf[java.time.OffsetDateTime] .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) - case _ => value.toString + s"'$x'" + case _ => s"'${value.toString}'" } - val _ = builder.append(s"'${lit}'") + val _ = builder.append(lit) case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") From 5d6dee337a8aaf31a8f71452382afd03bfd2b7cc Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 20 Nov 2021 18:15:14 +0100 Subject: [PATCH 296/673] added support for subqueries in selections and lateral tables in postgresql --- core/jvm/src/main/scala/zio/sql/expr.scala | 12 +- core/jvm/src/main/scala/zio/sql/ops.scala | 1 - core/jvm/src/main/scala/zio/sql/select.scala | 7 + .../zio/sql/postgresql/PostgresModule.scala | 93 ++++++++++- .../sql/postgresql/PostgresModuleSpec.scala | 150 ++++++++++++++---- .../scala/zio/sql/postgresql/ShopSchema.scala | 22 ++- .../zio/sql/sqlserver/SqlServerModule.scala | 4 + .../scala/zio/sql/sqlserver/DbSchema.scala | 7 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 114 ++++++++++++- 9 files changed, 361 insertions(+), 49 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 7d43c6667..13f808806 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -106,6 +106,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } object Expr { + implicit val subqueryToExpr = self.Read.Subselect.subselectToExpr _ sealed trait InvariantExpr[F, -A, B] extends Expr[F, A, B] { def typeTag: TypeTag[B] @@ -126,14 +127,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = Selection.computedOption(expr, exprName(expr)) - implicit def selectionToExpr[F, Repr, Source, Subsource, Head]( + sealed case class Subselect[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] - ): Expr[F, Source, Head] = - Expr.Subselect(subselect) - - sealed case class Subselect[F, Repr, Source, Subsource, Head]( - subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] - ) extends Expr[F, Source, Head] + ) extends InvariantExpr[F, Any, Head] { + override def typeTag: TypeTag[Head] = subselect.selection.value.head.toColumn.typeTag + } sealed case class Source[A, B] private[sql] (tableName: TableName, column: Column[B]) extends InvariantExpr[Features.Source, A, B] { diff --git a/core/jvm/src/main/scala/zio/sql/ops.scala b/core/jvm/src/main/scala/zio/sql/ops.scala index aa9e41dd1..d1ad515e7 100644 --- a/core/jvm/src/main/scala/zio/sql/ops.scala +++ b/core/jvm/src/main/scala/zio/sql/ops.scala @@ -80,7 +80,6 @@ trait OpsModule extends TypeTagModule { self: SelectModule => case object IsNotNull extends PropertyOp { override val symbol: String = "is not null" } - //todo how is this different to "= true"? case object IsTrue extends PropertyOp { override val symbol: String = "= true" } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 2a5a5e6d1..b777fe200 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -368,6 +368,13 @@ trait SelectModule { self: ExprModule with TableModule => override type CS = selection.value.CS } + object Subselect { + implicit def subselectToExpr[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( + subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] + ): Expr[F, Any, Head] = + Expr.Subselect(subselect) + } + sealed case class Union[Repr, Out](left: Read.Aux[Repr, Out], right: Read.Aux[Repr, Out], distinct: Boolean) extends Read[Out] { self => override type ResultType = Repr diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index f64a5b0d4..67e5c1d62 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -14,7 +14,55 @@ trait PostgresModule extends Jdbc { self => override type TypeTagExtension[+A] = PostgresSpecific.PostgresTypeTag[A] + override type TableExtension[A] = PostgresSpecific.PostgresSpecificTable[A] + object PostgresSpecific { + sealed trait PostgresSpecificTable[A] extends Table.TableEx[A] + + object PostgresSpecificTable { + import scala.language.implicitConversions + + private[PostgresModule] sealed case class LateraLTable[A, B](left: Table.Aux[A], right: Table.Aux[B]) + extends PostgresSpecificTable[A with B] { self => + + override type ColumnHead = left.ColumnHead + override type ColumnTail = + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail]] + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = + left.columnSet ++ right.columnSet + + override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { + def toExpr[C](column: Column[C]): Expr[Features.Source, A with B, C] = + if (left.columnSet.contains(column)) + left.columnToExpr.toExpr(column) + else + right.columnToExpr.toExpr(column) + } + } + + implicit def tableSourceToSelectedBuilder[A]( + table: Table.Aux[A] + ): LateralTableBuilder[A] = + new LateralTableBuilder(table) + + sealed case class LateralTableBuilder[A](left: Table.Aux[A]) { + self => + + final def lateral( + right: Table.DerivedTable[Read[_]] + ): Table.DialectSpecificTable[A with right.TableType] = { + + val tableExtension = LateraLTable[A, right.TableType]( + left, + right + ) + + new Table.DialectSpecificTable(tableExtension) + } + } + } + trait PostgresTypeTag[+A] extends Tag[A] with Decodable[A] object PostgresTypeTag { implicit case object TVoid extends PostgresTypeTag[Unit] { @@ -180,6 +228,39 @@ trait PostgresModule extends Jdbc { self => zdt.getZone.getId ) } + + object LateralTableExample { + import self.ColumnSet._ + + val customers = + (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( + "verified" + ) ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) + .table("customers") + + val customerId :*: dob :*: fName :*: lName :*: verified :*: createdString :*: createdTimestamp :*: _ = + customers.columns + + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + + val products = + (uuid("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") + val productId :*: description :*: imageURL :*: _ = products.columns + + val productPrices = + (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + val fkProductId :*: effective :*: price :*: _ = productPrices.columns + + val orderDetails = + (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")) + .table( + "order_details" + ) + val fkOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + + } } object PostgresFunctionDef { @@ -347,7 +428,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Subselect(subselect) => render(" (") - renderRead(subselect) + render(renderRead(subselect)) render(") ") case Expr.Source(table, column) => (table, column) match { @@ -604,11 +685,19 @@ trait PostgresModule extends Jdbc { self => def renderTable(table: Table)(implicit render: Renderer): Unit = table match { case Table.DialectSpecificTable(tableExtension) => + tableExtension match { + case PostgresSpecific.PostgresSpecificTable.LateraLTable(left, derivedTable) => + renderTable(left) + + render(" ,lateral ") + + renderTable(derivedTable) + } //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) case Table.DerivedTable(read, name) => render(" ( ") - renderRead(read) + render(renderRead(read)) render(" ) ") render(name) case Table.Joined(joinType, left, right, on) => diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 5c17c5009..ce33fe692 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -123,38 +123,38 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { testM("Can select with property binary operator with Instant") { customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) }, - // uncomment when we properly handle Postgres' Money type - // testM("Can select with property binary operator with numbers") { - // case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) - - // val orderDetailQuantity = 3 - // val orderDetailUnitPrice = BigDecimal(80.0) - // val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) - // val query = - // select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice).from(orderDetails).where(condition) - - // println(renderRead(query)) - - // val expected = - // Seq( - // OrderDetails( - // UUID.fromString("763a7c39-833f-4ee8-9939-e80dfdbfc0fc"), - // UUID.fromString("105a2701-ef93-4e25-81ab-8952cc7d9daa"), - // orderDetailQuantity, - // orderDetailUnitPrice - // ) - // ) - - // val testResult = execute(query.to[UUID, UUID, Int, BigDecimal, OrderDetails] { case row => - // OrderDetails(row._1, row._2, row._3, row._4) - // }) - - // val assertion = for { - // r <- testResult.runCollect - // } yield assert(r)(hasSameElementsDistinct(expected)) - - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // }, + //TODO try to translate money as "::numeric" +// testM("Can select with property binary operator with numbers") { +// case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) +// +// val orderDetailQuantity = 3 +// val orderDetailUnitPrice = BigDecimal(80.0) +// val condition = (quantity === orderDetailQuantity) && (unitPrice === orderDetailUnitPrice) +// val query = +// select(fkOrderId ++ fkProductId ++ quantity ++ unitPrice).from(orderDetails).where(condition) +// +// println(renderRead(query)) +// +// val expected = +// Seq( +// OrderDetails( +// UUID.fromString("763a7c39-833f-4ee8-9939-e80dfdbfc0fc"), +// UUID.fromString("105a2701-ef93-4e25-81ab-8952cc7d9daa"), +// orderDetailQuantity, +// orderDetailUnitPrice +// ) +// ) +// +// val testResult = execute(query.to[UUID, UUID, Int, BigDecimal, OrderDetails] { case row => +// OrderDetails(row._1, row._2, row._3, row._4) +// }) +// +// val assertion = for { +// r <- testResult.runCollect +// } yield assert(r)(hasSameElementsDistinct(expected)) +// +// assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) +// }, testM("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) @@ -240,6 +240,92 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("Can do lateral join") { + import PostgresSpecific.PostgresSpecificTable._ + + /** + * select customers.id, customers.first_name, customers.last_name, derived.order_date + * from customers, + * lateral ( + * select orders.order_date + * from orders + * where customers.id = orders.customer_id + * order by orders.order_date desc limit 1 ) derived order by derived.order_date desc + */ + + case class Row(id: UUID, firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row(UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), "Alana", "Murray", LocalDate.parse("2020-05-11")), + Row(UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), "Mila", "Paterso", LocalDate.parse("2020-04-30")), + Row(UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), "Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("2020-03-19") + ), + Row(UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), "Jose", "Wiggins", LocalDate.parse("2020-01-15")) + ) + + import DerivedTables._ + + val query = + select(customerId ++ fName ++ lName ++ orderDateDerived) + .from(customers.lateral(orderDateDerivedTable)) + .orderBy(Ordering.Desc(orderDateDerived)) + + val result = execute( + query + .to[UUID, String, String, LocalDate, Row] { case row => + Row(row._1, row._2, row._3, row._4) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("can do correlated subqueries in selections - counts orders for each customer") { + + /** + * select first_name, last_name, ( + * select count(orders.id) from orders + * where customers.id = orders.customer_id + * ) as "count" + * from customers + */ + + case class Row(firstName: String, lastName: String, count: Long) + + val expected = Seq( + Row("Alana", "Murray", 5), + Row("Mila", "Paterso", 5), + Row("Terrence", "Noel", 5), + Row("Ronald", "Russell", 6), + Row("Jose", "Wiggins", 4) + ) + + val subquery = + customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) + + val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) + + val result = execute( + query + .to[String, String, Long, Row] { case row => + Row(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("Can select using like") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index 54c4b4ddd..6c0124e35 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -41,6 +41,26 @@ trait ShopSchema extends Jdbc { self => "order_details" ) - val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + val orderDetailsOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + } + + object DerivedTables { + import OrderDetails._ + import Customers._ + import Orders._ + + val orderDetailsDerived = + select(orderDetailsOrderId ++ orderDetailsProductId ++ unitPrice).from(orderDetails).asTable("derived") + + val derivedOrderId :*: derivedProductId :*: derivedUnitPrice :*: _ = orderDetailsDerived.columns + val orderDateDerivedTable = customers + .subselect(orderDate) + .from(orders) + .limit(1) + .where(customerId === fkCustomerId) + .orderBy(Ordering.Desc(orderDate)) + .asTable("derived") + + val orderDateDerived :*: _ = orderDateDerivedTable.columns } } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 8ab3868c5..109fb5fc2 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -77,6 +77,10 @@ trait SqlServerModule extends Jdbc { self => } } } + + object SqlServerFunctionDef { + val Avg = AggregationDef[BigDecimal, Int](FunctionName("avg")) + } } override def renderDelete(delete: Delete[_]): String = ??? // TODO: https://github.com/zio/zio-sql/issues/159 diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 6105dcea1..5703d0701 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -18,8 +18,13 @@ trait DbSchema extends Jdbc { self => val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + val productPrices = + (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + + val fkProductId :*: effective :*: price :*: _ = productPrices.columns + val orderDetails = - (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ double("unit_price")).table("order_details") + (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")).table("order_details") val orderDetailsId :*: productId :*: quantity :*: unitPrice :*: _ = orderDetails.columns diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 803b380ea..cae0608e1 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -161,7 +161,111 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { r <- result.runCollect } yield assert(r.head)(equalTo(expected)) }, - testM("correlated subquery in where clause") { + testM("correlated subqueries in selections - counts orders for each customer") { + + /** + * select first_name, last_name, ( + * select count(orders.id) from orders + * where customers.id = orders.customer_id + * ) as "count" + * from customers + */ + + case class Row(firstName: String, lastName: String, count: Long) + + val expected = Seq( + Row("Alana", "Murray", 5), + Row("Mila", "Paterso", 5), + Row("Terrence", "Noel", 5), + Row("Ronald", "Russell", 6), + Row("Jose", "Wiggins", 4) + ) + + val subquery = + customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) + + val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) + + val result = execute( + query + .to[String, String, Long, Row] { case row => + Row(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("subquery in where clause") { + import SqlServerSpecific.SqlServerFunctionDef._ + + /** + * select derived.order_id, derived.product_id, derived.unit_price from order_details derived + * where derived.unit_price::numeric > (select AVG(price) + * from product_prices ) + */ + + val subquery = select(Avg(price)).from(productPrices) + + val query = select(derivedOrderId ++ derivedProductId ++ derivedUnitPrice) + .from(orderDetailsDerived) + .where( + derivedUnitPrice > subquery + ) + + case class Row(orderId: UUID, productId: UUID, unitPrice: BigDecimal) + + object Row { + def apply(orderId: String, productId: String, unitPrice: BigDecimal): Row = + new Row(UUID.fromString(orderId), UUID.fromString(productId), unitPrice) + } + + val expected = Seq( + Row("04912093-CC2E-46AC-B64C-1BD7BB7758C3", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("9022DD0D-06D6-4A43-9121-2993FC7712A1", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("38D66D44-3CFA-488A-AC77-30277751418F", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("7B2627D5-0150-44DF-9171-3462E20797EE", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("62CD4109-3E5D-40CC-8188-3899FC1F8BDF", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 72.7200), + Row("9473A0BC-396A-4936-96B0-3EEA922AF36B", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), + Row("B8BAC18D-769F-48ED-809D-4B6C0E4D1795", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row("BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row("742D45A0-E81A-41CE-95AD-55B4CABBA258", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row("618AA21F-700B-4CA7-933C-67066CF4CD97", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("606DA090-DD33-4A77-8746-6ED0E8443AB2", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row("FD0FA8D4-E1A0-4369-BE07-945450DB5D36", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), + Row("876B6034-B33C-4497-81EE-B4E8742164C2", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("91CAA28A-A5FE-40D7-979C-BD6A128D0418", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("2C3FC180-D0DF-4D7B-A271-E6CCD2440393", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 70.0000), + Row("763A7C39-833F-4EE8-9939-E80DFDBFC0FC", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), + Row("5011D206-8EFF-42C4-868E-F1A625E1F186", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row("A243FA42-817A-44EC-8B67-22193D212D82", "D5137D3A-894A-4109-9986-E982541B434F", 45.4500), + Row("62CD4109-3E5D-40CC-8188-3899FC1F8BDF", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), + Row("9473A0BC-396A-4936-96B0-3EEA922AF36B", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000), + Row("852E2DC9-4EC3-4225-A6F7-4F42F8FF728E", "D5137D3A-894A-4109-9986-E982541B434F", 45.4500), + Row("D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), + Row("2C3FC180-D0DF-4D7B-A271-E6CCD2440393", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), + Row("5883CB62-D792-4EE3-ACBC-FE85B6BAA998", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000) + ) + + val result = execute( + query + .to[UUID, UUID, BigDecimal, Row] { case row => + Row(row._1, row._2, row._3) + } + ) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("correlated subquery in where clause - return orders where price was above average for particular product") { + import SqlServerSpecific.SqlServerFunctionDef._ /** * select derived.order_id, derived.product_id, derived.unit_price from order_details derived @@ -171,15 +275,15 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(derivedOrderId ++ derivedProductId ++ derivedUnitPrice) .from(orderDetailsDerived) .where( - derivedUnitPrice > subselect[orderDetailsDerived.TableType](AggregationDef.Avg(unitPrice)) + derivedUnitPrice > subselect[orderDetailsDerived.TableType](Avg(unitPrice)) .from(orderDetails) .where(productId === derivedProductId) ) - case class Row(orderId: UUID, productId: UUID, unitPrice: Double) + case class Row(orderId: UUID, productId: UUID, unitPrice: BigDecimal) object Row { - def apply(orderId: String, productId: String, unitPrice: Double): Row = + def apply(orderId: String, productId: String, unitPrice: BigDecimal): Row = new Row(UUID.fromString(orderId), UUID.fromString(productId), unitPrice) } @@ -235,7 +339,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[UUID, UUID, Double, Row] { case row => + .to[UUID, UUID, BigDecimal, Row] { case row => Row(row._1, row._2, row._3) } ) From affb1cd16e1c880cf632bd7d8ec18af091bf1b35 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 21 Nov 2021 21:31:11 +0100 Subject: [PATCH 297/673] added insert module --- core/jvm/src/main/scala/zio/sql/Sql.scala | 5 +- .../jvm/src/main/scala/zio/sql/features.scala | 2 + core/jvm/src/main/scala/zio/sql/insert.scala | 128 ++++++++++++++++++ core/jvm/src/main/scala/zio/sql/table.scala | 96 ++++++++++++- .../zio/sql/postgresql/PostgresModule.scala | 26 +++- 5 files changed, 247 insertions(+), 10 deletions(-) create mode 100644 core/jvm/src/main/scala/zio/sql/insert.scala diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index d99453451..996ec0d63 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -1,6 +1,6 @@ package zio.sql -trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule { +trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertModule { self => /* @@ -38,4 +38,7 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def renderRead(read: self.Read[_]): String def renderUpdate(update: self.Update[_]): String + + def insertInto[Source, N <: ColumnCount](table: Table.Source.Aux[Source, N]): InsertBuilder[Source, N] = + InsertBuilder(table) } diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index 0e14680d6..c0e42f717 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -12,6 +12,8 @@ trait FeaturesModule { type Aggregated[_] type Union[_, _] type Source + //TODO make Derived and Join tables return Expr of type "Derived" when .columns is called + type Derived type Literal type Function0 diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala new file mode 100644 index 000000000..7b902691b --- /dev/null +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -0,0 +1,128 @@ +package zio.sql + +import scala.language.implicitConversions + +/** + * insert into customers (id, first_name, last_name, verified, dob) + * values ('22e37786-af3b-451e-80b4-0baf41c0933e', 'Jaro', 'Regec', 0, '1983-01-05') + * + * insertInto(customers)(customerId ++ fName ++ lName ++ verified ++ dob) + * .values('22e37786-af3b-451e-80b4-0baf41c0933e', 'Jaro', 'Regec', 0, '1983-01-05') + * + * OR + * + * insertInto(customers){fName ++ lName ++ dob} values ("Joe" ++ "Bloggs" ++ LocalDate.of(1990, 1, 8), "Matt" ++ "Smith" ++ LocalDate.of(1978, 4, 5)) + * + * OR + * we need all the values for non null & not auto generated columns + * we also need columns to link values with columns + * could value remember its source? -> maybe then we wouln't need columns at all like: + * + * insertInto(customers).values('22e37786-af3b-451e-80b4-0baf41c0933e', 'Jaro', 'Regec', 0, '1983-01-05') + * + * Columns - Values could be: + * - selections set -> but would consist only of Expr of type Source + * - column set -> we don't currently have a way to concat raw columns + * - own solution -> like InsertRow below + * + * insertInto(customers) + * .values( + * (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ + * (dob -> LocalDate.now()) ++ + * (fName -> "Jaro") ++ + * (lName -> "Regec") ++ + * (verified -> true) ++ + * (createdString -> s"${ZonedDateTime.now().toInstant().toEpochMilli()}") ++ + * (createdTimestamp -> ZonedDateTime.now())) + * + * TODO + * 1. add to column type capability to contain null values + * 2. add auto generated capabilities (like identity for postgresql) + * 3. foreign key... + * + * TODO research => there exists also complex inserts - values could be "subselect" that returns values .... + * Insert Into Test (Test_Date, Testno, Examno, Serialno, Type, Hours) + * Select S.Test_Date, E.Testno, S.Examno, S.Serialno, 'Non-Flight', (F.STARTED- F.ENDED) as Hours + * From Semester S, TIME F, TESTPAPERS e + * Where S.Testno = F.Testno And E.Testno = 1 + */ +trait InsertModule { self: ExprModule with TableModule => + + sealed case class InsertBuilder[Source, N <: ColumnCount](table: Table.Source.Aux[Source, N]) { + def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): Insert[Source, N] = Insert(table, values) + } + + sealed trait =!=[A, B] + + object =!= { + implicit def neq[A, B]: A =!= B = null + + // This pair excludes the A =:= B case + implicit def neqAmbig1[A]: A =!= A = null + implicit def neqAmbig2[A]: A =!= A = null + } + + sealed trait InsertRow[-Source] { self => + + type Append[Source1, Appended] <: InsertRow[Source1] + + type Size <: ColumnCount + + def ++[Source1 <: Source, Appended]( + that: (Expr[Features.Source, Source1, Appended], Appended) + )(implicit unique: Unique[Appended, self.type]): Append[Source1, Appended] + } + object InsertRow { + type Empty = Empty.type + import ColumnCount._ + + case object Empty extends InsertRow[Any] { + override type Size = _0 + override type Append[Source1, Appended] = InsertRow.Cons[Source1, Appended, InsertRow.Empty] + + override def ++[Source1 <: Any, Appended]( + that: (Expr[Features.Source, Source1, Appended], Appended) + )(implicit unique: Unique[Appended, Empty]): Append[Source1, Appended] = + InsertRow.Cons(that, InsertRow.Empty) + } + + sealed case class Cons[-Source, H, T <: InsertRow[Source]]( + tupleHead: (Expr[Features.Source, Source, H], H), + tail: T + ) extends InsertRow[Source] { self => + + override type Size = Succ[tail.Size] + + override type Append[Source1, Appended] = InsertRow.Cons[Source1, H, tail.Append[Source1, Appended]] + + override def ++[Source1 <: Source, Appended]( + that: (Expr[Features.Source, Source1, Appended], Appended) + )(implicit unique: Unique[Appended, self.type]): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended]] = + InsertRow.Cons[Source1, H, tail.Append[Source1, Appended]](tupleHead, tail.++(that)(new Unique[Appended, T] {})) + } + } + + //TODO translate + sealed case class Insert[A, N <: ColumnCount](table: Table.Source.Aux[A, N], values: InsertRow[A]) + + implicit def tupleToInsertSet[Source, H]( + tupleHead: (Expr[Features.Source, Source, H], H) + ): InsertRow.Cons[Source, H, InsertRow.Empty] = + InsertRow.Cons(tupleHead, InsertRow.Empty) + + //TODO works but following are the same types and therefore rejected + // (fName -> "Jaro") => (Expr[Features.Source, TableType, String], String) + // (lName -> "Regec") => (Expr[Features.Source, TableType, String], String) + sealed trait Unique[A, -Origin <: InsertRow[_]] + + object Unique { + implicit def uniqueInEmpty[A]: Unique[A, InsertRow.Empty] = + new Unique[A, InsertRow.Empty] {} + + implicit def uniqueInCons[A, H, T <: InsertRow[_]](implicit + tailNotContain: Unique[A, T], + ev: A =!= H + ): Unique[A, InsertRow.Cons[_, H, T]] = + new Unique[A, InsertRow.Cons[_, H, T]] {} + } +} diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 8cfb1cfd8..8308dcded 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -12,6 +12,7 @@ trait TableModule { self: ExprModule with SelectModule => sealed trait ColumnSet { type ColumnsRepr[T] type Append[That <: ColumnSet] <: ColumnSet + type Size <: ColumnCount def ++[That <: ColumnSet](that: That): Append[That] @@ -27,6 +28,7 @@ trait TableModule { self: ExprModule with SelectModule => type Empty = Empty.type type :*:[A, B <: ColumnSet] = Cons[A, B] type Singleton[A] = Cons[A, Empty] + import ColumnCount._ type ConsAux[A, B <: ColumnSet, ColumnsRepr0[_]] = ColumnSet.Cons[A, B] { type ColumnsRepr[C] = ColumnsRepr0[C] @@ -40,6 +42,8 @@ trait TableModule { self: ExprModule with SelectModule => override type ColumnsRepr[T] = Unit override type Append[That <: ColumnSet] = That + override type Size = _0 + override def ++[That <: ColumnSet](that: That): Append[That] = that override def columnsUntyped: List[Column.Untyped] = Nil @@ -54,6 +58,8 @@ trait TableModule { self: ExprModule with SelectModule => override type ColumnsRepr[T] = (Expr[Features.Source, T, A], tail.ColumnsRepr[T]) override type Append[That <: ColumnSet] = Cons[A, tail.Append[That]] + override type Size = Succ[tail.Size] + override def ++[That <: ColumnSet](that: That): Append[That] = Cons(head, tail ++ that) override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped @@ -63,17 +69,19 @@ trait TableModule { self: ExprModule with SelectModule => override type ColumnHead = A override type ColumnTail = B + override type Size = columnSet.Size + override val name: TableName = name0 override val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr] = self - override def columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { + override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] = Expr.Source(name0, column) } } - override def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] = + def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] = (columnToExpr.toExpr(head), tail.makeColumns(columnToExpr)) override def contains[A](column: Column[A]): Boolean = @@ -141,6 +149,7 @@ trait TableModule { self: ExprModule with SelectModule => type ColumnHead type ColumnTail <: ColumnSet + type Size = columnSet.Size final def fullOuter[That](that: Table.Aux[That]): Table.JoinBuilder[self.TableType, That] = new Table.JoinBuilder[self.TableType, That](JoinType.FullOuter, self, that) @@ -158,9 +167,11 @@ trait TableModule { self: ExprModule with SelectModule => final def columns = columnSet.makeColumns[TableType](columnToExpr) + //final val columnSize : Size = columnSet.size + val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] - def columnToExpr: ColumnToExpr[TableType] + val columnToExpr: ColumnToExpr[TableType] } object Table { @@ -196,6 +207,13 @@ trait TableModule { self: ExprModule with SelectModule => override def ahhhhhhhhhhhhh[A]: A = ??? //don't remove or it'll break } + object Source { + type Aux[A, Size0] = Table.Source { + type TableType = A + type Size = Size0 + } + } + sealed case class Joined[FF, A, B]( joinType: JoinType, left: Table.Aux[A], @@ -213,7 +231,7 @@ trait TableModule { self: ExprModule with SelectModule => left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[C](column: Column[C]): Expr[Features.Source, TableType, C] = + def toExpr[C](column: Column[C]) = if (left.columnSet.contains(column)) left.columnToExpr.toExpr(column) else @@ -228,7 +246,7 @@ trait TableModule { self: ExprModule with SelectModule => override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = read.columnSet - override def columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { + override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] = Expr.Source(name, column) } @@ -243,7 +261,7 @@ trait TableModule { self: ExprModule with SelectModule => override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = tableExtension.columnSet - override def columnToExpr: ColumnToExpr[TableType] = tableExtension.columnToExpr + override val columnToExpr: ColumnToExpr[TableType] = tableExtension.columnToExpr } trait TableEx[A] { @@ -259,4 +277,70 @@ trait TableModule { self: ExprModule with SelectModule => type TableExtension[A] <: Table.TableEx[A] + sealed trait ColumnCount { + + type Appended[That <: ColumnCount] <: ColumnCount + + def add[That <: ColumnCount](that: That): Appended[That] + } + object ColumnCount { + case object Zero extends ColumnCount { + override type Appended[That <: ColumnCount] = That + + override def add[That <: ColumnCount](that: That): Appended[That] = that + } + + sealed case class Succ[C <: ColumnCount](c: C) extends ColumnCount { + override type Appended[That <: ColumnCount] = Succ[c.Appended[That]] + + override def add[That <: ColumnCount](that: That): Appended[That] = Succ(c.add(that)) + } + + type _0 = Zero.type + val _0 = Zero + // type _1 = Succ[_0] + // val _1 = Succ(_0) + // type _2 = Succ[_1] + // val _2 = Succ(_1) + // type _3 = Succ[_2] + // val _3 = Succ(_2) + // type _4 = Succ[_3] + // val _4 = Succ(_3) + // type _5 = Succ[_4] + // val _5 = Succ(_4) + // type _6 = Succ[_5] + // val _6 = Succ(_5) + // type _7 = Succ[_6] + // val _7 = Succ(_6) + // type _8 = Succ[_7] + // val _8 = Succ(_7) + // type _9 = Succ[_8] + // val _9 = Succ(_8) + // type _10 = Succ[_9] + // val _10 = Succ(_9) + // type _11 = Succ[_10] + // val _11 = Succ(_10) + // type _12 = Succ[_11] + // val _12 = Succ(_11) + // type _13 = Succ[_12] + // val _13 = Succ(_12) + // type _14 = Succ[_13] + // val _14 = Succ(_13) + // type _15 = Succ[_14] + // val _15 = Succ(_14) + // type _16 = Succ[_15] + // val _16 = Succ(_15) + // type _17 = Succ[_16] + // val _17 = Succ(_16) + // type _18 = Succ[_17] + // val _18 = Succ(_17) + // type _19 = Succ[_18] + // val _19 = Succ(_18) + // type _20 = Succ[_19] + // val _20 = Succ(_19) + // type _21 = Succ[_20] + // val _21 = Succ(_20) + // type _22 = Succ[_21] + // val _22 = Succ(_21) + } } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 67e5c1d62..f27198dd9 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -233,12 +233,12 @@ trait PostgresModule extends Jdbc { self => import self.ColumnSet._ val customers = - (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( + (uuid("id") ++ localDate("dob") ++ string("last_name") ++ boolean( "verified" - ) ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) + ) ++ zonedDateTime("created_timestamp")) .table("customers") - val customerId :*: dob :*: fName :*: lName :*: verified :*: createdString :*: createdTimestamp :*: _ = + val customerId :*: dob :*: lName :*: verified :*: createdTimestamp :*: _ = customers.columns val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") @@ -260,6 +260,26 @@ trait PostgresModule extends Jdbc { self => ) val fkOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + // ============== INSERTS + + val insertValues = (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ + (dob -> LocalDate.now()) ++ + (lName -> "Regec") ++ + (verified -> true) ++ + (createdTimestamp -> ZonedDateTime.now()) + + insertInto(customers) + .values(insertValues) + + // works but refuses to store two same column types + insertInto(customers) + .values( + (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ + (dob -> LocalDate.now()) ++ + (lName -> "Regec") ++ + (verified -> true) ++ + (createdTimestamp -> ZonedDateTime.now()) + ) } } From d39ac1379ff39a8faaf3ccaf76812808ce33a4e0 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 21 Nov 2021 21:31:56 +0100 Subject: [PATCH 298/673] format --- core/jvm/src/main/scala/zio/sql/insert.scala | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 7b902691b..410a6d5b0 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -52,16 +52,6 @@ trait InsertModule { self: ExprModule with TableModule => def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): Insert[Source, N] = Insert(table, values) } - sealed trait =!=[A, B] - - object =!= { - implicit def neq[A, B]: A =!= B = null - - // This pair excludes the A =:= B case - implicit def neqAmbig1[A]: A =!= A = null - implicit def neqAmbig2[A]: A =!= A = null - } - sealed trait InsertRow[-Source] { self => type Append[Source1, Appended] <: InsertRow[Source1] @@ -125,4 +115,14 @@ trait InsertModule { self: ExprModule with TableModule => ): Unique[A, InsertRow.Cons[_, H, T]] = new Unique[A, InsertRow.Cons[_, H, T]] {} } + + sealed trait =!=[A, B] + + object =!= { + implicit def neq[A, B]: A =!= B = null + + // This pair excludes the A =:= B case + implicit def neqAmbig1[A]: A =!= A = null + implicit def neqAmbig2[A]: A =!= A = null + } } From 22efa6cf716b708d14acfd6d7a2be6255933235e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 26 Nov 2021 14:57:24 +0100 Subject: [PATCH 299/673] Update sbt-scalafix to 0.9.33 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ce77ca9b5..e15078794 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,5 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.29") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.33") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") From 157be53be2c2d02b40be1f5f1a965ac365df0f92 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 29 Nov 2021 17:32:00 +0100 Subject: [PATCH 300/673] distinguish two exprs of the same type representing two different source columns --- core/jvm/src/main/scala/zio/sql/Sql.scala | 4 +- core/jvm/src/main/scala/zio/sql/expr.scala | 8 +- .../jvm/src/main/scala/zio/sql/features.scala | 4 +- core/jvm/src/main/scala/zio/sql/insert.scala | 103 ++++----- core/jvm/src/main/scala/zio/sql/select.scala | 28 ++- core/jvm/src/main/scala/zio/sql/table.scala | 216 ++++++++++-------- .../scala/zio/sql/GroupByHavingSpec.scala | 10 +- .../test/scala/zio/sql/ProductSchema.scala | 10 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 8 +- examples/src/main/scala/Example1.scala | 2 + .../scala/zio/sql/SqlDriverLiveModule.scala | 13 ++ jdbc/src/main/scala/zio/sql/jdbc.scala | 7 + .../scala/zio/sql/mysql/MysqlModule.scala | 6 +- .../scala/zio/sql/oracle/OracleModule.scala | 6 +- .../zio/sql/postgresql/PostgresModule.scala | 152 ++++++++++-- .../sql/postgresql/PostgresModuleSpec.scala | 31 +++ .../zio/sql/sqlserver/SqlServerModule.scala | 14 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 2 +- 18 files changed, 415 insertions(+), 209 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 996ec0d63..b880a21d8 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -39,6 +39,8 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def renderUpdate(update: self.Update[_]): String - def insertInto[Source, N <: ColumnCount](table: Table.Source.Aux[Source, N]): InsertBuilder[Source, N] = + def insertInto[Source, N <: ColumnCount](table: Table.Source.AuxN[Source, N]): InsertBuilder[Source, N] = InsertBuilder(table) + + def renderInsert(insert: self.Insert[_]): String } diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 13f808806..dfd366c9c 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -118,8 +118,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { - case Expr.Source(_, c @ Column.Named(name)) => Some(name) - case _ => None + case Expr.Source(_, c) => c.name + case _ => None } implicit def expToSelection[F, A, B]( @@ -133,8 +133,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { override def typeTag: TypeTag[Head] = subselect.selection.value.head.toColumn.typeTag } - sealed case class Source[A, B] private[sql] (tableName: TableName, column: Column[B]) - extends InvariantExpr[Features.Source, A, B] { + sealed case class Source[-A, B, ColumnIdentity] private[sql] (tableName: TableName, column: Column.Aux[B, ColumnIdentity]) + extends InvariantExpr[Features.Source[ColumnIdentity], A, B] { def typeTag: TypeTag[B] = column.typeTag } diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index c0e42f717..4fb739004 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -11,7 +11,7 @@ trait FeaturesModule { object Features { type Aggregated[_] type Union[_, _] - type Source + type Source[_] //TODO make Derived and Join tables return Expr of type "Derived" when .columns is called type Derived type Literal @@ -33,7 +33,7 @@ trait FeaturesModule { sealed trait IsSource[A] object IsSource { - implicit case object SourceIsSource extends IsSource[Source] + implicit def isSource[ColumnIdentity] : IsSource[Source[ColumnIdentity]] = new IsSource[Source[ColumnIdentity]]{} } } diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 410a6d5b0..9ffd0539f 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -3,27 +3,8 @@ package zio.sql import scala.language.implicitConversions /** - * insert into customers (id, first_name, last_name, verified, dob) - * values ('22e37786-af3b-451e-80b4-0baf41c0933e', 'Jaro', 'Regec', 0, '1983-01-05') - * - * insertInto(customers)(customerId ++ fName ++ lName ++ verified ++ dob) - * .values('22e37786-af3b-451e-80b4-0baf41c0933e', 'Jaro', 'Regec', 0, '1983-01-05') - * - * OR - * - * insertInto(customers){fName ++ lName ++ dob} values ("Joe" ++ "Bloggs" ++ LocalDate.of(1990, 1, 8), "Matt" ++ "Smith" ++ LocalDate.of(1978, 4, 5)) - * - * OR - * we need all the values for non null & not auto generated columns - * we also need columns to link values with columns - * could value remember its source? -> maybe then we wouln't need columns at all like: - * - * insertInto(customers).values('22e37786-af3b-451e-80b4-0baf41c0933e', 'Jaro', 'Regec', 0, '1983-01-05') - * - * Columns - Values could be: - * - selections set -> but would consist only of Expr of type Source - * - column set -> we don't currently have a way to concat raw columns - * - own solution -> like InsertRow below + * insert into customers (id, dob, first_name, last_name, verified) + * values ('22e37786-af3b-451e-80b4-0baf41c0933e', '1983-01-05', 'Jaro', 'Regec', true) * * insertInto(customers) * .values( @@ -31,9 +12,7 @@ import scala.language.implicitConversions * (dob -> LocalDate.now()) ++ * (fName -> "Jaro") ++ * (lName -> "Regec") ++ - * (verified -> true) ++ - * (createdString -> s"${ZonedDateTime.now().toInstant().toEpochMilli()}") ++ - * (createdTimestamp -> ZonedDateTime.now())) + * (verified -> true))) * * TODO * 1. add to column type capability to contain null values @@ -45,64 +24,78 @@ import scala.language.implicitConversions * Select S.Test_Date, E.Testno, S.Examno, S.Serialno, 'Non-Flight', (F.STARTED- F.ENDED) as Hours * From Semester S, TIME F, TESTPAPERS e * Where S.Testno = F.Testno And E.Testno = 1 + * + * TODO + * what if i want to insert multiple rows + * + * insert into customers + * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) + * values + * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), + * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04')) */ trait InsertModule { self: ExprModule with TableModule => - sealed case class InsertBuilder[Source, N <: ColumnCount](table: Table.Source.Aux[Source, N]) { - def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): Insert[Source, N] = Insert(table, values) + sealed case class InsertBuilder[Source, N <: ColumnCount](table: Table.Source.AuxN[Source, N]) { + def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): Insert[Source] = Insert(table, values) } sealed trait InsertRow[-Source] { self => - type Append[Source1, Appended] <: InsertRow[Source1] + type Append[Source1, Appended, ThatIdentity] <: InsertRow[Source1] type Size <: ColumnCount - def ++[Source1 <: Source, Appended]( - that: (Expr[Features.Source, Source1, Appended], Appended) - )(implicit unique: Unique[Appended, self.type]): Append[Source1, Appended] + def ++[Source1 <: Source, Appended, ThatIdentity]( + that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) + )(implicit unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] } + object InsertRow { type Empty = Empty.type import ColumnCount._ case object Empty extends InsertRow[Any] { - override type Size = _0 - override type Append[Source1, Appended] = InsertRow.Cons[Source1, Appended, InsertRow.Empty] + override type Size = _0 + override type Append[Source1, Appended, ThatIdentity] = + InsertRow.Cons[Source1, Appended, InsertRow.Empty, ThatIdentity] - override def ++[Source1 <: Any, Appended]( - that: (Expr[Features.Source, Source1, Appended], Appended) - )(implicit unique: Unique[Appended, Empty]): Append[Source1, Appended] = + override def ++[Source1 <: Any, Appended, ThatIdentity]( + that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) + )(implicit unique: Unique[ThatIdentity, Empty], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] = InsertRow.Cons(that, InsertRow.Empty) } - sealed case class Cons[-Source, H, T <: InsertRow[Source]]( - tupleHead: (Expr[Features.Source, Source, H], H), + sealed case class Cons[-Source, H: TypeTag, T <: InsertRow[Source], HeadIdentity]( + tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H), tail: T ) extends InsertRow[Source] { self => override type Size = Succ[tail.Size] - override type Append[Source1, Appended] = InsertRow.Cons[Source1, H, tail.Append[Source1, Appended]] - - override def ++[Source1 <: Source, Appended]( - that: (Expr[Features.Source, Source1, Appended], Appended) - )(implicit unique: Unique[Appended, self.type]): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended]] = - InsertRow.Cons[Source1, H, tail.Append[Source1, Appended]](tupleHead, tail.++(that)(new Unique[Appended, T] {})) + override type Append[Source1, Appended, ThatIdentity] = + InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] + + override def ++[Source1 <: Source, Appended, ThatIdentity]( + that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) + )(implicit + unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended] + ): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = + InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity]( + tupleHead, + tail.++(that)(new Unique[ThatIdentity, T] {}, implicitly[TypeTag[Appended]]) + ) } } - //TODO translate - sealed case class Insert[A, N <: ColumnCount](table: Table.Source.Aux[A, N], values: InsertRow[A]) - - implicit def tupleToInsertSet[Source, H]( - tupleHead: (Expr[Features.Source, Source, H], H) - ): InsertRow.Cons[Source, H, InsertRow.Empty] = + implicit def tupleToInsertSet[Source, H: TypeTag, HeadIdentity]( + tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H) + ): InsertRow.Cons[Source, H, InsertRow.Empty, HeadIdentity] = InsertRow.Cons(tupleHead, InsertRow.Empty) - //TODO works but following are the same types and therefore rejected - // (fName -> "Jaro") => (Expr[Features.Source, TableType, String], String) - // (lName -> "Regec") => (Expr[Features.Source, TableType, String], String) + sealed case class Insert[A](table: Table.Source.Aux[A], values: InsertRow[A]) + + // A == ColumnIdentities sealed trait Unique[A, -Origin <: InsertRow[_]] object Unique { @@ -110,10 +103,10 @@ trait InsertModule { self: ExprModule with TableModule => new Unique[A, InsertRow.Empty] {} implicit def uniqueInCons[A, H, T <: InsertRow[_]](implicit - tailNotContain: Unique[A, T], + tailNotContain: Unique[H, T], ev: A =!= H - ): Unique[A, InsertRow.Cons[_, H, T]] = - new Unique[A, InsertRow.Cons[_, H, T]] {} + ): Unique[A, InsertRow.Cons[_, _, T, H]] = + new Unique[A, InsertRow.Cons[_, _, T, H]] {} } sealed trait =!=[A, B] diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index b777fe200..637b48dd0 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -95,9 +95,10 @@ trait SelectModule { self: ExprModule with TableModule => val mapper: ResultType => Out type ColumnHead + type HeadIdentity type ColumnTail <: ColumnSet - type CS <: ColumnSet.Cons[ColumnHead, ColumnTail] + type CS <: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity] val columnSet: CS @@ -307,6 +308,8 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnTail = read.ColumnTail override type CS = read.CS + override type HeadIdentity = read.HeadIdentity + override val columnSet: CS = read.columnSet override def asTable(name: TableName): Table.DerivedTable[Mapped[Repr, Out, Out2]] = @@ -363,6 +366,8 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnHead = selection.value.ColumnHead override type ColumnTail = selection.value.ColumnTail + override type HeadIdentity = selection.value.HeadIdentity + override val columnSet: CS = selection.value.columnSet override type CS = selection.value.CS @@ -384,6 +389,8 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnHead = left.ColumnHead override type ColumnTail = left.ColumnTail + override type HeadIdentity = left.HeadIdentity + override type CS = left.CS override val columnSet: CS = left.columnSet @@ -402,9 +409,9 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnHead = B override type ColumnTail = ColumnSet.Empty - override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] + override type CS = ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity] - override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead](), ColumnSet.Empty) + override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead, HeadIdentity](), ColumnSet.Empty) override def asTable(name: TableName): Table.DerivedTable[Literal[B]] = Table.DerivedTable(self, name) } @@ -454,7 +461,7 @@ trait SelectModule { self: ExprModule with TableModule => def name: Option[ColumnName] - def toColumn: Column[ColumnType] + val toColumn: Column[ColumnType] } object ColumnSelection { @@ -463,7 +470,7 @@ trait SelectModule { self: ExprModule with TableModule => extends ColumnSelection[Any, ColumnType] { def typeTag: TypeTag[ColumnType] = implicitly[TypeTag[ColumnType]] - def toColumn: Column[ColumnType] = name match { + val toColumn: Column[ColumnType] = name match { case Some(value) => Column.Named(value) case None => Column.Indexed() } @@ -473,7 +480,7 @@ trait SelectModule { self: ExprModule with TableModule => extends ColumnSelection[Source, ColumnType] { implicit def typeTag: TypeTag[ColumnType] = Expr.typeTagOf(expr) - def toColumn: Column[ColumnType] = name match { + val toColumn: Column[ColumnType] = name match { case Some(value) => Column.Named(value) case None => Column.Indexed() } @@ -490,6 +497,7 @@ trait SelectModule { self: ExprModule with TableModule => type ColumnHead type ColumnTail <: ColumnSet type SelectionTail <: SelectionSet[Source] + type HeadIdentity type CS <: ColumnSet def columnSet: CS @@ -522,6 +530,8 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnTail = ColumnSet.Empty override type SelectionTail = SelectionSet.Empty + override type HeadIdentity = Any + override type CS = ColumnSet.Empty override def columnSet: CS = ColumnSet.Empty @@ -546,10 +556,12 @@ trait SelectModule { self: ExprModule with TableModule => override type ColumnTail = tail.CS override type SelectionTail = B - override type CS = ColumnSet.Cons[ColumnHead, ColumnTail] + override type HeadIdentity = head.toColumn.Identity + + override type CS = ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity] override def columnSet: CS = - ColumnSet.Cons[ColumnHead, ColumnTail](head.toColumn, tail.columnSet) + ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity](head.toColumn, tail.columnSet) override type SelectionsRepr[Source1, T] = (ColumnSelection[Source1, A], tail.SelectionsRepr[Source1, T]) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 8308dcded..9ae02ef92 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -7,13 +7,17 @@ import java.util.UUID trait TableModule { self: ExprModule with SelectModule => - sealed case class ColumnSchema[A](value: A) + sealed trait Singleton0[A] { + type SingletonIdentity + } sealed trait ColumnSet { type ColumnsRepr[T] type Append[That <: ColumnSet] <: ColumnSet type Size <: ColumnCount + type AllColumnIdentities + def ++[That <: ColumnSet](that: That): Append[That] def columnsUntyped: List[Column.Untyped] @@ -25,12 +29,13 @@ trait TableModule { self: ExprModule with SelectModule => } object ColumnSet { - type Empty = Empty.type - type :*:[A, B <: ColumnSet] = Cons[A, B] - type Singleton[A] = Cons[A, Empty] + + type Empty = Empty.type + type :*:[A, B <: ColumnSet, HeadIdentity] = Cons[A, B, HeadIdentity] + type Singleton[A, ColumnIdentity] = Cons[A, Empty, ColumnIdentity] import ColumnCount._ - type ConsAux[A, B <: ColumnSet, ColumnsRepr0[_]] = ColumnSet.Cons[A, B] { + type ConsAux[A, B <: ColumnSet, ColumnsRepr0[_], HeadIdentity] = ColumnSet.Cons[A, B, HeadIdentity] { type ColumnsRepr[C] = ColumnsRepr0[C] } @@ -44,6 +49,8 @@ trait TableModule { self: ExprModule with SelectModule => override type Size = _0 + override type AllColumnIdentities = Any + override def ++[That <: ColumnSet](that: That): Append[That] = that override def columnsUntyped: List[Column.Untyped] = Nil @@ -53,31 +60,39 @@ trait TableModule { self: ExprModule with SelectModule => override def contains[A](column: Column[A]): Boolean = false } - sealed case class Cons[A, B <: ColumnSet](head: Column[A], tail: B) extends ColumnSet { self => + sealed case class Cons[A, B <: ColumnSet, HeadIdentity](head: Column.Aux[A, HeadIdentity], tail: B) + extends ColumnSet { self => - override type ColumnsRepr[T] = (Expr[Features.Source, T, A], tail.ColumnsRepr[T]) - override type Append[That <: ColumnSet] = Cons[A, tail.Append[That]] + override type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, A], tail.ColumnsRepr[T]) - override type Size = Succ[tail.Size] + override type Append[That <: ColumnSet] = Cons[A, tail.Append[That], HeadIdentity] override def ++[That <: ColumnSet](that: That): Append[That] = Cons(head, tail ++ that) + override type Size = Succ[tail.Size] + + override type AllColumnIdentities = HeadIdentity with tail.AllColumnIdentities + override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped - def table(name0: TableName): Table.Aux_[ColumnsRepr, A, B] = + def table(name0: TableName): Table.Aux_[ColumnsRepr, A, B, AllColumnIdentities, HeadIdentity] = new Table.Source { override type ColumnHead = A override type ColumnTail = B + override type HeadIdentity0 = HeadIdentity + + override type AllColumnIdentities = HeadIdentity with tail.AllColumnIdentities + override type Size = columnSet.Size - override val name: TableName = name0 - override val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) + override val name: TableName = name0 + //override val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) - override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr] = self + override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr, HeadIdentity] = self override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] = Expr.Source(name0, column) + def toExpr[A](column: Column[A]): Expr.Source[TableType, A, column.Identity] = Expr.Source(name0, column) } } @@ -88,42 +103,74 @@ trait TableModule { self: ExprModule with SelectModule => head == column || tail.contains(column) } - def bigDecimal(name: String): Singleton[BigDecimal] = singleton[BigDecimal](name) - def boolean(name: String): Singleton[Boolean] = singleton[Boolean](name) - def byteArray(name: String): Singleton[Chunk[Byte]] = singleton[Chunk[Byte]](name) - def char(name: String): Singleton[Char] = singleton[Char](name) - def double(name: String): Singleton[Double] = singleton[Double](name) - def float(name: String): Singleton[Float] = singleton[Float](name) - def instant(name: String): Singleton[Instant] = singleton[Instant](name) - def int(name: String): Singleton[Int] = singleton[Int](name) - def localDate(name: String): Singleton[LocalDate] = singleton[LocalDate](name) - def localDateTime(name: String): Singleton[LocalDateTime] = singleton[LocalDateTime](name) - def localTime(name: String): Singleton[LocalTime] = singleton[LocalTime](name) - def long(name: String): Singleton[Long] = singleton[Long](name) - def offsetDateTime(name: String): Singleton[OffsetDateTime] = singleton[OffsetDateTime](name) - def offsetTime(name: String): Singleton[OffsetTime] = singleton[OffsetTime](name) - def short(name: String): Singleton[Short] = singleton[Short](name) - def singleton[A: TypeTag](name: String): Singleton[A] = Cons(Column.Named[A](name), Empty) - def string(name: String): Singleton[String] = singleton[String](name) - def uuid(name: String): Singleton[UUID] = singleton[UUID](name) - def zonedDateTime(name: String): Singleton[ZonedDateTime] = singleton[ZonedDateTime](name) + /** + * TODO + * + * 1. I need a way to mark column as db generated + * 2. I need a way to mark column as nullable + */ + def byteArray(name: String): Singleton[Chunk[Byte], name.type] = singleton[Chunk[Byte], name.type](name) + def bigDecimal(name: String): Singleton[BigDecimal, name.type] = singleton[BigDecimal, name.type](name) + def boolean(name: String): Singleton[Boolean, name.type] = singleton[Boolean, name.type](name) + def char(name: String): Singleton[Char, name.type] = singleton[Char, name.type](name) + def double(name: String): Singleton[Double, name.type] = singleton[Double, name.type](name) + def float(name: String): Singleton[Float, name.type] = singleton[Float, name.type](name) + def instant(name: String): Singleton[Instant, name.type] = singleton[Instant, name.type](name) + def int(name: String): Singleton[Int, name.type] = singleton[Int, name.type](name) + def localDate(name: String): Singleton[LocalDate, name.type] = singleton[LocalDate, name.type](name) + def localDateTime(name: String): Singleton[LocalDateTime, name.type] = singleton[LocalDateTime, name.type](name) + def localTime(name: String): Singleton[LocalTime, name.type] = singleton[LocalTime, name.type](name) + def long(name: String): Singleton[Long, name.type] = singleton[Long, name.type](name) + def offsetDateTime(name: String): Singleton[OffsetDateTime, name.type] = singleton[OffsetDateTime, name.type](name) + def offsetTime(name: String): Singleton[OffsetTime, name.type] = singleton[OffsetTime, name.type](name) + def short(name: String): Singleton[Short, name.type] = singleton[Short, name.type](name) + def string(name: String): Singleton[String, name.type] = singleton[String, name.type](name) + def uuid(name: String): Singleton[UUID, name.type] = singleton[UUID, name.type](name) + def zonedDateTime(name: String): Singleton[ZonedDateTime, name.type] = singleton[ZonedDateTime, name.type](name) + + def singleton[A: TypeTag, ColumnIdentity](name: String): Singleton[A, ColumnIdentity] = + Cons(Column.Named[A, ColumnIdentity](name), Empty) } object :*: { def unapply[A, B](tuple: (A, B)): Some[(A, B)] = Some(tuple) } + sealed trait ColumnProperty + object ColumnProperty { + case object Nullable extends ColumnProperty + case object NotNull extends ColumnProperty + case object Generated extends ColumnProperty + } + sealed trait Column[+A] { + type Identity def typeTag: TypeTag[A] + + def name: Option[String] } object Column { - sealed case class Named[A: TypeTag](columnName: String) extends Column[A] { - def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + + type Aux[+A0, Identity0] = Column[A0] { + type Identity = Identity0 } - sealed case class Indexed[A: TypeTag]() extends Column[A] { - def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + sealed case class Named[A: TypeTag, ColumnIdentity](columnName: String) extends Column[A] { + override type Identity = ColumnIdentity + + override def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + + override def name = Some(columnName) + } + + sealed case class Indexed[A: TypeTag, ColumnIdentity]() extends Column[A] { + + override type Identity = ColumnIdentity + + override def typeTag: TypeTag[A] = implicitly[TypeTag[A]] + + override def name = None } type Untyped = Column[_] @@ -139,13 +186,15 @@ trait TableModule { self: ExprModule with SelectModule => } trait ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] + def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity], TableType, A] } sealed trait Table { self => type TableType - type Cols = ColumnSet.Cons[ColumnHead, ColumnTail] + type Cols = ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] + + type HeadIdentity0 type ColumnHead type ColumnTail <: ColumnSet @@ -167,9 +216,7 @@ trait TableModule { self: ExprModule with SelectModule => final def columns = columnSet.makeColumns[TableType](columnToExpr) - //final val columnSize : Size = columnSet.size - - val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] + val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] val columnToExpr: ColumnToExpr[TableType] } @@ -183,10 +230,13 @@ trait TableModule { self: ExprModule with SelectModule => type Aux[A] = Table { type TableType = A } - type Aux_[ColumnsRepr[_], A, B <: ColumnSet] = Table.Source { - type ColumnHead = A - type ColumnTail = B - def columnSet: ColumnSet.ConsAux[A, B, ColumnsRepr] + type Aux_[ColumnsRepr[_], A, B <: ColumnSet, AllColumnIdentities0, HeadIdentity] = Table.Source { + type ColumnHead = A + type ColumnTail = B + type AllColumnIdentities = AllColumnIdentities0 + + type HeadIdentity0 = HeadIdentity + val columnSet: ColumnSet.ConsAux[A, B, ColumnsRepr, HeadIdentity] } // Absence of "Insanity" trait causes following known problems: @@ -201,14 +251,19 @@ trait TableModule { self: ExprModule with SelectModule => sealed trait Source extends Table with Insanity { + type AllColumnIdentities + val name: TableName - val columnSchema: ColumnSchema[Cols] override def ahhhhhhhhhhhhh[A]: A = ??? //don't remove or it'll break } object Source { - type Aux[A, Size0] = Table.Source { + type Aux[A] = Table.Source { + type TableType = A + } + + type AuxN[A, Size0] = Table.Source { type TableType = A type Size = Size0 } @@ -223,15 +278,17 @@ trait TableModule { self: ExprModule with SelectModule => override type TableType = left.TableType with right.TableType + override type HeadIdentity0 = left.HeadIdentity0 + override type ColumnHead = left.ColumnHead override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail]] + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[C](column: Column[C]) = + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = if (left.columnSet.contains(column)) left.columnToExpr.toExpr(column) else @@ -244,10 +301,12 @@ trait TableModule { self: ExprModule with SelectModule => override type ColumnHead = read.ColumnHead override type ColumnTail = read.ColumnTail - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = read.columnSet + override type HeadIdentity0 = read.HeadIdentity + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = read.columnSet override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr[Features.Source, TableType, A] = + def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity], TableType, A] = Expr.Source(name, column) } } @@ -259,7 +318,9 @@ trait TableModule { self: ExprModule with SelectModule => override type ColumnHead = tableExtension.ColumnHead override type ColumnTail = tableExtension.ColumnTail - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = tableExtension.columnSet + override type HeadIdentity0 = tableExtension.HeadIdentity0 + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = tableExtension.columnSet override val columnToExpr: ColumnToExpr[TableType] = tableExtension.columnToExpr } @@ -268,8 +329,9 @@ trait TableModule { self: ExprModule with SelectModule => type ColumnHead type ColumnTail <: ColumnSet + type HeadIdentity0 - def columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] + def columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] def columnToExpr: ColumnToExpr[A] } @@ -298,49 +360,5 @@ trait TableModule { self: ExprModule with SelectModule => type _0 = Zero.type val _0 = Zero - // type _1 = Succ[_0] - // val _1 = Succ(_0) - // type _2 = Succ[_1] - // val _2 = Succ(_1) - // type _3 = Succ[_2] - // val _3 = Succ(_2) - // type _4 = Succ[_3] - // val _4 = Succ(_3) - // type _5 = Succ[_4] - // val _5 = Succ(_4) - // type _6 = Succ[_5] - // val _6 = Succ(_5) - // type _7 = Succ[_6] - // val _7 = Succ(_6) - // type _8 = Succ[_7] - // val _8 = Succ(_7) - // type _9 = Succ[_8] - // val _9 = Succ(_8) - // type _10 = Succ[_9] - // val _10 = Succ(_9) - // type _11 = Succ[_10] - // val _11 = Succ(_10) - // type _12 = Succ[_11] - // val _12 = Succ(_11) - // type _13 = Succ[_12] - // val _13 = Succ(_12) - // type _14 = Succ[_13] - // val _14 = Succ(_13) - // type _15 = Succ[_14] - // val _15 = Succ(_14) - // type _16 = Succ[_15] - // val _16 = Succ(_15) - // type _17 = Succ[_16] - // val _17 = Succ(_16) - // type _18 = Succ[_17] - // val _18 = Succ(_17) - // type _19 = Succ[_18] - // val _19 = Succ(_18) - // type _20 = Succ[_19] - // val _20 = Succ(_19) - // type _21 = Succ[_20] - // val _21 = Succ(_20) - // type _22 = Succ[_21] - // val _22 = Succ(_21) } } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index f00c6b7db..322ad436c 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -15,10 +15,12 @@ object GroupByHavingSpec extends DefaultRunnableSpec { } object AggregatedProductSchema { - val sqldsl = new Sql { - override def renderDelete(delete: this.Delete[_]): String = ??? - override def renderRead(read: this.Read[_]): String = ??? - override def renderUpdate(update: Update[_]): String = ??? + val sqldsl = new Sql { self => + override def renderDelete(delete: self.Delete[_]): String = ??? + override def renderRead(read: self.Read[_]): String = ??? + override def renderUpdate(update: self.Update[_]): String = ??? + + override def renderInsert(insert: self.Insert[_]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 6b1f90c91..99cf22e0f 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -1,10 +1,12 @@ package zio.sql object ProductSchema { - val sql = new Sql { - override def renderDelete(delete: this.Delete[_]): String = ??? - override def renderRead(read: this.Read[_]): String = ??? - override def renderUpdate(update: this.Update[_]): String = ??? + val sql = new Sql { self => + override def renderDelete(delete: self.Delete[_]): String = ??? + override def renderRead(read: self.Read[_]): String = ??? + override def renderUpdate(update: self.Update[_]): String = ??? + + override def renderInsert(insert: self.Insert[_]): String = ??? } import sql.ColumnSet._ import sql._ diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 6c62487c6..3a0690b36 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -7,9 +7,11 @@ object TestBasicSelect { val userSql = new Sql { self => import self.ColumnSet._ - override def renderDelete(delete: this.Delete[_]): String = ??? - override def renderRead(read: this.Read[_]): String = ??? - override def renderUpdate(update: this.Update[_]): String = ??? + override def renderDelete(delete: self.Delete[_]): String = ??? + override def renderRead(read: self.Read[_]): String = ??? + override def renderUpdate(update: self.Update[_]): String = ??? + + override def renderInsert(insert: self.Insert[_]): String = ??? val userTable = (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 4771c12a1..423b05095 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -7,6 +7,8 @@ object Example1 extends Sql { def renderDelete(delete: this.Delete[_]): String = ??? + override def renderInsert(insert: Insert[_]): String = ??? + def renderUpdate(update: Example1.Update[_]): String = ??? val columnSet = int("age") ++ string("name") diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index a81b876b4..2e9e0eaf6 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -82,6 +82,19 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] } + override def insert(insert: Insert[_]): IO[Exception, Int] = + pool.connection.use(insertOn(insert, _)) + + def insertOn(insert: Insert[_], conn: Connection): IO[Exception, Int] = + blocking.effectBlocking { + + val query = renderInsert(insert) + + val statement = conn.createStatement() + + statement.executeUpdate(query) + }.refineToOrDie[Exception] + override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = for { connection <- pool.connection diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index b0366fee0..22851399e 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -13,6 +13,8 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def read[A](read: Read[A]): Stream[Exception, A] def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] + + def insert(insert: Insert[_]): IO[Exception, Int] } object SqlDriver { val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlDriver]] = @@ -32,4 +34,9 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi ZIO.accessM[Has[SqlDriver]]( _.get.delete(delete) ) + + def execute(insert: Insert[_]): ZIO[Has[SqlDriver], Exception, Int] = + ZIO.accessM[Has[SqlDriver]]( + _.get.insert(insert) + ) } diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index e22fe2b72..0ea2d253e 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -42,6 +42,8 @@ trait MysqlModule extends Jdbc { self => render.toString } + override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderDelete(delete: self.Delete[_]): String = { implicit val render: Renderer = Renderer() MysqlRenderModule.renderDeleteImpl(delete) @@ -189,8 +191,8 @@ trait MysqlModule extends Jdbc { self => renderRead(subselect) render(") ") case Expr.Source(table, column) => - (table, column) match { - case (tableName: TableName, Column.Named(columnName)) => render(tableName, ".", columnName) + (table, column.name) match { + case (tableName: TableName, Some(columnName)) => render(tableName, ".", columnName) case _ => () } case Expr.Unary(base, op) => diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index fbbce7bc4..0bf900562 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -14,8 +14,8 @@ trait OracleModule extends Jdbc { self => builder.append(renderRead(subselect)) val _ = builder.append(") ") case Expr.Source(table, column) => - (table, column) match { - case (tableName: TableName, Column.Named(columnName)) => + (table, column.name) match { + case (tableName: TableName, Some(columnName)) => val _ = builder.append(tableName).append(".").append(columnName) case _ => () } @@ -300,5 +300,7 @@ trait OracleModule extends Jdbc { self => override def renderDelete(delete: self.Delete[_]): String = ??? + override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderUpdate(update: self.Update[_]): String = ??? } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index f27198dd9..f14ac4f68 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -2,11 +2,12 @@ package zio.sql.postgresql import org.postgresql.util.PGInterval import zio.Chunk -import zio.sql.{ Jdbc, Renderer } +import zio.sql.{Jdbc, Renderer} import java.sql.ResultSet import java.text.DecimalFormat import java.time._ +import java.time.format.DateTimeFormatter import java.util.Calendar trait PostgresModule extends Jdbc { self => @@ -26,14 +27,16 @@ trait PostgresModule extends Jdbc { self => extends PostgresSpecificTable[A with B] { self => override type ColumnHead = left.ColumnHead - override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail]] - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = + override type HeadIdentity0 = left.HeadIdentity0 + override type ColumnTail = + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source, A with B, C] = + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = if (left.columnSet.contains(column)) left.columnToExpr.toExpr(column) else @@ -232,13 +235,15 @@ trait PostgresModule extends Jdbc { self => object LateralTableExample { import self.ColumnSet._ + val xxxxx = uuid("well") //@@ notNull + val customers = - (uuid("id") ++ localDate("dob") ++ string("last_name") ++ boolean( + (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( "verified" ) ++ zonedDateTime("created_timestamp")) .table("customers") - val customerId :*: dob :*: lName :*: verified :*: createdTimestamp :*: _ = + val customerId :*: dob :*: fName :*: lName :*: verified :*: createdTimestamp :*: _ = customers.columns val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") @@ -260,10 +265,34 @@ trait PostgresModule extends Jdbc { self => ) val fkOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + val persons = string("name").table("persons") + + val persons2 = string("name").table("persons2") + val name2 :*: _ = persons2.columns + + val name :*: _ = persons.columns + + //does not compile + // insertInto(persons) + // .values(name2 -> "Jaro") + + insertInto(persons) + .values(name -> "Jaro") + + //implicitly[persons.AllColumnIdentities =:= name. + // ============== INSERTS + def test[A, B](expr1: Expr[Features.Source[A], _, _], expr2: Expr[Features.Source[B], _, _])(implicit + eq: A =:= B + ) = { + val _ = expr1 + val _ = expr2 + } + val insertValues = (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ (dob -> LocalDate.now()) ++ + (fName -> "Jaro") ++ (lName -> "Regec") ++ (verified -> true) ++ (createdTimestamp -> ZonedDateTime.now()) @@ -271,15 +300,10 @@ trait PostgresModule extends Jdbc { self => insertInto(customers) .values(insertValues) - // works but refuses to store two same column types - insertInto(customers) - .values( - (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ - (dob -> LocalDate.now()) ++ - (lName -> "Regec") ++ - (verified -> true) ++ - (createdTimestamp -> ZonedDateTime.now()) - ) + //test(customerId, dob) + test(customerId, customerId) + //test(fName, lName) + } } @@ -361,6 +385,12 @@ trait PostgresModule extends Jdbc { self => render.toString } + override def renderInsert(insert: self.Insert[_]): String = { + implicit val render: Renderer = Renderer() + PostgresRenderModule.renderInsertImpl(insert) + render.toString + } + override def renderDelete(delete: Delete[_]): String = { implicit val render: Renderer = Renderer() PostgresRenderModule.renderDeleteImpl(delete) @@ -370,6 +400,90 @@ trait PostgresModule extends Jdbc { self => object PostgresRenderModule { //todo split out to separate module + def renderInsertImpl(insert: Insert[_])(implicit render: Renderer) = { + render("INSERT INTO ") + renderTable(insert.table) + + render(" (") + renderColumnNames(insert.values) + render(") VALUES (") + + renderInsertValues(insert.values) + render(" )") + } + + def renderInsertValues(values: InsertRow[_])(implicit render: Renderer): Unit = + values match { + case InsertRow.Empty => () + case InsertRow.Cons(tupleHead, InsertRow.Empty) => + val typeTag = Expr.typeTagOf(tupleHead._1) + val value = tupleHead._2 + renderValue(typeTag, value) + case InsertRow.Cons(tupleHead, tail) => + val typeTag = Expr.typeTagOf(tupleHead._1) + val value = tupleHead._2 + renderValue(typeTag, value) + render(", ") + renderInsertValues(tail)(render) + } + + /** + * TODO + * + * Every values is written differently - based on Expr typeTag + */ + def renderValue[A](typeTage: TypeTag[A], value: A)(implicit render: Renderer): Unit = + typeTage match { + case TBigDecimal => render(value.toString) + case TBoolean => render(value.toString) + case TByte => render(value.toString) + case TByteArray => render(value.toString) + case TChar => render(value.toString) + case TDouble => render(value.toString) + case TFloat => render(value.toString) + case TInstant => render(value.toString) + case TInt => render(value.toString) + case TLocalDate => render(s"'${value.toString}'") + case TLocalDateTime => render(value.toString) + case TLocalTime => render(s"'${value.toString}'") + case TLong => render(value.toString) + case TOffsetDateTime => render(value.toString) + case TOffsetTime => render(value.toString) + case TShort => render(value.toString) + case TString => render(s"'${value.toString}'") + case TUUID => render(s"'${value.toString}'") + case TZonedDateTime => + render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") + case TDialectSpecific(typeTagExtension) => render(value.toString) + case Nullable() => render("null") + } + + + def renderColumnNames(values: InsertRow[_])(implicit render: Renderer): Unit = + values match { + case InsertRow.Empty => () // table is a collection of at least ONE column + case InsertRow.Cons(tupleHead, InsertRow.Empty) => + val expr = tupleHead._1 + val columnName = expr match { + case Expr.Source(_, c) => c.name + case _ => None + } + val _ = columnName.map { name => + render(name) + } + case InsertRow.Cons(tupleHead, tail) => + val expr = tupleHead._1 + val columnName = expr match { + case Expr.Source(_, c) => c.name + case _ => None + } + val _ = columnName.map { name => + render(name) + render(", ") + renderColumnNames(tail)(render) + } + } + def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") renderTable(delete.table) @@ -451,10 +565,10 @@ trait PostgresModule extends Jdbc { self => render(renderRead(subselect)) render(") ") case Expr.Source(table, column) => - (table, column) match { - case (tableName: TableName, Column.Named(columnName)) => + (table, column.name) match { + case (tableName: TableName, Some(columnName)) => render(tableName, ".", columnName) - case _ => () + case _ => () } case Expr.Unary(base, op) => render(" ", op.symbol) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index ce33fe692..1cbad4e70 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -375,6 +375,37 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { r <- result } yield assert(r)(equalTo(4)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("simple insert - inserted 1 column") { + + /** + * insert into + * customers + * (id, first_name, last_name, verifier, dob, created_timestamp_string, created_timestamp) + * values + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec, true' 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') + */ + + val dobValue = LocalDate.now() + val created = ZonedDateTime.now() + + val query = insertInto(customers) + .values( + (customerId -> java.util.UUID.fromString("0511474d-8eed-4307-bdb0-e39a561205b6")) ++ + (fName -> "Jaro") ++ + (lName -> "Regec") ++ + (verified -> false) ++ + (dob -> dobValue) ++ + (createdString -> created.toString) ++ + (createdTimestamp -> created)) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(1)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 109fb5fc2..04d8ac426 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -27,14 +27,16 @@ trait SqlServerModule extends Jdbc { self => ) extends SqlServerTable[A with B] { self => override type ColumnHead = left.ColumnHead + + override type HeadIdentity0 = left.HeadIdentity0 override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail]] + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail] = + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source, A with B, C] = + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = if (left.columnSet.contains(column)) left.columnToExpr.toExpr(column) else @@ -87,6 +89,8 @@ trait SqlServerModule extends Jdbc { self => override def renderUpdate(update: self.Update[_]): String = ??? + override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder @@ -96,8 +100,8 @@ trait SqlServerModule extends Jdbc { self => builder.append(renderRead(subselect)) val _ = builder.append(") ") case Expr.Source(table, column) => - (table, column) match { - case (tableName: TableName, Column.Named(columnName)) => + (table, column.name) match { + case (tableName: TableName, Some(columnName)) => val _ = builder.append(tableName).append(".").append(columnName) case _ => () } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index cae0608e1..744b4ba31 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -204,7 +204,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { /** * select derived.order_id, derived.product_id, derived.unit_price from order_details derived - * where derived.unit_price::numeric > (select AVG(price) + * where derived.unit_price > (select AVG(price) * from product_prices ) */ From 780acb5f1727df3361b56996e3263b399f8fbca2 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 29 Nov 2021 17:36:38 +0100 Subject: [PATCH 301/673] cleanup todos --- core/jvm/src/main/scala/zio/sql/insert.scala | 27 ++++++------------- core/jvm/src/main/scala/zio/sql/table.scala | 7 ----- .../zio/sql/postgresql/PostgresModule.scala | 2 -- 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 9ffd0539f..333537f42 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -3,21 +3,14 @@ package zio.sql import scala.language.implicitConversions /** - * insert into customers (id, dob, first_name, last_name, verified) - * values ('22e37786-af3b-451e-80b4-0baf41c0933e', '1983-01-05', 'Jaro', 'Regec', true) - * - * insertInto(customers) - * .values( - * (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ - * (dob -> LocalDate.now()) ++ - * (fName -> "Jaro") ++ - * (lName -> "Regec") ++ - * (verified -> true))) * * TODO * 1. add to column type capability to contain null values * 2. add auto generated capabilities (like identity for postgresql) * 3. foreign key... + * 4. insert multiple rows at once + * 5. translate for other modules than just postgres + * 6. OPTIONAL we could compare table's "AllColumnIdentities" with Expr[Features.Source[Identity]] instead of comparing length and uniqness (decide what makes most sense with regards to other points) * * TODO research => there exists also complex inserts - values could be "subselect" that returns values .... * Insert Into Test (Test_Date, Testno, Examno, Serialno, Type, Hours) @@ -25,14 +18,11 @@ import scala.language.implicitConversions * From Semester S, TIME F, TESTPAPERS e * Where S.Testno = F.Testno And E.Testno = 1 * - * TODO - * what if i want to insert multiple rows - * - * insert into customers - * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) - * values - * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), - * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04')) + * insert into customers + * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) + * values + * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), + * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04')) */ trait InsertModule { self: ExprModule with TableModule => @@ -95,7 +85,6 @@ trait InsertModule { self: ExprModule with TableModule => sealed case class Insert[A](table: Table.Source.Aux[A], values: InsertRow[A]) - // A == ColumnIdentities sealed trait Unique[A, -Origin <: InsertRow[_]] object Unique { diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 9ae02ef92..c373f4126 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -87,7 +87,6 @@ trait TableModule { self: ExprModule with SelectModule => override type Size = columnSet.Size override val name: TableName = name0 - //override val columnSchema: ColumnSchema[A :*: B] = ColumnSchema(self) override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr, HeadIdentity] = self @@ -103,12 +102,6 @@ trait TableModule { self: ExprModule with SelectModule => head == column || tail.contains(column) } - /** - * TODO - * - * 1. I need a way to mark column as db generated - * 2. I need a way to mark column as nullable - */ def byteArray(name: String): Singleton[Chunk[Byte], name.type] = singleton[Chunk[Byte], name.type](name) def bigDecimal(name: String): Singleton[BigDecimal, name.type] = singleton[BigDecimal, name.type](name) def boolean(name: String): Singleton[Boolean, name.type] = singleton[Boolean, name.type](name) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index f14ac4f68..a7bb68f1c 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -279,8 +279,6 @@ trait PostgresModule extends Jdbc { self => insertInto(persons) .values(name -> "Jaro") - //implicitly[persons.AllColumnIdentities =:= name. - // ============== INSERTS def test[A, B](expr1: Expr[Features.Source[A], _, _], expr2: Expr[Features.Source[B], _, _])(implicit From 6eac36eb8c7f2d4362ac93270b079481619e24ce Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 30 Nov 2021 16:18:59 +0000 Subject: [PATCH 302/673] fixed compilation failure on scala 2.12 --- core/jvm/src/main/scala/zio/sql/expr.scala | 4 ++-- core/jvm/src/main/scala/zio/sql/select.scala | 14 +++++++------- core/jvm/src/main/scala/zio/sql/table.scala | 2 +- .../src/main/scala/zio/sql/mysql/MysqlModule.scala | 4 ++-- .../main/scala/zio/sql/oracle/OracleModule.scala | 4 ++-- .../scala/zio/sql/postgresql/PostgresModule.scala | 6 +++--- .../scala/zio/sql/sqlserver/SqlServerModule.scala | 14 +++++++------- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 13f808806..ffd19e126 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -118,8 +118,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { - case Expr.Source(_, c @ Column.Named(name)) => Some(name) - case _ => None + case Expr.Source(_, Column.Named(name)) => Some(name) + case _ => None } implicit def expToSelection[F, A, B]( diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index b777fe200..013caffee 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -101,7 +101,7 @@ trait SelectModule { self: ExprModule with TableModule => val columnSet: CS - def asTable(name: TableName): Table.DerivedTable[Read[Out]] + def asTable(name: TableName): Table.DerivedTable[Out, Read[Out]] /** * Maps the [[Read]] query's output to another type by providing a function @@ -309,8 +309,8 @@ trait SelectModule { self: ExprModule with TableModule => override val columnSet: CS = read.columnSet - override def asTable(name: TableName): Table.DerivedTable[Mapped[Repr, Out, Out2]] = - Table.DerivedTable(self, name) + override def asTable(name: TableName): Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]] = + Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]](self, name) } type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] @@ -353,8 +353,8 @@ trait SelectModule { self: ExprModule with TableModule => copy(havingExpr = self.havingExpr && havingExpr2) } - override def asTable(name: TableName): Table.DerivedTable[Subselect[F, Repr, Source, Subsource, Head, Tail]] = - Table.DerivedTable(self, name) + override def asTable(name: TableName): Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]] = + Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]](self, name) override type ResultType = Repr @@ -388,7 +388,7 @@ trait SelectModule { self: ExprModule with TableModule => override val columnSet: CS = left.columnSet - override def asTable(name: TableName): Table.DerivedTable[Union[Repr, Out]] = Table.DerivedTable(self, name) + override def asTable(name: TableName): Table.DerivedTable[Out, Union[Repr, Out]] = Table.DerivedTable[Out, Union[Repr, Out]](self, name) } // TODO add name to literal selection - e.g. select '1' as one @@ -406,7 +406,7 @@ trait SelectModule { self: ExprModule with TableModule => override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead](), ColumnSet.Empty) - override def asTable(name: TableName): Table.DerivedTable[Literal[B]] = Table.DerivedTable(self, name) + override def asTable(name: TableName): Table.DerivedTable[(B, Unit), Literal[B]] = Table.DerivedTable[(B, Unit), Literal[B]](self, name) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 8cfb1cfd8..a67eca60d 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -221,7 +221,7 @@ trait TableModule { self: ExprModule with SelectModule => } } - sealed case class DerivedTable[+R <: Read[_]](read: R, name: TableName) extends Table { self => + sealed case class DerivedTable[+Out, +R <: Read[Out]](read: R, name: TableName) extends Table { self => override type ColumnHead = read.ColumnHead override type ColumnTail = read.ColumnTail diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index e22fe2b72..b1a67eaaa 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -160,13 +160,13 @@ trait MysqlModule extends Jdbc { self => private def renderTable(table: Table)(implicit render: Renderer): Unit = table match { - case Table.DialectSpecificTable(tableExtension) => ??? + case Table.DialectSpecificTable(_) => ??? //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) case Table.DerivedTable(read, name) => render(" ( ") - renderRead(read) + renderRead(read.asInstanceOf[Read[_]]) render(" ) ") render(name) case Table.Joined(joinType, left, right, on) => diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index fbbce7bc4..922dcd0ed 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -269,13 +269,13 @@ trait OracleModule extends Jdbc { self => } def buildTable(table: Table, builder: StringBuilder): Unit = table match { - case Table.DialectSpecificTable(tableExtension) => ??? + case Table.DialectSpecificTable(_) => ??? //The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) case Table.DerivedTable(read, name) => builder.append(" ( ") - builder.append(renderRead(read)) + builder.append(renderRead(read.asInstanceOf[Read[_]])) builder.append(" ) ") val _ = builder.append(name) case Table.Joined(joinType, left, right, on) => diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 67e5c1d62..8d7cd1faa 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -49,8 +49,8 @@ trait PostgresModule extends Jdbc { self => sealed case class LateralTableBuilder[A](left: Table.Aux[A]) { self => - final def lateral( - right: Table.DerivedTable[Read[_]] + final def lateral[Out]( + right: Table.DerivedTable[Out, Read[Out]] ): Table.DialectSpecificTable[A with right.TableType] = { val tableExtension = LateraLTable[A, right.TableType]( @@ -697,7 +697,7 @@ trait PostgresModule extends Jdbc { self => case sourceTable: self.Table.Source => render(sourceTable.name) case Table.DerivedTable(read, name) => render(" ( ") - render(renderRead(read)) + render(renderRead(read.asInstanceOf[Read[_]])) render(" ) ") render(name) case Table.Joined(joinType, left, right, on) => diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 109fb5fc2..3d190b3ea 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -50,8 +50,8 @@ trait SqlServerModule extends Jdbc { self => sealed case class CrossOuterApplyTableBuilder[A](left: Table.Aux[A]) { self => - final def crossApply( - right: Table.DerivedTable[Read[_]] + final def crossApply[Out]( + right: Table.DerivedTable[Out, Read[Out]] ): Table.DialectSpecificTable[A with right.TableType] = { val tableExtension = CrossOuterApplyTable[A, right.TableType]( @@ -63,8 +63,8 @@ trait SqlServerModule extends Jdbc { self => new Table.DialectSpecificTable(tableExtension) } - final def outerApply( - right: Table.DerivedTable[Read[_]] + final def outerApply[Out]( + right: Table.DerivedTable[Out, Read[Out]] ): Table.DialectSpecificTable[A with right.TableType] = { val tableExtension = CrossOuterApplyTable[A, right.TableType]( @@ -241,9 +241,9 @@ trait SqlServerModule extends Jdbc { self => val _ = builder.append(")") } - def buildReadString(read: self.Read[_]): Unit = + def buildReadString[Out](read: Read[Out]): Unit = read match { - case Read.Mapped(read, _) => buildReadString(read) + case Read.Mapped(read, _) => buildReadString(read.asInstanceOf[Read[Out]]) //todo offset (needs orderBy, must use fetch _instead_ of top) case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => @@ -379,7 +379,7 @@ trait SqlServerModule extends Jdbc { self => case Table.DerivedTable(read, name) => builder.append(" ( ") - builder.append(renderRead(read)) + builder.append(renderRead(read.asInstanceOf[Read[_]])) builder.append(" ) ") val _ = builder.append(name) From a7617b7b0b5742e6e06c3fe14321402178fb398e Mon Sep 17 00:00:00 2001 From: sviezypan Date: Wed, 1 Dec 2021 17:02:13 +0000 Subject: [PATCH 303/673] added alternative ways of doing inserts with zio schema --- build.sbt | 2 + core/jvm/src/main/scala/zio/sql/Sql.scala | 12 +- core/jvm/src/main/scala/zio/sql/insert.scala | 577 ++++++++++++++++-- .../scala/zio/sql/insertAlternative.scala | 110 ++++ core/jvm/src/main/scala/zio/sql/table.scala | 4 +- .../scala/zio/sql/GroupByHavingSpec.scala | 2 +- .../test/scala/zio/sql/ProductSchema.scala | 2 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 2 +- .../test/scala/zio-sql/HelloWorldSpec.scala | 3 +- examples/src/main/scala/Example1.scala | 2 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 4 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 4 +- .../scala/zio/sql/mysql/MysqlModule.scala | 2 +- .../scala/zio/sql/oracle/OracleModule.scala | 2 +- .../zio/sql/postgresql/PostgresModule.scala | 50 +- .../sql/postgresql/PostgresModuleSpec.scala | 2 +- .../zio/sql/sqlserver/SqlServerModule.scala | 2 +- 17 files changed, 681 insertions(+), 101 deletions(-) create mode 100644 core/jvm/src/main/scala/zio/sql/insertAlternative.scala diff --git a/build.sbt b/build.sbt index 84eb81353..6d540c0fb 100644 --- a/build.sbt +++ b/build.sbt @@ -80,6 +80,8 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion % Provided, "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % "0.1.4", + "dev.zio" %% "zio-schema-derivation" % "0.1.4", "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index b880a21d8..2df1891c4 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -1,6 +1,6 @@ package zio.sql -trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertModule { +trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertAltModule with InsertModule { self => /* @@ -39,8 +39,12 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def renderUpdate(update: self.Update[_]): String - def insertInto[Source, N <: ColumnCount](table: Table.Source.AuxN[Source, N]): InsertBuilder[Source, N] = - InsertBuilder(table) + def insertAltInto[Source, N <: ColumnCount, AllColumnIdentities](table: Table.Source.AuxN[Source, AllColumnIdentities, N]): InsertAltBuilder[Source, N, AllColumnIdentities] = + InsertAltBuilder(table) - def renderInsert(insert: self.Insert[_]): String + def renderInsert(insert: self.InsertAlt[_]): String + + def insertInto[Source, N <: ColumnCount, AllColumnIdentities, SourceTypes, ColsRepr](table: Table.Source.AuxN[Source, AllColumnIdentities, N]) + (sources: SourceSet.Aux[Source, SourceTypes, ColsRepr])(implicit ev1: AllColumnIdentities =:= SourceTypes, ev2: N =:= sources.Size) = + InsertBuilder(table, sources) } diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 333537f42..6aa6875df 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -1,110 +1,553 @@ package zio.sql +import zio.schema.Schema import scala.language.implicitConversions /** + * insert into + * customers + * (id, first_name, last_name, verified, dob) + * values + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec, true' 1999-11-02) * - * TODO - * 1. add to column type capability to contain null values - * 2. add auto generated capabilities (like identity for postgresql) - * 3. foreign key... - * 4. insert multiple rows at once - * 5. translate for other modules than just postgres - * 6. OPTIONAL we could compare table's "AllColumnIdentities" with Expr[Features.Source[Identity]] instead of comparing length and uniqness (decide what makes most sense with regards to other points) + * final case class Customer(id: UUID, fName: String, lName: Strng, verified: Boolean, dob: LocalDate) + * + * implicit val Customer = DeriveSchema.gen[Customer] + * val customerValues : List[Customer] = ??? + * + * insertInto(customers)(customerId +++ fName +++ lName +++ verified +++ dob) + * values(customerValues) * - * TODO research => there exists also complex inserts - values could be "subselect" that returns values .... - * Insert Into Test (Test_Date, Testno, Examno, Serialno, Type, Hours) - * Select S.Test_Date, E.Testno, S.Examno, S.Serialno, 'Non-Flight', (F.STARTED- F.ENDED) as Hours - * From Semester S, TIME F, TESTPAPERS e - * Where S.Testno = F.Testno And E.Testno = 1 - * - * insert into customers - * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) - * values - * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), - * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04')) + * TODO + * 1. change SourceSet +++ to :: or something better - cannot use ++ because its selectionSet then + * 2. make columns null, not null aware + * 3. automatically generated columns (postgres idenitity) do not accept insert + * 4. make better error messages + * 5. try to generate DSL tables at compile type from sql file with compiler plugin + * 6. translate new inserts to sql query + * 7. how to support tables with more than 22 columns ? */ trait InsertModule { self: ExprModule with TableModule => - sealed case class InsertBuilder[Source, N <: ColumnCount](table: Table.Source.AuxN[Source, N]) { - def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): Insert[Source] = Insert(table, values) + sealed case class InsertBuilder[Source, SourceTypes, ColsRepr]( + table: Table.Source.Aux[Source], + sources: SourceSet.Aux[Source, SourceTypes, ColsRepr] + ) { + + def values[Z](values: Seq[Z])(implicit + schemaCC: Schema[Z], + schemaValidity: SchemaValidity[Z, ColsRepr] + ): Insert[Source, Z] = Insert(table, sources, values) } - sealed trait InsertRow[-Source] { self => + sealed case class Insert[A, N](table: Table.Source.Aux[A], sources: SourceSet[A], values: Seq[N])(implicit + schemaN: Schema[N] + ) - type Append[Source1, Appended, ThatIdentity] <: InsertRow[Source1] + sealed trait SourceSet[-Source] { self => + + type Append[Source1, Appended, ThatIdentity] <: SourceSet[Source1] + + type Repr + + type ColumnTypes type Size <: ColumnCount - def ++[Source1 <: Source, Appended, ThatIdentity]( - that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) - )(implicit unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] + def +++[Source1 <: Source, Appended, ThatIdentity]( + that: Expr[Features.Source[ThatIdentity], Source1, Appended] + ): Append[Source1, Appended, ThatIdentity] } - object InsertRow { + object SourceSet { + + type Aux[Source0, ColumnTypes0, ColsRepr] = SourceSet[Source0] { + type ColumnTypes = ColumnTypes0 + + type Repr = ColsRepr + } + type Empty = Empty.type import ColumnCount._ - case object Empty extends InsertRow[Any] { - override type Size = _0 + case object Empty extends SourceSet[Any] { + override type Size = _0 + + override type ColumnTypes = Any + + override type Repr = Unit + override type Append[Source1, Appended, ThatIdentity] = - InsertRow.Cons[Source1, Appended, InsertRow.Empty, ThatIdentity] + SourceSet.Cons[Source1, Appended, SourceSet.Empty, ThatIdentity] - override def ++[Source1 <: Any, Appended, ThatIdentity]( - that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) - )(implicit unique: Unique[ThatIdentity, Empty], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] = - InsertRow.Cons(that, InsertRow.Empty) + override def +++[Source1 <: Any, Appended, ThatIdentity]( + that: Expr[Features.Source[ThatIdentity], Source1, Appended] + ): Append[Source1, Appended, ThatIdentity] = + SourceSet.Cons(that, SourceSet.Empty) } - sealed case class Cons[-Source, H: TypeTag, T <: InsertRow[Source], HeadIdentity]( - tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H), + sealed case class Cons[-Source, H, T <: SourceSet[Source], HeadIdentity]( + head: Expr[Features.Source[HeadIdentity], Source, H], tail: T - ) extends InsertRow[Source] { self => + ) extends SourceSet[Source] { self => override type Size = Succ[tail.Size] + override type Repr = (H, tail.Repr) + + override type ColumnTypes = HeadIdentity with tail.ColumnTypes + override type Append[Source1, Appended, ThatIdentity] = - InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] - - override def ++[Source1 <: Source, Appended, ThatIdentity]( - that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) - )(implicit - unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended] - ): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = - InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity]( - tupleHead, - tail.++(that)(new Unique[ThatIdentity, T] {}, implicitly[TypeTag[Appended]]) + SourceSet.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] + + override def +++[Source1 <: Source, Appended, ThatIdentity]( + that: Expr[Features.Source[ThatIdentity], Source1, Appended] + ): SourceSet.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = + SourceSet.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity]( + head, + tail.+++(that) ) } } - implicit def tupleToInsertSet[Source, H: TypeTag, HeadIdentity]( - tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H) - ): InsertRow.Cons[Source, H, InsertRow.Empty, HeadIdentity] = - InsertRow.Cons(tupleHead, InsertRow.Empty) + implicit def exprToSourceSet[Source, H: TypeTag, HeadIdentity]( + head: Expr[Features.Source[HeadIdentity], Source, H] + ): SourceSet.Cons[Source, H, SourceSet.Empty, HeadIdentity] = + SourceSet.Cons(head, SourceSet.Empty) - sealed case class Insert[A](table: Table.Source.Aux[A], values: InsertRow[A]) + sealed trait SchemaValidity[Z, ColsRepr] - sealed trait Unique[A, -Origin <: InsertRow[_]] + object SchemaValidity { + implicit def caseClass1[A, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass1[A, Z], + ev: ColsRepr <:< (A, Unit) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} - object Unique { - implicit def uniqueInEmpty[A]: Unique[A, InsertRow.Empty] = - new Unique[A, InsertRow.Empty] {} + implicit def caseClass2[A1, A2, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass2[A1, A2, Z], + ev: ColsRepr <:< (A1, (A2, Unit)) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} - implicit def uniqueInCons[A, H, T <: InsertRow[_]](implicit - tailNotContain: Unique[H, T], - ev: A =!= H - ): Unique[A, InsertRow.Cons[_, _, T, H]] = - new Unique[A, InsertRow.Cons[_, _, T, H]] {} - } + implicit def caseClass3[A1, A2, A3, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass3[A1, A2, A3, Z], + ev: ColsRepr <:< (A1, (A2, (A3, Unit))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass4[A1, A2, A3, A4, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass4[A1, A2, A3, A4, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} - sealed trait =!=[A, B] + implicit def caseClass5[A1, A2, A3, A4, A5, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass5[A1, A2, A3, A4, A5, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} - object =!= { - implicit def neq[A, B]: A =!= B = null + implicit def caseClass6[A1, A2, A3, A4, A5, A6, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass6[A1, A2, A3, A4, A5, A6, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} - // This pair excludes the A =:= B case - implicit def neqAmbig1[A]: A =!= A = null - implicit def neqAmbig2[A]: A =!= A = null + implicit def caseClass7[A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr](implicit + ccSchema: Schema.CaseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z], + ev: ColsRepr <:< ( + A1, + (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit)))))))))))))) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr]( + implicit + ccSchema: Schema.CaseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z], + ev: ColsRepr <:< ( + A1, + (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit))))))))))))))) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr]( + implicit + ccSchema: Schema.CaseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z], + ev: ColsRepr <:< ( + A1, + (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit)))))))))))))))) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass18[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + Z, + ColsRepr + ](implicit + ccSchema: Schema.CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z], + ev: ColsRepr <:< ( + A1, + ( + A2, + (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))) + ) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass19[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + Z, + ColsRepr + ](implicit + ccSchema: Schema.CaseClass19[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + Z + ], + ev: ColsRepr <:< ( + A1, + ( + A2, + ( + A3, + ( + A4, + (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))) + ) + ) + ) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass20[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + Z, + ColsRepr + ](implicit + ccSchema: Schema.CaseClass20[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + Z + ], + ev: ColsRepr <:< ( + A1, + ( + A2, + ( + A3, + ( + A4, + ( + A5, + ( + A6, + (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))) + ) + ) + ) + ) + ) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass21[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + Z, + ColsRepr + ](implicit + ccSchema: Schema.CaseClass21[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + Z + ], + ev: ColsRepr <:< ( + A1, + ( + A2, + ( + A3, + ( + A4, + ( + A5, + ( + A6, + ( + A7, + (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit)))))))))))))) + ) + ) + ) + ) + ) + ) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} + + implicit def caseClass22[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22, + Z, + ColsRepr + ](implicit + ccSchema: Schema.CaseClass22[ + A1, + A2, + A3, + A4, + A5, + A6, + A7, + A8, + A9, + A10, + A11, + A12, + A13, + A14, + A15, + A16, + A17, + A18, + A19, + A20, + A21, + A22, + Z + ], + ev: ColsRepr <:< ( + A1, + ( + A2, + ( + A3, + ( + A4, + ( + A5, + ( + A6, + ( + A7, + ( + A8, + ( + A9, + (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit))))))))))))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ): SchemaValidity[Z, ColsRepr] = + new SchemaValidity[Z, ColsRepr] {} } } diff --git a/core/jvm/src/main/scala/zio/sql/insertAlternative.scala b/core/jvm/src/main/scala/zio/sql/insertAlternative.scala new file mode 100644 index 000000000..8be610a39 --- /dev/null +++ b/core/jvm/src/main/scala/zio/sql/insertAlternative.scala @@ -0,0 +1,110 @@ +package zio.sql + +import scala.language.implicitConversions + +/** + * + * TODO + * 1. add to column type capability to contain null values + * 2. add auto generated capabilities (like identity for postgresql) + * 3. foreign key... + * 4. insert multiple rows at once + * 5. translate for other modules than just postgres + * 6. OPTIONAL we could compare table's "AllColumnIdentities" with Expr[Features.Source[Identity]] instead of comparing length and uniqness (decide what makes most sense with regards to other points) + * + * TODO research => there exists also complex inserts - values could be "subselect" that returns values .... + * Insert Into Test (Test_Date, Testno, Examno, Serialno, Type, Hours) + * Select S.Test_Date, E.Testno, S.Examno, S.Serialno, 'Non-Flight', (F.STARTED- F.ENDED) as Hours + * From Semester S, TIME F, TESTPAPERS e + * Where S.Testno = F.Testno And E.Testno = 1 + * + * insert into customers + * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) + * values + * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), + * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04')) + */ +trait InsertAltModule { self: ExprModule with TableModule => + + sealed case class InsertAltBuilder[Source, N <: ColumnCount, AllColumnIdentities](table: Table.Source.AuxN[Source, AllColumnIdentities, N]) { + def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): InsertAlt[Source] = InsertAlt(table, values) + } + + sealed trait InsertRow[-Source] { self => + + type Append[Source1, Appended, ThatIdentity] <: InsertRow[Source1] + + type Size <: ColumnCount + + def ++[Source1 <: Source, Appended, ThatIdentity]( + that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) + )(implicit unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] + } + + object InsertRow { + type Empty = Empty.type + import ColumnCount._ + + case object Empty extends InsertRow[Any] { + override type Size = _0 + override type Append[Source1, Appended, ThatIdentity] = + InsertRow.Cons[Source1, Appended, InsertRow.Empty, ThatIdentity] + + override def ++[Source1 <: Any, Appended, ThatIdentity]( + that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) + )(implicit unique: Unique[ThatIdentity, Empty], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] = + InsertRow.Cons(that, InsertRow.Empty) + } + + sealed case class Cons[-Source, H: TypeTag, T <: InsertRow[Source], HeadIdentity]( + tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H), + tail: T + ) extends InsertRow[Source] { self => + + override type Size = Succ[tail.Size] + + override type Append[Source1, Appended, ThatIdentity] = + InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] + + override def ++[Source1 <: Source, Appended, ThatIdentity]( + that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) + )(implicit + unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended] + ): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = + InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity]( + tupleHead, + tail.++(that)(new Unique[ThatIdentity, T] {}, implicitly[TypeTag[Appended]]) + ) + } + } + + implicit def tupleToInsertSet[Source, H: TypeTag, HeadIdentity]( + tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H) + ): InsertRow.Cons[Source, H, InsertRow.Empty, HeadIdentity] = + InsertRow.Cons(tupleHead, InsertRow.Empty) + + sealed case class InsertAlt[A](table: Table.Source.Aux[A], values: InsertRow[A]) + + sealed trait Unique[A, -Origin <: InsertRow[_]] + + object Unique { + implicit def uniqueInEmpty[A]: Unique[A, InsertRow.Empty] = + new Unique[A, InsertRow.Empty] {} + + implicit def uniqueInCons[A, H, T <: InsertRow[_]](implicit + tailNotContain: Unique[H, T], + ev: A =!= H + ): Unique[A, InsertRow.Cons[_, _, T, H]] = + new Unique[A, InsertRow.Cons[_, _, T, H]] {} + } + + sealed trait =!=[A, B] + + object =!= { + implicit def neq[A, B]: A =!= B = null + + // This pair excludes the A =:= B case + implicit def neqAmbig1[A]: A =!= A = null + implicit def neqAmbig2[A]: A =!= A = null + } +} diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index c373f4126..551d2ecf0 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -256,8 +256,10 @@ trait TableModule { self: ExprModule with SelectModule => type TableType = A } - type AuxN[A, Size0] = Table.Source { + type AuxN[A, AllColumnIdentities0, Size0] = Table.Source { type TableType = A + + type AllColumnIdentities = AllColumnIdentities0 type Size = Size0 } } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 322ad436c..853002496 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -20,7 +20,7 @@ object AggregatedProductSchema { override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderInsert(insert: self.InsertAlt[_]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 99cf22e0f..6d6426ee9 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -6,7 +6,7 @@ object ProductSchema { override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderInsert(insert: self.InsertAlt[_]): String = ??? } import sql.ColumnSet._ import sql._ diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 3a0690b36..4b876c7c0 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -11,7 +11,7 @@ object TestBasicSelect { override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderInsert(insert: self.InsertAlt[_]): String = ??? val userTable = (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") diff --git a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala index e6541f40d..60850ec6b 100644 --- a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala +++ b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala @@ -7,10 +7,11 @@ import zio.test.Assertion._ import zio.test.environment._ import HelloWorld._ +import java.io.IOException object HelloWorld { - def sayHello: ZIO[Console, Nothing, Unit] = + def sayHello: ZIO[Console, IOException, Unit] = console.putStrLn("Hello, World!") } diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 423b05095..dcd4bd98d 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -7,7 +7,7 @@ object Example1 extends Sql { def renderDelete(delete: this.Delete[_]): String = ??? - override def renderInsert(insert: Insert[_]): String = ??? + override def renderInsert(insert: InsertAlt[_]): String = ??? def renderUpdate(update: Example1.Update[_]): String = ??? diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 2e9e0eaf6..ee6f421a7 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -82,10 +82,10 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] } - override def insert(insert: Insert[_]): IO[Exception, Int] = + override def insert(insert: InsertAlt[_]): IO[Exception, Int] = pool.connection.use(insertOn(insert, _)) - def insertOn(insert: Insert[_], conn: Connection): IO[Exception, Int] = + def insertOn(insert: InsertAlt[_], conn: Connection): IO[Exception, Int] = blocking.effectBlocking { val query = renderInsert(insert) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 22851399e..6b308f5ac 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -14,7 +14,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] - def insert(insert: Insert[_]): IO[Exception, Int] + def insert(insert: InsertAlt[_]): IO[Exception, Int] } object SqlDriver { val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlDriver]] = @@ -35,7 +35,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi _.get.delete(delete) ) - def execute(insert: Insert[_]): ZIO[Has[SqlDriver], Exception, Int] = + def execute(insert: InsertAlt[_]): ZIO[Has[SqlDriver], Exception, Int] = ZIO.accessM[Has[SqlDriver]]( _.get.insert(insert) ) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 0ea2d253e..fe092186f 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -42,7 +42,7 @@ trait MysqlModule extends Jdbc { self => render.toString } - override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderInsert(insert: self.InsertAlt[_]): String = ??? override def renderDelete(delete: self.Delete[_]): String = { implicit val render: Renderer = Renderer() diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 0bf900562..aaf35cae7 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -300,7 +300,7 @@ trait OracleModule extends Jdbc { self => override def renderDelete(delete: self.Delete[_]): String = ??? - override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderInsert(insert: self.InsertAlt[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index a7bb68f1c..ecff1b235 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -9,6 +9,7 @@ import java.text.DecimalFormat import java.time._ import java.time.format.DateTimeFormatter import java.util.Calendar +import zio.schema._ trait PostgresModule extends Jdbc { self => import TypeTag._ @@ -265,21 +266,41 @@ trait PostgresModule extends Jdbc { self => ) val fkOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns - val persons = string("name").table("persons") - val persons2 = string("name").table("persons2") - val name2 :*: _ = persons2.columns + // ============= INSERTS - val name :*: _ = persons.columns + val persons1 = (string("name")).table("persons1") + val persons2 = (string("name") ++ int("age")).table("persons2") + val persons3 = (string("name") ++ int("age") ++ string("gender")).table("persons3") + val persons4 = (string("name") ++ int("age") ++ string("gender") ++ long("birth")).table("persons4") + + val name1 :*: _ = persons1.columns + val name2 :*: age2 :*: _ = persons2.columns + val name3 :*: age3 :*: gender3 :*: _ = persons3.columns + val name4 :*: age4 :*: gender4 :*: birth4 :*: _ = persons4.columns - //does not compile - // insertInto(persons) - // .values(name2 -> "Jaro") + case class Person1(name: String) + case class Person2(name: String, age: Int) + case class Person3(name: String, age: Int, gender: String) + case class Person4(name: String, age: Int, gender: String, dateOfBirth: Long) - insertInto(persons) - .values(name -> "Jaro") + implicit val personSchema1 = DeriveSchema.gen[Person1] + implicit val personSchema2 = DeriveSchema.gen[Person2] + implicit val personSchema3 = DeriveSchema.gen[Person3] + implicit val personSchema4 = DeriveSchema.gen[Person4] - // ============== INSERTS + val personValues1 : List[Person1] = ??? + val personValues2 : List[Person2] = ??? + val personValues3 : List[Person3] = ??? + val personValues4 : List[Person4] = ??? + + insertInto(persons1)(name1).values(personValues1) + insertInto(persons2)(name2 +++ age2).values(personValues2) + insertInto(persons3)(name3 +++ age3 +++ gender3).values(personValues3) + insertInto(persons4)(name4 +++ age4 +++ gender4 +++ birth4).values(personValues4) + + + // ============== INSERTS ALT def test[A, B](expr1: Expr[Features.Source[A], _, _], expr2: Expr[Features.Source[B], _, _])(implicit eq: A =:= B @@ -295,13 +316,10 @@ trait PostgresModule extends Jdbc { self => (verified -> true) ++ (createdTimestamp -> ZonedDateTime.now()) - insertInto(customers) + insertAltInto(customers) .values(insertValues) - //test(customerId, dob) test(customerId, customerId) - //test(fName, lName) - } } @@ -383,7 +401,7 @@ trait PostgresModule extends Jdbc { self => render.toString } - override def renderInsert(insert: self.Insert[_]): String = { + override def renderInsert(insert: self.InsertAlt[_]): String = { implicit val render: Renderer = Renderer() PostgresRenderModule.renderInsertImpl(insert) render.toString @@ -398,7 +416,7 @@ trait PostgresModule extends Jdbc { self => object PostgresRenderModule { //todo split out to separate module - def renderInsertImpl(insert: Insert[_])(implicit render: Renderer) = { + def renderInsertImpl(insert: InsertAlt[_])(implicit render: Renderer) = { render("INSERT INTO ") renderTable(insert.table) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 1cbad4e70..4b40fb4c1 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -390,7 +390,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val dobValue = LocalDate.now() val created = ZonedDateTime.now() - val query = insertInto(customers) + val query = insertAltInto(customers) .values( (customerId -> java.util.UUID.fromString("0511474d-8eed-4307-bdb0-e39a561205b6")) ++ (fName -> "Jaro") ++ diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 04d8ac426..aba66d795 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -89,7 +89,7 @@ trait SqlServerModule extends Jdbc { self => override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.Insert[_]): String = ??? + override def renderInsert(insert: self.InsertAlt[_]): String = ??? override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder From 72b4d31f9f59d03bdcbc42009bd32e84714847c0 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 4 Dec 2021 21:37:31 +0000 Subject: [PATCH 304/673] translated new insert module for postgresql --- core/jvm/src/main/scala/zio/sql/Sql.scala | 6 +- core/jvm/src/main/scala/zio/sql/insert.scala | 2 +- .../scala/zio/sql/GroupByHavingSpec.scala | 5 +- .../test/scala/zio/sql/ProductSchema.scala | 6 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 5 +- examples/src/main/scala/Example1.scala | 5 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 23 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 10 +- .../scala/zio/sql/mysql/MysqlModule.scala | 5 +- .../scala/zio/sql/oracle/OracleModule.scala | 5 +- .../zio/sql/postgresql/PostgresModule.scala | 215 ++++++++++++++---- .../sql/postgresql/PostgresModuleSpec.scala | 54 ++++- .../zio/sql/sqlserver/SqlServerModule.scala | 5 +- 13 files changed, 284 insertions(+), 62 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 2df1891c4..788583602 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -1,5 +1,7 @@ package zio.sql +import zio.schema.Schema + trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertAltModule with InsertModule { self => @@ -42,9 +44,11 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def insertAltInto[Source, N <: ColumnCount, AllColumnIdentities](table: Table.Source.AuxN[Source, AllColumnIdentities, N]): InsertAltBuilder[Source, N, AllColumnIdentities] = InsertAltBuilder(table) - def renderInsert(insert: self.InsertAlt[_]): String + def renderInsertAlt(insert: self.InsertAlt[_]): String def insertInto[Source, N <: ColumnCount, AllColumnIdentities, SourceTypes, ColsRepr](table: Table.Source.AuxN[Source, AllColumnIdentities, N]) (sources: SourceSet.Aux[Source, SourceTypes, ColsRepr])(implicit ev1: AllColumnIdentities =:= SourceTypes, ev2: N =:= sources.Size) = InsertBuilder(table, sources) + + def renderInsert[A: Schema](insert: self.Insert[_, A]): String } diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 6aa6875df..c8ba3ac32 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -19,7 +19,7 @@ import scala.language.implicitConversions * values(customerValues) * * TODO - * 1. change SourceSet +++ to :: or something better - cannot use ++ because its selectionSet then + * 1. change SourceSet +++ to :: or something better - cannot use ++ because its selectionSet then, && exists on expr * 2. make columns null, not null aware * 3. automatically generated columns (postgres idenitity) do not accept insert * 4. make better error messages diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 853002496..e7aed0f2c 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -2,6 +2,7 @@ package zio.sql import zio.test.Assertion.anything import zio.test.{ assert, DefaultRunnableSpec } +import zio.schema.Schema object GroupByHavingSpec extends DefaultRunnableSpec { @@ -20,7 +21,9 @@ object AggregatedProductSchema { override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.InsertAlt[_]): String = ??? + override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? } import sqldsl.ColumnSet._ import sqldsl.AggregationDef._ diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 6d6426ee9..d4531b009 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -1,12 +1,16 @@ package zio.sql +import zio.schema.Schema + object ProductSchema { val sql = new Sql { self => override def renderDelete(delete: self.Delete[_]): String = ??? override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.InsertAlt[_]): String = ??? + override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? } import sql.ColumnSet._ import sql._ diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 4b876c7c0..9d71ec462 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -2,6 +2,7 @@ package zio.sql import zio.test._ import zio.test.Assertion._ +import zio.schema.Schema object TestBasicSelect { val userSql = new Sql { self => @@ -11,7 +12,9 @@ object TestBasicSelect { override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.InsertAlt[_]): String = ??? + override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? val userTable = (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index dcd4bd98d..ec3a987df 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -1,4 +1,5 @@ import zio.sql.Sql +import zio.schema.Schema object Example1 extends Sql { import ColumnSet._ @@ -7,7 +8,9 @@ object Example1 extends Sql { def renderDelete(delete: this.Delete[_]): String = ??? - override def renderInsert(insert: InsertAlt[_]): String = ??? + override def renderInsertAlt(insert: InsertAlt[_]): String = ??? + + override def renderInsert[A: Schema](insert: Insert[_, A]): String = ??? def renderUpdate(update: Example1.Update[_]): String = ??? diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index ee6f421a7..1052548ff 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -5,9 +5,13 @@ import java.sql._ import zio._ import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } +import zio.schema.Schema trait SqlDriverLiveModule { self: Jdbc => private[sql] trait SqlDriverCore { + //TODO + // add inserts for transaction module + def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] @@ -82,10 +86,10 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] } - override def insert(insert: InsertAlt[_]): IO[Exception, Int] = - pool.connection.use(insertOn(insert, _)) + override def insertAlt(insert: InsertAlt[_]): IO[Exception, Int] = + pool.connection.use(insertOnAlt(insert, _)) - def insertOn(insert: InsertAlt[_], conn: Connection): IO[Exception, Int] = + def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] = blocking.effectBlocking { val query = renderInsert(insert) @@ -95,6 +99,19 @@ trait SqlDriverLiveModule { self: Jdbc => statement.executeUpdate(query) }.refineToOrDie[Exception] + override def insert[A : Schema](insert: Insert[_, A]): IO[Exception, Int] = + pool.connection.use(insertOn(insert, _)) + + def insertOnAlt(insert: InsertAlt[_], conn: Connection): IO[Exception, Int] = + blocking.effectBlocking { + + val query = renderInsertAlt(insert) + + val statement = conn.createStatement() + + statement.executeUpdate(query) + }.refineToOrDie[Exception] + override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = for { connection <- pool.connection diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 6b308f5ac..fe849231d 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -3,6 +3,7 @@ package zio.sql import zio._ import zio.blocking.Blocking import zio.stream._ +import zio.schema.Schema trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule with SqlDriverLiveModule { trait SqlDriver { @@ -14,7 +15,9 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] - def insert(insert: InsertAlt[_]): IO[Exception, Int] + def insertAlt(insert: InsertAlt[_]): IO[Exception, Int] + + def insert[A: zio.schema.Schema](insert: Insert[_, A]): IO[Exception, Int] } object SqlDriver { val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlDriver]] = @@ -36,6 +39,11 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi ) def execute(insert: InsertAlt[_]): ZIO[Has[SqlDriver], Exception, Int] = + ZIO.accessM[Has[SqlDriver]]( + _.get.insertAlt(insert) + ) + + def execute[A: Schema](insert: Insert[_, A]): ZIO[Has[SqlDriver], Exception, Int] = ZIO.accessM[Has[SqlDriver]]( _.get.insert(insert) ) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index fe092186f..2514b2c80 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -5,6 +5,7 @@ import zio.sql.{ Jdbc, Renderer } import java.sql.ResultSet import java.time.Year +import zio.schema.Schema trait MysqlModule extends Jdbc { self => @@ -42,7 +43,9 @@ trait MysqlModule extends Jdbc { self => render.toString } - override def renderInsert(insert: self.InsertAlt[_]): String = ??? + override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? override def renderDelete(delete: self.Delete[_]): String = { implicit val render: Renderer = Renderer() diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index aaf35cae7..fdecd1648 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -1,6 +1,7 @@ package zio.sql.oracle import zio.sql.Jdbc +import zio.schema.Schema trait OracleModule extends Jdbc { self => @@ -300,7 +301,9 @@ trait OracleModule extends Jdbc { self => override def renderDelete(delete: self.Delete[_]): String = ??? - override def renderInsert(insert: self.InsertAlt[_]): String = ??? + override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index ecff1b235..56eed4a65 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -2,7 +2,7 @@ package zio.sql.postgresql import org.postgresql.util.PGInterval import zio.Chunk -import zio.sql.{Jdbc, Renderer} +import zio.sql.{ Jdbc, Renderer } import java.sql.ResultSet import java.text.DecimalFormat @@ -266,17 +266,16 @@ trait PostgresModule extends Jdbc { self => ) val fkOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns - // ============= INSERTS val persons1 = (string("name")).table("persons1") val persons2 = (string("name") ++ int("age")).table("persons2") val persons3 = (string("name") ++ int("age") ++ string("gender")).table("persons3") val persons4 = (string("name") ++ int("age") ++ string("gender") ++ long("birth")).table("persons4") - - val name1 :*: _ = persons1.columns - val name2 :*: age2 :*: _ = persons2.columns - val name3 :*: age3 :*: gender3 :*: _ = persons3.columns + + val name1 :*: _ = persons1.columns + val name2 :*: age2 :*: _ = persons2.columns + val name3 :*: age3 :*: gender3 :*: _ = persons3.columns val name4 :*: age4 :*: gender4 :*: birth4 :*: _ = persons4.columns case class Person1(name: String) @@ -289,17 +288,16 @@ trait PostgresModule extends Jdbc { self => implicit val personSchema3 = DeriveSchema.gen[Person3] implicit val personSchema4 = DeriveSchema.gen[Person4] - val personValues1 : List[Person1] = ??? - val personValues2 : List[Person2] = ??? - val personValues3 : List[Person3] = ??? - val personValues4 : List[Person4] = ??? + val personValues1: List[Person1] = ??? + val personValues2: List[Person2] = ??? + val personValues3: List[Person3] = ??? + val personValues4: List[Person4] = ??? insertInto(persons1)(name1).values(personValues1) insertInto(persons2)(name2 +++ age2).values(personValues2) insertInto(persons3)(name3 +++ age3 +++ gender3).values(personValues3) insertInto(persons4)(name4 +++ age4 +++ gender4 +++ birth4).values(personValues4) - // ============== INSERTS ALT def test[A, B](expr1: Expr[Features.Source[A], _, _], expr2: Expr[Features.Source[B], _, _])(implicit @@ -401,7 +399,13 @@ trait PostgresModule extends Jdbc { self => render.toString } - override def renderInsert(insert: self.InsertAlt[_]): String = { + override def renderInsertAlt(insert: self.InsertAlt[_]): String = { + implicit val render: Renderer = Renderer() + PostgresRenderModule.renderInsertAltImpl(insert) + render.toString + } + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = { implicit val render: Renderer = Renderer() PostgresRenderModule.renderInsertImpl(insert) render.toString @@ -416,66 +420,181 @@ trait PostgresModule extends Jdbc { self => object PostgresRenderModule { //todo split out to separate module - def renderInsertImpl(insert: InsertAlt[_])(implicit render: Renderer) = { + def renderInsertImpl[A](insert: Insert[_, A])(implicit render: Renderer, schema: Schema[A]) = { render("INSERT INTO ") renderTable(insert.table) render(" (") - renderColumnNames(insert.values) - render(") VALUES (") + renderColumnNames(insert.sources) + render(") VALUES ") renderInsertValues(insert.values) + } + + def renderInsertValues[A](col: Seq[A])(implicit render: Renderer, schema: Schema[A]): Unit = + //TODO any performance penalty because of toList ? + col.toList match { + case head :: Nil => + render("(") + renderInserValue(head) + render(");") + case head :: next => + render("(") + renderInserValue(head)(render, schema) + render(" ),") + renderInsertValues(next) + case Nil => () + } + + def renderInserValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = + schema.toDynamic(z) match { + case DynamicValue.Record(listMap) => + listMap.values.toList match { + case head :: Nil => renderDynamicValue(head) + case head :: next => + renderDynamicValue(head) + render(", ") + renderDynamicValues(next) + case Nil => () + } + case _ => () + } + + + + def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = + dynValues match { + case head :: Nil => renderDynamicValue(head) + case head :: tail => { + renderDynamicValue(head) + render(", ") + renderDynamicValues(tail) + } + case Nil => () + } + + + def renderDynamicValue(dynValue: DynamicValue)(implicit render: Renderer): Unit = + dynValue match { + case DynamicValue.Primitive(value, typeTag) => + typeTag match { + case _ => render(s"'${value}'") + // TODO make StandardType covariant + // case StandardType.DayOfWeekType => ??? + // case StandardType.Month => ??? + // case BigIntegerType => ??? + // case StandardType.LocalTime(formatter) => ??? + // case StandardType.LocalDate(formatter) => ??? + // case BigDecimalType => ??? + // case StandardType.Instant(formatter) => ??? + // case StandardType.MonthDay => ??? + // case DoubleType => ??? + // case StandardType.ZonedDateTime(formatter) => ??? + // case StandardType.Duration(temporalUnit) => ??? + // case StandardType.LocalDateTime(formatter) => ??? + // case UnitType => ??? + // case BoolType => ??? + // case StandardType.ZoneOffset => ??? + // case StandardType.ZoneId => ??? + // case CharType => ??? + // case ShortType => ??? + // case StringType => ??? + // case FloatType => ??? + // case StandardType.Period => ??? + // case LongType => ??? + // case UUIDType => ??? + // case StandardType.OffsetDateTime(formatter) => ??? + // case StandardType.Year => ??? + // case BinaryType => ??? + // case StandardType.YearMonth => ??? + // case StandardType.OffsetTime(formatter) => ??? + // case IntType => ??? + } + case _ => () + } + + def renderColumnNames(sources: SourceSet[_])(implicit render: Renderer): Unit = + sources match { + case SourceSet.Empty => () // table is a collection of at least ONE column + case SourceSet.Cons(expr, SourceSet.Empty) => + val columnName = expr match { + case Expr.Source(_, c) => c.name + case _ => None + } + val _ = columnName.map { name => + render(name) + } + case SourceSet.Cons(expr, tail) => + val columnName = expr match { + case Expr.Source(_, c) => c.name + case _ => None + } + val _ = columnName.map { name => + render(name) + render(", ") + renderColumnNames(tail)(render) + } + } + + def renderInsertAltImpl(insert: InsertAlt[_])(implicit render: Renderer) = { + render("INSERT INTO ") + renderTable(insert.table) + + render(" (") + renderColumnNamesAlt(insert.values) + render(") VALUES (") + + renderInsertAltValues(insert.values) render(" )") } - def renderInsertValues(values: InsertRow[_])(implicit render: Renderer): Unit = + def renderInsertAltValues(values: InsertRow[_])(implicit render: Renderer): Unit = values match { case InsertRow.Empty => () case InsertRow.Cons(tupleHead, InsertRow.Empty) => val typeTag = Expr.typeTagOf(tupleHead._1) - val value = tupleHead._2 + val value = tupleHead._2 renderValue(typeTag, value) case InsertRow.Cons(tupleHead, tail) => val typeTag = Expr.typeTagOf(tupleHead._1) - val value = tupleHead._2 + val value = tupleHead._2 renderValue(typeTag, value) render(", ") - renderInsertValues(tail)(render) + renderInsertAltValues(tail)(render) } /** - * TODO - * - * Every values is written differently - based on Expr typeTag - */ + * TODO + * + * Every values is written differently - based on Expr typeTag + */ def renderValue[A](typeTage: TypeTag[A], value: A)(implicit render: Renderer): Unit = typeTage match { - case TBigDecimal => render(value.toString) - case TBoolean => render(value.toString) - case TByte => render(value.toString) - case TByteArray => render(value.toString) - case TChar => render(value.toString) - case TDouble => render(value.toString) - case TFloat => render(value.toString) - case TInstant => render(value.toString) - case TInt => render(value.toString) - case TLocalDate => render(s"'${value.toString}'") - case TLocalDateTime => render(value.toString) - case TLocalTime => render(s"'${value.toString}'") - case TLong => render(value.toString) - case TOffsetDateTime => render(value.toString) - case TOffsetTime => render(value.toString) - case TShort => render(value.toString) - case TString => render(s"'${value.toString}'") - case TUUID => render(s"'${value.toString}'") - case TZonedDateTime => + case TBigDecimal => render(value.toString) + case TBoolean => render(value.toString) + case TByte => render(value.toString) + case TByteArray => render(value.toString) + case TChar => render(value.toString) + case TDouble => render(value.toString) + case TFloat => render(value.toString) + case TInstant => render(value.toString) + case TInt => render(value.toString) + case TLocalDate => render(s"'${value.toString}'") + case TLocalDateTime => render(value.toString) + case TLocalTime => render(s"'${value.toString}'") + case TLong => render(value.toString) + case TOffsetDateTime => render(value.toString) + case TOffsetTime => render(value.toString) + case TShort => render(value.toString) + case TString => render(s"'${value.toString}'") + case TUUID => render(s"'${value.toString}'") + case TZonedDateTime => render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") case TDialectSpecific(typeTagExtension) => render(value.toString) - case Nullable() => render("null") + case Nullable() => render("null") } - - def renderColumnNames(values: InsertRow[_])(implicit render: Renderer): Unit = + def renderColumnNamesAlt(values: InsertRow[_])(implicit render: Renderer): Unit = values match { case InsertRow.Empty => () // table is a collection of at least ONE column case InsertRow.Cons(tupleHead, InsertRow.Empty) => @@ -484,7 +603,7 @@ trait PostgresModule extends Jdbc { self => case Expr.Source(_, c) => c.name case _ => None } - val _ = columnName.map { name => + val _ = columnName.map { name => render(name) } case InsertRow.Cons(tupleHead, tail) => @@ -493,10 +612,10 @@ trait PostgresModule extends Jdbc { self => case Expr.Source(_, c) => c.name case _ => None } - val _ = columnName.map { name => + val _ = columnName.map { name => render(name) render(", ") - renderColumnNames(tail)(render) + renderColumnNamesAlt(tail)(render) } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 4b40fb4c1..7757f83e8 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -8,6 +8,8 @@ import zio.test._ import java.time._ import java.util.UUID import scala.language.postfixOps +import zio.schema.Schema +import java.time.format.DateTimeFormatter object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { @@ -377,7 +379,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("simple insert - inserted 1 column") { + testM("simple insert - inserted 1 row") { /** * insert into @@ -406,6 +408,56 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { r <- result } yield assert(r)(equalTo(1)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("insert - insert 10 columns") { + + /** + insert into product_prices + (product_id, effective, price) + values + ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), + ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), + ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00), + ..... + ('D5137D3A-894A-4109-9986-E982541B43BB', '2020-01-01', 66.00); + */ + + final case class InputOrders(uuid: UUID, customerId: UUID, localDate: LocalDate) + + implicit val localDateSchema = Schema.CaseClass3[UUID, UUID, LocalDate, InputOrders]( + Chunk.empty, + Schema.Field("uuid", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("customerId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("localDate", Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE))), + InputOrders.apply, + _.uuid, + _.customerId, + _.localDate + ) + + val orderValues = List( + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()) + ) + + val query = insertInto(orders)(orderId +++ fkCustomerId +++ orderDate) + .values(orderValues) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(10)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index aba66d795..df9cb4b9a 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -1,6 +1,7 @@ package zio.sql.sqlserver import zio.sql.Jdbc +import zio.schema.Schema trait SqlServerModule extends Jdbc { self => @@ -89,7 +90,9 @@ trait SqlServerModule extends Jdbc { self => override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsert(insert: self.InsertAlt[_]): String = ??? + override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder From ffb8f78d97465e764370687026ad1e7e24b809c9 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 4 Dec 2021 21:42:56 +0000 Subject: [PATCH 305/673] changed mssql-jdbc version to be jre8 compatible --- build.sbt | 2 +- core/jvm/src/main/scala/zio/sql/select.scala | 10 +++++++--- mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala | 8 ++++---- .../src/main/scala/zio/sql/oracle/OracleModule.scala | 8 ++++---- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/build.sbt b/build.sbt index 84eb81353..7eb42fa09 100644 --- a/build.sbt +++ b/build.sbt @@ -223,7 +223,7 @@ lazy val sqlserver = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.microsoft.sqlserver" % "mssql-jdbc" % "9.2.1.jre11" % Test, + "com.microsoft.sqlserver" % "mssql-jdbc" % "9.4.0.jre8" % Test, "com.dimafeng" %% "testcontainers-scala-mssqlserver" % testcontainersScalaVersion % Test ) ) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 013caffee..23e808863 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -353,7 +353,9 @@ trait SelectModule { self: ExprModule with TableModule => copy(havingExpr = self.havingExpr && havingExpr2) } - override def asTable(name: TableName): Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]] = + override def asTable( + name: TableName + ): Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]] = Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]](self, name) override type ResultType = Repr @@ -388,7 +390,8 @@ trait SelectModule { self: ExprModule with TableModule => override val columnSet: CS = left.columnSet - override def asTable(name: TableName): Table.DerivedTable[Out, Union[Repr, Out]] = Table.DerivedTable[Out, Union[Repr, Out]](self, name) + override def asTable(name: TableName): Table.DerivedTable[Out, Union[Repr, Out]] = + Table.DerivedTable[Out, Union[Repr, Out]](self, name) } // TODO add name to literal selection - e.g. select '1' as one @@ -406,7 +409,8 @@ trait SelectModule { self: ExprModule with TableModule => override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead](), ColumnSet.Empty) - override def asTable(name: TableName): Table.DerivedTable[(B, Unit), Literal[B]] = Table.DerivedTable[(B, Unit), Literal[B]](self, name) + override def asTable(name: TableName): Table.DerivedTable[(B, Unit), Literal[B]] = + Table.DerivedTable[(B, Unit), Literal[B]](self, name) } def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index b1a67eaaa..b7e98c153 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -160,16 +160,16 @@ trait MysqlModule extends Jdbc { self => private def renderTable(table: Table)(implicit render: Renderer): Unit = table match { - case Table.DialectSpecificTable(_) => ??? + case Table.DialectSpecificTable(_) => ??? //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => + case sourceTable: self.Table.Source => render(sourceTable.name) - case Table.DerivedTable(read, name) => + case Table.DerivedTable(read, name) => render(" ( ") renderRead(read.asInstanceOf[Read[_]]) render(" ) ") render(name) - case Table.Joined(joinType, left, right, on) => + case Table.Joined(joinType, left, right, on) => renderTable(left) render(joinType match { case JoinType.Inner => " INNER JOIN " diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 922dcd0ed..cbde7ffa4 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -269,16 +269,16 @@ trait OracleModule extends Jdbc { self => } def buildTable(table: Table, builder: StringBuilder): Unit = table match { - case Table.DialectSpecificTable(_) => ??? + case Table.DialectSpecificTable(_) => ??? //The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => + case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) - case Table.DerivedTable(read, name) => + case Table.DerivedTable(read, name) => builder.append(" ( ") builder.append(renderRead(read.asInstanceOf[Read[_]])) builder.append(" ) ") val _ = builder.append(name) - case Table.Joined(joinType, left, right, on) => + case Table.Joined(joinType, left, right, on) => buildTable(left, builder) builder.append(joinType match { case JoinType.Inner => " INNER JOIN " From db663f4d36f69a1c45c78812e7bf054364e1e2de Mon Sep 17 00:00:00 2001 From: Antonio Morales Date: Mon, 6 Dec 2021 16:50:41 -0800 Subject: [PATCH 306/673] Update zio-sql to be compatible with latest ZIO 2.0 milestone release --- build.sbt | 2 +- .../test/scala/zio-sql/HelloWorldSpec.scala | 8 +- .../main/scala/zio/sql/ConnectionPool.scala | 34 ++-- .../scala/zio/sql/ConnectionPoolConfig.scala | 3 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 15 +- .../scala/zio/sql/TransactionModule.scala | 43 ++-- jdbc/src/main/scala/zio/sql/jdbc.scala | 20 +- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 16 +- .../test/scala/zio/sql/TestContainer.scala | 17 +- .../test/scala/zio/sql/mysql/DeleteSpec.scala | 2 +- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 18 +- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 10 +- .../zio/sql/mysql/MysqlRunnableSpec.scala | 13 +- .../scala/zio/sql/mysql/TransactionSpec.scala | 23 ++- .../test/scala/zio/sql/TestContainer.scala | 17 +- .../scala/zio/sql/postgresql/DeleteSpec.scala | 2 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 192 +++++++++--------- .../sql/postgresql/PostgresModuleSpec.scala | 32 +-- .../sql/postgresql/PostgresRunnableSpec.scala | 8 +- .../zio/sql/postgresql/TransactionSpec.scala | 16 +- 20 files changed, 241 insertions(+), 250 deletions(-) diff --git a/build.sbt b/build.sbt index fd2c90b42..522a90d39 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "1.0.7" +val zioVersion = "2.0.0-M6-2" val testcontainersVersion = "1.16.0" val testcontainersScalaVersion = "0.39.5" diff --git a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala index e6541f40d..f8cbe93e1 100644 --- a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala +++ b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala @@ -1,23 +1,21 @@ package zio.sql import zio._ -import zio.console._ import zio.test._ import zio.test.Assertion._ -import zio.test.environment._ import HelloWorld._ object HelloWorld { - def sayHello: ZIO[Console, Nothing, Unit] = - console.putStrLn("Hello, World!") + def sayHello: ZIO[Console, Throwable, Unit] = + Console.printLine("Hello, World!") } object HelloWorldSpec extends DefaultRunnableSpec { def spec = suite("HelloWorldSpec")( - testM("sayHello correctly displays output") { + test("sayHello correctly displays output") { for { _ <- sayHello output <- TestConsole.output diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index ca397f2f7..9397efb9a 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -5,8 +5,6 @@ import java.sql._ import zio.stm._ import zio._ -import zio.blocking._ -import zio.clock._ trait ConnectionPool { @@ -23,15 +21,14 @@ object ConnectionPool { * A live layer for `ConnectionPool` that creates a JDBC connection pool * from the specified connection pool settings. */ - val live: ZLayer[Has[ConnectionPoolConfig] with Blocking with Clock, IOException, Has[ConnectionPool]] = + val live: ZLayer[ConnectionPoolConfig with Clock, IOException, ConnectionPool] = (for { config <- ZManaged.service[ConnectionPoolConfig] - blocking <- ZManaged.service[Blocking.Service] - clock <- ZManaged.service[Clock.Service] - queue <- TQueue.bounded[TPromise[Nothing, ResettableConnection]](config.queueCapacity).commit.toManaged_ - available <- TRef.make(List.empty[ResettableConnection]).commit.toManaged_ - pool = ConnectionPoolLive(queue, available, config, clock, blocking) - _ <- pool.initialize.toManaged_ + clock <- ZManaged.service[Clock] + queue <- TQueue.bounded[TPromise[Nothing, ResettableConnection]](config.queueCapacity).commit.toManaged + available <- TRef.make(List.empty[ResettableConnection]).commit.toManaged + pool = ConnectionPoolLive(queue, available, config, clock) + _ <- pool.initialize.toManaged _ <- ZManaged.finalizer(pool.close.orDie) } yield pool).toLayer } @@ -49,15 +46,14 @@ final case class ConnectionPoolLive( queue: TQueue[TPromise[Nothing, ResettableConnection]], available: TRef[List[ResettableConnection]], config: ConnectionPoolConfig, - clock: Clock.Service, - blocking: Blocking.Service + clock: Clock, ) extends ConnectionPool { /** * Adds a fresh connection to the connection pool. */ val addFreshConnection: IO[IOException, ResettableConnection] = { - val makeConnection = blocking.effectBlocking { + val makeConnection = ZIO.attemptBlocking { val connection = DriverManager.getConnection(config.url, config.properties) val autoCommit = config.autoCommit @@ -80,7 +76,7 @@ final case class ConnectionPoolLive( }.refineToOrDie[IOException] for { - connection <- makeConnection.retry(config.retryPolicy).provide(Has(clock)) + connection <- makeConnection.retry(config.retryPolicy).provideEnvironment(ZEnvironment(clock)) _ <- available.update(connection :: _).commit } yield connection } @@ -91,17 +87,15 @@ final case class ConnectionPoolLive( val close: IO[IOException, Any] = ZIO.uninterruptible { available.get.commit.flatMap { all => - blocking.blocking { - ZIO.foreachPar(all) { connection => - ZIO(connection.connection.close()).refineToOrDie[IOException] - } + ZIO.foreachPar(all) { connection => + ZIO.attemptBlocking(connection.connection.close()).refineToOrDie[IOException] } } } def connection: Managed[Exception, Connection] = ZManaged - .make(tryTake.commit.flatMap { + .acquireReleaseWith(tryTake.commit.flatMap { case Left(promise) => ZIO.interruptible(promise.await.commit).onInterrupt { promise.poll.flatMap { @@ -115,7 +109,7 @@ final case class ConnectionPoolLive( case Right(connection) => ZIO.succeed(connection) })(release(_)) - .flatMap(rc => rc.reset.toManaged_.as(rc.connection)) + .flatMap(rc => rc.reset.toManaged.as(rc.connection)) /** * Initializes the connection pool. @@ -123,7 +117,7 @@ final case class ConnectionPoolLive( val initialize: IO[IOException, Unit] = ZIO.uninterruptible { ZIO - .foreachPar_(1 to config.poolSize) { _ => + .foreachParDiscard(1 to config.poolSize) { _ => addFreshConnection } .unit diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala b/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala index 59d0fae50..7e632e229 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala @@ -1,7 +1,6 @@ package zio.sql -import zio.Schedule -import zio.duration._ +import zio.{Schedule, durationInt} /** * Configuration information for the connection pool. diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index a81b876b4..dc6d1921e 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -3,7 +3,6 @@ package zio.sql import java.sql._ import zio._ -import zio.blocking.Blocking import zio.stream.{ Stream, ZStream } trait SqlDriverLiveModule { self: Jdbc => @@ -15,14 +14,14 @@ trait SqlDriverLiveModule { self: Jdbc => def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] } - sealed case class SqlDriverLive(blocking: Blocking.Service, pool: ConnectionPool) + sealed case class SqlDriverLive(pool: ConnectionPool) extends SqlDriver with SqlDriverCore { self => def delete(delete: Delete[_]): IO[Exception, Int] = pool.connection.use(deleteOn(delete, _)) def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { + ZIO.attemptBlocking { val query = renderDelete(delete) val statement = conn.createStatement() statement.executeUpdate(query) @@ -32,7 +31,7 @@ trait SqlDriverLiveModule { self: Jdbc => pool.connection.use(updateOn(update, _)) def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { + ZIO.attemptBlocking { val query = renderUpdate(update) @@ -51,7 +50,7 @@ trait SqlDriverLiveModule { self: Jdbc => override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = Stream.unwrap { - blocking.effectBlocking { + ZIO.attemptBlocking { val schema = getColumns(read).zipWithIndex.map { case (value, index) => (value, index + 1) } // SQL is 1-based indexing @@ -66,7 +65,7 @@ trait SqlDriverLiveModule { self: Jdbc => val resultSet = statement.getResultSet() ZStream - .unfoldM(resultSet) { rs => + .unfoldZIO(resultSet) { rs => if (rs.next()) { try unsafeExtractRow[read.ResultType](resultSet, schema) match { case Left(error) => ZIO.fail(error) @@ -85,8 +84,8 @@ trait SqlDriverLiveModule { self: Jdbc => override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = for { connection <- pool.connection - _ <- blocking.effectBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception].toManaged_ - a <- tx.run(blocking, Txn(connection, self)) + _ <- ZIO.attemptBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception].toManaged + a <- tx.run(Txn(connection, self)) } yield a } } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 578074c8a..bbb53f4b1 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -2,66 +2,63 @@ package zio.sql import java.sql._ -import zio._ -import zio.blocking.Blocking +import zio.{Tag => ZTag, _} import zio.stream._ trait TransactionModule { self: Jdbc => private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) - sealed case class ZTransaction[-R, +E, +A](unwrap: ZManaged[(R, Txn), E, A]) { self => + sealed case class ZTransaction[-R: ZTag: IsNotIntersection, +E, +A](unwrap: ZManaged[(R, Txn), E, A]) { self => def map[B](f: A => B): ZTransaction[R, E, B] = ZTransaction(self.unwrap.map(f)) - def flatMap[R1 <: R, E1 >: E, B](f: A => ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def flatMap[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](f: A => ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = ZTransaction(self.unwrap.flatMap(a => f(a).unwrap)) - private[sql] def run(blocking: Blocking.Service, txn: Txn)(implicit + private[sql] def run(txn: Txn)(implicit ev: E <:< Exception ): ZManaged[R, Exception, A] = for { r <- ZManaged.environment[R] a <- self.unwrap .mapError(ev) - .provide((r, txn)) + .provideEnvironment(ZEnvironment((r.get, txn))) .tapBoth( _ => - blocking - .effectBlocking(txn.connection.rollback()) + ZIO.attemptBlocking(txn.connection.rollback()) .refineToOrDie[Exception] - .toManaged_, + .toManaged, _ => - blocking - .effectBlocking(txn.connection.commit()) + ZIO.attemptBlocking(txn.connection.commit()) .refineToOrDie[Exception] - .toManaged_ + .toManaged ) } yield a - def zip[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = + def zip[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = zipWith[R1, E1, B, (A, B)](tx)((_, _)) - def zipWith[R1 <: R, E1 >: E, B, C](tx: ZTransaction[R1, E1, B])(f: (A, B) => C): ZTransaction[R1, E1, C] = + def zipWith[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B, C](tx: ZTransaction[R1, E1, B])(f: (A, B) => C): ZTransaction[R1, E1, C] = for { a <- self b <- tx } yield f(a, b) - def *>[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def *>[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self.flatMap(_ => tx) // named alias for *> - def zipRight[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def zipRight[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self *> tx - def <*[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + def <*[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self.flatMap(a => tx.map(_ => a)) // named alias for <* - def zipLeft[R1 <: R, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + def zipLeft[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self <* tx - def catchAllCause[R1 <: R, E1 >: E, A1 >: A](f: Cause[E1] => ZTransaction[R1, E1, A1]): ZTransaction[R1, E1, A1] = + def catchAllCause[R1 <: R: ZTag: IsNotIntersection, E1 >: E, A1 >: A](f: Cause[E1] => ZTransaction[R1, E1, A1]): ZTransaction[R1, E1, A1] = ZTransaction(self.unwrap.catchAllCause(cause => f(cause).unwrap)) } @@ -91,15 +88,15 @@ trait TransactionModule { self: Jdbc => def fail[E](e: => E): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.fail(e)) - def halt[E](e: => Cause[E]): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.halt(e)) + def halt[E](e: => Cause[E]): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.failCause(e)) - def fromEffect[R, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = + def fromEffect[R: ZTag: IsNotIntersection, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = ZTransaction(for { tuple <- ZManaged.environment[(R, Txn)] - a <- zio.provide(tuple._1).toManaged_ + a <- zio.provideEnvironment(ZEnvironment(tuple.get._1)).toManaged } yield a) private val txn: ZTransaction[Any, Nothing, Txn] = - ZTransaction(ZManaged.environment[(Any, Txn)].map(_._2)) + ZTransaction(ZManaged.environment[(Any, Txn)].map(_.get._2)) } } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index b0366fee0..60e6fb8b9 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,7 +1,6 @@ package zio.sql -import zio._ -import zio.blocking.Blocking +import zio.{Tag => ZTag, _} import zio.stream._ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule with SqlDriverLiveModule { @@ -15,21 +14,20 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] } object SqlDriver { - val live: ZLayer[Blocking with Has[ConnectionPool], Nothing, Has[SqlDriver]] = + val live: ZLayer[ConnectionPool, Nothing, SqlDriver] = (for { - blocking <- ZIO.service[Blocking.Service] pool <- ZIO.service[ConnectionPool] - } yield SqlDriverLive(blocking, pool)).toLayer + } yield SqlDriverLive(pool)).toLayer } - def execute[R <: Has[SqlDriver], A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = - ZManaged.accessManaged[R](_.get.transact(tx)) + def execute[R <: SqlDriver: ZTag: IsNotIntersection, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = + ZManaged.environmentWithManaged[R](_.get.transact(tx)) - def execute[A](read: Read[A]): ZStream[Has[SqlDriver], Exception, A] = - ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read))) + def execute[A](read: Read[A]): ZStream[SqlDriver, Exception, A] = + ZStream.unwrap(ZIO.environmentWith[SqlDriver](_.get.read(read))) - def execute(delete: Delete[_]): ZIO[Has[SqlDriver], Exception, Int] = - ZIO.accessM[Has[SqlDriver]]( + def execute(delete: Delete[_]): ZIO[SqlDriver, Exception, Int] = + ZIO.environmentWithZIO[SqlDriver]( _.get.delete(delete) ) } diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index 28c2d645b..fb4e6ea1e 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -1,23 +1,21 @@ package zio.sql -import zio.test.environment.TestEnvironment +import zio.test.TestEnvironment import zio.test.DefaultRunnableSpec import zio.ZLayer -import zio.blocking.Blocking -import zio.clock.Clock -import zio.Has +import zio.Clock trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { - type JdbcEnvironment = TestEnvironment with Has[SqlDriver] + type JdbcEnvironment = TestEnvironment with SqlDriver - val poolConfigLayer: ZLayer[Blocking, Throwable, Has[ConnectionPoolConfig]] + val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] final lazy val executorLayer = { - val connectionPoolLayer: ZLayer[Blocking with Clock, Throwable, Has[ConnectionPool]] = - ((Blocking.any >+> poolConfigLayer) ++ Clock.any) >>> ConnectionPool.live + val connectionPoolLayer: ZLayer[Clock, Throwable, ConnectionPool] = + (poolConfigLayer ++ Clock.any) >>> ConnectionPool.live - (Blocking.any ++ connectionPoolLayer >+> SqlDriver.live).orDie + (connectionPoolLayer >+> SqlDriver.live).orDie } final lazy val jdbcLayer = TestEnvironment.live >+> executorLayer diff --git a/mysql/src/test/scala/zio/sql/TestContainer.scala b/mysql/src/test/scala/zio/sql/TestContainer.scala index 93f5d0241..cc20b0a83 100644 --- a/mysql/src/test/scala/zio/sql/TestContainer.scala +++ b/mysql/src/test/scala/zio/sql/TestContainer.scala @@ -4,21 +4,20 @@ import com.dimafeng.testcontainers.SingleContainer import com.dimafeng.testcontainers.MySQLContainer import org.testcontainers.utility.DockerImageName import zio._ -import zio.blocking.{ effectBlocking, Blocking } object TestContainer { - def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = - ZManaged.make { - effectBlocking { + def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { c.start() c } - }(container => effectBlocking(container.stop()).orDie).toLayer + }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer - def mysql(imageName: String = "mysql"): ZLayer[Blocking, Throwable, Has[MySQLContainer]] = - ZManaged.make { - effectBlocking { + def mysql(imageName: String = "mysql"): ZLayer[Any, Throwable, MySQLContainer] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { val c = new MySQLContainer( mysqlImageVersion = Option(imageName).map(DockerImageName.parse) ).configure { a => @@ -28,6 +27,6 @@ object TestContainer { c.start() c } - }(container => effectBlocking(container.stop()).orDie).toLayer + }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer } diff --git a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala index 2586cf91d..cc4768cd7 100644 --- a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala @@ -9,7 +9,7 @@ object DeleteSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ override def specLayered = suite("MySQL module delete")( - testM("Can delete from single table with a condition") { + test("Can delete from single table with a condition") { val query = deleteFrom(customers).where(verified.isNotTrue) val result = execute(query) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 11fbd2e59..a2b6902d5 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -11,7 +11,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { import MysqlFunctionDef._ override def specLayered = suite("MySQL FunctionDef")( - testM("lower") { + test("lower") { val query = select(Lower(fName)) from customers limit (1) val expected = "ronald" @@ -27,7 +27,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { // FIXME: lower with string literal should not refer to a column name // See: https://www.w3schools.com/sql/trymysql.asp?filename=trysql_func_mysql_lower // Uncomment the following test when fixed - // testM("lower with string literal") { + // test("lower with string literal") { // val query = select(Lower("LOWER")) from customers limit(1) // // val expected = "lower" @@ -40,7 +40,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { // // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) // }, - testM("sin") { + test("sin") { val query = select(Sin(1.0)) val expected = 0.8414709848078965 @@ -53,7 +53,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("abs") { + test("abs") { val query = select(Abs(-32.0)) val expected = 32.0 @@ -66,7 +66,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("crc32") { + test("crc32") { val query = select(Crc32("MySQL")) from customers val expected = 3259397556L @@ -79,7 +79,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("degrees") { + test("degrees") { val query = select(Degrees(Math.PI)) from customers val expected = 180d @@ -92,7 +92,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("log2") { + test("log2") { val query = select(Log2(8d)) from customers val expected = 3d @@ -105,7 +105,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("log10") { + test("log10") { val query = select(Log10(1000000d)) from customers val expected = 6d @@ -118,7 +118,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("pi") { + test("pi") { val query = select(Pi) from customers val expected = 3.141593d diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 83029086e..d7d0db114 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -14,7 +14,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { import this.Orders._ override def specLayered = suite("Mysql module")( - testM("Can select from single table") { + test("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = select(customerId ++ fName ++ lName ++ dob) from customers @@ -68,7 +68,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can select with property operator") { + test("Can select with property operator") { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (verified isNotTrue) @@ -99,7 +99,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can select from single table with limit, offset and order by") { + test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) @@ -133,7 +133,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { * This is a failing test for aggregation function. * Uncomment it when aggregation function handling is fixed. */ - // testM("Can count rows") { + // test("Can count rows") { // val query = select { Count(userId) } from users // val expected = 5L @@ -144,7 +144,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { // r <- result.runCollect // } yield assert(r.head)(equalTo(expected)) // }, - testM("Can select from joined tables (inner join)") { + test("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate) from (customers join orders).on( fkCustomerId === customerId ) where (verified isNotTrue) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index da0b7385b..7ce8a3d90 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -4,7 +4,7 @@ import java.util.Properties import zio._ import zio.sql._ -import zio.test.environment.TestEnvironment +import zio.test.TestEnvironment import zio.test._ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { @@ -18,10 +18,17 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { val poolConfigLayer = TestContainer .mysql() - .map(a => Has(ConnectionPoolConfig(a.get.jdbcUrl, connProperties(a.get.username, a.get.password)))) + .map(a => + ZEnvironment( + ConnectionPoolConfig( + a.get.jdbcUrl, + connProperties(a.get.username, a.get.password) + ) + ) + ) override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = - specLayered.provideCustomLayerShared(jdbcLayer) + specLayered.provideCustomShared(jdbcLayer) def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index b1e01fe41..e30d41d63 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -11,19 +11,22 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ - override def specLayered = suite("MySQL module")( - testM("Transaction is returning the last value") { + override def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] = suite("MySQL module")( + test("Transaction is returning the last value") { val query = select(customerId) from customers val result = execute( ZTransaction(query) *> ZTransaction(query) ).use(ZIO.succeed(_)) - val assertion = assertM(result.flatMap(_.runCount))(equalTo(5L)).orDie + val assertion = + result.flatMap(_.runCount) + .map(count => assertTrue(count == 5)) + .orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transaction is failing") { + test("Transaction is failing") { val query = select(customerId) from customers val result = execute( @@ -32,30 +35,30 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transaction failed and didn't deleted rows") { + test("Transaction failed and didn't deleted rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transaction succeeded and deleted rows") { + test("Transaction succeeded and deleted rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) val tx = ZTransaction(deleteQuery) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged _ <- execute(tx) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) diff --git a/postgres/src/test/scala/zio/sql/TestContainer.scala b/postgres/src/test/scala/zio/sql/TestContainer.scala index a5c6b7e4d..3da5e095a 100644 --- a/postgres/src/test/scala/zio/sql/TestContainer.scala +++ b/postgres/src/test/scala/zio/sql/TestContainer.scala @@ -4,21 +4,20 @@ import com.dimafeng.testcontainers.SingleContainer import com.dimafeng.testcontainers.PostgreSQLContainer import org.testcontainers.utility.DockerImageName import zio._ -import zio.blocking.{ effectBlocking, Blocking } object TestContainer { - def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = - ZManaged.make { - effectBlocking { + def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { c.start() c } - }(container => effectBlocking(container.stop()).orDie).toLayer + }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer - def postgres(imageName: String = "postgres:alpine"): ZLayer[Blocking, Throwable, Has[PostgreSQLContainer]] = - ZManaged.make { - effectBlocking { + def postgres(imageName: String = "postgres:alpine"): ZLayer[Any, Throwable, PostgreSQLContainer] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { val c = new PostgreSQLContainer( dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) ).configure { a => @@ -29,7 +28,7 @@ object TestContainer { c } } { container => - effectBlocking(container.stop()).orDie + ZIO.attemptBlocking(container.stop()).orDie }.toLayer } diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index f55160b9b..72dac5bce 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -9,7 +9,7 @@ object DeleteSpec extends PostgresRunnableSpec with ShopSchema { import Customers._ override def specLayered = suite("Postgres module delete")( - testM("Can delete from single table with a condition") { + test("Can delete from single table with a condition") { val query = deleteFrom(customers).where(verified.isNotTrue) val result = execute(query) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 95cf7b1ed..21179aeb3 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -4,12 +4,12 @@ import java.time._ import java.time.format.DateTimeFormatter import java.util.UUID import zio.{ Cause, Chunk } -import zio.random.{ Random => ZioRandom } +import zio.{ Random => ZioRandom } import zio.stream.ZStream import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.{ ignore, timeout } -import zio.duration._ +import zio.durationInt object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { @@ -32,7 +32,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) override def specLayered = suite("Postgres FunctionDef")( - testM("concat_ws #1 - combine flat values") { + test("concat_ws #1 - combine flat values") { import Expr._ //note: a plain number (3) would and should not compile @@ -49,7 +49,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("concat_ws #2 - combine columns") { + test("concat_ws #2 - combine columns") { import Expr._ // note: you can't use customerId here as it is a UUID, hence not a string in our book @@ -66,7 +66,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("concat_ws #3 - combine columns and flat values") { + test("concat_ws #3 - combine columns and flat values") { import Expr._ val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers @@ -82,7 +82,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("concat_ws #3 - combine function calls together") { + test("concat_ws #3 - combine function calls together") { import Expr._ val query = select( @@ -100,7 +100,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("isfinite") { + test("isfinite") { val query = select(IsFinite(Instant.now)) val expected: Boolean = true @@ -114,7 +114,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, suite("String functions")( - testM("CharLength") { + test("CharLength") { val query = select(Length("hello")) val expected = 5 @@ -126,7 +126,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("ltrim") { + test("ltrim") { val query = select(Ltrim(" hello ")) val expected = "hello " @@ -139,7 +139,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("rtrim") { + test("rtrim") { val query = select(Rtrim(" hello ")) val expected = " hello" @@ -153,7 +153,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, suite("format function")( - testM("format0") { + test("format0") { import Expr._ val query = select(Format0("Person")) from customers @@ -169,7 +169,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("format1") { + test("format1") { import Expr._ val query = select(Format1("Person: %s", Customers.fName)) from customers @@ -185,7 +185,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("format2") { + test("format2") { import Expr._ val query = select(Format2("Person: %s %s", Customers.fName, Customers.lName)) from customers @@ -201,7 +201,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("format3") { + test("format3") { import Expr._ val query = select( @@ -219,7 +219,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("format4") { + test("format4") { import Expr._ val query = select( @@ -243,7 +243,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute(query.to[String, String](identity)) collectAndCompare(expected, testResult) }, - testM("format5") { + test("format5") { import Expr._ val query = select( @@ -270,7 +270,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } ) ), - testM("abs") { + test("abs") { val query = select(Abs(-3.14159)) val expected = 3.14159 @@ -283,7 +283,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("log") { + test("log") { val query = select(Log(2.0, 32.0)) val expected: Double = 5 @@ -296,7 +296,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("acos") { + test("acos") { val query = select(Acos(-1.0)) val expected = 3.141592653589793 @@ -309,7 +309,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("repeat") { + test("repeat") { val query = select(Repeat("Zio", 3)) val expected = "ZioZioZio" @@ -322,7 +322,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("asin") { + test("asin") { val query = select(Asin(0.5)) val expected = 0.5235987755982989 @@ -335,7 +335,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("ln") { + test("ln") { val query = select(Ln(3.0)) val expected = 1.0986122886681097 @@ -348,7 +348,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("atan") { + test("atan") { val query = select(Atan(10.0)) val expected = 1.4711276743037347 @@ -361,7 +361,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("reverse") { + test("reverse") { val query = select(Reverse("abcd")) val expected = "dcba" @@ -374,7 +374,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cos") { + test("cos") { val query = select(Cos(3.141592653589793)) val expected = -1.0 @@ -387,7 +387,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("exp") { + test("exp") { val query = select(Exp(1.0)) val expected = 2.718281828459045 @@ -400,7 +400,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("floor") { + test("floor") { val query = select(Floor(-3.14159)) val expected = -4.0 @@ -413,7 +413,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("ceil") { + test("ceil") { val query = select(Ceil(53.7) ++ Ceil(-53.7)) val expected = (54.0, -53.0) @@ -426,7 +426,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("sin") { + test("sin") { val query = select(Sin(1.0)) val expected = 0.8414709848078965 @@ -439,7 +439,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("sind") { + test("sind") { val query = select(Sind(30.0)) val expected = 0.5 @@ -452,7 +452,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("split_part") { + test("split_part") { val query = select(SplitPart("abc~@~def~@~ghi", "~@~", 2)) val expected = "def" @@ -465,7 +465,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("timeofday") { + test("timeofday") { val query = select(TimeOfDay()) val testResult = execute(query.to[String, String](identity)) @@ -480,7 +480,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("localtime") { + test("localtime") { val query = select(Localtime) val testResult = execute(query.to[LocalTime, LocalTime](identity)) @@ -491,7 +491,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("localtime with precision") { + test("localtime with precision") { val precision = 0 val query = select(LocaltimeWithPrecision(precision)) @@ -503,7 +503,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("localtimestamp") { + test("localtimestamp") { val query = select(Localtimestamp) val testResult = execute(query.to[Instant, Instant](identity)) @@ -517,7 +517,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("localtimestamp with precision") { + test("localtimestamp with precision") { val precision = 2 val query = select(LocaltimestampWithPrecision(precision)) @@ -533,7 +533,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("now") { + test("now") { val query = select(Now()) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -547,7 +547,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("statement_timestamp") { + test("statement_timestamp") { val query = select(StatementTimestamp()) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -561,7 +561,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("transaction_timestamp") { + test("transaction_timestamp") { val query = select(TransactionTimestamp()) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -575,7 +575,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("current_time") { + test("current_time") { val query = select(CurrentTime) val testResult = execute(query.to[OffsetTime, OffsetTime](identity)) @@ -591,7 +591,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("md5") { + test("md5") { val query = select(Md5("hello, world!")) val expected = "3adbbad1791fbae3ec908894c4963870" @@ -605,8 +605,8 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, suite("parseIdent")( - testM("parseIdent removes quoting of individual identifiers") { - val someString: Gen[ZioRandom with Sized, String] = Gen.anyString + test("parseIdent removes quoting of individual identifiers") { + val someString: Gen[ZioRandom with Sized, String] = Gen.string .filter(x => x.length < 50 && x.length > 1) //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it val genTestString: Gen[ZioRandom with Sized, String] = @@ -615,7 +615,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { string2 <- someString } yield s""""${string1}".${string2}""" - val assertion = checkM(genTestString) { (testString) => + val assertion = check(genTestString) { (testString) => val query = select(ParseIdent(testString)) val testResult = execute(query.to[String, String](identity)) @@ -626,18 +626,18 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("parseIdent fails with invalid identifier") { + test("parseIdent fails with invalid identifier") { val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) val testResult = execute(query.to[String, String](identity)) val assertion = for { - r <- testResult.runCollect.run + r <- testResult.runCollect.exit } yield assert(r)(fails(anything)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ ignore, - testM("sqrt") { + test("sqrt") { val query = select(Sqrt(121.0)) val expected = 11.0 @@ -650,7 +650,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("chr") { + test("chr") { val query = select(Chr(65)) val expected = "A" @@ -663,7 +663,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("current_date") { + test("current_date") { val query = select(CurrentDate) val expected = LocalDate.now() @@ -676,7 +676,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("initcap") { + test("initcap") { val query = select(Initcap("hi THOMAS")) val expected = "Hi Thomas" @@ -689,7 +689,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("trim_scale") { + test("trim_scale") { val query = select(TrimScale(8.4100)) val expected = 8.41 @@ -702,7 +702,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("hex") { + test("hex") { val query = select(Hex(2147483647)) val expected = "7fffffff" @@ -715,7 +715,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("encode") { + test("encode") { val query = select(Encode(Chunk.fromArray("Hello, World!".getBytes), "BASE64")) val expected = "SGVsbG8sIFdvcmxkIQ==" @@ -728,7 +728,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("decode") { + test("decode") { val query = select(Decode("SGVsbG8sIFdvcmxkIQ==", "BASE64")) val expected = Chunk.fromArray("Hello, World!".getBytes) @@ -741,7 +741,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("trunc") { + test("trunc") { val query = select(Trunc(42.8)) val expected = 42d @@ -754,7 +754,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("round") { + test("round") { val query = select(Round(10.8124, 2)) val expected = 10.81 @@ -767,7 +767,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("sign positive") { + test("sign positive") { val query = select(Sign(3.0)) val expected = 1 @@ -780,7 +780,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("sign negative") { + test("sign negative") { val query = select(Sign(-3.0)) val expected = -1 @@ -793,7 +793,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("sign zero") { + test("sign zero") { val query = select(Sign(0.0)) val expected = 0 @@ -806,7 +806,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("power") { + test("power") { val query = select(Power(7.0, 3.0)) val expected = 343.000000000000000 @@ -819,7 +819,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("length") { + test("length") { val query = select(Length("hello")) val expected = 5 @@ -832,7 +832,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("mod") { + test("mod") { val query = select(Mod(-15.0, -4.0)) val expected = -3.0 @@ -845,7 +845,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("translate") { + test("translate") { val query = select(Translate("12345", "143", "ax")) val expected = "a2x5" @@ -858,7 +858,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("left") { + test("left") { val query = select(Left("abcde", 2)) val expected = "ab" @@ -871,7 +871,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("right") { + test("right") { val query = select(Right("abcde", 2)) val expected = "de" @@ -884,7 +884,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("radians") { + test("radians") { val query = select(Radians(45.0)) val expected = 0.7853981634 @@ -897,7 +897,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("min_scale") { + test("min_scale") { val query = select(MinScale(8.4100)) val expected = 2 @@ -910,7 +910,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("starts_with") { + test("starts_with") { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = @@ -940,7 +940,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("lower") { + test("lower") { val query = select(Lower(fName)) from customers limit (1) val expected = "ronald" @@ -953,7 +953,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("lower with string literal") { + test("lower with string literal") { val query = select(Lower("LOWER")) from customers limit (1) val expected = "lower" @@ -966,7 +966,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("octet_length") { + test("octet_length") { val query = select(OctetLength("josé")) val expected = 5 @@ -979,7 +979,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("ascii") { + test("ascii") { val query = select(Ascii("""x""")) val expected = 120 @@ -992,7 +992,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("upper") { + test("upper") { val query = (select(Upper("ronald"))).limit(1) val expected = "RONALD" @@ -1005,7 +1005,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("width_bucket") { + test("width_bucket") { val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) val expected = 3 @@ -1018,7 +1018,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("tan") { + test("tan") { val query = select(Tan(0.7853981634)) val expected = 1.0000000000051035 @@ -1031,7 +1031,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("gcd") { + test("gcd") { val query = select(GCD(1071d, 462d)) val expected = 21d @@ -1044,7 +1044,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("lcm") { + test("lcm") { val query = select(LCM(1071d, 462d)) val expected = 23562d @@ -1057,7 +1057,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cbrt") { + test("cbrt") { val query = select(CBRT(64.0)) val expected = 4d @@ -1070,7 +1070,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("degrees") { + test("degrees") { val query = select(Degrees(0.5)) val expected = 28.64788975654116 @@ -1083,7 +1083,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("div") { + test("div") { val query = select(Div(8d, 4d)) val expected = 2d @@ -1096,7 +1096,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("factorial") { + test("factorial") { val query = select(Factorial(5)) val expected = 120 @@ -1109,7 +1109,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("random") { + test("random") { val query = select(Random()) val testResult = execute(query.to[Double, Double](identity)) @@ -1120,7 +1120,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("setseed") { + test("setseed") { val query = select(SetSeed(0.12) ++ Random() ++ Random()) from customers val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) @@ -1132,7 +1132,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can concat strings with concat function") { + test("Can concat strings with concat function") { val query = select(Concat(fName, lName) as "fullname") from customers @@ -1146,7 +1146,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can calculate character length of a string") { + test("Can calculate character length of a string") { val query = select(CharLength(fName)) from customers @@ -1160,7 +1160,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("to_timestamp") { + test("to_timestamp") { val query = select(ToTimestamp(1284352323L)) val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) @@ -1187,7 +1187,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("replace") { + test("replace") { val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" @@ -1206,7 +1206,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("lpad") { + test("lpad") { def runTest(s: String, pad: String) = { val query = select(LPad(s, 5, pad)) @@ -1221,7 +1221,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("rpad") { + test("rpad") { def runTest(s: String, pad: String) = { val query = select(RPad(s, 5, pad)) @@ -1236,7 +1236,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("pg_client_encoding") { + test("pg_client_encoding") { val query = select(PgClientEncoding()) val testResult = execute(query.to[String, String](identity)) @@ -1248,7 +1248,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } @@ ignore, //todo fix - select(PgClientEncoding())? - testM("make_date") { + test("make_date") { val query = select(MakeDate(2013, 7, 15)) val expected = LocalDate.of(2013, 7, 15) @@ -1261,7 +1261,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("make_interval") { + test("make_interval") { def runTest(interval: Interval) = { val query = select( MakeInterval(interval) @@ -1281,7 +1281,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("make_time") { + test("make_time") { val query = select(MakeTime(8, 15, 23.5)) val expected = LocalTime.parse("08:15:23.500") val testResult = execute(query.to[LocalTime, LocalTime](identity)) @@ -1292,7 +1292,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("make_timestamp") { + test("make_timestamp") { val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) val expected = LocalDateTime.parse("2013-07-15T08:15:23.500") val testResult = execute(query.to[LocalDateTime, LocalDateTime](identity)) @@ -1303,7 +1303,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("make_timestampz") { + test("make_timestampz") { def runTest(tz: Timestampz) = { val query = select(MakeTimestampz(tz)) for { @@ -1325,7 +1325,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { t5 <- assertM(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) } yield t1 && t2 && t3 && t4 && t5).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cannot compile a select without from clause if a table source is required") { + test("cannot compile a select without from clause if a table source is required") { //the following execute only compiles with 'from customers' clause execute((select(CharLength(Customers.fName)) from customers).to[Int, Int](identity)) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 2fa360fca..286f3ceaf 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -48,7 +48,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { } override def specLayered = suite("Postgres module")( - testM("Can select from single table") { + test("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = select(customerId ++ fName ++ lName ++ dob).from(customers) @@ -100,32 +100,32 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can select with property unary operator") { + test("Can select with property unary operator") { customerSelectJoseAssertion(verified isNotTrue) }, - testM("Can select with property binary operator with UUID") { + test("Can select with property binary operator with UUID") { customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) }, - testM("Can select with property binary operator with String") { + test("Can select with property binary operator with String") { customerSelectJoseAssertion(fName === "Jose") }, - testM("Can select with property binary operator with LocalDate") { + test("Can select with property binary operator with LocalDate") { customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) }, - testM("Can select with property binary operator with LocalDateTime") { + test("Can select with property binary operator with LocalDateTime") { customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) }, - testM("Can select with property binary operator with OffsetDateTime") { + test("Can select with property binary operator with OffsetDateTime") { customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) }, - testM("Can select with property binary operator with ZonedLocalDate") { + test("Can select with property binary operator with ZonedLocalDate") { customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) }, - testM("Can select with property binary operator with Instant") { + test("Can select with property binary operator with Instant") { customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) }, // uncomment when we properly handle Postgres' Money type - // testM("Can select with property binary operator with numbers") { + // test("Can select with property binary operator with numbers") { // case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) // val orderDetailQuantity = 3 @@ -156,7 +156,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) // }, - testM("Can select from single table with limit, offset and order by") { + test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = select(customerId ++ fName ++ lName ++ dob).from(customers).limit(1).offset(1).orderBy(fName) @@ -184,7 +184,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can count rows") { + test("Can count rows") { val query = select(Count(customerId)).from(customers) val expected = 5L @@ -195,7 +195,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { r <- result.runCollect } yield assert(r.head)(equalTo(expected)) }, - testM("Can select from joined tables (inner join)") { + test("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) case class Row(firstName: String, lastName: String, orderDate: LocalDate) @@ -241,7 +241,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can select using like") { + test("Can select using like") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = select(customerId ++ fName ++ lName ++ dob).from(customers).where(fName like "Jo%") @@ -268,7 +268,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can delete from single table with a condition") { + test("Can delete from single table with a condition") { val query = deleteFrom(customers) where (verified isNotTrue) println(renderDelete(query)) @@ -280,7 +280,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can delete all from a single table") { + test("Can delete all from a single table") { val query = deleteFrom(customers) println(renderDelete(query)) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 7e5538e03..4b1929a20 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,10 +1,10 @@ package zio.sql.postgresql import zio.test._ -import zio.test.environment.TestEnvironment +import zio.test.TestEnvironment import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } -import zio.Has +import zio.ZEnvironment trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { @@ -20,7 +20,7 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { val poolConfigLayer = TestContainer .postgres() .map(a => - Has( + ZEnvironment( ConnectionPoolConfig( url = a.get.jdbcUrl, properties = connProperties(a.get.username, a.get.password), @@ -30,7 +30,7 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { ) override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = - specLayered.provideCustomLayerShared(jdbcLayer) + specLayered.provideCustomShared(jdbcLayer) def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index 167092fe5..ee93d1ee5 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -14,7 +14,7 @@ object TransactionSpec extends PostgresRunnableSpec with ShopSchema { import Customers._ override def specLayered = suite("Postgres module")( - testM("Transaction is returning the last value") { + test("Transaction is returning the last value") { val query = select(customerId) from customers val result = execute( @@ -25,7 +25,7 @@ object TransactionSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transaction is failing") { + test("Transaction is failing") { val query = select(customerId) from customers val result = execute( @@ -34,30 +34,30 @@ object TransactionSpec extends PostgresRunnableSpec with ShopSchema { assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transaction failed and didn't deleted rows") { + test("Transaction failed and didn't deleted rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Transaction succeeded and deleted rows") { + test("Transaction succeeded and deleted rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) val tx = ZTransaction(deleteQuery) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged _ <- execute(tx) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) From 02db2cd90dd3b79c80258bbb5d80e737b422b1db Mon Sep 17 00:00:00 2001 From: Antonio Morales Date: Mon, 6 Dec 2021 17:01:39 -0800 Subject: [PATCH 307/673] format code --- .../main/scala/zio/sql/ConnectionPool.scala | 2 +- .../scala/zio/sql/ConnectionPoolConfig.scala | 2 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 4 +--- .../scala/zio/sql/TransactionModule.scala | 20 +++++++++++++------ jdbc/src/main/scala/zio/sql/jdbc.scala | 8 +++++--- .../scala/zio/sql/mysql/TransactionSpec.scala | 7 ++++--- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index 9397efb9a..97aa4f48d 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -46,7 +46,7 @@ final case class ConnectionPoolLive( queue: TQueue[TPromise[Nothing, ResettableConnection]], available: TRef[List[ResettableConnection]], config: ConnectionPoolConfig, - clock: Clock, + clock: Clock ) extends ConnectionPool { /** diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala b/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala index 7e632e229..a17b6e4e5 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPoolConfig.scala @@ -1,6 +1,6 @@ package zio.sql -import zio.{Schedule, durationInt} +import zio.{ durationInt, Schedule } /** * Configuration information for the connection pool. diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index dc6d1921e..9c67bf051 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -14,9 +14,7 @@ trait SqlDriverLiveModule { self: Jdbc => def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] } - sealed case class SqlDriverLive(pool: ConnectionPool) - extends SqlDriver - with SqlDriverCore { self => + sealed case class SqlDriverLive(pool: ConnectionPool) extends SqlDriver with SqlDriverCore { self => def delete(delete: Delete[_]): IO[Exception, Int] = pool.connection.use(deleteOn(delete, _)) diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index bbb53f4b1..ec039c4c5 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -2,7 +2,7 @@ package zio.sql import java.sql._ -import zio.{Tag => ZTag, _} +import zio.{ Tag => ZTag, _ } import zio.stream._ trait TransactionModule { self: Jdbc => @@ -12,7 +12,9 @@ trait TransactionModule { self: Jdbc => def map[B](f: A => B): ZTransaction[R, E, B] = ZTransaction(self.unwrap.map(f)) - def flatMap[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](f: A => ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def flatMap[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B]( + f: A => ZTransaction[R1, E1, B] + ): ZTransaction[R1, E1, B] = ZTransaction(self.unwrap.flatMap(a => f(a).unwrap)) private[sql] def run(txn: Txn)(implicit @@ -25,11 +27,13 @@ trait TransactionModule { self: Jdbc => .provideEnvironment(ZEnvironment((r.get, txn))) .tapBoth( _ => - ZIO.attemptBlocking(txn.connection.rollback()) + ZIO + .attemptBlocking(txn.connection.rollback()) .refineToOrDie[Exception] .toManaged, _ => - ZIO.attemptBlocking(txn.connection.commit()) + ZIO + .attemptBlocking(txn.connection.commit()) .refineToOrDie[Exception] .toManaged ) @@ -38,7 +42,9 @@ trait TransactionModule { self: Jdbc => def zip[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = zipWith[R1, E1, B, (A, B)](tx)((_, _)) - def zipWith[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B, C](tx: ZTransaction[R1, E1, B])(f: (A, B) => C): ZTransaction[R1, E1, C] = + def zipWith[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B, C]( + tx: ZTransaction[R1, E1, B] + )(f: (A, B) => C): ZTransaction[R1, E1, C] = for { a <- self b <- tx @@ -58,7 +64,9 @@ trait TransactionModule { self: Jdbc => def zipLeft[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self <* tx - def catchAllCause[R1 <: R: ZTag: IsNotIntersection, E1 >: E, A1 >: A](f: Cause[E1] => ZTransaction[R1, E1, A1]): ZTransaction[R1, E1, A1] = + def catchAllCause[R1 <: R: ZTag: IsNotIntersection, E1 >: E, A1 >: A]( + f: Cause[E1] => ZTransaction[R1, E1, A1] + ): ZTransaction[R1, E1, A1] = ZTransaction(self.unwrap.catchAllCause(cause => f(cause).unwrap)) } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 60e6fb8b9..860e5274c 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,6 +1,6 @@ package zio.sql -import zio.{Tag => ZTag, _} +import zio.{ Tag => ZTag, _ } import zio.stream._ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule with SqlDriverLiveModule { @@ -16,11 +16,13 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi object SqlDriver { val live: ZLayer[ConnectionPool, Nothing, SqlDriver] = (for { - pool <- ZIO.service[ConnectionPool] + pool <- ZIO.service[ConnectionPool] } yield SqlDriverLive(pool)).toLayer } - def execute[R <: SqlDriver: ZTag: IsNotIntersection, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = + def execute[R <: SqlDriver: ZTag: IsNotIntersection, A]( + tx: ZTransaction[R, Exception, A] + ): ZManaged[R, Exception, A] = ZManaged.environmentWithManaged[R](_.get.transact(tx)) def execute[A](read: Read[A]): ZStream[SqlDriver, Exception, A] = diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index e30d41d63..90bc6b0d6 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -20,9 +20,10 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { ).use(ZIO.succeed(_)) val assertion = - result.flatMap(_.runCount) - .map(count => assertTrue(count == 5)) - .orDie + result + .flatMap(_.runCount) + .map(count => assertTrue(count == 5)) + .orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, From e3a9dea841106848385d47aaa5dfd8269ad8dde8 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 10 Dec 2021 06:53:26 +0100 Subject: [PATCH 308/673] Update sbt to 1.5.6 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 10fd9eee0..bb3a9b7dc 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.5 +sbt.version=1.5.6 From fa08f0cafc835e2a5d9928b684765fe8a8d558a2 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 10 Dec 2021 16:33:12 +0100 Subject: [PATCH 309/673] formatting and small fixes --- build.sbt | 12 +- core/jvm/src/main/scala/zio/sql/Sql.scala | 22 +- core/jvm/src/main/scala/zio/sql/expr.scala | 10 +- .../jvm/src/main/scala/zio/sql/features.scala | 2 +- core/jvm/src/main/scala/zio/sql/insert.scala | 2 + .../scala/zio/sql/insertAlternative.scala | 14 +- core/jvm/src/main/scala/zio/sql/table.scala | 4 +- .../scala/zio/sql/GroupByHavingSpec.scala | 2 +- .../test/scala/zio-sql/HelloWorldSpec.scala | 4 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 12 +- .../scala/zio/sql/mysql/MysqlModule.scala | 2 +- .../scala/zio/sql/oracle/OracleModule.scala | 2 +- .../zio/sql/postgresql/PostgresModule.scala | 103 +++++--- .../sql/postgresql/PostgresModuleSpec.scala | 239 ++++++++++++++---- .../zio/sql/sqlserver/SqlServerModule.scala | 6 +- 15 files changed, 307 insertions(+), 129 deletions(-) diff --git a/build.sbt b/build.sbt index 6d540c0fb..b2b73e0fc 100644 --- a/build.sbt +++ b/build.sbt @@ -78,12 +78,12 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .settings(buildInfoSettings("zio.sql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % "0.1.4", - "dev.zio" %% "zio-schema-derivation" % "0.1.4", - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % "0.1.4", + "dev.zio" %% "zio-schema-derivation" % "0.1.4", + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 788583602..2c3e3f252 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -2,7 +2,14 @@ package zio.sql import zio.schema.Schema -trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertAltModule with InsertModule { +trait Sql + extends SelectModule + with DeleteModule + with UpdateModule + with ExprModule + with TableModule + with InsertAltModule + with InsertModule { self => /* @@ -41,14 +48,19 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def renderUpdate(update: self.Update[_]): String - def insertAltInto[Source, N <: ColumnCount, AllColumnIdentities](table: Table.Source.AuxN[Source, AllColumnIdentities, N]): InsertAltBuilder[Source, N, AllColumnIdentities] = + def insertAltInto[Source, N <: ColumnCount, AllColumnIdentities]( + table: Table.Source.AuxN[Source, AllColumnIdentities, N] + ): InsertAltBuilder[Source, N, AllColumnIdentities] = InsertAltBuilder(table) def renderInsertAlt(insert: self.InsertAlt[_]): String - def insertInto[Source, N <: ColumnCount, AllColumnIdentities, SourceTypes, ColsRepr](table: Table.Source.AuxN[Source, AllColumnIdentities, N]) - (sources: SourceSet.Aux[Source, SourceTypes, ColsRepr])(implicit ev1: AllColumnIdentities =:= SourceTypes, ev2: N =:= sources.Size) = + def insertInto[Source, N <: ColumnCount, AllColumnIdentities, SourceTypes, ColsRepr]( + table: Table.Source.AuxN[Source, AllColumnIdentities, N] + )( + sources: SourceSet.Aux[Source, SourceTypes, ColsRepr] + )(implicit ev1: AllColumnIdentities =:= SourceTypes, ev2: N =:= sources.Size) = InsertBuilder(table, sources) - def renderInsert[A: Schema](insert: self.Insert[_, A]): String + def renderInsert[A: Schema](insert: self.Insert[_, A]): String } diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index dfd366c9c..411256c93 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -118,8 +118,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def exprName[F, A, B](expr: Expr[F, A, B]): Option[String] = expr match { - case Expr.Source(_, c) => c.name - case _ => None + case Expr.Source(_, c) => c.name + case _ => None } implicit def expToSelection[F, A, B]( @@ -133,8 +133,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { override def typeTag: TypeTag[Head] = subselect.selection.value.head.toColumn.typeTag } - sealed case class Source[-A, B, ColumnIdentity] private[sql] (tableName: TableName, column: Column.Aux[B, ColumnIdentity]) - extends InvariantExpr[Features.Source[ColumnIdentity], A, B] { + sealed case class Source[-A, B, ColumnIdentity] private[sql] ( + tableName: TableName, + column: Column.Aux[B, ColumnIdentity] + ) extends InvariantExpr[Features.Source[ColumnIdentity], A, B] { def typeTag: TypeTag[B] = column.typeTag } diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index 4fb739004..ffe15c441 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -33,7 +33,7 @@ trait FeaturesModule { sealed trait IsSource[A] object IsSource { - implicit def isSource[ColumnIdentity] : IsSource[Source[ColumnIdentity]] = new IsSource[Source[ColumnIdentity]]{} + implicit def isSource[ColumnIdentity]: IsSource[Source[ColumnIdentity]] = new IsSource[Source[ColumnIdentity]] {} } } diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index c8ba3ac32..ee9ef04d0 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -26,6 +26,8 @@ import scala.language.implicitConversions * 5. try to generate DSL tables at compile type from sql file with compiler plugin * 6. translate new inserts to sql query * 7. how to support tables with more than 22 columns ? + * 8. retrieve generated ID from inserted row + * 9. explore & add "on conflict do" stuff */ trait InsertModule { self: ExprModule with TableModule => diff --git a/core/jvm/src/main/scala/zio/sql/insertAlternative.scala b/core/jvm/src/main/scala/zio/sql/insertAlternative.scala index 8be610a39..b37b602d8 100644 --- a/core/jvm/src/main/scala/zio/sql/insertAlternative.scala +++ b/core/jvm/src/main/scala/zio/sql/insertAlternative.scala @@ -3,7 +3,6 @@ package zio.sql import scala.language.implicitConversions /** - * * TODO * 1. add to column type capability to contain null values * 2. add auto generated capabilities (like identity for postgresql) @@ -17,7 +16,7 @@ import scala.language.implicitConversions * Select S.Test_Date, E.Testno, S.Examno, S.Serialno, 'Non-Flight', (F.STARTED- F.ENDED) as Hours * From Semester S, TIME F, TESTPAPERS e * Where S.Testno = F.Testno And E.Testno = 1 - * + * * insert into customers * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) * values @@ -26,7 +25,9 @@ import scala.language.implicitConversions */ trait InsertAltModule { self: ExprModule with TableModule => - sealed case class InsertAltBuilder[Source, N <: ColumnCount, AllColumnIdentities](table: Table.Source.AuxN[Source, AllColumnIdentities, N]) { + sealed case class InsertAltBuilder[Source, N <: ColumnCount, AllColumnIdentities]( + table: Table.Source.AuxN[Source, AllColumnIdentities, N] + ) { def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): InsertAlt[Source] = InsertAlt(table, values) } @@ -69,8 +70,9 @@ trait InsertAltModule { self: ExprModule with TableModule => override def ++[Source1 <: Source, Appended, ThatIdentity]( that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) )(implicit - unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended] - ): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = + unique: Unique[ThatIdentity, self.type], + ev: TypeTag[Appended] + ): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity]( tupleHead, tail.++(that)(new Unique[ThatIdentity, T] {}, implicitly[TypeTag[Appended]]) @@ -94,7 +96,7 @@ trait InsertAltModule { self: ExprModule with TableModule => implicit def uniqueInCons[A, H, T <: InsertRow[_]](implicit tailNotContain: Unique[H, T], ev: A =!= H - ): Unique[A, InsertRow.Cons[_, _, T, H]] = + ): Unique[A, InsertRow.Cons[_, _, T, H]] = new Unique[A, InsertRow.Cons[_, _, T, H]] {} } diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 551d2ecf0..122798c94 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -102,7 +102,7 @@ trait TableModule { self: ExprModule with SelectModule => head == column || tail.contains(column) } - def byteArray(name: String): Singleton[Chunk[Byte], name.type] = singleton[Chunk[Byte], name.type](name) + def byteArray(name: String): Singleton[Chunk[Byte], name.type] = singleton[Chunk[Byte], name.type](name) def bigDecimal(name: String): Singleton[BigDecimal, name.type] = singleton[BigDecimal, name.type](name) def boolean(name: String): Singleton[Boolean, name.type] = singleton[Boolean, name.type](name) def char(name: String): Singleton[Char, name.type] = singleton[Char, name.type](name) @@ -260,7 +260,7 @@ trait TableModule { self: ExprModule with SelectModule => type TableType = A type AllColumnIdentities = AllColumnIdentities0 - type Size = Size0 + type Size = Size0 } } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index e7aed0f2c..ae447f736 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -19,7 +19,7 @@ object AggregatedProductSchema { val sqldsl = new Sql { self => override def renderDelete(delete: self.Delete[_]): String = ??? override def renderRead(read: self.Read[_]): String = ??? - override def renderUpdate(update: self.Update[_]): String = ??? + override def renderUpdate(update: self.Update[_]): String = ??? override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? diff --git a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala index 60850ec6b..a6e740662 100644 --- a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala +++ b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala @@ -1,17 +1,15 @@ package zio.sql import zio._ -import zio.console._ import zio.test._ import zio.test.Assertion._ import zio.test.environment._ import HelloWorld._ -import java.io.IOException object HelloWorld { - def sayHello: ZIO[Console, IOException, Unit] = + def sayHello = console.putStrLn("Hello, World!") } diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 1052548ff..153bffd46 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -86,27 +86,27 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] } - override def insertAlt(insert: InsertAlt[_]): IO[Exception, Int] = + override def insertAlt(insert: InsertAlt[_]): IO[Exception, Int] = pool.connection.use(insertOnAlt(insert, _)) def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] = blocking.effectBlocking { - val query = renderInsert(insert) - + val query = renderInsert(insert) + val statement = conn.createStatement() statement.executeUpdate(query) }.refineToOrDie[Exception] - override def insert[A : Schema](insert: Insert[_, A]): IO[Exception, Int] = + override def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] = pool.connection.use(insertOn(insert, _)) def insertOnAlt(insert: InsertAlt[_], conn: Connection): IO[Exception, Int] = blocking.effectBlocking { - val query = renderInsertAlt(insert) - + val query = renderInsertAlt(insert) + val statement = conn.createStatement() statement.executeUpdate(query) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 2514b2c80..946fee6ec 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -196,7 +196,7 @@ trait MysqlModule extends Jdbc { self => case Expr.Source(table, column) => (table, column.name) match { case (tableName: TableName, Some(columnName)) => render(tableName, ".", columnName) - case _ => () + case _ => () } case Expr.Unary(base, op) => render(" ", op.symbol) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index fdecd1648..22712a5b1 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -18,7 +18,7 @@ trait OracleModule extends Jdbc { self => (table, column.name) match { case (tableName: TableName, Some(columnName)) => val _ = builder.append(tableName).append(".").append(columnName) - case _ => () + case _ => () } case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 56eed4a65..e7d208586 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -10,6 +10,20 @@ import java.time._ import java.time.format.DateTimeFormatter import java.util.Calendar import zio.schema._ +import zio.schema.StandardType.BigDecimalType +import zio.schema.StandardType.CharType +import zio.schema.StandardType.IntType +import zio.schema.StandardType.BinaryType +import zio.schema.StandardType.UnitType +import zio.schema.StandardType.DoubleType +import zio.schema.StandardType.BigIntegerType +import zio.schema.StandardType.UUIDType +import zio.schema.StandardType.ShortType +import zio.schema.StandardType.LongType +import zio.schema.StandardType.StringType +import zio.schema.StandardType.BoolType +import zio.schema.StandardType.DayOfWeekType +import zio.schema.StandardType.FloatType trait PostgresModule extends Jdbc { self => import TypeTag._ @@ -460,56 +474,67 @@ trait PostgresModule extends Jdbc { self => case _ => () } - - def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = dynValues match { - case head :: Nil => renderDynamicValue(head) - case head :: tail => { + case head :: Nil => renderDynamicValue(head) + case head :: tail => renderDynamicValue(head) render(", ") renderDynamicValues(tail) - } - case Nil => () + case Nil => () } - + // TODO render each type according to their specifics & test it def renderDynamicValue(dynValue: DynamicValue)(implicit render: Renderer): Unit = dynValue match { case DynamicValue.Primitive(value, typeTag) => - typeTag match { - case _ => render(s"'${value}'") - // TODO make StandardType covariant - // case StandardType.DayOfWeekType => ??? - // case StandardType.Month => ??? - // case BigIntegerType => ??? - // case StandardType.LocalTime(formatter) => ??? - // case StandardType.LocalDate(formatter) => ??? - // case BigDecimalType => ??? - // case StandardType.Instant(formatter) => ??? - // case StandardType.MonthDay => ??? - // case DoubleType => ??? - // case StandardType.ZonedDateTime(formatter) => ??? - // case StandardType.Duration(temporalUnit) => ??? - // case StandardType.LocalDateTime(formatter) => ??? - // case UnitType => ??? - // case BoolType => ??? - // case StandardType.ZoneOffset => ??? - // case StandardType.ZoneId => ??? - // case CharType => ??? - // case ShortType => ??? - // case StringType => ??? - // case FloatType => ??? - // case StandardType.Period => ??? - // case LongType => ??? - // case UUIDType => ??? - // case StandardType.OffsetDateTime(formatter) => ??? - // case StandardType.Year => ??? - // case BinaryType => ??? - // case StandardType.YearMonth => ??? - // case StandardType.OffsetTime(formatter) => ??? - // case IntType => ??? + // need to do this since StandardType is invariant in A + StandardType.fromString(typeTag.tag) match { + case Some(v) => + v match { + case BigDecimalType => + println("foo") + render(value) + case StandardType.Instant(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") + case CharType => render(s"'${value}'") + case IntType => render(value) + case StandardType.MonthDay => render(s"'${value}'") + case BinaryType => render(s"'${value}'") + case StandardType.Month => render(s"'${value}'") + case StandardType.LocalDateTime(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalDateTime])}'") + case UnitType => () // ??? + case StandardType.YearMonth => render(s"'${value}'") + case DoubleType => render(value) + case StandardType.Year => render(s"'${value}'") + case StandardType.OffsetDateTime(formatter) => + render(s"'${formatter.format(value.asInstanceOf[OffsetDateTime])}'") + case StandardType.ZonedDateTime(formatter) => + //render(s"'${formatter.format(value.asInstanceOf[ZonedDateTime])}'") + render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") + case BigIntegerType => render(s"'${value}'") + case UUIDType => render(s"'${value}'") + case StandardType.ZoneOffset => render(s"'${value}'") + case ShortType => render(value) + case StandardType.LocalTime(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalTime])}'") + case StandardType.OffsetTime(formatter) => + render(s"'${formatter.format(value.asInstanceOf[OffsetTime])}'") + case LongType => render(value) + case StringType => render(s"'${value}'") + case StandardType.Period => render(s"'${value}'") + case StandardType.ZoneId => render(s"'${value}'") + case StandardType.LocalDate(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalDate])}'") + case BoolType => render(value) + case DayOfWeekType => render(s"'${value}'") + case FloatType => render(value) + case StandardType.Duration(temporalUnit) => render(s"'${value}'") + } + case None => () } + //TODO do we need to handle also other cases? + case DynamicValue.Transform(that) => renderDynamicValue(that) case _ => () } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 7757f83e8..28d12d111 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -382,25 +382,26 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { testM("simple insert - inserted 1 row") { /** - * insert into - * customers + * insert into + * customers * (id, first_name, last_name, verifier, dob, created_timestamp_string, created_timestamp) - * values - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec, true' 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') + * values + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') */ - val dobValue = LocalDate.now() - val created = ZonedDateTime.now() + val dobValue = LocalDate.now() + val created = ZonedDateTime.now() - val query = insertAltInto(customers) + val query = insertAltInto(customers) .values( - (customerId -> java.util.UUID.fromString("0511474d-8eed-4307-bdb0-e39a561205b6")) ++ - (fName -> "Jaro") ++ - (lName -> "Regec") ++ - (verified -> false) ++ - (dob -> dobValue) ++ - (createdString -> created.toString) ++ - (createdTimestamp -> created)) + (customerId -> java.util.UUID.fromString("0511474d-8eed-4307-bdb0-e39a561205b6")) ++ + (fName -> "Jaro") ++ + (lName -> "Regec") ++ + (verified -> false) ++ + (dob -> dobValue) ++ + (createdString -> created.toString) ++ + (createdTimestamp -> created) + ) val result = execute(query) @@ -410,47 +411,51 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("insert - insert 10 columns") { + testM("insert - insert 10 rows into orders") { /** - insert into product_prices - (product_id, effective, price) - values - ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), - ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), - ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00), - ..... - ('D5137D3A-894A-4109-9986-E982541B43BB', '2020-01-01', 66.00); + * insert into product_prices + * (product_id, effective, price) + * values + * ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), + * ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), + * ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00), + * ..... + * ('D5137D3A-894A-4109-9986-E982541B43BB', '2020-01-01', 66.00); */ - final case class InputOrders(uuid: UUID, customerId: UUID, localDate: LocalDate) - - implicit val localDateSchema = Schema.CaseClass3[UUID, UUID, LocalDate, InputOrders]( - Chunk.empty, - Schema.Field("uuid", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), - Schema.Field("customerId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), - Schema.Field("localDate", Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE))), - InputOrders.apply, - _.uuid, - _.customerId, - _.localDate - ) - - val orderValues = List( - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), - InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()) - ) - - val query = insertInto(orders)(orderId +++ fkCustomerId +++ orderDate) - .values(orderValues) + final case class InputOrders(uuid: UUID, customerId: UUID, localDate: LocalDate) + + //TODO why does DeriveSchema.gen[T] does not work? + implicit val inputOrdersSchema = Schema.CaseClass3[UUID, UUID, LocalDate, InputOrders]( + Chunk.empty, + Schema.Field("uuid", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("customerId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field( + "localDate", + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) + ), + InputOrders.apply, + _.uuid, + _.customerId, + _.localDate + ) + + val orderValues = List( + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), + InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()) + ) + + val query = insertInto(orders)(orderId +++ fkCustomerId +++ orderDate) + .values(orderValues) val result = execute(query) @@ -458,6 +463,138 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { r <- result } yield assert(r)(equalTo(10)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("insert - 4 rows into orderDetails") { + + /** + * insert into order_details + * (order_id, product_id, quantity, unit_price) + * values + * ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), + * ('38D66D44-3CFA-488A-AC77-30277751418F', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), + * ('7B2627D5-0150-44DF-9171-3462E20797EE', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.50), + * ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.90), + */ + + import OrderDetails._ + + case class OrderDetailsRow(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) + + //TODO we need schema for scala.math.BigDecimal + implicit val bigDecimalSchema: Schema[BigDecimal] = + Schema.Transform( + Schema.primitive[java.math.BigDecimal](zio.schema.StandardType.BigDecimalType), + (bigDec: java.math.BigDecimal) => Right(new BigDecimal(bigDec, java.math.MathContext.DECIMAL128)), + bigDec => Right(bigDec.bigDecimal), + Chunk.empty + ) + + implicit val orderDetailsRowSchema = Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetailsRow]( + Chunk.empty, + Schema.Field("orderId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("productId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("quantity", Schema.primitive[Int](zio.schema.StandardType.IntType)), + Schema.Field("unitPrice", bigDecimalSchema), + OrderDetailsRow.apply, + _.orderId, + _.productId, + _.quantity, + _.unitPrice + ) + + val rows = List( + OrderDetailsRow(UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00)), + OrderDetailsRow(UUID.randomUUID(), UUID.randomUUID(), 1, BigDecimal.valueOf(11.00)), + OrderDetailsRow(UUID.randomUUID(), UUID.randomUUID(), 1, BigDecimal.valueOf(11.50)), + OrderDetailsRow(UUID.randomUUID(), UUID.randomUUID(), 2, BigDecimal.valueOf(10.50)) + ) + + val query = insertInto(orderDetails)(orderDetailsOrderId +++ orderDetailsProductId +++ quantity +++ unitPrice) + .values(rows) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(4)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("insert - 2 rows into cutomers") { + + /** + * insert into customers + * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) + * values + * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), + * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04'), + */ + + final case class CustomerRow( + id: UUID, + firstName: String, + lastName: String, + verified: Boolean, + dateOfBirth: LocalDate, + cretedTimestampString: String, + createdTimestamp: ZonedDateTime + ) + + val created = ZonedDateTime.now() + import java.time._ + + implicit val customerRowSchema = + Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( + Chunk.empty, + Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), + Schema.Field( + "localDate", + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) + ), + Schema.Field("cretedTimestampString", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field( + "createdTimestamp", + Schema.primitive[ZonedDateTime]( + zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME) + ) + ), + CustomerRow.apply, + _.id, + _.firstName, + _.lastName, + _.verified, + _.dateOfBirth, + _.cretedTimestampString, + _.createdTimestamp + ) + + val rows = List( + CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created), + CustomerRow( + UUID.randomUUID(), + "Martin", + "Mrkva", + false, + LocalDate.ofYearDay(1980, 1), + created.toString, + created + ) + ) + + val query = insertInto(customers)( + customerId +++ fName +++ lName +++ verified +++ dob +++ createdString +++ createdTimestamp + ).values(rows) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(2)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index df9cb4b9a..21856cd52 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -30,14 +30,14 @@ trait SqlServerModule extends Jdbc { self => override type ColumnHead = left.ColumnHead override type HeadIdentity0 = left.HeadIdentity0 - override type ColumnTail = + override type ColumnTail = left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = if (left.columnSet.contains(column)) left.columnToExpr.toExpr(column) else @@ -106,7 +106,7 @@ trait SqlServerModule extends Jdbc { self => (table, column.name) match { case (tableName: TableName, Some(columnName)) => val _ = builder.append(tableName).append(".").append(columnName) - case _ => () + case _ => () } case Expr.Unary(base, op) => val _ = builder.append(" ").append(op.symbol) From 5f01d86edab10cdef3c71cb55c967d998084646b Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 12 Dec 2021 18:11:24 +0100 Subject: [PATCH 310/673] removed sourceSet, insert works directly with selectionSet, ++ in insert is supported --- core/jvm/src/main/scala/zio/sql/Sql.scala | 6 +- core/jvm/src/main/scala/zio/sql/insert.scala | 335 +++++++++--------- .../scala/zio/sql/insertAlternative.scala | 25 +- core/jvm/src/main/scala/zio/sql/select.scala | 44 ++- core/jvm/src/main/scala/zio/sql/table.scala | 24 +- .../zio/sql/postgresql/PostgresModule.scala | 61 ++-- .../sql/postgresql/PostgresModuleSpec.scala | 161 +++++---- 7 files changed, 325 insertions(+), 331 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 2c3e3f252..c6c8e2ba3 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -55,11 +55,11 @@ trait Sql def renderInsertAlt(insert: self.InsertAlt[_]): String - def insertInto[Source, N <: ColumnCount, AllColumnIdentities, SourceTypes, ColsRepr]( + def insertInto[F, Source, N <: ColumnCount, AllColumnIdentities, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( table: Table.Source.AuxN[Source, AllColumnIdentities, N] )( - sources: SourceSet.Aux[Source, SourceTypes, ColsRepr] - )(implicit ev1: AllColumnIdentities =:= SourceTypes, ev2: N =:= sources.Size) = + sources: Selection.Aux[F, Source, B, ColsRepr] + )(implicit ev2: N =:= sources.Size) = InsertBuilder(table, sources) def renderInsert[A: Schema](insert: self.Insert[_, A]): String diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index ee9ef04d0..b6ad68cf3 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -1,7 +1,6 @@ package zio.sql import zio.schema.Schema -import scala.language.implicitConversions /** * insert into @@ -19,221 +18,195 @@ import scala.language.implicitConversions * values(customerValues) * * TODO - * 1. change SourceSet +++ to :: or something better - cannot use ++ because its selectionSet then, && exists on expr * 2. make columns null, not null aware - * 3. automatically generated columns (postgres idenitity) do not accept insert + * 3. automatically generated columns (postgres idenitity) do not accept values by insert * 4. make better error messages * 5. try to generate DSL tables at compile type from sql file with compiler plugin - * 6. translate new inserts to sql query - * 7. how to support tables with more than 22 columns ? - * 8. retrieve generated ID from inserted row - * 9. explore & add "on conflict do" stuff + * 6. how to support tables with more than 22 columns ? + * 7. retrieve generated ID from inserted row + * 8. explore & add "on conflict do" stuff + * 9 do we want to keep supporting insertAltInto stuff? + * + * + * TODO + * 1. support for tuples by inserting + * 2. add possibility to select and insert source columns separated by comma + * 3. deal with trailing unit in tuples + * 4. rollout zio-schema for other APIs ( select, delete, update) + * */ -trait InsertModule { self: ExprModule with TableModule => +trait InsertModule { self: ExprModule with TableModule with SelectModule => - sealed case class InsertBuilder[Source, SourceTypes, ColsRepr]( - table: Table.Source.Aux[Source], - sources: SourceSet.Aux[Source, SourceTypes, ColsRepr] + sealed case class InsertBuilder[F, Source, AllColumnIdentities, N, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( + table: Table.Source.AuxN[Source, AllColumnIdentities, N], + sources: Selection.Aux[F, Source, B, ColsRepr] ) { def values[Z](values: Seq[Z])(implicit schemaCC: Schema[Z], - schemaValidity: SchemaValidity[Z, ColsRepr] - ): Insert[Source, Z] = Insert(table, sources, values) + schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities], + ): Insert[Source, Z] = Insert(table, sources.value, values) } - sealed case class Insert[A, N](table: Table.Source.Aux[A], sources: SourceSet[A], values: Seq[N])(implicit + sealed case class Insert[A, N](table: Table.Source.Aux[A], sources: SelectionSet[A], values: Seq[N])(implicit schemaN: Schema[N] ) - sealed trait SourceSet[-Source] { self => - - type Append[Source1, Appended, ThatIdentity] <: SourceSet[Source1] - - type Repr - - type ColumnTypes - - type Size <: ColumnCount - - def +++[Source1 <: Source, Appended, ThatIdentity]( - that: Expr[Features.Source[ThatIdentity], Source1, Appended] - ): Append[Source1, Appended, ThatIdentity] - } - - object SourceSet { - - type Aux[Source0, ColumnTypes0, ColsRepr] = SourceSet[Source0] { - type ColumnTypes = ColumnTypes0 - - type Repr = ColsRepr - } - - type Empty = Empty.type - import ColumnCount._ - - case object Empty extends SourceSet[Any] { - override type Size = _0 - - override type ColumnTypes = Any - - override type Repr = Unit - - override type Append[Source1, Appended, ThatIdentity] = - SourceSet.Cons[Source1, Appended, SourceSet.Empty, ThatIdentity] - - override def +++[Source1 <: Any, Appended, ThatIdentity]( - that: Expr[Features.Source[ThatIdentity], Source1, Appended] - ): Append[Source1, Appended, ThatIdentity] = - SourceSet.Cons(that, SourceSet.Empty) - } - - sealed case class Cons[-Source, H, T <: SourceSet[Source], HeadIdentity]( - head: Expr[Features.Source[HeadIdentity], Source, H], - tail: T - ) extends SourceSet[Source] { self => - - override type Size = Succ[tail.Size] - - override type Repr = (H, tail.Repr) - - override type ColumnTypes = HeadIdentity with tail.ColumnTypes - - override type Append[Source1, Appended, ThatIdentity] = - SourceSet.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] - - override def +++[Source1 <: Source, Appended, ThatIdentity]( - that: Expr[Features.Source[ThatIdentity], Source1, Appended] - ): SourceSet.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = - SourceSet.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity]( - head, - tail.+++(that) - ) - } - } - - implicit def exprToSourceSet[Source, H: TypeTag, HeadIdentity]( - head: Expr[Features.Source[HeadIdentity], Source, H] - ): SourceSet.Cons[Source, H, SourceSet.Empty, HeadIdentity] = - SourceSet.Cons(head, SourceSet.Empty) - - sealed trait SchemaValidity[Z, ColsRepr] + //TODO should be moved to separate file ? + sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] object SchemaValidity { - implicit def caseClass1[A, Z, ColsRepr](implicit + + implicit def caseClass1[F, A, Z, ColsRepr, AllColumnIdentities, Identity1](implicit ccSchema: Schema.CaseClass1[A, Z], - ev: ColsRepr <:< (A, Unit) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A, Unit), + ev2: F <:< Features.Source[Identity1], + ev3: AllColumnIdentities <:< Identity1 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass2[A1, A2, Z, ColsRepr](implicit + implicit def caseClass2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2](implicit ccSchema: Schema.CaseClass2[A1, A2, Z], - ev: ColsRepr <:< (A1, (A2, Unit)) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, Unit)), + ev2: F <:< :||:[Features.Source[Identity1], Features.Source[Identity2]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass3[A1, A2, A3, Z, ColsRepr](implicit + implicit def caseClass3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3](implicit ccSchema: Schema.CaseClass3[A1, A2, A3, Z], - ev: ColsRepr <:< (A1, (A2, (A3, Unit))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, Unit))), + ev2: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass4[A1, A2, A3, A4, Z, ColsRepr](implicit + implicit def caseClass4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4](implicit ccSchema: Schema.CaseClass4[A1, A2, A3, A4, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass5[A1, A2, A3, A4, A5, Z, ColsRepr](implicit + implicit def caseClass5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5](implicit ccSchema: Schema.CaseClass5[A1, A2, A3, A4, A5, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass6[A1, A2, A3, A4, A5, A6, Z, ColsRepr](implicit + implicit def caseClass6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6](implicit ccSchema: Schema.CaseClass6[A1, A2, A3, A4, A5, A6, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass7[A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr](implicit + implicit def caseClass7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7](implicit ccSchema: Schema.CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr](implicit + implicit def caseClass8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8](implicit ccSchema: Schema.CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr](implicit + implicit def caseClass9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9](implicit ccSchema: Schema.CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr](implicit + implicit def caseClass10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10](implicit ccSchema: Schema.CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + - implicit def caseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr](implicit + implicit def caseClass11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11](implicit ccSchema: Schema.CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr](implicit + implicit def caseClass12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12](implicit ccSchema: Schema.CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr](implicit + implicit def caseClass13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13](implicit ccSchema: Schema.CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr](implicit + implicit def caseClass14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14](implicit ccSchema: Schema.CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr](implicit + implicit def caseClass15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15](implicit ccSchema: Schema.CaseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z], ev: ColsRepr <:< ( A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit)))))))))))))) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr]( + implicit def caseClass16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16]( implicit ccSchema: Schema.CaseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z], ev: ColsRepr <:< ( A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit))))))))))))))) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def caseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr]( + implicit def caseClass17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17]( implicit ccSchema: Schema.CaseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z], ev: ColsRepr <:< ( A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit)))))))))))))))) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def caseClass18[ + F, A1, A2, A3, @@ -253,7 +226,7 @@ trait InsertModule { self: ExprModule with TableModule => A17, A18, Z, - ColsRepr + ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18 ](implicit ccSchema: Schema.CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z], ev: ColsRepr <:< ( @@ -262,11 +235,14 @@ trait InsertModule { self: ExprModule with TableModule => A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))) ) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def caseClass19[ + F, A1, A2, A3, @@ -287,7 +263,7 @@ trait InsertModule { self: ExprModule with TableModule => A18, A19, Z, - ColsRepr + ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19 ](implicit ccSchema: Schema.CaseClass19[ A1, @@ -323,11 +299,14 @@ trait InsertModule { self: ExprModule with TableModule => ) ) ) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def caseClass20[ + F, A1, A2, A3, @@ -349,7 +328,7 @@ trait InsertModule { self: ExprModule with TableModule => A19, A20, Z, - ColsRepr + ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20 ](implicit ccSchema: Schema.CaseClass20[ A1, @@ -392,11 +371,14 @@ trait InsertModule { self: ExprModule with TableModule => ) ) ) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def caseClass21[ + F, A1, A2, A3, @@ -419,7 +401,7 @@ trait InsertModule { self: ExprModule with TableModule => A20, A21, Z, - ColsRepr + ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21 ](implicit ccSchema: Schema.CaseClass21[ A1, @@ -466,11 +448,14 @@ trait InsertModule { self: ExprModule with TableModule => ) ) ) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def caseClass22[ + F, A1, A2, A3, @@ -494,7 +479,7 @@ trait InsertModule { self: ExprModule with TableModule => A21, A22, Z, - ColsRepr + ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22 ](implicit ccSchema: Schema.CaseClass22[ A1, @@ -548,8 +533,10 @@ trait InsertModule { self: ExprModule with TableModule => ) ) ) - ) - ): SchemaValidity[Z, ColsRepr] = - new SchemaValidity[Z, ColsRepr] {} + ), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} } } diff --git a/core/jvm/src/main/scala/zio/sql/insertAlternative.scala b/core/jvm/src/main/scala/zio/sql/insertAlternative.scala index b37b602d8..e020b35d6 100644 --- a/core/jvm/src/main/scala/zio/sql/insertAlternative.scala +++ b/core/jvm/src/main/scala/zio/sql/insertAlternative.scala @@ -3,27 +3,22 @@ package zio.sql import scala.language.implicitConversions /** - * TODO - * 1. add to column type capability to contain null values - * 2. add auto generated capabilities (like identity for postgresql) - * 3. foreign key... - * 4. insert multiple rows at once - * 5. translate for other modules than just postgres - * 6. OPTIONAL we could compare table's "AllColumnIdentities" with Expr[Features.Source[Identity]] instead of comparing length and uniqness (decide what makes most sense with regards to other points) - * - * TODO research => there exists also complex inserts - values could be "subselect" that returns values .... - * Insert Into Test (Test_Date, Testno, Examno, Serialno, Type, Hours) - * Select S.Test_Date, E.Testno, S.Examno, S.Serialno, 'Non-Flight', (F.STARTED- F.ENDED) as Hours - * From Semester S, TIME F, TESTPAPERS e - * Where S.Testno = F.Testno And E.Testno = 1 - * * insert into customers * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) * values * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04')) + * + * insertInto(customers) + * .values( + * (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ + * (dob -> LocalDate.now()) ++ + * (fName -> "Jaro") ++ + * (lName -> "Regec") ++ + * (verified -> true) ++ + * (createdTimestamp -> ZonedDateTime.now())) */ -trait InsertAltModule { self: ExprModule with TableModule => +trait InsertAltModule { self: ExprModule with TableModule with SelectModule => sealed case class InsertAltBuilder[Source, N <: ColumnCount, AllColumnIdentities]( table: Table.Source.AuxN[Source, AllColumnIdentities, N] diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 637b48dd0..830e9dcc2 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -424,20 +424,24 @@ trait SelectModule { self: ExprModule with TableModule => */ sealed case class Selection[F, -A, +B <: SelectionSet[A]](value: B) { self => - type SelectionType + type ColsRepr = value.ResultTypeRepr + type Size = value.Size def ++[F2, A1 <: A, C <: SelectionSet[A1]]( that: Selection[F2, A1, C] ): Selection[F :||: F2, A1, self.value.Append[A1, C]] = Selection(self.value ++ that.value) - def columns[A1 <: A]: value.SelectionsRepr[A1, SelectionType] = value.selections[A1, SelectionType] } object Selection { import ColumnSelection._ import SelectionSet.{ Cons, Empty } + type Aux[F, -A, +B <: SelectionSet[A], ColsRepr0] = Selection[F, A, B]{ + type ColsRepr = ColsRepr0 + } + def constantOption[A: TypeTag](value: A, option: Option[ColumnName]): Selection[Any, Any, Cons[Any, A, Empty]] = Selection(Cons(Constant(value, option), Empty)) @@ -465,7 +469,6 @@ trait SelectModule { self: ExprModule with TableModule => } object ColumnSelection { - sealed case class Constant[ColumnType: TypeTag](value: ColumnType, name: Option[ColumnName]) extends ColumnSelection[Any, ColumnType] { def typeTag: TypeTag[ColumnType] = implicitly[TypeTag[ColumnType]] @@ -498,6 +501,8 @@ trait SelectModule { self: ExprModule with TableModule => type ColumnTail <: ColumnSet type SelectionTail <: SelectionSet[Source] type HeadIdentity + + type Size <: ColumnCount type CS <: ColumnSet def columnSet: CS @@ -510,7 +515,9 @@ trait SelectModule { self: ExprModule with TableModule => } object SelectionSet { - type Aux[ResultTypeRepr0, -Source] = + import ColumnCount._ + + type Aux[-Source, ResultTypeRepr0] = SelectionSet[Source] { type ResultTypeRepr = ResultTypeRepr0 } @@ -520,8 +527,6 @@ trait SelectModule { self: ExprModule with TableModule => type ResultTypeRepr = ResultTypeRepr0 } - type Singleton[-Source, A] = Cons[Source, A, Empty] - type Empty = Empty.type case object Empty extends SelectionSet[Any] { @@ -541,6 +546,8 @@ trait SelectModule { self: ExprModule with TableModule => override type Append[Source1, That <: SelectionSet[Source1]] = That + override type Size = _0 + override def ++[Source1 <: Any, That <: SelectionSet[Source1]](that: That): Append[Source1, That] = that @@ -570,6 +577,8 @@ trait SelectModule { self: ExprModule with TableModule => override type Append[Source1, That <: SelectionSet[Source1]] = Cons[Source1, A, tail.Append[Source1, That]] + override type Size = Succ[tail.Size] + override def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] = Cons[Source1, A, tail.Append[Source1, That]](head, tail ++ that) @@ -613,4 +622,27 @@ trait SelectModule { self: ExprModule with TableModule => def message = s"The ResultSet has been closed, so decoding is impossible" } } + + sealed trait ColumnCount { + + type Appended[That <: ColumnCount] <: ColumnCount + + def add[That <: ColumnCount](that: That): Appended[That] + } + object ColumnCount { + case object Zero extends ColumnCount { + override type Appended[That <: ColumnCount] = That + + override def add[That <: ColumnCount](that: That): Appended[That] = that + } + + sealed case class Succ[C <: ColumnCount](c: C) extends ColumnCount { + override type Appended[That <: ColumnCount] = Succ[c.Appended[That]] + + override def add[That <: ColumnCount](that: That): Appended[That] = Succ(c.add(that)) + } + + type _0 = Zero.type + val _0 = Zero + } } diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 122798c94..bcbaf54d8 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -71,6 +71,7 @@ trait TableModule { self: ExprModule with SelectModule => override type Size = Succ[tail.Size] + //TODO AllColumnIdentities could probably be removed, we need just HeadIdentity for Features.Source in inserts override type AllColumnIdentities = HeadIdentity with tail.AllColumnIdentities override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped @@ -333,27 +334,4 @@ trait TableModule { self: ExprModule with SelectModule => } type TableExtension[A] <: Table.TableEx[A] - - sealed trait ColumnCount { - - type Appended[That <: ColumnCount] <: ColumnCount - - def add[That <: ColumnCount](that: That): Appended[That] - } - object ColumnCount { - case object Zero extends ColumnCount { - override type Appended[That <: ColumnCount] = That - - override def add[That <: ColumnCount](that: That): Appended[That] = that - } - - sealed case class Succ[C <: ColumnCount](c: C) extends ColumnCount { - override type Appended[That <: ColumnCount] = Succ[c.Appended[That]] - - override def add[That <: ColumnCount](that: That): Appended[That] = Succ(c.add(that)) - } - - type _0 = Zero.type - val _0 = Zero - } } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index e7d208586..bed4553c1 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -250,7 +250,8 @@ trait PostgresModule extends Jdbc { self => object LateralTableExample { import self.ColumnSet._ - val xxxxx = uuid("well") //@@ notNull + // ColumnSetAspect + // val nullableUUID = uuid("id") @@ nullable val customers = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( @@ -282,10 +283,13 @@ trait PostgresModule extends Jdbc { self => // ============= INSERTS + // val persons5 = table[Person5]("persons5") + // val name5 :*: age5 :*: gender5 :*: birth5 :*: _ = persons5.columns + val persons1 = (string("name")).table("persons1") val persons2 = (string("name") ++ int("age")).table("persons2") val persons3 = (string("name") ++ int("age") ++ string("gender")).table("persons3") - val persons4 = (string("name") ++ int("age") ++ string("gender") ++ long("birth")).table("persons4") + val persons4 = (string("name") ++ int("age") ++ string("gender") ++ long("date_of_birth")).table("persons4") val name1 :*: _ = persons1.columns val name2 :*: age2 :*: _ = persons2.columns @@ -307,12 +311,15 @@ trait PostgresModule extends Jdbc { self => val personValues3: List[Person3] = ??? val personValues4: List[Person4] = ??? - insertInto(persons1)(name1).values(personValues1) - insertInto(persons2)(name2 +++ age2).values(personValues2) - insertInto(persons3)(name3 +++ age3 +++ gender3).values(personValues3) - insertInto(persons4)(name4 +++ age4 +++ gender4 +++ birth4).values(personValues4) + val xx = name2 ++ age2 - // ============== INSERTS ALT + + val ex = Expr.literal("Jaro") + + insertInto(persons1)(name1).values(personValues1) + insertInto(persons2)(name2 ++ age2) + insertInto(persons2)(name2 ++ age2).values(personValues2) + insertInto(persons3)(name3 ++ age3 ++ gender3).values(personValues3) def test[A, B](expr1: Expr[Features.Source[A], _, _], expr2: Expr[Features.Source[B], _, _])(implicit eq: A =:= B @@ -320,18 +327,16 @@ trait PostgresModule extends Jdbc { self => val _ = expr1 val _ = expr2 } - - val insertValues = (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ - (dob -> LocalDate.now()) ++ - (fName -> "Jaro") ++ - (lName -> "Regec") ++ - (verified -> true) ++ - (createdTimestamp -> ZonedDateTime.now()) - + insertAltInto(customers) - .values(insertValues) - - test(customerId, customerId) + .values( + (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ + (dob -> LocalDate.now()) ++ + (fName -> "Jaro") ++ + (lName -> "Regec") ++ + (verified -> true) ++ + (createdTimestamp -> ZonedDateTime.now()) + ) } } @@ -538,23 +543,15 @@ trait PostgresModule extends Jdbc { self => case _ => () } - def renderColumnNames(sources: SourceSet[_])(implicit render: Renderer): Unit = + def renderColumnNames(sources: SelectionSet[_])(implicit render: Renderer): Unit = sources match { - case SourceSet.Empty => () // table is a collection of at least ONE column - case SourceSet.Cons(expr, SourceSet.Empty) => - val columnName = expr match { - case Expr.Source(_, c) => c.name - case _ => None - } - val _ = columnName.map { name => + case SelectionSet.Empty => () // table is a collection of at least ONE column + case SelectionSet.Cons(columnSelection, SelectionSet.Empty) => + val _ = columnSelection.name.map { name => render(name) } - case SourceSet.Cons(expr, tail) => - val columnName = expr match { - case Expr.Source(_, c) => c.name - case _ => None - } - val _ = columnName.map { name => + case SelectionSet.Cons(columnSelection, tail) => + val _ = columnSelection.name.map { name => render(name) render(", ") renderColumnNames(tail)(render) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 28d12d111..d6ab31a4d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -387,6 +387,11 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { * (id, first_name, last_name, verifier, dob, created_timestamp_string, created_timestamp) * values * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') */ val dobValue = LocalDate.now() @@ -411,6 +416,82 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("insert - 2 rows into cutomers") { + + /** + * insert into customers + * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) + * values + * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), + * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04'), + */ + + final case class CustomerRow( + id: UUID, + firstName: String, + lastName: String, + verified: Boolean, + dateOfBirth: LocalDate, + cretedTimestampString: String, + createdTimestamp: ZonedDateTime + ) + + val created = ZonedDateTime.now() + import java.time._ + + implicit val customerRowSchema = // DeriveSchema.gen[CustomerRow] + Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( + Chunk.empty, + Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), + Schema.Field( + "localDate", + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) + ), + Schema.Field("cretedTimestampString", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field( + "createdTimestamp", + Schema.primitive[ZonedDateTime]( + zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME) + ) + ), + CustomerRow.apply, + _.id, + _.firstName, + _.lastName, + _.verified, + _.dateOfBirth, + _.cretedTimestampString, + _.createdTimestamp + ) + + val rows = List( + CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created), + CustomerRow( + UUID.randomUUID(), + "Martin", + "Mrkva", + false, + LocalDate.ofYearDay(1980, 1), + created.toString, + created + ) + ) + + val query = insertInto(customers)( + customerId ++ fName ++ lName ++ verified ++ dob ++ createdString ++ createdTimestamp + ).values(rows) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(2)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, testM("insert - insert 10 rows into orders") { /** @@ -454,7 +535,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()) ) - val query = insertInto(orders)(orderId +++ fkCustomerId +++ orderDate) + val query = insertInto(orders)(orderId ++ fkCustomerId ++ orderDate) .values(orderValues) val result = execute(query) @@ -510,7 +591,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { OrderDetailsRow(UUID.randomUUID(), UUID.randomUUID(), 2, BigDecimal.valueOf(10.50)) ) - val query = insertInto(orderDetails)(orderDetailsOrderId +++ orderDetailsProductId +++ quantity +++ unitPrice) + val query = insertInto(orderDetails)(orderDetailsOrderId ++ orderDetailsProductId ++ quantity ++ unitPrice) .values(rows) val result = execute(query) @@ -519,82 +600,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { r <- result } yield assert(r)(equalTo(4)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("insert - 2 rows into cutomers") { - - /** - * insert into customers - * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) - * values - * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), - * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04'), - */ - - final case class CustomerRow( - id: UUID, - firstName: String, - lastName: String, - verified: Boolean, - dateOfBirth: LocalDate, - cretedTimestampString: String, - createdTimestamp: ZonedDateTime - ) - - val created = ZonedDateTime.now() - import java.time._ - - implicit val customerRowSchema = - Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( - Chunk.empty, - Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), - Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), - Schema.Field( - "localDate", - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) - ), - Schema.Field("cretedTimestampString", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field( - "createdTimestamp", - Schema.primitive[ZonedDateTime]( - zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME) - ) - ), - CustomerRow.apply, - _.id, - _.firstName, - _.lastName, - _.verified, - _.dateOfBirth, - _.cretedTimestampString, - _.createdTimestamp - ) - - val rows = List( - CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created), - CustomerRow( - UUID.randomUUID(), - "Martin", - "Mrkva", - false, - LocalDate.ofYearDay(1980, 1), - created.toString, - created - ) - ) - - val query = insertInto(customers)( - customerId +++ fName +++ lName +++ verified +++ dob +++ createdString +++ createdTimestamp - ).values(rows) - - val result = execute(query) - - val assertion = for { - r <- result - } yield assert(r)(equalTo(2)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential From f982c6091cc67688c184b3da3ba04f908b6de2d5 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 12 Dec 2021 20:33:38 +0100 Subject: [PATCH 311/673] Added support for tuple1 to tuple22 inserts --- core/jvm/src/main/scala/zio/sql/Sql.scala | 1 + core/jvm/src/main/scala/zio/sql/insert.scala | 233 +++++++++++++++++- .../zio/sql/postgresql/PostgresModule.scala | 22 +- .../sql/postgresql/PostgresModuleSpec.scala | 60 +++++ 4 files changed, 297 insertions(+), 19 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index c6c8e2ba3..05ce00287 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -59,6 +59,7 @@ trait Sql table: Table.Source.AuxN[Source, AllColumnIdentities, N] )( sources: Selection.Aux[F, Source, B, ColsRepr] + //TODO verify if I really need to check Size )(implicit ev2: N =:= sources.Size) = InsertBuilder(table, sources) diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index a1705c54a..7b2800cd6 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -2,6 +2,8 @@ package zio.sql import zio.schema.Schema +import scala.annotation.implicitNotFound + /** * insert into * customers @@ -18,20 +20,22 @@ import zio.schema.Schema * values(customerValues) * * TODO - * 2. make columns null, not null aware - * 3. automatically generated columns (postgres idenitity) do not accept values by insert - * 4. make better error messages - * 5. try to generate DSL tables at compile type from sql file with compiler plugin - * 6. how to support tables with more than 22 columns ? - * 7. retrieve generated ID from inserted row - * 8. explore & add "on conflict do" stuff - * 9 do we want to keep supporting insertAltInto stuff? + * 1. make columns null, not null aware + * 2. automatically generated columns (postgres idenitity) do not accept values by insert + * 3. make better error messages ==> explore @implicitNotFound("") + * 4. try to generate DSL tables at compile type from sql file with compiler plugin + * 5. how to support tables with more than 22 columns ? - changes to zio-schema required + * 6. retrieve generated ID from inserted row + * 7. explore & add "on conflict do" stuff + * 8. do we want to keep supporting insertAltInto stuff? * * TODO - * 1. support for tuples by inserting - * 2. add possibility to select and insert source columns separated by comma - * 3. deal with trailing unit in tuples - * 4. rollout zio-schema for other APIs ( select, delete, update) + * 1. add possibility to select and insert source columns separated by comma + * 2. deal with trailing unit in tuples + * 3. rollout zio-schema for other APIs ( select, delete, update) + * 4. explore: + * val persons5 = table[Person5]("persons5") + * val name5 :*: age5 :*: gender5 :*: birth5 :*: _ = persons5.columns */ trait InsertModule { self: ExprModule with TableModule with SelectModule => @@ -52,10 +56,213 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) //TODO should be moved to separate file ? + @implicitNotFound("This insert would blow up at runtime!!!") sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] // format: off - object SchemaValidity { + object SchemaValidity extends SchemaValidityCaseClasses { + + implicit def tuple1[F, A1, Z, ColsRepr, AllColumnIdentities, Identity1](implicit + schema: Schema[Z], + ev1: Z =:= A1, + ev2: ColsRepr <:< (A1, Unit), + ev3: F <:< Features.Source[Identity1], + ev4: AllColumnIdentities <:< Identity1 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2](implicit + schema: Schema[Z], + ev1: Z =:= (A1, A2), + ev2: ColsRepr <:< (A1, (A2, Unit)), + ev3: F <:< Features.Union[Features.Source[Identity1], Features.Source[Identity2]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3](implicit + ccSchema: Schema[Z], + ev1: Z =:= (A1, A2, A3), + ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), + ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4](implicit + schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + + implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + + implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] + (implicit schema: Schema[Z], + ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], + ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + } + + trait SchemaValidityCaseClasses { implicit def caseClass1[F, A, Z, ColsRepr, AllColumnIdentities, Identity1](implicit ccSchema: Schema.CaseClass1[A, Z], diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index c162bad96..7c6c97045 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -311,15 +311,20 @@ trait PostgresModule extends Jdbc { self => val personValues3: List[Person3] = ??? val personValues4: List[Person4] = ??? - val xx = name2 ++ age2 - - val ex = Expr.literal("Jaro") - insertInto(persons1)(name1).values(personValues1) - insertInto(persons2)(name2 ++ age2) insertInto(persons2)(name2 ++ age2).values(personValues2) insertInto(persons3)(name3 ++ age3 ++ gender3).values(personValues3) + val personValues1Tuple: List[String] = ??? + val personValues2Tuple: List[(String, Int)] = ??? + + insertInto(persons1)(name1).values(personValues1Tuple) + insertInto(persons2)(name2 ++ age2).values(personValues2Tuple) + + + val personValues3Tuple: List[(String, Int, String)] = ??? + insertInto(persons3)(name3 ++ age3 ++ gender3).values(personValues3Tuple) + def test[A, B](expr1: Expr[Features.Source[A], _, _], expr2: Expr[Features.Source[B], _, _])(implicit eq: A =:= B ) = { @@ -475,7 +480,7 @@ trait PostgresModule extends Jdbc { self => renderDynamicValues(next) case Nil => () } - case _ => () + case value => renderDynamicValue(value) } def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = @@ -539,6 +544,11 @@ trait PostgresModule extends Jdbc { self => } //TODO do we need to handle also other cases? case DynamicValue.Transform(that) => renderDynamicValue(that) + case DynamicValue.Tuple(left, right) => { + renderDynamicValue(left) + render(", ") + renderDynamicValue(right) + } case _ => () } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index d6ab31a4d..53b85ccff 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -600,6 +600,66 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { r <- result } yield assert(r)(equalTo(4)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("insert into orderDetails with tuples") { + + /** + * insert into order_details + * (order_id, product_id, quantity, unit_price) + * values + * ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00)) + */ + + import OrderDetails._ + + val rows = List( + ((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00))) + ) + + val query = insertInto(orderDetails)(orderDetailsOrderId ++ orderDetailsProductId ++ quantity ++ unitPrice) + .values(rows) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(1)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + testM("insert into customers with tuples") { + + /** + * insert into customers + * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) + * values + * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), + */ + + val created = ZonedDateTime.now() + + val rows = List( + ((UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created)) + ) + + //TODO move these implicits to PostgresModule (+ others needed for postgres data types) + implicit val localDateSchema = + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) + + implicit val zonedDateTimeShema = + Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME)) + + val query = insertInto(customers)( + customerId ++ fName ++ lName ++ verified ++ dob ++ createdString ++ createdTimestamp + ).values(rows) + + val result = execute(query) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(1)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential From d527761a92557436c813a4af3babd5c00cc42ea9 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 13 Dec 2021 02:44:49 +0100 Subject: [PATCH 312/673] Update Scala to 2.12.15 --- .github/workflows/ci.yml | 2 +- project/BuildHelper.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1de28805e..d8db28462 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.14', '2.13.6'] + scala: ['2.12.15', '2.13.6'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 51c53dffa..d20ffc52e 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -9,8 +9,8 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val SilencerVersion = "1.7.5" - val Scala212 = "2.12.14" + val SilencerVersion = "1.7.7" + val Scala212 = "2.12.15" val Scala213 = "2.13.6" val ScalaDotty = "3.0.0-RC3" @@ -154,7 +154,7 @@ object BuildHelper { libraryDependencies ++= { if (scalaVersion.value == ScalaDotty) Seq( - "com.github.ghik" % s"silencer-lib_2.13.6" % "1.7.7" % Provided + "com.github.ghik" % s"silencer-lib_2.13.6" % SilencerVersion % Provided ) else Seq( From d4b9f35f4fff27b8a85c96f17b085e22f8cfcf89 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Mon, 13 Dec 2021 11:13:02 +0100 Subject: [PATCH 313/673] Update plugins.sbt --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 463622859..79327390d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.33") From cfe7fa7183ae261c57b5b093cc4f5a08cae4466c Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 11 Jan 2022 20:51:46 +0100 Subject: [PATCH 314/673] mostly test cleanup --- core/jvm/src/main/scala/zio/sql/Sql.scala | 23 +-- core/jvm/src/main/scala/zio/sql/insert.scala | 96 ++++------- .../scala/zio/sql/insertAlternative.scala | 107 ------------ core/jvm/src/main/scala/zio/sql/select.scala | 31 ---- core/jvm/src/main/scala/zio/sql/table.scala | 14 +- .../scala/zio/sql/GroupByHavingSpec.scala | 2 - .../test/scala/zio/sql/ProductSchema.scala | 2 - .../scala/zio/sql/TestBasicSelectSpec.scala | 9 +- examples/src/main/scala/Example1.scala | 2 - .../scala/zio/sql/SqlDriverLiveModule.scala | 19 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 7 - .../scala/zio/sql/mysql/MysqlModule.scala | 2 - .../scala/zio/sql/oracle/OracleModule.scala | 2 - .../zio/sql/postgresql/PostgresModule.scala | 163 +----------------- .../sql/postgresql/PostgresModuleSpec.scala | 135 ++++----------- .../scala/zio/sql/postgresql/ShopSchema.scala | 2 +- .../zio/sql/sqlserver/SqlServerModule.scala | 2 - 17 files changed, 84 insertions(+), 534 deletions(-) delete mode 100644 core/jvm/src/main/scala/zio/sql/insertAlternative.scala diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 05ce00287..84ec5f8c5 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -2,14 +2,7 @@ package zio.sql import zio.schema.Schema -trait Sql - extends SelectModule - with DeleteModule - with UpdateModule - with ExprModule - with TableModule - with InsertAltModule - with InsertModule { +trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertModule { self => /* @@ -48,19 +41,11 @@ trait Sql def renderUpdate(update: self.Update[_]): String - def insertAltInto[Source, N <: ColumnCount, AllColumnIdentities]( - table: Table.Source.AuxN[Source, AllColumnIdentities, N] - ): InsertAltBuilder[Source, N, AllColumnIdentities] = - InsertAltBuilder(table) - - def renderInsertAlt(insert: self.InsertAlt[_]): String - - def insertInto[F, Source, N <: ColumnCount, AllColumnIdentities, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( - table: Table.Source.AuxN[Source, AllColumnIdentities, N] + def insertInto[F, Source, AllColumnIdentities, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( + table: Table.Source.Aux_[Source, AllColumnIdentities] )( sources: Selection.Aux[F, Source, B, ColsRepr] - //TODO verify if I really need to check Size - )(implicit ev2: N =:= sources.Size) = + ) = InsertBuilder(table, sources) def renderInsert[A: Schema](insert: self.Insert[_, A]): String diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 7b2800cd6..0cf39241b 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -5,43 +5,18 @@ import zio.schema.Schema import scala.annotation.implicitNotFound /** - * insert into - * customers - * (id, first_name, last_name, verified, dob) - * values - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec, true' 1999-11-02) - * - * final case class Customer(id: UUID, fName: String, lName: Strng, verified: Boolean, dob: LocalDate) - * - * implicit val Customer = DeriveSchema.gen[Customer] - * val customerValues : List[Customer] = ??? + * val data = List( + * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Richard', 'Dent, true' 1999-11-02), + * .... + * ) * * insertInto(customers)(customerId +++ fName +++ lName +++ verified +++ dob) - * values(customerValues) - * - * TODO - * 1. make columns null, not null aware - * 2. automatically generated columns (postgres idenitity) do not accept values by insert - * 3. make better error messages ==> explore @implicitNotFound("") - * 4. try to generate DSL tables at compile type from sql file with compiler plugin - * 5. how to support tables with more than 22 columns ? - changes to zio-schema required - * 6. retrieve generated ID from inserted row - * 7. explore & add "on conflict do" stuff - * 8. do we want to keep supporting insertAltInto stuff? - * - * TODO - * 1. add possibility to select and insert source columns separated by comma - * 2. deal with trailing unit in tuples - * 3. rollout zio-schema for other APIs ( select, delete, update) - * 4. explore: - * val persons5 = table[Person5]("persons5") - * val name5 :*: age5 :*: gender5 :*: birth5 :*: _ = persons5.columns + * .values(data) */ - trait InsertModule { self: ExprModule with TableModule with SelectModule => - sealed case class InsertBuilder[F, Source, AllColumnIdentities, N, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( - table: Table.Source.AuxN[Source, AllColumnIdentities, N], + sealed case class InsertBuilder[F, Source, AllColumnIdentities, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( + table: Table.Source.Aux_[Source, AllColumnIdentities], sources: Selection.Aux[F, Source, B, ColsRepr] ) { @@ -49,21 +24,24 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => schemaCC: Schema[Z], schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] ): Insert[Source, Z] = Insert(table, sources.value, values) + + def values[Z](value: Z)(implicit + schemaCC: Schema[Z], + schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] + ): Insert[Source, Z] = Insert(table, sources.value, Seq(value)) } - sealed case class Insert[A, N](table: Table.Source.Aux[A], sources: SelectionSet[A], values: Seq[N])(implicit - schemaN: Schema[N] + sealed case class Insert[A, Z](table: Table.Source.Aux[A], sources: SelectionSet[A], values: Seq[Z])(implicit + schemaN: Schema[Z] ) - //TODO should be moved to separate file ? + //TODO find a way for more meaningful error messages @implicitNotFound("This insert would blow up at runtime!!!") sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] // format: off object SchemaValidity extends SchemaValidityCaseClasses { - - implicit def tuple1[F, A1, Z, ColsRepr, AllColumnIdentities, Identity1](implicit - schema: Schema[Z], + implicit def tuple1[F, A1, Z, ColsRepr, AllColumnIdentities, Identity1](implicit ev1: Z =:= A1, ev2: ColsRepr <:< (A1, Unit), ev3: F <:< Features.Source[Identity1], @@ -72,7 +50,6 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2](implicit - schema: Schema[Z], ev1: Z =:= (A1, A2), ev2: ColsRepr <:< (A1, (A2, Unit)), ev3: F <:< Features.Union[Features.Source[Identity1], Features.Source[Identity2]], @@ -81,7 +58,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3](implicit - ccSchema: Schema[Z], + ev1: Z =:= (A1, A2, A3), ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], @@ -90,7 +67,6 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4](implicit - schema: Schema[Z], ev1: Z =:= (A1, A2, A3, A4), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], @@ -99,7 +75,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], @@ -108,7 +84,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], @@ -117,7 +93,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], @@ -126,17 +102,16 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], @@ -145,7 +120,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], @@ -154,7 +129,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], @@ -163,7 +138,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], @@ -172,7 +147,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], @@ -181,7 +156,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], @@ -190,7 +165,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], @@ -199,7 +174,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], @@ -208,7 +183,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], @@ -217,7 +192,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], @@ -226,7 +201,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], @@ -235,7 +210,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], @@ -244,7 +219,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], @@ -253,7 +228,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] - (implicit schema: Schema[Z], + (implicit ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], @@ -262,6 +237,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} } + trait SchemaValidityCaseClasses { implicit def caseClass1[F, A, Z, ColsRepr, AllColumnIdentities, Identity1](implicit diff --git a/core/jvm/src/main/scala/zio/sql/insertAlternative.scala b/core/jvm/src/main/scala/zio/sql/insertAlternative.scala deleted file mode 100644 index e020b35d6..000000000 --- a/core/jvm/src/main/scala/zio/sql/insertAlternative.scala +++ /dev/null @@ -1,107 +0,0 @@ -package zio.sql - -import scala.language.implicitConversions - -/** - * insert into customers - * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) - * values - * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), - * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04')) - * - * insertInto(customers) - * .values( - * (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ - * (dob -> LocalDate.now()) ++ - * (fName -> "Jaro") ++ - * (lName -> "Regec") ++ - * (verified -> true) ++ - * (createdTimestamp -> ZonedDateTime.now())) - */ -trait InsertAltModule { self: ExprModule with TableModule with SelectModule => - - sealed case class InsertAltBuilder[Source, N <: ColumnCount, AllColumnIdentities]( - table: Table.Source.AuxN[Source, AllColumnIdentities, N] - ) { - def values(values: InsertRow[Source])(implicit ev: values.Size =:= N): InsertAlt[Source] = InsertAlt(table, values) - } - - sealed trait InsertRow[-Source] { self => - - type Append[Source1, Appended, ThatIdentity] <: InsertRow[Source1] - - type Size <: ColumnCount - - def ++[Source1 <: Source, Appended, ThatIdentity]( - that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) - )(implicit unique: Unique[ThatIdentity, self.type], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] - } - - object InsertRow { - type Empty = Empty.type - import ColumnCount._ - - case object Empty extends InsertRow[Any] { - override type Size = _0 - override type Append[Source1, Appended, ThatIdentity] = - InsertRow.Cons[Source1, Appended, InsertRow.Empty, ThatIdentity] - - override def ++[Source1 <: Any, Appended, ThatIdentity]( - that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) - )(implicit unique: Unique[ThatIdentity, Empty], ev: TypeTag[Appended]): Append[Source1, Appended, ThatIdentity] = - InsertRow.Cons(that, InsertRow.Empty) - } - - sealed case class Cons[-Source, H: TypeTag, T <: InsertRow[Source], HeadIdentity]( - tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H), - tail: T - ) extends InsertRow[Source] { self => - - override type Size = Succ[tail.Size] - - override type Append[Source1, Appended, ThatIdentity] = - InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] - - override def ++[Source1 <: Source, Appended, ThatIdentity]( - that: (Expr[Features.Source[ThatIdentity], Source1, Appended], Appended) - )(implicit - unique: Unique[ThatIdentity, self.type], - ev: TypeTag[Appended] - ): InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity] = - InsertRow.Cons[Source1, H, tail.Append[Source1, Appended, ThatIdentity], HeadIdentity]( - tupleHead, - tail.++(that)(new Unique[ThatIdentity, T] {}, implicitly[TypeTag[Appended]]) - ) - } - } - - implicit def tupleToInsertSet[Source, H: TypeTag, HeadIdentity]( - tupleHead: (Expr[Features.Source[HeadIdentity], Source, H], H) - ): InsertRow.Cons[Source, H, InsertRow.Empty, HeadIdentity] = - InsertRow.Cons(tupleHead, InsertRow.Empty) - - sealed case class InsertAlt[A](table: Table.Source.Aux[A], values: InsertRow[A]) - - sealed trait Unique[A, -Origin <: InsertRow[_]] - - object Unique { - implicit def uniqueInEmpty[A]: Unique[A, InsertRow.Empty] = - new Unique[A, InsertRow.Empty] {} - - implicit def uniqueInCons[A, H, T <: InsertRow[_]](implicit - tailNotContain: Unique[H, T], - ev: A =!= H - ): Unique[A, InsertRow.Cons[_, _, T, H]] = - new Unique[A, InsertRow.Cons[_, _, T, H]] {} - } - - sealed trait =!=[A, B] - - object =!= { - implicit def neq[A, B]: A =!= B = null - - // This pair excludes the A =:= B case - implicit def neqAmbig1[A]: A =!= A = null - implicit def neqAmbig2[A]: A =!= A = null - } -} diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index d79251850..e0d0ed475 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -429,7 +429,6 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class Selection[F, -A, +B <: SelectionSet[A]](value: B) { self => type ColsRepr = value.ResultTypeRepr - type Size = value.Size def ++[F2, A1 <: A, C <: SelectionSet[A1]]( that: Selection[F2, A1, C] @@ -506,8 +505,6 @@ trait SelectModule { self: ExprModule with TableModule => type SelectionTail <: SelectionSet[Source] type HeadIdentity - type Size <: ColumnCount - type CS <: ColumnSet def columnSet: CS @@ -519,7 +516,6 @@ trait SelectModule { self: ExprModule with TableModule => } object SelectionSet { - import ColumnCount._ type Aux[-Source, ResultTypeRepr0] = SelectionSet[Source] { @@ -550,8 +546,6 @@ trait SelectModule { self: ExprModule with TableModule => override type Append[Source1, That <: SelectionSet[Source1]] = That - override type Size = _0 - override def ++[Source1 <: Any, That <: SelectionSet[Source1]](that: That): Append[Source1, That] = that @@ -581,8 +575,6 @@ trait SelectModule { self: ExprModule with TableModule => override type Append[Source1, That <: SelectionSet[Source1]] = Cons[Source1, A, tail.Append[Source1, That]] - override type Size = Succ[tail.Size] - override def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] = Cons[Source1, A, tail.Append[Source1, That]](head, tail ++ that) @@ -626,27 +618,4 @@ trait SelectModule { self: ExprModule with TableModule => def message = s"The ResultSet has been closed, so decoding is impossible" } } - - sealed trait ColumnCount { - - type Appended[That <: ColumnCount] <: ColumnCount - - def add[That <: ColumnCount](that: That): Appended[That] - } - object ColumnCount { - case object Zero extends ColumnCount { - override type Appended[That <: ColumnCount] = That - - override def add[That <: ColumnCount](that: That): Appended[That] = that - } - - sealed case class Succ[C <: ColumnCount](c: C) extends ColumnCount { - override type Appended[That <: ColumnCount] = Succ[c.Appended[That]] - - override def add[That <: ColumnCount](that: That): Appended[That] = Succ(c.add(that)) - } - - type _0 = Zero.type - val _0 = Zero - } } diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 22c5a0487..c4c34f022 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -14,8 +14,6 @@ trait TableModule { self: ExprModule with SelectModule => sealed trait ColumnSet { type ColumnsRepr[T] type Append[That <: ColumnSet] <: ColumnSet - type Size <: ColumnCount - type AllColumnIdentities def ++[That <: ColumnSet](that: That): Append[That] @@ -33,7 +31,6 @@ trait TableModule { self: ExprModule with SelectModule => type Empty = Empty.type type :*:[A, B <: ColumnSet, HeadIdentity] = Cons[A, B, HeadIdentity] type Singleton[A, ColumnIdentity] = Cons[A, Empty, ColumnIdentity] - import ColumnCount._ type ConsAux[A, B <: ColumnSet, ColumnsRepr0[_], HeadIdentity] = ColumnSet.Cons[A, B, HeadIdentity] { type ColumnsRepr[C] = ColumnsRepr0[C] @@ -47,8 +44,6 @@ trait TableModule { self: ExprModule with SelectModule => override type ColumnsRepr[T] = Unit override type Append[That <: ColumnSet] = That - override type Size = _0 - override type AllColumnIdentities = Any override def ++[That <: ColumnSet](that: That): Append[That] = that @@ -69,9 +64,6 @@ trait TableModule { self: ExprModule with SelectModule => override def ++[That <: ColumnSet](that: That): Append[That] = Cons(head, tail ++ that) - override type Size = Succ[tail.Size] - - //TODO AllColumnIdentities could probably be removed, we need just HeadIdentity for Features.Source in inserts override type AllColumnIdentities = HeadIdentity with tail.AllColumnIdentities override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped @@ -85,8 +77,6 @@ trait TableModule { self: ExprModule with SelectModule => override type AllColumnIdentities = HeadIdentity with tail.AllColumnIdentities - override type Size = columnSet.Size - override val name: TableName = name0 override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr, HeadIdentity] = self @@ -192,7 +182,6 @@ trait TableModule { self: ExprModule with SelectModule => type ColumnHead type ColumnTail <: ColumnSet - type Size = columnSet.Size final def fullOuter[That](that: Table.Aux[That]): Table.JoinBuilder[self.TableType, That] = new Table.JoinBuilder[self.TableType, That](JoinType.FullOuter, self, that) @@ -257,11 +246,10 @@ trait TableModule { self: ExprModule with SelectModule => type TableType = A } - type AuxN[A, AllColumnIdentities0, Size0] = Table.Source { + type Aux_[A, AllColumnIdentities0] = Table.Source { type TableType = A type AllColumnIdentities = AllColumnIdentities0 - type Size = Size0 } } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index ae447f736..42161483b 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -21,8 +21,6 @@ object AggregatedProductSchema { override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? } import sqldsl.ColumnSet._ diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index d4531b009..8dd1496c6 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -8,8 +8,6 @@ object ProductSchema { override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? } import sql.ColumnSet._ diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 9d71ec462..2815bc2ab 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -8,12 +8,9 @@ object TestBasicSelect { val userSql = new Sql { self => import self.ColumnSet._ - override def renderDelete(delete: self.Delete[_]): String = ??? - override def renderRead(read: self.Read[_]): String = ??? - override def renderUpdate(update: self.Update[_]): String = ??? - - override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? - + override def renderDelete(delete: self.Delete[_]): String = ??? + override def renderRead(read: self.Read[_]): String = ??? + override def renderUpdate(update: self.Update[_]): String = ??? override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? val userTable = diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index ec3a987df..d8fdebdaa 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -8,8 +8,6 @@ object Example1 extends Sql { def renderDelete(delete: this.Delete[_]): String = ??? - override def renderInsertAlt(insert: InsertAlt[_]): String = ??? - override def renderInsert[A: Schema](insert: Insert[_, A]): String = ??? def renderUpdate(update: Example1.Update[_]): String = ??? diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 153bffd46..f992ccb8b 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -9,14 +9,14 @@ import zio.schema.Schema trait SqlDriverLiveModule { self: Jdbc => private[sql] trait SqlDriverCore { - //TODO - // add inserts for transaction module def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] + + def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] } sealed case class SqlDriverLive(blocking: Blocking.Service, pool: ConnectionPool) @@ -86,10 +86,7 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] } - override def insertAlt(insert: InsertAlt[_]): IO[Exception, Int] = - pool.connection.use(insertOnAlt(insert, _)) - - def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] = + override def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] = blocking.effectBlocking { val query = renderInsert(insert) @@ -102,16 +99,6 @@ trait SqlDriverLiveModule { self: Jdbc => override def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] = pool.connection.use(insertOn(insert, _)) - def insertOnAlt(insert: InsertAlt[_], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { - - val query = renderInsertAlt(insert) - - val statement = conn.createStatement() - - statement.executeUpdate(query) - }.refineToOrDie[Exception] - override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = for { connection <- pool.connection diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index fe849231d..40d2203b4 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -15,8 +15,6 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] - def insertAlt(insert: InsertAlt[_]): IO[Exception, Int] - def insert[A: zio.schema.Schema](insert: Insert[_, A]): IO[Exception, Int] } object SqlDriver { @@ -38,11 +36,6 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi _.get.delete(delete) ) - def execute(insert: InsertAlt[_]): ZIO[Has[SqlDriver], Exception, Int] = - ZIO.accessM[Has[SqlDriver]]( - _.get.insertAlt(insert) - ) - def execute[A: Schema](insert: Insert[_, A]): ZIO[Has[SqlDriver], Exception, Int] = ZIO.accessM[Has[SqlDriver]]( _.get.insert(insert) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 4535260dc..eb342be5d 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -43,8 +43,6 @@ trait MysqlModule extends Jdbc { self => render.toString } - override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? override def renderDelete(delete: self.Delete[_]): String = { diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 93db513c5..9af0ff15f 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -301,8 +301,6 @@ trait OracleModule extends Jdbc { self => override def renderDelete(delete: self.Delete[_]): String = ??? - override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 7c6c97045..a10b0cd73 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -246,103 +246,13 @@ trait PostgresModule extends Jdbc { self => zdt.getZone.getId ) } + } - object LateralTableExample { - import self.ColumnSet._ - - // ColumnSetAspect - // val nullableUUID = uuid("id") @@ nullable - - val customers = - (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( - "verified" - ) ++ zonedDateTime("created_timestamp")) - .table("customers") - - val customerId :*: dob :*: fName :*: lName :*: verified :*: createdTimestamp :*: _ = - customers.columns - - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns - - val products = - (uuid("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - val productId :*: description :*: imageURL :*: _ = products.columns - - val productPrices = - (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - val fkProductId :*: effective :*: price :*: _ = productPrices.columns - - val orderDetails = - (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")) - .table( - "order_details" - ) - val fkOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns - - // ============= INSERTS - - // val persons5 = table[Person5]("persons5") - // val name5 :*: age5 :*: gender5 :*: birth5 :*: _ = persons5.columns - - val persons1 = (string("name")).table("persons1") - val persons2 = (string("name") ++ int("age")).table("persons2") - val persons3 = (string("name") ++ int("age") ++ string("gender")).table("persons3") - val persons4 = (string("name") ++ int("age") ++ string("gender") ++ long("date_of_birth")).table("persons4") - - val name1 :*: _ = persons1.columns - val name2 :*: age2 :*: _ = persons2.columns - val name3 :*: age3 :*: gender3 :*: _ = persons3.columns - val name4 :*: age4 :*: gender4 :*: birth4 :*: _ = persons4.columns - - case class Person1(name: String) - case class Person2(name: String, age: Int) - case class Person3(name: String, age: Int, gender: String) - case class Person4(name: String, age: Int, gender: String, dateOfBirth: Long) - - implicit val personSchema1 = DeriveSchema.gen[Person1] - implicit val personSchema2 = DeriveSchema.gen[Person2] - implicit val personSchema3 = DeriveSchema.gen[Person3] - implicit val personSchema4 = DeriveSchema.gen[Person4] - - val personValues1: List[Person1] = ??? - val personValues2: List[Person2] = ??? - val personValues3: List[Person3] = ??? - val personValues4: List[Person4] = ??? - - insertInto(persons1)(name1).values(personValues1) - insertInto(persons2)(name2 ++ age2).values(personValues2) - insertInto(persons3)(name3 ++ age3 ++ gender3).values(personValues3) - - val personValues1Tuple: List[String] = ??? - val personValues2Tuple: List[(String, Int)] = ??? - - insertInto(persons1)(name1).values(personValues1Tuple) - insertInto(persons2)(name2 ++ age2).values(personValues2Tuple) - - - val personValues3Tuple: List[(String, Int, String)] = ??? - insertInto(persons3)(name3 ++ age3 ++ gender3).values(personValues3Tuple) + implicit val localDateSchema = + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) - def test[A, B](expr1: Expr[Features.Source[A], _, _], expr2: Expr[Features.Source[B], _, _])(implicit - eq: A =:= B - ) = { - val _ = expr1 - val _ = expr2 - } - - insertAltInto(customers) - .values( - (customerId -> java.util.UUID.fromString("28e880be-c783-43ea-9839-db51834347a8")) ++ - (dob -> LocalDate.now()) ++ - (fName -> "Jaro") ++ - (lName -> "Regec") ++ - (verified -> true) ++ - (createdTimestamp -> ZonedDateTime.now()) - ) - } - } + implicit val zonedDateTimeShema = + Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME)) object PostgresFunctionDef { import PostgresSpecific._ @@ -422,12 +332,6 @@ trait PostgresModule extends Jdbc { self => render.toString } - override def renderInsertAlt(insert: self.InsertAlt[_]): String = { - implicit val render: Renderer = Renderer() - PostgresRenderModule.renderInsertAltImpl(insert) - render.toString - } - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = { implicit val render: Renderer = Renderer() PostgresRenderModule.renderInsertImpl(insert) @@ -480,7 +384,7 @@ trait PostgresModule extends Jdbc { self => renderDynamicValues(next) case Nil => () } - case value => renderDynamicValue(value) + case value => renderDynamicValue(value) } def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = @@ -544,11 +448,10 @@ trait PostgresModule extends Jdbc { self => } //TODO do we need to handle also other cases? case DynamicValue.Transform(that) => renderDynamicValue(that) - case DynamicValue.Tuple(left, right) => { + case DynamicValue.Tuple(left, right) => renderDynamicValue(left) render(", ") renderDynamicValue(right) - } case _ => () } @@ -567,33 +470,6 @@ trait PostgresModule extends Jdbc { self => } } - def renderInsertAltImpl(insert: InsertAlt[_])(implicit render: Renderer) = { - render("INSERT INTO ") - renderTable(insert.table) - - render(" (") - renderColumnNamesAlt(insert.values) - render(") VALUES (") - - renderInsertAltValues(insert.values) - render(" )") - } - - def renderInsertAltValues(values: InsertRow[_])(implicit render: Renderer): Unit = - values match { - case InsertRow.Empty => () - case InsertRow.Cons(tupleHead, InsertRow.Empty) => - val typeTag = Expr.typeTagOf(tupleHead._1) - val value = tupleHead._2 - renderValue(typeTag, value) - case InsertRow.Cons(tupleHead, tail) => - val typeTag = Expr.typeTagOf(tupleHead._1) - val value = tupleHead._2 - renderValue(typeTag, value) - render(", ") - renderInsertAltValues(tail)(render) - } - /** * TODO * @@ -625,31 +501,6 @@ trait PostgresModule extends Jdbc { self => case Nullable() => render("null") } - def renderColumnNamesAlt(values: InsertRow[_])(implicit render: Renderer): Unit = - values match { - case InsertRow.Empty => () // table is a collection of at least ONE column - case InsertRow.Cons(tupleHead, InsertRow.Empty) => - val expr = tupleHead._1 - val columnName = expr match { - case Expr.Source(_, c) => c.name - case _ => None - } - val _ = columnName.map { name => - render(name) - } - case InsertRow.Cons(tupleHead, tail) => - val expr = tupleHead._1 - val columnName = expr match { - case Expr.Source(_, c) => c.name - case _ => None - } - val _ = columnName.map { name => - render(name) - render(", ") - renderColumnNamesAlt(tail)(render) - } - } - def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") renderTable(delete.table) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 53b85ccff..47e7a8ec1 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -379,51 +379,13 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("simple insert - inserted 1 row") { - - /** - * insert into - * customers - * (id, first_name, last_name, verifier, dob, created_timestamp_string, created_timestamp) - * values - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Jaro', 'Regec', true, 1999-11-02, 2020-11-21T19:10:25+00:00, '2020-11-21 19:10:25+00') - */ - - val dobValue = LocalDate.now() - val created = ZonedDateTime.now() - - val query = insertAltInto(customers) - .values( - (customerId -> java.util.UUID.fromString("0511474d-8eed-4307-bdb0-e39a561205b6")) ++ - (fName -> "Jaro") ++ - (lName -> "Regec") ++ - (verified -> false) ++ - (dob -> dobValue) ++ - (createdString -> created.toString) ++ - (createdTimestamp -> created) - ) - - val result = execute(query) - - val assertion = for { - r <- result - } yield assert(r)(equalTo(1)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - testM("insert - 2 rows into cutomers") { + testM("insert - 1 rows into customers") { /** * insert into customers * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) * values - * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), - * ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04'), + * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00')) */ final case class CustomerRow( @@ -439,7 +401,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val created = ZonedDateTime.now() import java.time._ - implicit val customerRowSchema = // DeriveSchema.gen[CustomerRow] + implicit val customerRowSchema = Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( Chunk.empty, Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), @@ -467,30 +429,14 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { _.createdTimestamp ) - val rows = List( - CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created), - CustomerRow( - UUID.randomUUID(), - "Martin", - "Mrkva", - false, - LocalDate.ofYearDay(1980, 1), - created.toString, - created - ) - ) + val data = + CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created) val query = insertInto(customers)( customerId ++ fName ++ lName ++ verified ++ dob ++ createdString ++ createdTimestamp - ).values(rows) + ).values(data) - val result = execute(query) - - val assertion = for { - r <- result - } yield assert(r)(equalTo(2)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertM(execute(query))(equalTo(1)) }, testM("insert - insert 10 rows into orders") { @@ -507,7 +453,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { final case class InputOrders(uuid: UUID, customerId: UUID, localDate: LocalDate) - //TODO why does DeriveSchema.gen[T] does not work? implicit val inputOrdersSchema = Schema.CaseClass3[UUID, UUID, LocalDate, InputOrders]( Chunk.empty, Schema.Field("uuid", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), @@ -522,7 +467,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { _.localDate ) - val orderValues = List( + val data = List( InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()), @@ -536,15 +481,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) val query = insertInto(orders)(orderId ++ fkCustomerId ++ orderDate) - .values(orderValues) - - val result = execute(query) - - val assertion = for { - r <- result - } yield assert(r)(equalTo(10)) + .values(data) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertM(execute(query))(equalTo(10)) }, testM("insert - 4 rows into orderDetails") { @@ -562,7 +501,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { case class OrderDetailsRow(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - //TODO we need schema for scala.math.BigDecimal + //TODO we need schema for scala.math.BigDecimal. Probably directly in zio-schema ? implicit val bigDecimalSchema: Schema[BigDecimal] = Schema.Transform( Schema.primitive[java.math.BigDecimal](zio.schema.StandardType.BigDecimalType), @@ -594,13 +533,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = insertInto(orderDetails)(orderDetailsOrderId ++ orderDetailsProductId ++ quantity ++ unitPrice) .values(rows) - val result = execute(query) - - val assertion = for { - r <- result - } yield assert(r)(equalTo(4)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertM(execute(query))(equalTo(4)) }, testM("insert into orderDetails with tuples") { @@ -613,20 +546,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { import OrderDetails._ - val rows = List( - ((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00))) - ) - val query = insertInto(orderDetails)(orderDetailsOrderId ++ orderDetailsProductId ++ quantity ++ unitPrice) - .values(rows) - - val result = execute(query) - - val assertion = for { - r <- result - } yield assert(r)(equalTo(1)) + .values(((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00)))) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertM(execute(query))(equalTo(1)) }, testM("insert into customers with tuples") { @@ -639,28 +562,28 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val created = ZonedDateTime.now() - val rows = List( + val row = ((UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created)) - ) - - //TODO move these implicits to PostgresModule (+ others needed for postgres data types) - implicit val localDateSchema = - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) - - implicit val zonedDateTimeShema = - Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME)) val query = insertInto(customers)( customerId ++ fName ++ lName ++ verified ++ dob ++ createdString ++ createdTimestamp - ).values(rows) + ).values(row) - val result = execute(query) + assertM(execute(query))(equalTo(1)) + }, + testM("insert into products") { + import Products._ + + val tupleData = List( + (UUID.randomUUID(), "product 1", "product desription", "image url"), + (UUID.randomUUID(), "product 2", "product desription", "image url"), + (UUID.randomUUID(), "product 3", "product desription", "image url"), + (UUID.randomUUID(), "product 4", "product desription", "image url") + ) - val assertion = for { - r <- result - } yield assert(r)(equalTo(1)) + val query = insertInto(products)(productId ++ productName ++ description ++ imageURL).values(tupleData) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertM(execute(query))(equalTo(4)) } ) @@ sequential } diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index 6c0124e35..7cc37e5e8 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -25,7 +25,7 @@ trait ShopSchema extends Jdbc { self => val products = (uuid("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - val productId :*: description :*: imageURL :*: _ = products.columns + val productId :*: productName :*: description :*: imageURL :*: _ = products.columns } object ProductPrices { val productPrices = diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index a5e156126..0374e36fa 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -90,8 +90,6 @@ trait SqlServerModule extends Jdbc { self => override def renderUpdate(update: self.Update[_]): String = ??? - override def renderInsertAlt(insert: self.InsertAlt[_]): String = ??? - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? override def renderRead(read: self.Read[_]): String = { From 3a588283e96ca24f48ff712dda5aa280f1f52d25 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 11 Jan 2022 21:01:45 +0100 Subject: [PATCH 315/673] made zio schema provided dependency --- build.sbt | 45 ++++++++++++------- core/jvm/src/main/scala/zio/sql/table.scala | 10 +---- .../zio/sql/postgresql/PostgresModule.scala | 34 +------------- 3 files changed, 32 insertions(+), 57 deletions(-) diff --git a/build.sbt b/build.sbt index c3f6b8d16..b31833598 100644 --- a/build.sbt +++ b/build.sbt @@ -25,6 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "1.0.7" +val zioSchemaVersion = "0.1.4" val testcontainersVersion = "1.16.0" val testcontainersScalaVersion = "0.39.5" @@ -78,12 +79,12 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .settings(buildInfoSettings("zio.sql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % "0.1.4", - "dev.zio" %% "zio-schema-derivation" % "0.1.4", - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -115,8 +116,10 @@ lazy val examples = project publish / skip := true, moduleName := "examples", libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided ) ) .settings(dottySettings) @@ -128,9 +131,11 @@ lazy val driver = project .settings(buildInfoSettings("zio.sql.driver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -142,10 +147,12 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion % Provided, + "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -161,6 +168,8 @@ lazy val mysql = project libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion % Provided, "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, @@ -181,6 +190,8 @@ lazy val oracle = project libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion % Provided, "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, @@ -201,6 +212,8 @@ lazy val postgres = project libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion % Provided, "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, @@ -221,6 +234,8 @@ lazy val sqlserver = project libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion % Provided, "dev.zio" %% "zio-streams" % zioVersion % Provided, + "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index c4c34f022..30322cdcc 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -120,13 +120,6 @@ trait TableModule { self: ExprModule with SelectModule => def unapply[A, B](tuple: (A, B)): Some[(A, B)] = Some(tuple) } - sealed trait ColumnProperty - object ColumnProperty { - case object Nullable extends ColumnProperty - case object NotNull extends ColumnProperty - case object Generated extends ColumnProperty - } - sealed trait Column[+A] { type Identity def typeTag: TypeTag[A] @@ -247,8 +240,7 @@ trait TableModule { self: ExprModule with SelectModule => } type Aux_[A, AllColumnIdentities0] = Table.Source { - type TableType = A - + type TableType = A type AllColumnIdentities = AllColumnIdentities0 } } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index a10b0cd73..b43e715de 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -423,7 +423,6 @@ trait PostgresModule extends Jdbc { self => case StandardType.OffsetDateTime(formatter) => render(s"'${formatter.format(value.asInstanceOf[OffsetDateTime])}'") case StandardType.ZonedDateTime(formatter) => - //render(s"'${formatter.format(value.asInstanceOf[ZonedDateTime])}'") render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") case BigIntegerType => render(s"'${value}'") case UUIDType => render(s"'${value}'") @@ -446,7 +445,7 @@ trait PostgresModule extends Jdbc { self => } case None => () } - //TODO do we need to handle also other cases? + //TODO what about other cases? case DynamicValue.Transform(that) => renderDynamicValue(that) case DynamicValue.Tuple(left, right) => renderDynamicValue(left) @@ -470,37 +469,6 @@ trait PostgresModule extends Jdbc { self => } } - /** - * TODO - * - * Every values is written differently - based on Expr typeTag - */ - def renderValue[A](typeTage: TypeTag[A], value: A)(implicit render: Renderer): Unit = - typeTage match { - case TBigDecimal => render(value.toString) - case TBoolean => render(value.toString) - case TByte => render(value.toString) - case TByteArray => render(value.toString) - case TChar => render(value.toString) - case TDouble => render(value.toString) - case TFloat => render(value.toString) - case TInstant => render(value.toString) - case TInt => render(value.toString) - case TLocalDate => render(s"'${value.toString}'") - case TLocalDateTime => render(value.toString) - case TLocalTime => render(s"'${value.toString}'") - case TLong => render(value.toString) - case TOffsetDateTime => render(value.toString) - case TOffsetTime => render(value.toString) - case TShort => render(value.toString) - case TString => render(s"'${value.toString}'") - case TUUID => render(s"'${value.toString}'") - case TZonedDateTime => - render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") - case TDialectSpecific(typeTagExtension) => render(value.toString) - case Nullable() => render("null") - } - def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") renderTable(delete.table) From c51a67ee0afc294cb1abccc682ea76d418f218db Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 Jan 2022 06:13:58 +0100 Subject: [PATCH 316/673] Update sbt-scalafix to 0.9.34 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 79327390d..3099047c6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,5 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.33") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") From d7f49990b50265feef93bd2c22707b3ee0fd6d6d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 Jan 2022 06:14:06 +0100 Subject: [PATCH 317/673] Update sbt-scoverage to 1.9.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 79327390d..f0a7ea4bd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 52c8c05248f7bb600aae27824768ec7013884f31 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Wed, 12 Jan 2022 10:26:26 +0100 Subject: [PATCH 318/673] scala 2.12 fixes --- core/jvm/src/main/scala/zio/sql/insert.scala | 181 +++++++++--------- .../zio/sql/postgresql/PostgresModule.scala | 22 +-- .../sql/postgresql/PostgresModuleSpec.scala | 2 +- 3 files changed, 102 insertions(+), 103 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 0cf39241b..b1c2ab7d3 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -2,7 +2,7 @@ package zio.sql import zio.schema.Schema -import scala.annotation.implicitNotFound +//import scala.annotation.implicitNotFound /** * val data = List( @@ -36,205 +36,204 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) //TODO find a way for more meaningful error messages - @implicitNotFound("This insert would blow up at runtime!!!") + //@implicitNotFound("This insert would blow up at runtime!!!") sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] // format: off object SchemaValidity extends SchemaValidityCaseClasses { - implicit def tuple1[F, A1, Z, ColsRepr, AllColumnIdentities, Identity1](implicit - ev1: Z =:= A1, + implicit def tuple1[F, A1, ColsRepr, AllColumnIdentities, Identity1](implicit + ev1: Schema[A1], ev2: ColsRepr <:< (A1, Unit), ev3: F <:< Features.Source[Identity1], ev4: AllColumnIdentities <:< Identity1 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, A1, ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, A1, ColsRepr, AllColumnIdentities] {} - implicit def tuple2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2](implicit - ev1: Z =:= (A1, A2), + implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Identity1, Identity2](implicit + ev1: Schema[(A1, A2)], ev2: ColsRepr <:< (A1, (A2, Unit)), ev3: F <:< Features.Union[Features.Source[Identity1], Features.Source[Identity2]], ev4: AllColumnIdentities <:< Identity1 with Identity2 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities] {} - implicit def tuple3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3](implicit - - ev1: Z =:= (A1, A2, A3), + implicit def tuple3[F, A1, A2, A3, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3](implicit + ev1: Schema[(A1, A2, A3)], ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities] {} - implicit def tuple4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4](implicit - ev1: Z =:= (A1, A2, A3, A4), + implicit def tuple4[F, A1, A2, A3, A4, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4](implicit + ev1: Schema[(A1, A2, A3, A4)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities] {} - implicit def tuple5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5] + implicit def tuple5[F, A1, A2, A3, A4, A5, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5), + ev1: Schema[(A1, A2, A3, A4, A5)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities] {} - implicit def tuple6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] + implicit def tuple6[F, A1, A2, A3, A4, A5, A6, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6), + ev1: Schema[(A1, A2, A3, A4, A5, A6)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities] {} - implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] + implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities] {} - implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] + implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities] {} - implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] + implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities] {} - implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] + implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities] {} - implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] + implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities] {} - implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] + implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities] {} - implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] + implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities] {} - implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] + implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities] {} - implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] + implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities] {} - implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] + implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities] {} - implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] + implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities] {} - implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] + implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities] {} - implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] + implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities] {} - implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] + implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities] {} - implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] + implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities] {} - implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] + implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] (implicit - ev1: Z =:= (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities] {} } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index b43e715de..d921179ab 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -147,7 +147,7 @@ trait PostgresModule extends Jdbc { self => hours: Int = 0, minutes: Int = 0, seconds: BigDecimal = 0.0 - ) { + ) { self => private val secondsFormat = { val format = new DecimalFormat("0.00####") val dfs = format.getDecimalFormatSymbols() @@ -171,7 +171,7 @@ trait PostgresModule extends Jdbc { self => def +:(date: java.util.Date): java.util.Date = { val cal = Calendar.getInstance cal.setTime(date) - date.setTime((cal +: this).getTime.getTime) + date.setTime((cal +: self).getTime.getTime) date } @@ -422,7 +422,7 @@ trait PostgresModule extends Jdbc { self => case StandardType.Year => render(s"'${value}'") case StandardType.OffsetDateTime(formatter) => render(s"'${formatter.format(value.asInstanceOf[OffsetDateTime])}'") - case StandardType.ZonedDateTime(formatter) => + case StandardType.ZonedDateTime(_) => render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") case BigIntegerType => render(s"'${value}'") case UUIDType => render(s"'${value}'") @@ -441,7 +441,7 @@ trait PostgresModule extends Jdbc { self => case BoolType => render(value) case DayOfWeekType => render(s"'${value}'") case FloatType => render(value) - case StandardType.Duration(temporalUnit) => render(s"'${value}'") + case StandardType.Duration(_) => render(s"'${value}'") } case None => () } @@ -456,16 +456,16 @@ trait PostgresModule extends Jdbc { self => def renderColumnNames(sources: SelectionSet[_])(implicit render: Renderer): Unit = sources match { - case SelectionSet.Empty => () // table is a collection of at least ONE column - case SelectionSet.Cons(columnSelection, SelectionSet.Empty) => + case SelectionSet.Empty => () // table is a collection of at least ONE column + case SelectionSet.Cons(columnSelection, tail) => val _ = columnSelection.name.map { name => render(name) } - case SelectionSet.Cons(columnSelection, tail) => - val _ = columnSelection.name.map { name => - render(name) - render(", ") - renderColumnNames(tail)(render) + tail.asInstanceOf[SelectionSet[_]] match { + case SelectionSet.Empty => () + case next @ SelectionSet.Cons(_, _) => + render(", ") + renderColumnNames(next.asInstanceOf[SelectionSet[_]])(render) } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 47e7a8ec1..6e846916b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -547,7 +547,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { import OrderDetails._ val query = insertInto(orderDetails)(orderDetailsOrderId ++ orderDetailsProductId ++ quantity ++ unitPrice) - .values(((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00)))) + .values((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00))) assertM(execute(query))(equalTo(1)) }, From a2d009ed09604791148efe01022faff84a942130 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 Jan 2022 11:26:03 +0100 Subject: [PATCH 319/673] Update silencer-lib, silencer-lib_2.13.6, ... to 1.7.8 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index d20ffc52e..d6eaea573 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -9,7 +9,7 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val SilencerVersion = "1.7.7" + val SilencerVersion = "1.7.8" val Scala212 = "2.12.15" val Scala213 = "2.13.6" val ScalaDotty = "3.0.0-RC3" From 6fd4ff64aa138ac07bc64f6b0c9c9ef411d3247a Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Wed, 12 Jan 2022 17:19:29 +0100 Subject: [PATCH 320/673] Remove dottySettings from the projects definition until Scala 3 version can be compiled correctly --- build.sbt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build.sbt b/build.sbt index 2a208e966..76275f9f0 100644 --- a/build.sbt +++ b/build.sbt @@ -93,7 +93,6 @@ lazy val coreJS = core.js .settings(scalaJSUseMainModuleInitializer := true) lazy val coreJVM = core.jvm - .settings(dottySettings) lazy val docs = project .in(file("zio-sql-docs")) @@ -122,7 +121,6 @@ lazy val examples = project "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided ) ) - .settings(dottySettings) .dependsOn(sqlserver) lazy val driver = project @@ -139,7 +137,6 @@ lazy val driver = project ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) - .settings(dottySettings) lazy val jdbc = project .in(file("jdbc")) @@ -156,7 +153,6 @@ lazy val jdbc = project ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) - .settings(dottySettings) .dependsOn(core.jvm) lazy val mysql = project @@ -179,7 +175,6 @@ lazy val mysql = project ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) - .settings(dottySettings) lazy val oracle = project .in(file("oracle")) @@ -201,7 +196,6 @@ lazy val oracle = project ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) - .settings(dottySettings) lazy val postgres = project .in(file("postgres")) @@ -223,7 +217,6 @@ lazy val postgres = project ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) - .settings(dottySettings) lazy val sqlserver = project .in(file("sqlserver")) @@ -245,4 +238,3 @@ lazy val sqlserver = project ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) - .settings(dottySettings) From 67e7e1c7a12b51e89c122d80c0be9356320fc72e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 Jan 2022 21:01:51 +0100 Subject: [PATCH 321/673] Update sbt-bloop to 1.4.12 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 79327390d..cbab908e7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.12") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From b3da6d9bb22b0a3468f7bd6e3fcd5e6ff3f35b61 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 Jan 2022 21:02:01 +0100 Subject: [PATCH 322/673] Update testcontainers-scala-mssqlserver, ... to 0.39.12 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 76275f9f0..ade15988a 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.7" val zioSchemaVersion = "0.1.4" val testcontainersVersion = "1.16.0" -val testcontainersScalaVersion = "0.39.5" +val testcontainersScalaVersion = "0.39.12" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From 393983db1a93ba685e6b3f63dcdc2cc1174e3bf6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 Jan 2022 21:02:19 +0100 Subject: [PATCH 323/673] Update zio, zio-streams, zio-test, ... to 1.0.13 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 76275f9f0..73b7be741 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "1.0.7" +val zioVersion = "1.0.13" val zioSchemaVersion = "0.1.4" val testcontainersVersion = "1.16.0" val testcontainersScalaVersion = "0.39.5" From 4339837be67b8af88bd28cfc4d2554d6f464a2c5 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Thu, 13 Jan 2022 16:46:30 +0100 Subject: [PATCH 324/673] Add some initial documentation --- build.sbt | 7 +- docs/overview/index.md | 101 +- docs/resources/index.md | 6 + website/package-lock.json | 23015 ++++++++++++++++++++++++++++++++ website/pages/en/index.js | 71 +- website/sidebars.json | 5 + website/siteConfig.js | 5 +- website/static/css/custom.css | 10 +- 8 files changed, 23177 insertions(+), 43 deletions(-) create mode 100644 docs/resources/index.md create mode 100644 website/package-lock.json diff --git a/build.sbt b/build.sbt index 76275f9f0..75608e37a 100644 --- a/build.sbt +++ b/build.sbt @@ -102,10 +102,13 @@ lazy val docs = project scalacOptions -= "-Yno-imports", scalacOptions -= "-Xfatal-warnings", libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion ) ) - .dependsOn(coreJVM) + .dependsOn(postgres) .enablePlugins(MdocPlugin, DocusaurusPlugin) lazy val examples = project diff --git a/docs/overview/index.md b/docs/overview/index.md index 9488b1f7a..150813b2b 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -1,10 +1,105 @@ --- id: overview_index -title: "Contents" +title: "Quick introduction" --- -TODO: List of contents available +TODO: Some initial statement about ZIO SQL ## Installation -TODO: Installation details +ZIO SQL is packaged into separate modules for different databases. Depending on which of these (currently supported) systems you're using, you will need to add one of the following dependencies: +```scala +//PostgreSQL +libraryDependencies += "dev.zio" %% "zio-sql-postgres" % zioSqlVersion + +//MySQL +libraryDependencies += "dev.zio" %% "zio-sql-mysql" % zioSqlVersion + +//Oracle +libraryDependencies += "dev.zio" %% "zio-sql-oracle" % zioSqlVersion + +//SQL Server +libraryDependencies += "dev.zio" %% "zio-sql-sqlserver" % zioSqlVersion +``` + +## Imports and modules + +Most of the needed imports will be resolved with +```scala +import zio.sql._ +``` + +ZIO SQL relies heavily on path dependent types, so to use most of the features you need to be in the scope of one of the database modules: + +```scala +trait MyRepositoryModule extends PostgresModule { + + // your ZIO SQL code here + +} + +// other available modules are MysqlModule, OracleModule and SqlServerModule +``` + +We will assume this scope in the following examples. + +## Table schema + +Table schemas are required to later construct correct and type-safe queries. Table schemas are created from `ColumnSet`s that are composed out of single columns, by calling a method `table` (on the `ColumnSet`). + +```scala +import ColumnSet._ + +val products = + (uuid("id") ++ string("name") ++ bigDecimal("price")).table("products") + +val orders = + (uuid("id") ++ uuid("product_id") ++ int("quantity") ++ localDate("order_date")).table("orders") +``` + +You can compose column set out of smaller column sets. This could be useful when your tables share some common set of columns. + +```scala +import ColumnSet._ + +//common columns +val auditColumns = zonedDateTime("created_at") ++ zonedDateTime("updated_at") + +//products definition +val productColumns = uuid("id") ++ string("name") ++ bigDecimal("price") ++ auditColumns + +val products = productColumns.table("products") + +//orders definition +val orderColumns = uuid("id") ++ uuid("product_id") ++ int("quantity") ++ localDate("order_date") ++ auditColumns + +val orders = orderColumns.table("orders") +``` + +## Selects + +TODO: details + +## Inserts + +TODO: details + +## Updates + +TODO: details + +## Deletes + +TODO: details + +## Transactions + +TODO: details + +## Printing queries + +TODO: details + +## Running queries + +TODO: details diff --git a/docs/resources/index.md b/docs/resources/index.md new file mode 100644 index 000000000..353876aa0 --- /dev/null +++ b/docs/resources/index.md @@ -0,0 +1,6 @@ +--- +id: resources_index +title: "Learning resources" +--- + +- [ZIO SQL Example Application](https://github.com/sviezypan/zio-sql-example) by [Jaro Regec](https://github.com/sviezypan) \ No newline at end of file diff --git a/website/package-lock.json b/website/package-lock.json new file mode 100644 index 000000000..95a866727 --- /dev/null +++ b/website/package-lock.json @@ -0,0 +1,23015 @@ +{ + "name": "website", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "docusaurus": "^1.12.0", + "react-sidecar": "^0.1.1" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", + "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.7.tgz", + "integrity": "sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.7", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", + "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.8", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "dev": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz", + "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", + "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz", + "integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", + "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz", + "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.8.tgz", + "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", + "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", + "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-proposal-optional-chaining": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.7.tgz", + "integrity": "sha512-dgqJJrcZoG/4CkMopzhPJjGxsIe9A8RlkQLnL/Vhhx8AA9ZuaRwGSlscSh42hazc7WSrya/IK7mTeoF0DP9tEw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz", + "integrity": "sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.16.4", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz", + "integrity": "sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", + "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", + "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz", + "integrity": "sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", + "dev": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-display-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", + "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.7.tgz", + "integrity": "sha512-8D16ye66fxiE8m890w0BpPpngG9o9OVBBy0gH2E+2AR7qMR2ZpTYJEqLxAsoroenMId0p/wMW+Blc0meDgu0Ag==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-development": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", + "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", + "dev": true, + "dependencies": { + "@babel/plugin-transform-react-jsx": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-pure-annotations": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", + "integrity": "sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", + "dev": true, + "dependencies": { + "regenerator-transform": "^0.14.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/polyfill": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz", + "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==", + "deprecated": "🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.", + "dev": true, + "dependencies": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.4" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.8.tgz", + "integrity": "sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.16.8", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-async-generator-functions": "^7.16.8", + "@babel/plugin-proposal-class-properties": "^7.16.7", + "@babel/plugin-proposal-class-static-block": "^7.16.7", + "@babel/plugin-proposal-dynamic-import": "^7.16.7", + "@babel/plugin-proposal-export-namespace-from": "^7.16.7", + "@babel/plugin-proposal-json-strings": "^7.16.7", + "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", + "@babel/plugin-proposal-numeric-separator": "^7.16.7", + "@babel/plugin-proposal-object-rest-spread": "^7.16.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", + "@babel/plugin-proposal-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-private-methods": "^7.16.7", + "@babel/plugin-proposal-private-property-in-object": "^7.16.7", + "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.16.7", + "@babel/plugin-transform-async-to-generator": "^7.16.8", + "@babel/plugin-transform-block-scoped-functions": "^7.16.7", + "@babel/plugin-transform-block-scoping": "^7.16.7", + "@babel/plugin-transform-classes": "^7.16.7", + "@babel/plugin-transform-computed-properties": "^7.16.7", + "@babel/plugin-transform-destructuring": "^7.16.7", + "@babel/plugin-transform-dotall-regex": "^7.16.7", + "@babel/plugin-transform-duplicate-keys": "^7.16.7", + "@babel/plugin-transform-exponentiation-operator": "^7.16.7", + "@babel/plugin-transform-for-of": "^7.16.7", + "@babel/plugin-transform-function-name": "^7.16.7", + "@babel/plugin-transform-literals": "^7.16.7", + "@babel/plugin-transform-member-expression-literals": "^7.16.7", + "@babel/plugin-transform-modules-amd": "^7.16.7", + "@babel/plugin-transform-modules-commonjs": "^7.16.8", + "@babel/plugin-transform-modules-systemjs": "^7.16.7", + "@babel/plugin-transform-modules-umd": "^7.16.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", + "@babel/plugin-transform-new-target": "^7.16.7", + "@babel/plugin-transform-object-super": "^7.16.7", + "@babel/plugin-transform-parameters": "^7.16.7", + "@babel/plugin-transform-property-literals": "^7.16.7", + "@babel/plugin-transform-regenerator": "^7.16.7", + "@babel/plugin-transform-reserved-words": "^7.16.7", + "@babel/plugin-transform-shorthand-properties": "^7.16.7", + "@babel/plugin-transform-spread": "^7.16.7", + "@babel/plugin-transform-sticky-regex": "^7.16.7", + "@babel/plugin-transform-template-literals": "^7.16.7", + "@babel/plugin-transform-typeof-symbol": "^7.16.7", + "@babel/plugin-transform-unicode-escapes": "^7.16.7", + "@babel/plugin-transform-unicode-regex": "^7.16.7", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.16.8", + "babel-plugin-polyfill-corejs2": "^0.3.0", + "babel-plugin-polyfill-corejs3": "^0.5.0", + "babel-plugin-polyfill-regenerator": "^0.3.0", + "core-js-compat": "^3.20.2", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-react": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", + "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-react-display-name": "^7.16.7", + "@babel/plugin-transform-react-jsx": "^7.16.7", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-pure-annotations": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/register": { + "version": "7.16.9", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.9.tgz", + "integrity": "sha512-jJ72wcghdRIlENfvALcyODhNoGE5j75cYHdC+aQMh6cU/P86tiiXTp9XYZct1UxUMo/4+BgQRyNZEGx0KWGS+g==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "find-cache-dir": "^2.0.0", + "make-dir": "^2.1.0", + "pirates": "^4.0.0", + "source-map-support": "^0.5.16" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", + "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz", + "integrity": "sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.8", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.16.8", + "@babel/types": "^7.16.8", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", + "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "dependencies": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.scandir/node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@types/cheerio": { + "version": "0.22.30", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.30.tgz", + "integrity": "sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "17.0.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz", + "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", + "dev": true + }, + "node_modules/@types/q": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", + "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/address": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", + "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", + "dev": true, + "engines": { + "node": ">= 0.12.0" + } + }, + "node_modules/airbnb-prop-types": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz", + "integrity": "sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==", + "dev": true, + "dependencies": { + "array.prototype.find": "^2.1.1", + "function.prototype.name": "^1.1.2", + "is-regex": "^1.1.0", + "object-is": "^1.1.2", + "object.assign": "^4.1.0", + "object.entries": "^1.1.2", + "prop-types": "^15.7.2", + "prop-types-exact": "^1.2.0", + "react-is": "^16.13.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "peerDependencies": { + "react": "^0.14 || ^15.0.0 || ^16.0.0-alpha" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "node_modules/ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/archive-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", + "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "dev": true, + "dependencies": { + "file-type": "^4.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/archive-type/node_modules/file-type": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", + "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.filter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz", + "integrity": "sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.find": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.1.2.tgz", + "integrity": "sha512-00S1O4ewO95OmmJW7EesWfQlrCrLEL8kZ40w3+GkLX2yTt0m2ggcePPa2uHPJ9KUmJvwRq+lCV9bD8Yim23x/Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", + "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true, + "peer": true + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/autolinker": { + "version": "3.14.3", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.14.3.tgz", + "integrity": "sha512-t81i2bCpS+s+5FIhatoww9DmpjhbdiimuU9ATEuLxtZMQ7jLv9fyFn7SWNG8IkEfD4AmYyirL1ss9k1aqVWRvg==", + "dev": true, + "dependencies": { + "tslib": "^1.9.3" + } + }, + "node_modules/autolinker/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/autoprefixer": { + "version": "9.8.8", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz", + "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==", + "dev": true, + "dependencies": { + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001109", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "picocolors": "^0.2.1", + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz", + "integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.3.0", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.0.tgz", + "integrity": "sha512-Hcrgnmkf+4JTj73GbK3bBhlVPiLL47owUAnoJIf69Hakl3q+KfodbDXiZWGMM7iqCZTxCG3Z2VRfPNYES4rXqQ==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.0", + "core-js-compat": "^3.20.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz", + "integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true, + "bin": { + "babylon": "bin/babylon.js" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/bin-build": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", + "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", + "dev": true, + "dependencies": { + "decompress": "^4.0.0", + "download": "^6.2.2", + "execa": "^0.7.0", + "p-map-series": "^1.0.0", + "tempfile": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", + "dev": true, + "dependencies": { + "execa": "^0.7.0", + "executable": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", + "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", + "dev": true, + "dependencies": { + "execa": "^1.0.0", + "find-versions": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-version-check": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", + "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", + "dev": true, + "dependencies": { + "bin-version": "^3.0.0", + "semver": "^5.6.0", + "semver-truncate": "^1.1.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-version-check/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/bin-version/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/bin-version/node_modules/execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-version/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-version/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/bin-wrapper": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", + "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", + "dev": true, + "dependencies": { + "bin-check": "^4.1.0", + "bin-version-check": "^4.0.0", + "download": "^7.1.0", + "import-lazy": "^3.1.0", + "os-filter-obj": "^2.0.0", + "pify": "^4.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-wrapper/node_modules/download": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", + "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", + "dev": true, + "dependencies": { + "archive-type": "^4.0.0", + "caw": "^2.0.1", + "content-disposition": "^0.5.2", + "decompress": "^4.2.0", + "ext-name": "^5.0.0", + "file-type": "^8.1.0", + "filenamify": "^2.0.0", + "get-stream": "^3.0.0", + "got": "^8.3.1", + "make-dir": "^1.2.0", + "p-event": "^2.1.0", + "pify": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-wrapper/node_modules/download/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/file-type": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", + "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-wrapper/node_modules/got": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/got/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/make-dir/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/p-cancelable": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/p-event": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "dev": true, + "dependencies": { + "p-timeout": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/bin-wrapper/node_modules/p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-wrapper/node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "dependencies": { + "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/body": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "dev": true, + "dependencies": { + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" + } + }, + "node_modules/body-parser": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", + "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", + "dev": true, + "dependencies": { + "bytes": "3.1.1", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.9.6", + "raw-body": "2.4.2", + "type-is": "~1.6.18" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/body/node_modules/bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", + "dev": true + }, + "node_modules/body/node_modules/raw-body": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", + "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", + "dev": true, + "dependencies": { + "bytes": "1", + "string_decoder": "0.10" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/body/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/braces/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/braces/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/braces/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/browserslist": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", + "escalade": "^3.1.1", + "node-releases": "^2.0.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/browserslist/node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/bytes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", + "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "dependencies": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cacheable-request/node_modules/normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "dependencies": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cacheable-request/node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/cacheable-request/node_modules/sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "node_modules/caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "dependencies": { + "callsites": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "dependencies": { + "caller-callsite": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "dependencies": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001299", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", + "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "node_modules/caw": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", + "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", + "dev": true, + "dependencies": { + "get-proxy": "^2.0.0", + "isurl": "^1.0.0-alpha5", + "tunnel-agent": "^0.6.0", + "url-to-options": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cheerio": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", + "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", + "dev": true, + "dependencies": { + "cheerio-select": "^1.5.0", + "dom-serializer": "^1.3.2", + "domhandler": "^4.2.0", + "htmlparser2": "^6.1.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", + "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", + "dev": true, + "dependencies": { + "css-select": "^4.1.3", + "css-what": "^5.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0", + "domutils": "^2.7.0" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==", + "dev": true + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + } + }, + "node_modules/coa": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", + "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", + "dev": true, + "dependencies": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/coa/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/coa/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/coa/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/coa/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/coa/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/coa/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/coa/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/coffee-script": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", + "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", + "deprecated": "CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)", + "dev": true, + "bin": { + "cake": "bin/cake", + "coffee": "bin/coffee" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/color-string": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz", + "integrity": "sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==", + "dev": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/concat-with-sourcemaps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/console-stream": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", + "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/continuable-cache": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", + "dev": true, + "hasInstallScript": true + }, + "node_modules/core-js-compat": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.2.tgz", + "integrity": "sha512-qZEzVQ+5Qh6cROaTPFLNS4lkvQ6mBzE3R6A6EEpssj7Zr2egMHgsy4XapdifqJDGC9CBiNv7s+ejI96rLNQFdg==", + "dev": true, + "dependencies": { + "browserslist": "^4.19.1", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "dependencies": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/create-react-class": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.7.0.tgz", + "integrity": "sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng==", + "dev": true, + "peer": true, + "dependencies": { + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" + } + }, + "node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/crowdin-cli": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/crowdin-cli/-/crowdin-cli-0.3.0.tgz", + "integrity": "sha1-6smYmm/n/qrzMJA5evwYfGe0YZE=", + "dev": true, + "dependencies": { + "request": "^2.53.0", + "yamljs": "^0.2.1", + "yargs": "^2.3.0" + }, + "bin": { + "crowdin-cli": "bin/crowdin-cli" + } + }, + "node_modules/css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/css-declaration-sorter": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", + "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", + "dev": true, + "dependencies": { + "postcss": "^7.0.1", + "timsort": "^0.3.0" + }, + "engines": { + "node": ">4" + } + }, + "node_modules/css-select": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", + "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^5.1.0", + "domhandler": "^4.3.0", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-select-base-adapter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", + "dev": true + }, + "node_modules/css-tree": { + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-tree/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-what": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", + "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssnano": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz", + "integrity": "sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==", + "dev": true, + "dependencies": { + "cosmiconfig": "^5.0.0", + "cssnano-preset-default": "^4.0.8", + "is-resolvable": "^1.0.0", + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-preset-default": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz", + "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==", + "dev": true, + "dependencies": { + "css-declaration-sorter": "^4.0.1", + "cssnano-util-raw-cache": "^4.0.1", + "postcss": "^7.0.0", + "postcss-calc": "^7.0.1", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-svgo": "^4.0.3", + "postcss-unique-selectors": "^4.0.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-get-arguments": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", + "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-get-match": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", + "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-raw-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", + "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/cssnano-util-same-parent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", + "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/csso/node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/csso/node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "node_modules/csso/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "dependencies": { + "array-find-index": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "dependencies": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "dependencies": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tar/node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "dependencies": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2/node_modules/file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "dependencies": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-targz/node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "dev": true, + "dependencies": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-unzip/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-unzip/node_modules/get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "dev": true, + "dependencies": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-unzip/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress/node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress/node_modules/make-dir/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "node_modules/detect-port-alt": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", + "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", + "dev": true, + "dependencies": { + "address": "^1.0.1", + "debug": "^2.6.0" + }, + "bin": { + "detect": "bin/detect-port", + "detect-port": "bin/detect-port" + }, + "engines": { + "node": ">= 4.2.1" + } + }, + "node_modules/detect-port-alt/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/detect-port-alt/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/diacritics-map": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", + "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "dependencies": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=", + "dev": true + }, + "node_modules/docusaurus": { + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/docusaurus/-/docusaurus-1.14.7.tgz", + "integrity": "sha512-UWqar4ZX0lEcpLc5Tg+MwZ2jhF/1n1toCQRSeoxDON/D+E9ToLr+vTRFVMP/Tk84NXSVjZFRlrjWwM2pXzvLsQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/polyfill": "^7.12.1", + "@babel/preset-env": "^7.12.1", + "@babel/preset-react": "^7.12.5", + "@babel/register": "^7.12.1", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.6", + "autoprefixer": "^9.7.5", + "babylon": "^6.18.0", + "chalk": "^3.0.0", + "classnames": "^2.2.6", + "commander": "^4.0.1", + "crowdin-cli": "^0.3.0", + "cssnano": "^4.1.10", + "enzyme": "^3.10.0", + "enzyme-adapter-react-16": "^1.15.1", + "escape-string-regexp": "^2.0.0", + "express": "^4.17.1", + "feed": "^4.2.1", + "fs-extra": "^9.0.1", + "gaze": "^1.1.3", + "github-slugger": "^1.3.0", + "glob": "^7.1.6", + "highlight.js": "^9.16.2", + "imagemin": "^6.0.0", + "imagemin-gifsicle": "^6.0.1", + "imagemin-jpegtran": "^6.0.0", + "imagemin-optipng": "^6.0.0", + "imagemin-svgo": "^7.0.0", + "lodash": "^4.17.20", + "markdown-toc": "^1.2.0", + "mkdirp": "^0.5.1", + "portfinder": "^1.0.28", + "postcss": "^7.0.23", + "prismjs": "^1.22.0", + "react": "^16.8.4", + "react-dev-utils": "^11.0.1", + "react-dom": "^16.8.4", + "remarkable": "^2.0.0", + "request": "^2.88.0", + "shelljs": "^0.8.4", + "sitemap": "^3.2.2", + "tcp-port-used": "^1.0.1", + "tiny-lr": "^1.1.1", + "tree-node-cli": "^1.2.5", + "truncate-html": "^1.0.3" + }, + "bin": { + "docusaurus-build": "lib/build-files.js", + "docusaurus-examples": "lib/copy-examples.js", + "docusaurus-publish": "lib/publish-gh-pages.js", + "docusaurus-rename-version": "lib/rename-version.js", + "docusaurus-start": "lib/start-server.js", + "docusaurus-version": "lib/version.js", + "docusaurus-write-translations": "lib/write-translations.js" + } + }, + "node_modules/docusaurus/node_modules/enzyme-adapter-react-16": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz", + "integrity": "sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g==", + "dev": true, + "dependencies": { + "enzyme-adapter-utils": "^1.14.0", + "enzyme-shallow-equal": "^1.0.4", + "has": "^1.0.3", + "object.assign": "^4.1.2", + "object.values": "^1.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.13.1", + "react-test-renderer": "^16.0.0-0", + "semver": "^5.7.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "peerDependencies": { + "enzyme": "^3.0.0", + "react": "^16.0.0-0", + "react-dom": "^16.0.0-0" + } + }, + "node_modules/docusaurus/node_modules/react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/docusaurus/node_modules/react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + }, + "peerDependencies": { + "react": "^16.14.0" + } + }, + "node_modules/docusaurus/node_modules/react-test-renderer": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.14.0.tgz", + "integrity": "sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==", + "dev": true, + "dependencies": { + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "react-is": "^16.8.6", + "scheduler": "^0.19.1" + }, + "peerDependencies": { + "react": "^16.14.0" + } + }, + "node_modules/docusaurus/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", + "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/download": { + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", + "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", + "dev": true, + "dependencies": { + "caw": "^2.0.0", + "content-disposition": "^0.5.2", + "decompress": "^4.0.0", + "ext-name": "^5.0.0", + "file-type": "5.2.0", + "filenamify": "^2.0.0", + "get-stream": "^3.0.0", + "got": "^7.0.0", + "make-dir": "^1.0.0", + "p-event": "^1.0.0", + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/download/node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/download/node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/download/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "node_modules/duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.44", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.44.tgz", + "integrity": "sha512-tHGWiUUmY7GABK8+DNcr474cnZDTzD8x1736SlDosVH8+/vRJeqfaIBAEHFtMjddz/0T4rKKYsxEc8BwQRdBpw==", + "dev": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "peer": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/enzyme": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", + "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", + "dev": true, + "dependencies": { + "array.prototype.flat": "^1.2.3", + "cheerio": "^1.0.0-rc.3", + "enzyme-shallow-equal": "^1.0.1", + "function.prototype.name": "^1.1.2", + "has": "^1.0.3", + "html-element-map": "^1.2.0", + "is-boolean-object": "^1.0.1", + "is-callable": "^1.1.5", + "is-number-object": "^1.0.4", + "is-regex": "^1.0.5", + "is-string": "^1.0.5", + "is-subset": "^0.1.1", + "lodash.escape": "^4.0.1", + "lodash.isequal": "^4.5.0", + "object-inspect": "^1.7.0", + "object-is": "^1.0.2", + "object.assign": "^4.1.0", + "object.entries": "^1.1.1", + "object.values": "^1.1.1", + "raf": "^3.4.1", + "rst-selector-parser": "^2.2.3", + "string.prototype.trim": "^1.2.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/enzyme-adapter-utils": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz", + "integrity": "sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==", + "dev": true, + "dependencies": { + "airbnb-prop-types": "^2.16.0", + "function.prototype.name": "^1.1.3", + "has": "^1.0.3", + "object.assign": "^4.1.2", + "object.fromentries": "^2.0.3", + "prop-types": "^15.7.2", + "semver": "^5.7.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "peerDependencies": { + "react": "0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0" + } + }, + "node_modules/enzyme-adapter-utils/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/enzyme-shallow-equal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz", + "integrity": "sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==", + "dev": true, + "dependencies": { + "has": "^1.0.3", + "object-is": "^1.1.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "dev": true, + "dependencies": { + "string-template": "~0.2.1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/exec-buffer": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz", + "integrity": "sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==", + "dev": true, + "dependencies": { + "execa": "^0.7.0", + "p-finally": "^1.0.0", + "pify": "^3.0.0", + "rimraf": "^2.5.4", + "tempfile": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/exec-buffer/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/executable/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "dependencies": { + "fill-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/express": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", + "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", + "dev": true, + "dependencies": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.4.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.9.6", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.17.2", + "serve-static": "1.14.2", + "setprototypeof": "1.2.0", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/express/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "dev": true, + "dependencies": { + "mime-db": "^1.28.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "dev": true, + "dependencies": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, + "dependencies": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-xml-parser": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "dev": true, + "dependencies": { + "strnum": "^1.0.4" + }, + "bin": { + "xml2js": "cli.js" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/fbjs": { + "version": "0.8.18", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.18.tgz", + "integrity": "sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA==", + "dev": true, + "peer": true, + "dependencies": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.30" + } + }, + "node_modules/fbjs/node_modules/core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", + "dev": true, + "peer": true + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/feed": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz", + "integrity": "sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==", + "dev": true, + "dependencies": { + "xml-js": "^1.6.11" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-type": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-10.11.0.tgz", + "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/filenamify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", + "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", + "dev": true, + "dependencies": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/filesize": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", + "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "dependencies": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "dependencies": { + "semver-regex": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/fork-ts-checker-webpack-plugin": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz", + "integrity": "sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.5.5", + "chalk": "^2.4.1", + "micromatch": "^3.1.10", + "minimatch": "^3.0.4", + "semver": "^5.6.0", + "tapable": "^1.0.0", + "worker-rpc": "^0.1.0" + }, + "engines": { + "node": ">=6.11.5", + "yarn": ">=1.0.0" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.2.tgz", + "integrity": "sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "dependencies": { + "globule": "^1.0.0" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proxy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", + "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", + "dev": true, + "dependencies": { + "npm-conf": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/gifsicle": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-4.0.1.tgz", + "integrity": "sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "execa": "^1.0.0", + "logalot": "^2.0.0" + }, + "bin": { + "gifsicle": "cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/gifsicle/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/gifsicle/node_modules/execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/gifsicle/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/gifsicle/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/github-slugger": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.4.0.tgz", + "integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==", + "dev": true + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", + "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", + "dev": true, + "dependencies": { + "array-union": "^1.0.1", + "dir-glob": "2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globule": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.3.tgz", + "integrity": "sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg==", + "dev": true, + "dependencies": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/globule/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "dependencies": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true + }, + "node_modules/gray-matter": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", + "integrity": "sha1-MELZrewqHe1qdwep7SOA+KF6Qw4=", + "dev": true, + "dependencies": { + "ansi-red": "^0.1.1", + "coffee-script": "^1.12.4", + "extend-shallow": "^2.0.1", + "js-yaml": "^3.8.1", + "toml": "^2.3.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gulp-header": { + "version": "1.8.12", + "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.12.tgz", + "integrity": "sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ==", + "deprecated": "Removed event-stream from gulp-header", + "dev": true, + "dependencies": { + "concat-with-sourcemaps": "*", + "lodash.template": "^4.4.0", + "through2": "^2.0.0" + } + }, + "node_modules/gzip-size": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "dev": true, + "dependencies": { + "duplexer": "^0.1.1", + "pify": "^4.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "dependencies": { + "has-symbol-support-x": "^1.4.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hex-color-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", + "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", + "dev": true + }, + "node_modules/highlight.js": { + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "deprecated": "Support has ended for 9.x series. Upgrade to @latest", + "dev": true, + "hasInstallScript": true, + "engines": { + "node": "*" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/hsl-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", + "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", + "dev": true + }, + "node_modules/hsla-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", + "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", + "dev": true + }, + "node_modules/html-element-map": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", + "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", + "dev": true, + "dependencies": { + "array.prototype.filter": "^1.0.0", + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "node_modules/http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "node_modules/http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz", + "integrity": "sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA==", + "dev": true + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "node_modules/imagemin": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-6.1.0.tgz", + "integrity": "sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A==", + "dev": true, + "dependencies": { + "file-type": "^10.7.0", + "globby": "^8.0.1", + "make-dir": "^1.0.0", + "p-pipe": "^1.1.0", + "pify": "^4.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/imagemin-gifsicle": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz", + "integrity": "sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng==", + "dev": true, + "dependencies": { + "exec-buffer": "^3.0.0", + "gifsicle": "^4.0.0", + "is-gif": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/imagemin-jpegtran": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz", + "integrity": "sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g==", + "dev": true, + "dependencies": { + "exec-buffer": "^3.0.0", + "is-jpg": "^2.0.0", + "jpegtran-bin": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/imagemin-optipng": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz", + "integrity": "sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A==", + "dev": true, + "dependencies": { + "exec-buffer": "^3.0.0", + "is-png": "^1.0.0", + "optipng-bin": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/imagemin-svgo": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz", + "integrity": "sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg==", + "dev": true, + "dependencies": { + "is-svg": "^4.2.1", + "svgo": "^1.3.2" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sindresorhus/imagemin-svgo?sponsor=1" + } + }, + "node_modules/imagemin/node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/imagemin/node_modules/make-dir/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/immer": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", + "integrity": "sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "dependencies": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/import-lazy": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "dependencies": { + "repeating": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "dependencies": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ip-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-color-stop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", + "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", + "dev": true, + "dependencies": { + "css-color-names": "^0.0.4", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0" + } + }, + "node_modules/is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-gif": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-gif/-/is-gif-3.0.0.tgz", + "integrity": "sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw==", + "dev": true, + "dependencies": { + "file-type": "^10.4.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-jpg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-jpg/-/is-jpg-2.0.0.tgz", + "integrity": "sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc=", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", + "dev": true + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-png": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-1.1.0.tgz", + "integrity": "sha1-1XSxK/J1wDUEVVcLDltXqwYgd84=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "node_modules/is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-root": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", + "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-subset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", + "dev": true + }, + "node_modules/is-svg": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.3.2.tgz", + "integrity": "sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw==", + "dev": true, + "dependencies": { + "fast-xml-parser": "^3.19.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is2": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.7.tgz", + "integrity": "sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "ip-regex": "^4.1.0", + "is-url": "^1.2.4" + }, + "engines": { + "node": ">=v0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true, + "peer": true, + "dependencies": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "node_modules/isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "dependencies": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/jpegtran-bin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz", + "integrity": "sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "logalot": "^2.0.0" + }, + "bin": { + "jpegtran": "cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "dev": true, + "dependencies": { + "set-getter": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/list-item": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/list-item/-/list-item-1.1.1.tgz", + "integrity": "sha1-DGXQDih8tmPMs8s4Sad+iewmilY=", + "dev": true, + "dependencies": { + "expand-range": "^1.8.1", + "extend-shallow": "^2.0.1", + "is-number": "^2.1.0", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/livereload-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", + "dev": true + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "node_modules/lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=", + "dev": true + }, + "node_modules/lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=", + "dev": true + }, + "node_modules/lodash.chunk": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", + "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=", + "dev": true + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "node_modules/lodash.escape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", + "integrity": "sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg=", + "dev": true + }, + "node_modules/lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=", + "dev": true + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "node_modules/lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=", + "dev": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "node_modules/lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.padstart": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", + "dev": true + }, + "node_modules/lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", + "dev": true + }, + "node_modules/lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=", + "dev": true + }, + "node_modules/lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=", + "dev": true + }, + "node_modules/lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", + "dev": true + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "node_modules/lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "dependencies": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "node_modules/lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "dependencies": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "node_modules/logalot": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", + "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", + "dev": true, + "dependencies": { + "figures": "^1.3.5", + "squeak": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "dependencies": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", + "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", + "dev": true, + "dependencies": { + "get-stdin": "^4.0.1", + "indent-string": "^2.1.0", + "longest": "^1.0.0", + "meow": "^3.3.0" + }, + "bin": { + "lpad-align": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/markdown-link": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/markdown-link/-/markdown-link-0.1.1.tgz", + "integrity": "sha1-MsXGUZmmRXMWMi0eQinRNAfIx88=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/markdown-toc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/markdown-toc/-/markdown-toc-1.2.0.tgz", + "integrity": "sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg==", + "dev": true, + "dependencies": { + "concat-stream": "^1.5.2", + "diacritics-map": "^0.1.0", + "gray-matter": "^2.1.0", + "lazy-cache": "^2.0.2", + "list-item": "^1.1.1", + "markdown-link": "^0.1.1", + "minimist": "^1.2.0", + "mixin-deep": "^1.1.3", + "object.pick": "^1.2.0", + "remarkable": "^1.7.1", + "repeat-string": "^1.6.1", + "strip-color": "^0.1.0" + }, + "bin": { + "markdown-toc": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/markdown-toc/node_modules/autolinker": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", + "integrity": "sha1-BlK0kYgYefB3XazgzcoyM5QqTkc=", + "dev": true, + "dependencies": { + "gulp-header": "^1.7.1" + } + }, + "node_modules/markdown-toc/node_modules/remarkable": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.4.tgz", + "integrity": "sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg==", + "dev": true, + "dependencies": { + "argparse": "^1.0.10", + "autolinker": "~0.28.0" + }, + "bin": { + "remarkable": "bin/remarkable.js" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "node_modules/mdn-data": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", + "dev": true + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "dependencies": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/microevent.ts": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/microevent.ts/-/microevent.ts-0.1.1.tgz", + "integrity": "sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==", + "dev": true + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "dev": true, + "dependencies": { + "mime-db": "1.51.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/moo": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", + "integrity": "sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "dev": true, + "dependencies": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "bin": { + "nearley-railroad": "bin/nearley-railroad.js", + "nearley-test": "bin/nearley-test.js", + "nearley-unparse": "bin/nearley-unparse.js", + "nearleyc": "bin/nearleyc.js" + }, + "funding": { + "type": "individual", + "url": "https://nearley.js.org/#give-to-nearley" + } + }, + "node_modules/nearley/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "peer": true, + "dependencies": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", + "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/npm-conf": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", + "dev": true, + "dependencies": { + "config-chain": "^1.1.11", + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-conf/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/nth-check": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", + "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", + "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", + "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optipng-bin": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-5.1.0.tgz", + "integrity": "sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "logalot": "^2.0.0" + }, + "bin": { + "optipng": "cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/os-filter-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", + "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", + "dev": true, + "dependencies": { + "arch": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-event": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", + "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", + "dev": true, + "dependencies": { + "p-timeout": "^1.1.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-map-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", + "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", + "dev": true, + "dependencies": { + "p-reduce": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-pipe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz", + "integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-reduce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-type/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", + "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "dependencies": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "engines": { + "node": ">= 0.12.0" + } + }, + "node_modules/portfinder/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-calc": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", + "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", + "dev": true, + "dependencies": { + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" + } + }, + "node_modules/postcss-colormin": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", + "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-colormin/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-convert-values": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", + "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-convert-values/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-discard-comments": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", + "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", + "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-discard-empty": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", + "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", + "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-merge-longhand": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", + "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", + "dev": true, + "dependencies": { + "css-color-names": "0.0.4", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "stylehacks": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-merge-longhand/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-merge-rules": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", + "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "cssnano-util-same-parent": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0", + "vendors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-merge-rules/node_modules/postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "dependencies": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", + "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-font-values/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-minify-gradients": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", + "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", + "dev": true, + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-gradients/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-minify-params": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", + "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", + "dev": true, + "dependencies": { + "alphanum-sort": "^1.0.0", + "browserslist": "^4.0.0", + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-params/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-minify-selectors": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", + "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", + "dev": true, + "dependencies": { + "alphanum-sort": "^1.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-minify-selectors/node_modules/postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "dependencies": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss-normalize-charset": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", + "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", + "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", + "dev": true, + "dependencies": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-display-values/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-normalize-positions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", + "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", + "dev": true, + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-positions/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", + "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", + "dev": true, + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-repeat-style/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-normalize-string": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", + "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", + "dev": true, + "dependencies": { + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-string/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", + "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", + "dev": true, + "dependencies": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-timing-functions/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-normalize-unicode": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", + "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-unicode/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-normalize-url": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", + "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", + "dev": true, + "dependencies": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-url/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-normalize-whitespace": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", + "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-normalize-whitespace/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-ordered-values": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", + "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", + "dev": true, + "dependencies": { + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-ordered-values/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-reduce-initial": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", + "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", + "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", + "dev": true, + "dependencies": { + "cssnano-util-get-match": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-reduce-transforms/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.8.tgz", + "integrity": "sha512-D5PG53d209Z1Uhcc0qAZ5U3t5HagH3cxu+WLZ22jt3gLUpXM4eXXfiO14jiDWST3NNooX/E8wISfOhZ9eIjGTQ==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-svgo": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz", + "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "svgo": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-svgo/node_modules/postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "node_modules/postcss-unique-selectors": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", + "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", + "dev": true, + "dependencies": { + "alphanum-sort": "^1.0.0", + "postcss": "^7.0.0", + "uniqs": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/postcss/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prismjs": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.26.0.tgz", + "integrity": "sha512-HUoH9C5Z3jKkl3UunCyiD5jwk0+Hz0fIgQ2nbwU2Oo/ceuTAQAg+pPVnfdt2TJWRVLcxKh9iuoYDUSc8clb5UQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "peer": true, + "dependencies": { + "asap": "~2.0.3" + } + }, + "node_modules/prompts": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", + "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types-exact": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prop-types-exact/-/prop-types-exact-1.2.0.tgz", + "integrity": "sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA==", + "dev": true, + "dependencies": { + "has": "^1.0.3", + "object.assign": "^4.1.0", + "reflect.ownkeys": "^0.2.0" + } + }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true, + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/qs": { + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "dev": true, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "dependencies": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "dev": true, + "dependencies": { + "performance-now": "^2.1.0" + } + }, + "node_modules/railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=", + "dev": true + }, + "node_modules/randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "dev": true, + "dependencies": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "dependencies": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/randomatic/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", + "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "dev": true, + "dependencies": { + "bytes": "3.1.1", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/react/-/react-15.7.0.tgz", + "integrity": "sha512-5/MMRYmpmM0sMTHGLossnJCrmXQIiJilD6y3YN3TzAwGFj6zdnMtFv6xmi65PHKRV+pehIHpT7oy67Sr6s9AHA==", + "dev": true, + "peer": true, + "dependencies": { + "create-react-class": "^15.6.0", + "fbjs": "^0.8.9", + "loose-envify": "^1.1.0", + "object-assign": "^4.1.0", + "prop-types": "^15.5.10" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dev-utils": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.4.tgz", + "integrity": "sha512-dx0LvIGHcOPtKbeiSUM4jqpBl3TcY7CDjZdfOIcKeznE7BWr9dg0iPG90G5yfVQ+p/rGNMXdbfStvzQZEVEi4A==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.10.4", + "address": "1.1.2", + "browserslist": "4.14.2", + "chalk": "2.4.2", + "cross-spawn": "7.0.3", + "detect-port-alt": "1.1.6", + "escape-string-regexp": "2.0.0", + "filesize": "6.1.0", + "find-up": "4.1.0", + "fork-ts-checker-webpack-plugin": "4.1.6", + "global-modules": "2.0.0", + "globby": "11.0.1", + "gzip-size": "5.1.1", + "immer": "8.0.1", + "is-root": "2.1.0", + "loader-utils": "2.0.0", + "open": "^7.0.2", + "pkg-up": "3.1.0", + "prompts": "2.4.0", + "react-error-overlay": "^6.0.9", + "recursive-readdir": "2.2.2", + "shell-quote": "1.7.2", + "strip-ansi": "6.0.0", + "text-table": "0.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-dev-utils/node_modules/@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/react-dev-utils/node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/react-dev-utils/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/react-dev-utils/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/browserslist": { + "version": "4.14.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz", + "integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001125", + "electron-to-chromium": "^1.3.564", + "escalade": "^3.0.2", + "node-releases": "^1.1.61" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + }, + "node_modules/react-dev-utils/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/react-dev-utils/node_modules/chalk/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/react-dev-utils/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/react-dev-utils/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/react-dev-utils/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/react-dev-utils/node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/fast-glob": { + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.10.tgz", + "integrity": "sha512-s9nFhFnvR63wls6/kM88kQqDhMu0AfdjqouE2l5GVQPbqLgyFjjU5ry/r2yKsJxpb9Py1EYNqieFrmMaX4v++A==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/react-dev-utils/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/react-dev-utils/node_modules/globby": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/react-dev-utils/node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/react-dev-utils/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/react-dev-utils/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/react-dev-utils/node_modules/node-releases": { + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", + "dev": true + }, + "node_modules/react-dev-utils/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/react-dev-utils/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/react-dev-utils/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/react-error-overlay": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz", + "integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==", + "dev": true + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "node_modules/react-sidecar": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/react-sidecar/-/react-sidecar-0.1.1.tgz", + "integrity": "sha1-5JcLyV5JXxaI0nJ/lI78JXVViE4=", + "dev": true, + "peerDependencies": { + "react": ">= 0.11.2 < 16.0.0" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/recursive-readdir": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", + "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", + "dev": true, + "dependencies": { + "minimatch": "3.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "dependencies": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reflect.ownkeys": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", + "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=", + "dev": true + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexpu-core": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/remarkable": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", + "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", + "dev": true, + "dependencies": { + "argparse": "^1.0.10", + "autolinker": "^3.11.0" + }, + "bin": { + "remarkable": "bin/remarkable.js" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "dependencies": { + "is-finite": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/resolve": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", + "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", + "dev": true, + "dependencies": { + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true + }, + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rgb-regex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", + "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", + "dev": true + }, + "node_modules/rgba-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", + "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", + "dev": true + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rst-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", + "integrity": "sha1-gbIw6i/MYGbInjRy3nlChdmwPZE=", + "dev": true, + "dependencies": { + "lodash.flattendeep": "^4.4.0", + "nearley": "^2.7.10" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-json-parse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", + "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "node_modules/scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dev": true, + "dependencies": { + "commander": "^2.8.1" + }, + "bin": { + "seek-bunzip": "bin/seek-bunzip", + "seek-table": "bin/seek-bzip-table" + } + }, + "node_modules/seek-bzip/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/semver-truncate": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", + "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", + "dev": true, + "dependencies": { + "semver": "^5.3.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/semver-truncate/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", + "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "1.8.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/serve-static": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", + "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "dev": true, + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-getter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", + "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", + "dev": true, + "dependencies": { + "to-object-path": "^0.3.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true, + "peer": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", + "dev": true + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/sitemap": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-3.2.2.tgz", + "integrity": "sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg==", + "dev": true, + "dependencies": { + "lodash.chunk": "^4.2.0", + "lodash.padstart": "^4.6.1", + "whatwg-url": "^7.0.0", + "xmlbuilder": "^13.0.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=4.0.0" + } + }, + "node_modules/slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "dev": true, + "dependencies": { + "sort-keys": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", + "dev": true + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/squeak": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", + "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", + "dev": true, + "dependencies": { + "chalk": "^1.0.0", + "console-stream": "^0.1.1", + "lpad-align": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/squeak/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/squeak/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/squeak/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/squeak/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/squeak/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/squeak/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "node_modules/string.prototype.trim": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz", + "integrity": "sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-color": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", + "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "dependencies": { + "is-natural-number": "^4.0.1" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "dependencies": { + "get-stdin": "^4.0.1" + }, + "bin": { + "strip-indent": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-outer/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true + }, + "node_modules/stylehacks": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", + "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/stylehacks/node_modules/postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "dependencies": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svgo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "deprecated": "This SVGO version is no longer supported. Upgrade to v2.x.x.", + "dev": true, + "dependencies": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/svgo/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svgo/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svgo/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/svgo/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/svgo/node_modules/css-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "node_modules/svgo/node_modules/css-what": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/svgo/node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/svgo/node_modules/domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/svgo/node_modules/domutils/node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "node_modules/svgo/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/svgo/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/svgo/node_modules/nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "dependencies": { + "boolbase": "~1.0.0" + } + }, + "node_modules/svgo/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "dependencies": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tcp-port-used": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz", + "integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==", + "dev": true, + "dependencies": { + "debug": "4.3.1", + "is2": "^2.0.6" + } + }, + "node_modules/tcp-port-used/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tempfile": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", + "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", + "dev": true, + "dependencies": { + "temp-dir": "^1.0.0", + "uuid": "^3.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, + "node_modules/tiny-lr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", + "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", + "dev": true, + "dependencies": { + "body": "^5.1.0", + "debug": "^3.1.0", + "faye-websocket": "~0.10.0", + "livereload-js": "^2.3.0", + "object-assign": "^4.1.0", + "qs": "^6.4.0" + } + }, + "node_modules/tiny-lr/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/toml": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz", + "integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==", + "dev": true + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-node-cli": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/tree-node-cli/-/tree-node-cli-1.4.0.tgz", + "integrity": "sha512-hBc/cp7rTSHFSFvaTzmHNYyJv87UJBsxsfCoq2DtDQuMES4vhnLuvXZit/asGtZG8edWTCydWeFWoBz9LYkJdQ==", + "dev": true, + "dependencies": { + "commander": "^5.0.0" + }, + "bin": { + "tree": "bin/tree.js", + "treee": "bin/tree.js" + } + }, + "node_modules/tree-node-cli/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/trim-repeated/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/truncate-html": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/truncate-html/-/truncate-html-1.0.4.tgz", + "integrity": "sha512-FpDAlPzpJ3jlZiNEahRs584FS3jOSQafgj4cC9DmAYPct6uMZDLY625+eErRd43G35vGDrNq3i7b4aYUQ/Bxqw==", + "dev": true, + "dependencies": { + "@types/cheerio": "^0.22.8", + "cheerio": "0.22.0" + } + }, + "node_modules/truncate-html/node_modules/cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "dev": true, + "dependencies": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/truncate-html/node_modules/css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "dependencies": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "node_modules/truncate-html/node_modules/css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/truncate-html/node_modules/dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dev": true, + "dependencies": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "node_modules/truncate-html/node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "node_modules/truncate-html/node_modules/domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/truncate-html/node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/truncate-html/node_modules/entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "node_modules/truncate-html/node_modules/htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/truncate-html/node_modules/nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "dependencies": { + "boolbase": "~1.0.0" + } + }, + "node_modules/truncate-html/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "node_modules/ua-parser-js": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", + "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "node_modules/uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unquote": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", + "dev": true + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true + }, + "node_modules/url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "dependencies": { + "prepend-http": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/util.promisify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vendors": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", + "dev": true, + "peer": true + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/worker-rpc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/worker-rpc/-/worker-rpc-0.1.1.tgz", + "integrity": "sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg==", + "dev": true, + "dependencies": { + "microevent.ts": "~0.1.1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "dev": true, + "dependencies": { + "sax": "^1.2.4" + }, + "bin": { + "xml-js": "bin/cli.js" + } + }, + "node_modules/xmlbuilder": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz", + "integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "node_modules/yamljs": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.2.10.tgz", + "integrity": "sha1-SBzHwlynOvWfWR8MluPOVsdXpA8=", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "glob": "^7.0.5" + }, + "bin": { + "json2yaml": "bin/json2yaml", + "yaml2json": "bin/yaml2json" + } + }, + "node_modules/yargs": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-2.3.0.tgz", + "integrity": "sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s=", + "dev": true, + "dependencies": { + "wordwrap": "0.0.2" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.16.7" + } + }, + "@babel/compat-data": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", + "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", + "dev": true + }, + "@babel/core": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.7.tgz", + "integrity": "sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.7", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + } + }, + "@babel/generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", + "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.8", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz", + "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", + "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz", + "integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-module-transforms": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" + } + }, + "@babel/helper-replace-supers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-simple-access": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" + } + }, + "@babel/helpers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", + "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", + "dev": true, + "requires": { + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/highlight": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz", + "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.8.tgz", + "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw==", + "dev": true + }, + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", + "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", + "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-proposal-optional-chaining": "^7.16.7" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.7.tgz", + "integrity": "sha512-dgqJJrcZoG/4CkMopzhPJjGxsIe9A8RlkQLnL/Vhhx8AA9ZuaRwGSlscSh42hazc7WSrya/IK7mTeoF0DP9tEw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz", + "integrity": "sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.16.4", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.16.7" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz", + "integrity": "sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", + "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", + "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz", + "integrity": "sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-react-display-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", + "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-react-jsx": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.7.tgz", + "integrity": "sha512-8D16ye66fxiE8m890w0BpPpngG9o9OVBBy0gH2E+2AR7qMR2ZpTYJEqLxAsoroenMId0p/wMW+Blc0meDgu0Ag==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/plugin-transform-react-jsx-development": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", + "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", + "dev": true, + "requires": { + "@babel/plugin-transform-react-jsx": "^7.16.7" + } + }, + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", + "integrity": "sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/polyfill": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz", + "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==", + "dev": true, + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/preset-env": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.8.tgz", + "integrity": "sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.16.8", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-async-generator-functions": "^7.16.8", + "@babel/plugin-proposal-class-properties": "^7.16.7", + "@babel/plugin-proposal-class-static-block": "^7.16.7", + "@babel/plugin-proposal-dynamic-import": "^7.16.7", + "@babel/plugin-proposal-export-namespace-from": "^7.16.7", + "@babel/plugin-proposal-json-strings": "^7.16.7", + "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", + "@babel/plugin-proposal-numeric-separator": "^7.16.7", + "@babel/plugin-proposal-object-rest-spread": "^7.16.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", + "@babel/plugin-proposal-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-private-methods": "^7.16.7", + "@babel/plugin-proposal-private-property-in-object": "^7.16.7", + "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.16.7", + "@babel/plugin-transform-async-to-generator": "^7.16.8", + "@babel/plugin-transform-block-scoped-functions": "^7.16.7", + "@babel/plugin-transform-block-scoping": "^7.16.7", + "@babel/plugin-transform-classes": "^7.16.7", + "@babel/plugin-transform-computed-properties": "^7.16.7", + "@babel/plugin-transform-destructuring": "^7.16.7", + "@babel/plugin-transform-dotall-regex": "^7.16.7", + "@babel/plugin-transform-duplicate-keys": "^7.16.7", + "@babel/plugin-transform-exponentiation-operator": "^7.16.7", + "@babel/plugin-transform-for-of": "^7.16.7", + "@babel/plugin-transform-function-name": "^7.16.7", + "@babel/plugin-transform-literals": "^7.16.7", + "@babel/plugin-transform-member-expression-literals": "^7.16.7", + "@babel/plugin-transform-modules-amd": "^7.16.7", + "@babel/plugin-transform-modules-commonjs": "^7.16.8", + "@babel/plugin-transform-modules-systemjs": "^7.16.7", + "@babel/plugin-transform-modules-umd": "^7.16.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", + "@babel/plugin-transform-new-target": "^7.16.7", + "@babel/plugin-transform-object-super": "^7.16.7", + "@babel/plugin-transform-parameters": "^7.16.7", + "@babel/plugin-transform-property-literals": "^7.16.7", + "@babel/plugin-transform-regenerator": "^7.16.7", + "@babel/plugin-transform-reserved-words": "^7.16.7", + "@babel/plugin-transform-shorthand-properties": "^7.16.7", + "@babel/plugin-transform-spread": "^7.16.7", + "@babel/plugin-transform-sticky-regex": "^7.16.7", + "@babel/plugin-transform-template-literals": "^7.16.7", + "@babel/plugin-transform-typeof-symbol": "^7.16.7", + "@babel/plugin-transform-unicode-escapes": "^7.16.7", + "@babel/plugin-transform-unicode-regex": "^7.16.7", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.16.8", + "babel-plugin-polyfill-corejs2": "^0.3.0", + "babel-plugin-polyfill-corejs3": "^0.5.0", + "babel-plugin-polyfill-regenerator": "^0.3.0", + "core-js-compat": "^3.20.2", + "semver": "^6.3.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/preset-react": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", + "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-react-display-name": "^7.16.7", + "@babel/plugin-transform-react-jsx": "^7.16.7", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-pure-annotations": "^7.16.7" + } + }, + "@babel/register": { + "version": "7.16.9", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.9.tgz", + "integrity": "sha512-jJ72wcghdRIlENfvALcyODhNoGE5j75cYHdC+aQMh6cU/P86tiiXTp9XYZct1UxUMo/4+BgQRyNZEGx0KWGS+g==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "find-cache-dir": "^2.0.0", + "make-dir": "^2.1.0", + "pirates": "^4.0.0", + "source-map-support": "^0.5.16" + } + }, + "@babel/runtime": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", + "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/traverse": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz", + "integrity": "sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.8", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.16.8", + "@babel/types": "^7.16.8", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", + "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "dependencies": { + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + } + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "dev": true + }, + "@types/cheerio": { + "version": "0.22.30", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.30.tgz", + "integrity": "sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "17.0.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz", + "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", + "dev": true + }, + "@types/q": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", + "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==", + "dev": true + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "address": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", + "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", + "dev": true + }, + "airbnb-prop-types": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz", + "integrity": "sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==", + "dev": true, + "requires": { + "array.prototype.find": "^2.1.1", + "function.prototype.name": "^1.1.2", + "is-regex": "^1.1.0", + "object-is": "^1.1.2", + "object.assign": "^4.1.0", + "object.entries": "^1.1.2", + "prop-types": "^15.7.2", + "prop-types-exact": "^1.2.0", + "react-is": "^16.13.1" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true + }, + "archive-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", + "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "dev": true, + "requires": { + "file-type": "^4.2.0" + }, + "dependencies": { + "file-type": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", + "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", + "dev": true + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "array.prototype.filter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz", + "integrity": "sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + } + }, + "array.prototype.find": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.1.2.tgz", + "integrity": "sha512-00S1O4ewO95OmmJW7EesWfQlrCrLEL8kZ40w3+GkLX2yTt0m2ggcePPa2uHPJ9KUmJvwRq+lCV9bD8Yim23x/Q==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + } + }, + "array.prototype.flat": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", + "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + } + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true, + "peer": true + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "autolinker": { + "version": "3.14.3", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.14.3.tgz", + "integrity": "sha512-t81i2bCpS+s+5FIhatoww9DmpjhbdiimuU9ATEuLxtZMQ7jLv9fyFn7SWNG8IkEfD4AmYyirL1ss9k1aqVWRvg==", + "dev": true, + "requires": { + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "autoprefixer": { + "version": "9.8.8", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz", + "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==", + "dev": true, + "requires": { + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001109", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "picocolors": "^0.2.1", + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz", + "integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.3.0", + "semver": "^6.1.1" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.0.tgz", + "integrity": "sha512-Hcrgnmkf+4JTj73GbK3bBhlVPiLL47owUAnoJIf69Hakl3q+KfodbDXiZWGMM7iqCZTxCG3Z2VRfPNYES4rXqQ==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.0", + "core-js-compat": "^3.20.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz", + "integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.0" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "bin-build": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", + "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", + "dev": true, + "requires": { + "decompress": "^4.0.0", + "download": "^6.2.2", + "execa": "^0.7.0", + "p-map-series": "^1.0.0", + "tempfile": "^2.0.0" + } + }, + "bin-check": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "executable": "^4.1.0" + } + }, + "bin-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", + "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "find-versions": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "bin-version-check": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", + "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", + "dev": true, + "requires": { + "bin-version": "^3.0.0", + "semver": "^5.6.0", + "semver-truncate": "^1.1.2" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "bin-wrapper": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", + "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", + "dev": true, + "requires": { + "bin-check": "^4.1.0", + "bin-version-check": "^4.0.0", + "download": "^7.1.0", + "import-lazy": "^3.1.0", + "os-filter-obj": "^2.0.0", + "pify": "^4.0.1" + }, + "dependencies": { + "download": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", + "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", + "dev": true, + "requires": { + "archive-type": "^4.0.0", + "caw": "^2.0.1", + "content-disposition": "^0.5.2", + "decompress": "^4.2.0", + "ext-name": "^5.0.0", + "file-type": "^8.1.0", + "filenamify": "^2.0.0", + "get-stream": "^3.0.0", + "got": "^8.3.1", + "make-dir": "^1.2.0", + "p-event": "^2.1.0", + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "file-type": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", + "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", + "dev": true + }, + "got": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", + "dev": true + }, + "p-event": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "dev": true, + "requires": { + "p-timeout": "^2.0.1" + } + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + } + } + }, + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "body": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "dev": true, + "requires": { + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" + }, + "dependencies": { + "bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", + "dev": true + }, + "raw-body": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", + "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", + "dev": true, + "requires": { + "bytes": "1", + "string_decoder": "0.10" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "body-parser": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", + "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", + "dev": true, + "requires": { + "bytes": "3.1.1", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.9.6", + "raw-body": "2.4.2", + "type-is": "~1.6.18" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "browserslist": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", + "escalade": "^3.1.1", + "node-releases": "^2.0.1", + "picocolors": "^1.0.0" + }, + "dependencies": { + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + } + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "bytes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", + "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "requires": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + } + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001299", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", + "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "caw": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", + "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", + "dev": true, + "requires": { + "get-proxy": "^2.0.0", + "isurl": "^1.0.0-alpha5", + "tunnel-agent": "^0.6.0", + "url-to-options": "^1.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cheerio": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", + "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", + "dev": true, + "requires": { + "cheerio-select": "^1.5.0", + "dom-serializer": "^1.3.2", + "domhandler": "^4.2.0", + "htmlparser2": "^6.1.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "tslib": "^2.2.0" + } + }, + "cheerio-select": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", + "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", + "dev": true, + "requires": { + "css-select": "^4.1.3", + "css-what": "^5.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0", + "domutils": "^2.7.0" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "coa": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", + "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", + "dev": true, + "requires": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "coffee-script": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", + "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "dev": true, + "requires": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + }, + "dependencies": { + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "color-string": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz", + "integrity": "sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "console-stream": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", + "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", + "dev": true + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "requires": { + "safe-buffer": "5.2.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "continuable-cache": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", + "dev": true + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "dev": true + }, + "core-js-compat": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.2.tgz", + "integrity": "sha512-qZEzVQ+5Qh6cROaTPFLNS4lkvQ6mBzE3R6A6EEpssj7Zr2egMHgsy4XapdifqJDGC9CBiNv7s+ejI96rLNQFdg==", + "dev": true, + "requires": { + "browserslist": "^4.19.1", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + } + }, + "create-react-class": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.7.0.tgz", + "integrity": "sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng==", + "dev": true, + "peer": true, + "requires": { + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crowdin-cli": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/crowdin-cli/-/crowdin-cli-0.3.0.tgz", + "integrity": "sha1-6smYmm/n/qrzMJA5evwYfGe0YZE=", + "dev": true, + "requires": { + "request": "^2.53.0", + "yamljs": "^0.2.1", + "yargs": "^2.3.0" + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "css-declaration-sorter": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", + "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", + "dev": true, + "requires": { + "postcss": "^7.0.1", + "timsort": "^0.3.0" + } + }, + "css-select": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", + "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^5.1.0", + "domhandler": "^4.3.0", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + } + }, + "css-select-base-adapter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", + "dev": true + }, + "css-tree": { + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "dev": true, + "requires": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "css-what": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", + "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", + "dev": true + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "cssnano": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz", + "integrity": "sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.0", + "cssnano-preset-default": "^4.0.8", + "is-resolvable": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "cssnano-preset-default": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz", + "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==", + "dev": true, + "requires": { + "css-declaration-sorter": "^4.0.1", + "cssnano-util-raw-cache": "^4.0.1", + "postcss": "^7.0.0", + "postcss-calc": "^7.0.1", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-svgo": "^4.0.3", + "postcss-unique-selectors": "^4.0.1" + } + }, + "cssnano-util-get-arguments": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", + "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", + "dev": true + }, + "cssnano-util-get-match": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", + "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", + "dev": true + }, + "cssnano-util-raw-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", + "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "cssnano-util-same-parent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", + "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", + "dev": true + }, + "csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "requires": { + "css-tree": "^1.1.2" + }, + "dependencies": { + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + } + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + } + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "dev": true, + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-port-alt": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", + "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", + "dev": true, + "requires": { + "address": "^1.0.1", + "debug": "^2.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "diacritics-map": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", + "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=", + "dev": true + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + } + }, + "discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=", + "dev": true + }, + "docusaurus": { + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/docusaurus/-/docusaurus-1.14.7.tgz", + "integrity": "sha512-UWqar4ZX0lEcpLc5Tg+MwZ2jhF/1n1toCQRSeoxDON/D+E9ToLr+vTRFVMP/Tk84NXSVjZFRlrjWwM2pXzvLsQ==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/polyfill": "^7.12.1", + "@babel/preset-env": "^7.12.1", + "@babel/preset-react": "^7.12.5", + "@babel/register": "^7.12.1", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.6", + "autoprefixer": "^9.7.5", + "babylon": "^6.18.0", + "chalk": "^3.0.0", + "classnames": "^2.2.6", + "commander": "^4.0.1", + "crowdin-cli": "^0.3.0", + "cssnano": "^4.1.10", + "enzyme": "^3.10.0", + "enzyme-adapter-react-16": "^1.15.1", + "escape-string-regexp": "^2.0.0", + "express": "^4.17.1", + "feed": "^4.2.1", + "fs-extra": "^9.0.1", + "gaze": "^1.1.3", + "github-slugger": "^1.3.0", + "glob": "^7.1.6", + "highlight.js": "^9.16.2", + "imagemin": "^6.0.0", + "imagemin-gifsicle": "^6.0.1", + "imagemin-jpegtran": "^6.0.0", + "imagemin-optipng": "^6.0.0", + "imagemin-svgo": "^7.0.0", + "lodash": "^4.17.20", + "markdown-toc": "^1.2.0", + "mkdirp": "^0.5.1", + "portfinder": "^1.0.28", + "postcss": "^7.0.23", + "prismjs": "^1.22.0", + "react": "^16.8.4", + "react-dev-utils": "^11.0.1", + "react-dom": "^16.8.4", + "remarkable": "^2.0.0", + "request": "^2.88.0", + "shelljs": "^0.8.4", + "sitemap": "^3.2.2", + "tcp-port-used": "^1.0.1", + "tiny-lr": "^1.1.1", + "tree-node-cli": "^1.2.5", + "truncate-html": "^1.0.3" + }, + "dependencies": { + "enzyme-adapter-react-16": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz", + "integrity": "sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g==", + "dev": true, + "requires": { + "enzyme-adapter-utils": "^1.14.0", + "enzyme-shallow-equal": "^1.0.4", + "has": "^1.0.3", + "object.assign": "^4.1.2", + "object.values": "^1.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.13.1", + "react-test-renderer": "^16.0.0-0", + "semver": "^5.7.0" + } + }, + "react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + } + }, + "react-test-renderer": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.14.0.tgz", + "integrity": "sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "react-is": "^16.8.6", + "scheduler": "^0.19.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "domhandler": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", + "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "download": { + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", + "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", + "dev": true, + "requires": { + "caw": "^2.0.0", + "content-disposition": "^0.5.2", + "decompress": "^4.0.0", + "ext-name": "^5.0.0", + "file-type": "5.2.0", + "filenamify": "^2.0.0", + "get-stream": "^3.0.0", + "got": "^7.0.0", + "make-dir": "^1.0.0", + "p-event": "^1.0.0", + "pify": "^3.0.0" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.44", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.44.tgz", + "integrity": "sha512-tHGWiUUmY7GABK8+DNcr474cnZDTzD8x1736SlDosVH8+/vRJeqfaIBAEHFtMjddz/0T4rKKYsxEc8BwQRdBpw==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "peer": true, + "requires": { + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "peer": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + }, + "enzyme": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", + "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", + "dev": true, + "requires": { + "array.prototype.flat": "^1.2.3", + "cheerio": "^1.0.0-rc.3", + "enzyme-shallow-equal": "^1.0.1", + "function.prototype.name": "^1.1.2", + "has": "^1.0.3", + "html-element-map": "^1.2.0", + "is-boolean-object": "^1.0.1", + "is-callable": "^1.1.5", + "is-number-object": "^1.0.4", + "is-regex": "^1.0.5", + "is-string": "^1.0.5", + "is-subset": "^0.1.1", + "lodash.escape": "^4.0.1", + "lodash.isequal": "^4.5.0", + "object-inspect": "^1.7.0", + "object-is": "^1.0.2", + "object.assign": "^4.1.0", + "object.entries": "^1.1.1", + "object.values": "^1.1.1", + "raf": "^3.4.1", + "rst-selector-parser": "^2.2.3", + "string.prototype.trim": "^1.2.1" + } + }, + "enzyme-adapter-utils": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz", + "integrity": "sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==", + "dev": true, + "requires": { + "airbnb-prop-types": "^2.16.0", + "function.prototype.name": "^1.1.3", + "has": "^1.0.3", + "object.assign": "^4.1.2", + "object.fromentries": "^2.0.3", + "prop-types": "^15.7.2", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "enzyme-shallow-equal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz", + "integrity": "sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==", + "dev": true, + "requires": { + "has": "^1.0.3", + "object-is": "^1.1.2" + } + }, + "error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "dev": true, + "requires": { + "string-template": "~0.2.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "exec-buffer": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz", + "integrity": "sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "p-finally": "^1.0.0", + "pify": "^3.0.0", + "rimraf": "^2.5.4", + "tempfile": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "requires": { + "pify": "^2.2.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "express": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", + "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.4.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.9.6", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.17.2", + "serve-static": "1.14.2", + "setprototypeof": "1.2.0", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "dev": true, + "requires": { + "mime-db": "^1.28.0" + } + }, + "ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "dev": true, + "requires": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-xml-parser": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "dev": true, + "requires": { + "strnum": "^1.0.4" + } + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "fbjs": { + "version": "0.8.18", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.18.tgz", + "integrity": "sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA==", + "dev": true, + "peer": true, + "requires": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.30" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "dev": true, + "peer": true + } + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "feed": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz", + "integrity": "sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==", + "dev": true, + "requires": { + "xml-js": "^1.6.11" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "file-type": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-10.11.0.tgz", + "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==", + "dev": true + }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "dev": true + }, + "filenamify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", + "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", + "dev": true, + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "filesize": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", + "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==", + "dev": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "requires": { + "semver-regex": "^2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "fork-ts-checker-webpack-plugin": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz", + "integrity": "sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "chalk": "^2.4.1", + "micromatch": "^3.1.10", + "minimatch": "^3.0.4", + "semver": "^5.6.0", + "tapable": "^1.0.0", + "worker-rpc": "^0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "functions-have-names": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.2.tgz", + "integrity": "sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==", + "dev": true + }, + "gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "requires": { + "globule": "^1.0.0" + } + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-proxy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", + "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", + "dev": true, + "requires": { + "npm-conf": "^1.1.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gifsicle": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-4.0.1.tgz", + "integrity": "sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg==", + "dev": true, + "requires": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "execa": "^1.0.0", + "logalot": "^2.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "github-slugger": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.4.0.tgz", + "integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==", + "dev": true + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "requires": { + "global-prefix": "^3.0.0" + } + }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", + "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "globule": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.3.tgz", + "integrity": "sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg==", + "dev": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + }, + "dependencies": { + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true + }, + "gray-matter": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", + "integrity": "sha1-MELZrewqHe1qdwep7SOA+KF6Qw4=", + "dev": true, + "requires": { + "ansi-red": "^0.1.1", + "coffee-script": "^1.12.4", + "extend-shallow": "^2.0.1", + "js-yaml": "^3.8.1", + "toml": "^2.3.2" + } + }, + "gulp-header": { + "version": "1.8.12", + "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.12.tgz", + "integrity": "sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ==", + "dev": true, + "requires": { + "concat-with-sourcemaps": "*", + "lodash.template": "^4.4.0", + "through2": "^2.0.0" + } + }, + "gzip-size": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "pify": "^4.0.1" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hex-color-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", + "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", + "dev": true + }, + "highlight.js": { + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "hsl-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", + "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", + "dev": true + }, + "hsla-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", + "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", + "dev": true + }, + "html-element-map": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", + "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", + "dev": true, + "requires": { + "array.prototype.filter": "^1.0.0", + "call-bind": "^1.0.2" + } + }, + "htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + } + }, + "http-parser-js": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz", + "integrity": "sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "imagemin": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-6.1.0.tgz", + "integrity": "sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A==", + "dev": true, + "requires": { + "file-type": "^10.7.0", + "globby": "^8.0.1", + "make-dir": "^1.0.0", + "p-pipe": "^1.1.0", + "pify": "^4.0.1", + "replace-ext": "^1.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + } + } + }, + "imagemin-gifsicle": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz", + "integrity": "sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng==", + "dev": true, + "requires": { + "exec-buffer": "^3.0.0", + "gifsicle": "^4.0.0", + "is-gif": "^3.0.0" + } + }, + "imagemin-jpegtran": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz", + "integrity": "sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g==", + "dev": true, + "requires": { + "exec-buffer": "^3.0.0", + "is-jpg": "^2.0.0", + "jpegtran-bin": "^4.0.0" + } + }, + "imagemin-optipng": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz", + "integrity": "sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A==", + "dev": true, + "requires": { + "exec-buffer": "^3.0.0", + "is-png": "^1.0.0", + "optipng-bin": "^5.0.0" + } + }, + "imagemin-svgo": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz", + "integrity": "sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg==", + "dev": true, + "requires": { + "is-svg": "^4.2.1", + "svgo": "^1.3.2" + } + }, + "immer": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", + "integrity": "sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==", + "dev": true + }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, + "import-lazy": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "requires": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + } + }, + "ip-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-color-stop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", + "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", + "dev": true, + "requires": { + "css-color-names": "^0.0.4", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0" + } + }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true + }, + "is-gif": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-gif/-/is-gif-3.0.0.tgz", + "integrity": "sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw==", + "dev": true, + "requires": { + "file-type": "^10.4.0" + } + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-jpg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-jpg/-/is-jpg-2.0.0.tgz", + "integrity": "sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc=", + "dev": true + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-png": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-1.1.0.tgz", + "integrity": "sha1-1XSxK/J1wDUEVVcLDltXqwYgd84=", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true + }, + "is-root": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", + "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", + "dev": true + }, + "is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-subset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", + "dev": true + }, + "is-svg": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.3.2.tgz", + "integrity": "sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw==", + "dev": true, + "requires": { + "fast-xml-parser": "^3.19.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "is2": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.7.tgz", + "integrity": "sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "ip-regex": "^4.1.0", + "is-url": "^1.2.4" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true, + "peer": true, + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "jpegtran-bin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz", + "integrity": "sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ==", + "dev": true, + "requires": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "logalot": "^2.0.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "dev": true, + "requires": { + "set-getter": "^0.1.0" + } + }, + "list-item": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/list-item/-/list-item-1.1.1.tgz", + "integrity": "sha1-DGXQDih8tmPMs8s4Sad+iewmilY=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "extend-shallow": "^2.0.1", + "is-number": "^2.1.0", + "repeat-string": "^1.5.2" + } + }, + "livereload-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=", + "dev": true + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=", + "dev": true + }, + "lodash.chunk": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", + "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.escape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", + "integrity": "sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg=", + "dev": true + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.padstart": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", + "dev": true + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", + "dev": true + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=", + "dev": true + }, + "lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=", + "dev": true + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", + "dev": true + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "logalot": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", + "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", + "dev": true, + "requires": { + "figures": "^1.3.5", + "squeak": "^1.0.0" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lpad-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", + "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "indent-string": "^2.1.0", + "longest": "^1.0.0", + "meow": "^3.3.0" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "markdown-link": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/markdown-link/-/markdown-link-0.1.1.tgz", + "integrity": "sha1-MsXGUZmmRXMWMi0eQinRNAfIx88=", + "dev": true + }, + "markdown-toc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/markdown-toc/-/markdown-toc-1.2.0.tgz", + "integrity": "sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg==", + "dev": true, + "requires": { + "concat-stream": "^1.5.2", + "diacritics-map": "^0.1.0", + "gray-matter": "^2.1.0", + "lazy-cache": "^2.0.2", + "list-item": "^1.1.1", + "markdown-link": "^0.1.1", + "minimist": "^1.2.0", + "mixin-deep": "^1.1.3", + "object.pick": "^1.2.0", + "remarkable": "^1.7.1", + "repeat-string": "^1.6.1", + "strip-color": "^0.1.0" + }, + "dependencies": { + "autolinker": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", + "integrity": "sha1-BlK0kYgYefB3XazgzcoyM5QqTkc=", + "dev": true, + "requires": { + "gulp-header": "^1.7.1" + } + }, + "remarkable": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.4.tgz", + "integrity": "sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg==", + "dev": true, + "requires": { + "argparse": "^1.0.10", + "autolinker": "~0.28.0" + } + } + } + }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "mdn-data": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", + "dev": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "microevent.ts": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/microevent.ts/-/microevent.ts-0.1.1.tgz", + "integrity": "sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "dev": true + }, + "mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "dev": true, + "requires": { + "mime-db": "1.51.0" + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "moo": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", + "integrity": "sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "peer": true, + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, + "node-releases": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", + "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true + }, + "npm-conf": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", + "dev": true, + "requires": { + "config-chain": "^1.1.11", + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "nth-check": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.entries": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", + "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "object.fromentries": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", + "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", + "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, + "optipng-bin": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-5.1.0.tgz", + "integrity": "sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA==", + "dev": true, + "requires": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "logalot": "^2.0.0" + } + }, + "os-filter-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", + "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", + "dev": true, + "requires": { + "arch": "^2.1.0" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-event": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", + "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", + "dev": true, + "requires": { + "p-timeout": "^1.1.1" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-map-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", + "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "p-pipe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz", + "integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=", + "dev": true + }, + "p-reduce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "dev": true + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "requires": { + "parse5": "^6.0.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pirates": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", + "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "postcss-calc": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", + "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", + "dev": true, + "requires": { + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" + } + }, + "postcss-colormin": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", + "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-convert-values": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", + "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-discard-comments": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", + "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-duplicates": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", + "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-empty": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", + "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-overridden": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", + "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-merge-longhand": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", + "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", + "dev": true, + "requires": { + "css-color-names": "0.0.4", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "stylehacks": "^4.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-merge-rules": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", + "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "cssnano-util-same-parent": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0", + "vendors": "^1.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-minify-font-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", + "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-gradients": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", + "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-params": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", + "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "browserslist": "^4.0.0", + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-selectors": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", + "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-normalize-charset": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", + "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-normalize-display-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", + "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-positions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", + "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-repeat-style": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", + "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-string": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", + "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", + "dev": true, + "requires": { + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-timing-functions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", + "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-unicode": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", + "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-url": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", + "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-whitespace": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", + "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-ordered-values": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", + "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-reduce-initial": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", + "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "postcss-reduce-transforms": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", + "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-selector-parser": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.8.tgz", + "integrity": "sha512-D5PG53d209Z1Uhcc0qAZ5U3t5HagH3cxu+WLZ22jt3gLUpXM4eXXfiO14jiDWST3NNooX/E8wISfOhZ9eIjGTQ==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-svgo": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz", + "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "svgo": "^1.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-unique-selectors": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", + "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "postcss": "^7.0.0", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "prismjs": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.26.0.tgz", + "integrity": "sha512-HUoH9C5Z3jKkl3UunCyiD5jwk0+Hz0fIgQ2nbwU2Oo/ceuTAQAg+pPVnfdt2TJWRVLcxKh9iuoYDUSc8clb5UQ==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "peer": true, + "requires": { + "asap": "~2.0.3" + } + }, + "prompts": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", + "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "prop-types-exact": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prop-types-exact/-/prop-types-exact-1.2.0.tgz", + "integrity": "sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA==", + "dev": true, + "requires": { + "has": "^1.0.3", + "object.assign": "^4.1.0", + "reflect.ownkeys": "^0.2.0" + } + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "dev": true + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "dev": true, + "requires": { + "performance-now": "^2.1.0" + } + }, + "railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=", + "dev": true + }, + "randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "dev": true, + "requires": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + } + }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", + "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "dev": true, + "requires": { + "bytes": "3.1.1", + "http-errors": "1.8.1", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "react": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/react/-/react-15.7.0.tgz", + "integrity": "sha512-5/MMRYmpmM0sMTHGLossnJCrmXQIiJilD6y3YN3TzAwGFj6zdnMtFv6xmi65PHKRV+pehIHpT7oy67Sr6s9AHA==", + "dev": true, + "peer": true, + "requires": { + "create-react-class": "^15.6.0", + "fbjs": "^0.8.9", + "loose-envify": "^1.1.0", + "object-assign": "^4.1.0", + "prop-types": "^15.5.10" + } + }, + "react-dev-utils": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.4.tgz", + "integrity": "sha512-dx0LvIGHcOPtKbeiSUM4jqpBl3TcY7CDjZdfOIcKeznE7BWr9dg0iPG90G5yfVQ+p/rGNMXdbfStvzQZEVEi4A==", + "dev": true, + "requires": { + "@babel/code-frame": "7.10.4", + "address": "1.1.2", + "browserslist": "4.14.2", + "chalk": "2.4.2", + "cross-spawn": "7.0.3", + "detect-port-alt": "1.1.6", + "escape-string-regexp": "2.0.0", + "filesize": "6.1.0", + "find-up": "4.1.0", + "fork-ts-checker-webpack-plugin": "4.1.6", + "global-modules": "2.0.0", + "globby": "11.0.1", + "gzip-size": "5.1.1", + "immer": "8.0.1", + "is-root": "2.1.0", + "loader-utils": "2.0.0", + "open": "^7.0.2", + "pkg-up": "3.1.0", + "prompts": "2.4.0", + "react-error-overlay": "^6.0.9", + "recursive-readdir": "2.2.2", + "shell-quote": "1.7.2", + "strip-ansi": "6.0.0", + "text-table": "0.2.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.14.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz", + "integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001125", + "electron-to-chromium": "^1.3.564", + "escalade": "^3.0.2", + "node-releases": "^1.1.61" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "fast-glob": { + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.10.tgz", + "integrity": "sha512-s9nFhFnvR63wls6/kM88kQqDhMu0AfdjqouE2l5GVQPbqLgyFjjU5ry/r2yKsJxpb9Py1EYNqieFrmMaX4v++A==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "node-releases": { + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", + "dev": true + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "react-error-overlay": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz", + "integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==", + "dev": true + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "react-sidecar": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/react-sidecar/-/react-sidecar-0.1.1.tgz", + "integrity": "sha1-5JcLyV5JXxaI0nJ/lI78JXVViE4=", + "dev": true, + "requires": {} + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "dependencies": { + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "recursive-readdir": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", + "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", + "dev": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "reflect.ownkeys": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", + "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=", + "dev": true + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", + "dev": true, + "requires": { + "regenerate": "^1.4.2" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "regexpu-core": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", + "dev": true, + "requires": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remarkable": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", + "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", + "dev": true, + "requires": { + "argparse": "^1.0.10", + "autolinker": "^3.11.0" + } + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true + } + } + }, + "resolve": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", + "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", + "dev": true, + "requires": { + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rgb-regex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", + "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", + "dev": true + }, + "rgba-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", + "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "rst-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", + "integrity": "sha1-gbIw6i/MYGbInjRy3nlChdmwPZE=", + "dev": true, + "requires": { + "lodash.flattendeep": "^4.4.0", + "nearley": "^2.7.10" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-json-parse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", + "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dev": true, + "requires": { + "commander": "^2.8.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true + }, + "semver-truncate": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", + "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", + "dev": true, + "requires": { + "semver": "^5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "send": { + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", + "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "1.8.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", + "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.2" + } + }, + "set-getter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", + "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", + "dev": true, + "requires": { + "to-object-path": "^0.3.0" + } + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true, + "peer": true + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", + "dev": true + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + } + } + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "sitemap": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-3.2.2.tgz", + "integrity": "sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg==", + "dev": true, + "requires": { + "lodash.chunk": "^4.2.0", + "lodash.padstart": "^4.6.1", + "whatwg-url": "^7.0.0", + "xmlbuilder": "^13.0.0" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "dev": true, + "requires": { + "sort-keys": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "squeak": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", + "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "console-stream": "^0.1.1", + "lpad-align": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "string.prototype.trim": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz", + "integrity": "sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-color": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", + "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", + "dev": true + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "requires": { + "is-natural-number": "^4.0.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true + }, + "stylehacks": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", + "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "svgo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "css-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "css-what": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", + "dev": true + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + }, + "dependencies": { + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "tcp-port-used": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz", + "integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==", + "dev": true, + "requires": { + "debug": "4.3.1", + "is2": "^2.0.6" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", + "dev": true + }, + "tempfile": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", + "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", + "dev": true, + "requires": { + "temp-dir": "^1.0.0", + "uuid": "^3.0.1" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, + "tiny-lr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", + "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", + "dev": true, + "requires": { + "body": "^5.1.0", + "debug": "^3.1.0", + "faye-websocket": "~0.10.0", + "livereload-js": "^2.3.0", + "object-assign": "^4.1.0", + "qs": "^6.4.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true + }, + "toml": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz", + "integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==", + "dev": true + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "tree-node-cli": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/tree-node-cli/-/tree-node-cli-1.4.0.tgz", + "integrity": "sha512-hBc/cp7rTSHFSFvaTzmHNYyJv87UJBsxsfCoq2DtDQuMES4vhnLuvXZit/asGtZG8edWTCydWeFWoBz9LYkJdQ==", + "dev": true, + "requires": { + "commander": "^5.0.0" + }, + "dependencies": { + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + } + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "truncate-html": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/truncate-html/-/truncate-html-1.0.4.tgz", + "integrity": "sha512-FpDAlPzpJ3jlZiNEahRs584FS3jOSQafgj4cC9DmAYPct6uMZDLY625+eErRd43G35vGDrNq3i7b4aYUQ/Bxqw==", + "dev": true, + "requires": { + "@types/cheerio": "^0.22.8", + "cheerio": "0.22.0" + }, + "dependencies": { + "cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "dev": true, + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "dev": true + }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dev": true, + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", + "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", + "dev": true, + "peer": true + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unquote": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vendors": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + } + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true + }, + "whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", + "dev": true, + "peer": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "worker-rpc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/worker-rpc/-/worker-rpc-0.1.1.tgz", + "integrity": "sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg==", + "dev": true, + "requires": { + "microevent.ts": "~0.1.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "dev": true, + "requires": { + "sax": "^1.2.4" + } + }, + "xmlbuilder": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz", + "integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yamljs": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.2.10.tgz", + "integrity": "sha1-SBzHwlynOvWfWR8MluPOVsdXpA8=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "glob": "^7.0.5" + } + }, + "yargs": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-2.3.0.tgz", + "integrity": "sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s=", + "dev": true, + "requires": { + "wordwrap": "0.0.2" + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 0a744121f..8a4c7738a 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -65,6 +65,7 @@ class HomeSplash extends React.Component { + @@ -91,46 +92,46 @@ class Index extends React.Component { ); - const FeatureCallout = () => ( -
-

Welcome to zio-sql

- - TODO: Tagline - - - - TODO: Long description (paragraph) - -
- ); - - const Features = () => ( - - {[ - { - content: 'TODO: Content 1', - image: `${baseUrl}img/undraw_tweetstorm.svg`, - imageAlign: 'top', - title: 'TODO: Title 1', - }, - { - content: 'TODO: Content 2', - image: `${baseUrl}img/undraw_operating_system.svg`, - imageAlign: 'top', - title: 'TODO: Title 2', - }, - ]} - - ); + // const FeatureCallout = () => ( + //
+ //

Welcome to zio-sql

+ // + // TODO: Tagline + // + + // + // TODO: Long description (paragraph) + // + //
+ // ); + + // const Features = () => ( + // + // {[ + // { + // content: 'TODO: Content 1', + // image: `${baseUrl}img/undraw_tweetstorm.svg`, + // imageAlign: 'top', + // title: 'TODO: Title 1', + // }, + // { + // content: 'TODO: Content 2', + // image: `${baseUrl}img/undraw_operating_system.svg`, + // imageAlign: 'top', + // title: 'TODO: Title 2', + // }, + // ]} + // + // ); return (
- - + {/* + */}
); diff --git a/website/sidebars.json b/website/sidebars.json index 2ae03049a..39f810ba5 100755 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -9,6 +9,11 @@ "usecases/usecases_index" ] }, + "resources-sidebar": { + "Resources": [ + "resources/resources_index" + ] + }, "about-sidebar": { "About": [ "about/about_index", diff --git a/website/siteConfig.js b/website/siteConfig.js index 907141a41..adad03280 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -21,8 +21,8 @@ const users = [ ]; const siteConfig = { - title: 'zio-sql', - tagline: 'TODO: Tagline', + title: 'ZIO SQL', + tagline: 'Type-safe, composable SQL for ZIO applications', url: 'https://zio.github.io', baseUrl: '/zio-sql/', @@ -33,6 +33,7 @@ const siteConfig = { headerLinks: [ {doc: 'overview/overview_index', label: 'Overview'}, {doc: 'usecases/usecases_index', label: 'Use Cases'}, + {doc: 'resources/resources_index', label: 'Resources'}, {href: 'api/index.html', label: 'API'}, {doc: 'about/about_index', label: 'About'} ], diff --git a/website/static/css/custom.css b/website/static/css/custom.css index ab26b8c91..21250e57d 100755 --- a/website/static/css/custom.css +++ b/website/static/css/custom.css @@ -1,9 +1,16 @@ /* your custom css */ +.mainContainer .wrapper .post .postHeaderTitle { + margin-top: 45px; +} + @media only screen and (min-device-width: 360px) and (max-device-width: 736px) { } @media only screen and (min-width: 1024px) { + .mainContainer .wrapper .post .postHeaderTitle { + margin-top: 10px; + } } @media only screen and (max-width: 1023px) { @@ -38,4 +45,5 @@ a { .input-group-append { margin-left: -1px; -} \ No newline at end of file +} + From 92f1c8f0d4903be38634ca1f97b30a08a0da86eb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 13 Jan 2022 22:31:24 +0100 Subject: [PATCH 325/673] Update scala-library to 2.13.8 --- .github/workflows/ci.yml | 2 +- project/BuildHelper.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8db28462..5bffb75e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.15', '2.13.6'] + scala: ['2.12.15', '2.13.8'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index d6eaea573..2e5e44a5c 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -11,7 +11,7 @@ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { val SilencerVersion = "1.7.8" val Scala212 = "2.12.15" - val Scala213 = "2.13.6" + val Scala213 = "2.13.8" val ScalaDotty = "3.0.0-RC3" def buildInfoSettings(packageName: String) = From 02b0f45bbb34e34a85ec5a8f026594adaceb9f61 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 15 Jan 2022 01:06:06 +0100 Subject: [PATCH 326/673] Update zio-schema to 0.1.7 --- build.sbt | 2 +- .../zio/sql/postgresql/PostgresModule.scala | 63 ++++++++++--------- .../sql/postgresql/PostgresModuleSpec.scala | 9 +-- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/build.sbt b/build.sbt index cf669cb5e..9eb6701b1 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "1.0.13" -val zioSchemaVersion = "0.1.4" +val zioSchemaVersion = "0.1.7" val testcontainersVersion = "1.16.0" val testcontainersScalaVersion = "0.39.12" diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index d921179ab..019fe1d15 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -249,10 +249,10 @@ trait PostgresModule extends Jdbc { self => } implicit val localDateSchema = - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) implicit val zonedDateTimeShema = - Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME)) + Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME)) object PostgresFunctionDef { import PostgresSpecific._ @@ -405,43 +405,44 @@ trait PostgresModule extends Jdbc { self => StandardType.fromString(typeTag.tag) match { case Some(v) => v match { - case BigDecimalType => + case BigDecimalType => println("foo") render(value) - case StandardType.Instant(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") - case CharType => render(s"'${value}'") - case IntType => render(value) - case StandardType.MonthDay => render(s"'${value}'") - case BinaryType => render(s"'${value}'") - case StandardType.Month => render(s"'${value}'") - case StandardType.LocalDateTime(formatter) => + case StandardType.InstantType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[Instant])}'") + case CharType => render(s"'${value}'") + case IntType => render(value) + case StandardType.MonthDayType => render(s"'${value}'") + case BinaryType => render(s"'${value}'") + case StandardType.MonthType => render(s"'${value}'") + case StandardType.LocalDateTimeType(formatter) => render(s"'${formatter.format(value.asInstanceOf[LocalDateTime])}'") - case UnitType => () // ??? - case StandardType.YearMonth => render(s"'${value}'") - case DoubleType => render(value) - case StandardType.Year => render(s"'${value}'") - case StandardType.OffsetDateTime(formatter) => + case UnitType => () // ??? + case StandardType.YearMonthType => render(s"'${value}'") + case DoubleType => render(value) + case StandardType.YearType => render(s"'${value}'") + case StandardType.OffsetDateTimeType(formatter) => render(s"'${formatter.format(value.asInstanceOf[OffsetDateTime])}'") - case StandardType.ZonedDateTime(_) => + case StandardType.ZonedDateTimeType(_) => render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") - case BigIntegerType => render(s"'${value}'") - case UUIDType => render(s"'${value}'") - case StandardType.ZoneOffset => render(s"'${value}'") - case ShortType => render(value) - case StandardType.LocalTime(formatter) => + case BigIntegerType => render(s"'${value}'") + case UUIDType => render(s"'${value}'") + case StandardType.ZoneOffsetType => render(s"'${value}'") + case ShortType => render(value) + case StandardType.LocalTimeType(formatter) => render(s"'${formatter.format(value.asInstanceOf[LocalTime])}'") - case StandardType.OffsetTime(formatter) => + case StandardType.OffsetTimeType(formatter) => render(s"'${formatter.format(value.asInstanceOf[OffsetTime])}'") - case LongType => render(value) - case StringType => render(s"'${value}'") - case StandardType.Period => render(s"'${value}'") - case StandardType.ZoneId => render(s"'${value}'") - case StandardType.LocalDate(formatter) => + case LongType => render(value) + case StringType => render(s"'${value}'") + case StandardType.PeriodType => render(s"'${value}'") + case StandardType.ZoneIdType => render(s"'${value}'") + case StandardType.LocalDateType(formatter) => render(s"'${formatter.format(value.asInstanceOf[LocalDate])}'") - case BoolType => render(value) - case DayOfWeekType => render(s"'${value}'") - case FloatType => render(value) - case StandardType.Duration(_) => render(s"'${value}'") + case BoolType => render(value) + case DayOfWeekType => render(s"'${value}'") + case FloatType => render(value) + case StandardType.Duration(_) => render(s"'${value}'") } case None => () } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 6e846916b..ab0832c6a 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -403,20 +403,19 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { implicit val customerRowSchema = Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( - Chunk.empty, Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), Schema.Field( "localDate", - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) ), Schema.Field("cretedTimestampString", Schema.primitive[String](zio.schema.StandardType.StringType)), Schema.Field( "createdTimestamp", Schema.primitive[ZonedDateTime]( - zio.schema.StandardType.ZonedDateTime(DateTimeFormatter.ISO_ZONED_DATE_TIME) + zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME) ) ), CustomerRow.apply, @@ -454,12 +453,11 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { final case class InputOrders(uuid: UUID, customerId: UUID, localDate: LocalDate) implicit val inputOrdersSchema = Schema.CaseClass3[UUID, UUID, LocalDate, InputOrders]( - Chunk.empty, Schema.Field("uuid", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("customerId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field( "localDate", - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDate(DateTimeFormatter.ISO_DATE)) + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) ), InputOrders.apply, _.uuid, @@ -511,7 +509,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) implicit val orderDetailsRowSchema = Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetailsRow]( - Chunk.empty, Schema.Field("orderId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("productId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("quantity", Schema.primitive[Int](zio.schema.StandardType.IntType)), From c7743342e8e052669cefb4009b8b52a238cfce75 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 16 Jan 2022 00:38:31 +0100 Subject: [PATCH 327/673] added documentation about inserts & subqueries --- README.md | 2 +- docs/overview/index.md | 256 +++++++++++++++++- .../sql/sqlserver/SqlServerModuleSpec.scala | 19 +- 3 files changed, 262 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 9c80b3433..08adf1e3e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Type-safe DSL | :white_check_mark: Running Reads | :heavy_check_mark: Running Deletes | :heavy_check_mark: Running Updates | :heavy_check_mark: -Running Inserts | +Running Inserts | :heavy_check_mark: Transactions | :white_check_mark: Connection pool | :white_check_mark: diff --git a/docs/overview/index.md b/docs/overview/index.md index 150813b2b..e3da16f62 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -82,8 +82,262 @@ TODO: details ## Inserts -TODO: details +In this chapter we will explore how to write type safe inserts with zio-sql. + +### Table description +As usual, in order to use the DSL, first thing we need to do is to create meta-model of our table. Let’s imagine we have a *customers* table in postgres (in case of a different database just extend the appropriate module) +```scala +import zio.sql.postgresql.PostgresModule + +trait TableModel extends PostgresModule { + + import ColumnSet._ + + val customers = + (uuid("id") ++ localDate(“date_of_birth”) ++ string("first_name") ++ string("last_name") ++ boolean("verified_customer") ++ zonedDateTime("created")) + .table("customers") + + val customerId :*: dob :*: fName :*: lName :*: verified :*: created :*: _ = customers.columns +} +``` +Then, to use zio-sql ’s inserts, just mix in *TableModel* trait from above, to your repository. + +In case you’re wondering what those extracted columns are (customerId, dob etc), they are of a type called *Expr*. +*Expr[F, A, B]* is fundamental abstraction in zio-sql which basically represents description of any SQL expression of type **B**, having a source of type **A** and a phantom type **F**. +To give specific example, type of *fName* is +```scala +Expr[Features.Source[String(“first_name”)], customers.TableType, String]. +``` +This gives DSL huge power to remember table from which the column comes from, type of the columns and what kind of Expr we are dealing with. Don’t worry, you don’t need to remember any of this, but from now on we will use those Expr instances in our inserts. + +In general, DSL is giving us two options how to approach inserts. We can insert either tuple values or used defined case class - which requires zio-schema instance (more on that later). +Also your custom data type or tuple need to consist only of the types for which there is a **TypeTag** instance defined. Each sql module has a finite set of such types - those are the types that particular module can work with. In other words, types inside your tuples or case class need to correspond with the types of the extracted Exprs. + +### Insert tuples +Let’s say we want to build the query like the following one: +```sql +insert into + customers(id, date_of_birth, first_name, last_name, verified_customer, created) +values + ('60b01fc9-c902-4468-8d49-3c0f989def37', ‘1983-01-05’, 'Ronald', 'Russell', true, '2020-11-21 19:10:25+00') +``` +zio-sql gives us nice typesafe DSL that feels similar to writing SQL: +```scala +insertInto(customers) + (customerId ++ dob ++ fName ++ lName ++ verified ++ created) + .values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) +``` +In case you mess up the order of values - like e.g. you put Boolean where String is expected - or you don’t specify all the not null columns of the table, above query fails with compile-time error. + +Some details about syntax: *insertInto* method takes two value parameters. One is our table *customers* that we created before in *Table description* section. The other is an *HList like* collection of Expr’s, called *Selection*. You create it by appending Exprs with “++” operator. +*values* method takes a Tuple6 of type (UUID, LocalDate, String, String, Boolean, ZonedDateTime). The required tuple is dependent on combination of Exprs. Just like with normal sql insert, you could swap *fName* with *dob* Expr and corresponding values and your query will work just fine. Compiler will only let you build such queries that won’t explode in runtime (in case you described your table correctly of course ! ) + +If we need to insert multiple values at once, all we need to do is to create any *Seq* of tuples and stick it into the overloaded *values* method. +```scala +val data = + List( + (UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald1", "Russel1", true, ZonedDateTime.now()), + (UUID.randomUUID(), LocalDate.ofYearDay(1980, 1), "Ronald2", "Russel2", false, ZonedDateTime.now()), + (UUID.randomUUID(), LocalDate.ofYearDay(1970, 1), "Ronald3", "Russel3", true, ZonedDateTime.now()) + ) + +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values(data) +``` + +In this case, data is of type *List[(UUID, LocalDate, String, String, Boolean, ZonedDateTime)]* + +### Insert custom case class +ZIO_SQL lets you insert also your own case classes. +Let’s define a customer case class + +```scala +final case class Customer( + id: UUID, + dateOfBirth: LocalDate, + firstName: String, + lastName: String, + verified: Boolean, + createdTimestamp: ZonedDateTime + ) +``` + +In this case, the name of the fields makes no difference. Similarly to writing sql, the order of the fields is important. + +zio-sql also needs an implicit instance of zio-schema for your data type. You can define it easily: + +```scala +import zio.schema.DeriveSchema +implicit val customerSchema = DeriveSchema.gen[Customer] +``` + +Then your insert looks almost the same as before: +```scala +val data: Customer = Customer(UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russel", true, ZonedDateTime.now()) + +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values(data) +``` +Or you can insert multiple rows at once. Just define data as a List. + +```scala +val data : List[Customer] = ??? +``` + +### Show generated SQL query + +In case you want to see the exact query that zio-sql generated, you can use *renderInsert* method inside repo that has PostgresModule (or TableModel from above example) mixed in. +```scala +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) + +val sqlString: String = renderInsert(query) +``` + +### Execute the query + +In order to execute a query, we use *execute* method inside repo that has PostgresModule (or TableModel from the above example) mixed in. +```scala +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) + +val executed : ZIO[Has[SqlDriver], Exception, Int] = execute(query) +``` +As the type of *executed* indicates, you need to provide an SqlDriver in order to run this effect. The result *Int* is the number of rows updated. + +### More examples +More examples can be found in zio-sql test suite (PostgresModuleSpec, SqlServerModuleSpec, …) or in zio-sql-example application in resources. + +### What is missing +As of now (February 2022) zio team is actively working on: +- returning generated IDs from inserts +- introduce nullable columns - for which user won’t need to input values +- introduce auto generated columns - for which user cannot input values + +## Subqueries & Correlated subqueries + +The goal of ZIO SQL is to give users the ability to describe also queries much more complex than just simple selects or joins. In this section we will introduce a few examples of subqueries and correlated subqueries. In case you will find a query which is not possible to write with zio-sql - or the generated sql query looks differently then expected - please contact us on discord and we will try to add your use case to the next release :) Now let’s explore what is possible today. + +### Subquery +Subquery is a query which is a part of another query. It’s executed first - before outer query - and then its result is used in outer query. + +Now let’s say we want to build following query (this is on MSSQL Server) : + +```sql +select order_id, product_id, unit_price +from order_details +where unit_price > (select AVG(price) from product_prices ) +``` +We want to match details about orders, but we are interested only in those orders where price is higher than average price of all the products from product_prices table. + +This is the meta model that we are working with: +```scala +val productPrices = + (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + +val id :*: effective :*: price :*: _ = productPrices.columns + +val orderDetails = + (uuid("order_id") ++ uuid("product_id") ++ bigDecimal("unit_price")).table("order_details") + +val orderDetailsId :*: productId :*: unitPrice :*: _ = orderDetails.columns +``` +We can create query very easily. In fact, just type it like a regular sql query and let your IDE auto completion guide you! +```scala +val query = select(orderDetailsId ++ productId ++ unitPrice) + .from(orderDetails) + .where( + unitPrice > select(Avg(price)).from(productPrices) + ) +``` +Then you can either execute the query to selected types or inspect sql query represented as a String. +You just need a custom data type (Row in our example) to encapsulate results of a selection. +```scala +case class Row(orderId: UUID, productId: UUID, unitPrice: BigDecimal) + +val result: ZStream[Has[SqlDriver],Exception,Row] = execute(query.to[UUID, UUID, BigDecimal, Row](Row.apply)) + +val sqlQuery: String = renderRead(query) +``` +Similarly you can use subqueries inside select clause. + +### Correlated subqueries +Correlated subqueries are the ones that are executed after the outer query. They can be dependent on the result of the outer query and therefore they are executed for each resulting row of the outer query. +Lets say we want to build the following query: +```sql +select first_name, last_name, + ( select count(orders.id) from orders where customers.id = orders.customer_id ) as "count" +from customers +``` +This would return the count of orders for each customer. + +Description of tables: +```scala +val customers = (uuid("id") ++ string("first_name") ++ string("last_name"))).table("customers") + +val customerId :*: fName :*: lName _ = customers.columns + +val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + +val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns +``` +ZIO SQL query: +```scala +val subquery = + customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) + +val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) +``` +All of these examples and more can be found and run in zio-sql tests. + +### Correlated subquery in from clause & Derived tables +Just one last, a little more complex example before we wrap up this section. + +Now we would use the same *customers* and *orders* tables as before. +```scala +val customers = (uuid("id") ++ string("first_name") ++ string("last_name"))).table("customers") + +val customerId :*: fName :*: lName _ = customers.columns + +val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + +val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns +``` +Imagine we would want to write a query that would select all customers with the date of their last order. If you approach this problem with JOIN, you end up with one row of a customer with the newest order. In fact, this is a good example of correlated subquery inside *from* clause, where subquery needs to access *customer_id* of the outer query. For this type of problems postgres introduced **LATERAL** keyword and MSSQL Server have **CROSS APPLY** and **OUTER APPLY**. +```sql +select customers.id, customers.first_name, customers.last_name, derived.order_date + from customers, + lateral ( + select orders.order_date + from orders + where customers.id = orders.customer_id + order by orders.order_date desc limit 1 ) derived order by derived.order_date desc +``` +Now it’s starting to be a little more complicated. First we need to create a *subselect* which can access columns from another source table - *customers* in our case. Then we specify this source as a type parameter to *subselect*. In order to build the whole query we also need *derived.order_date* which is coming from *derived* table, so that we can extract that column. +```scala + val derivedTable = subselect[customers.TableType](orderDate) + .from(orders) + .limit(1) + .where(customerId === fkCustomerId) + .orderBy(Ordering.Desc(orderDate)) + .asTable("derived") + +val orderDateDerived :*: _ = derivedTable +``` +Finally, we have all the ingredients we need to describe our query with zio-sql. +```scala +import PostgresSpecific.PostgresSpecificTable._ + +val query = + select(customerId ++ fName ++ lName ++ orderDateDerived) + .from(customers.lateral(derivedTable)) + .orderBy(Ordering.Desc(orderDateDerived)) +``` ## Updates TODO: details diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 744b4ba31..c9b31d9d4 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -203,17 +203,15 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { import SqlServerSpecific.SqlServerFunctionDef._ /** - * select derived.order_id, derived.product_id, derived.unit_price from order_details derived - * where derived.unit_price > (select AVG(price) + * select order_id, product_id, unit_price from order_details + * where unit_price > (select AVG(price) * from product_prices ) */ - val subquery = select(Avg(price)).from(productPrices) - - val query = select(derivedOrderId ++ derivedProductId ++ derivedUnitPrice) - .from(orderDetailsDerived) + val query = select(orderDetailsId ++ productId ++ unitPrice) + .from(orderDetails) .where( - derivedUnitPrice > subquery + unitPrice > select(Avg(price)).from(productPrices) ) case class Row(orderId: UUID, productId: UUID, unitPrice: BigDecimal) @@ -251,12 +249,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { Row("5883CB62-D792-4EE3-ACBC-FE85B6BAA998", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000) ) - val result = execute( - query - .to[UUID, UUID, BigDecimal, Row] { case row => - Row(row._1, row._2, row._3) - } - ) + val result = execute(query.to[UUID, UUID, BigDecimal, Row](Row.apply)) val assertion = for { r <- result.runCollect From 4e15788f35556ddf0c46857a04cafd7083525219 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 16 Jan 2022 09:49:34 +0100 Subject: [PATCH 328/673] some little docs cleanup --- docs/overview/index.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/overview/index.md b/docs/overview/index.md index e3da16f62..131e79575 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -100,18 +100,18 @@ trait TableModel extends PostgresModule { val customerId :*: dob :*: fName :*: lName :*: verified :*: created :*: _ = customers.columns } ``` -Then, to use zio-sql ’s inserts, just mix in *TableModel* trait from above, to your repository. +Then, to use zio-sql ’s inserts, just mix in `TableModel` trait from above, to your repository. In case you’re wondering what those extracted columns are (customerId, dob etc), they are of a type called *Expr*. -*Expr[F, A, B]* is fundamental abstraction in zio-sql which basically represents description of any SQL expression of type **B**, having a source of type **A** and a phantom type **F**. -To give specific example, type of *fName* is +`Expr[F, A, B]` is fundamental abstraction in zio-sql which basically represents description of any SQL expression of type `B`, having a source of type `A` and a phantom type `F`. +To give specific example, type of `fName` is ```scala Expr[Features.Source[String(“first_name”)], customers.TableType, String]. ``` This gives DSL huge power to remember table from which the column comes from, type of the columns and what kind of Expr we are dealing with. Don’t worry, you don’t need to remember any of this, but from now on we will use those Expr instances in our inserts. In general, DSL is giving us two options how to approach inserts. We can insert either tuple values or used defined case class - which requires zio-schema instance (more on that later). -Also your custom data type or tuple need to consist only of the types for which there is a **TypeTag** instance defined. Each sql module has a finite set of such types - those are the types that particular module can work with. In other words, types inside your tuples or case class need to correspond with the types of the extracted Exprs. +Also your custom data type or tuple need to consist only of the types for which there is a `TypeTag` instance defined. Each sql module has a finite set of such types - those are the types that particular module can work with. In other words, types inside your tuples or case class need to correspond with the types of the extracted Exprs. ### Insert tuples Let’s say we want to build the query like the following one: @@ -127,12 +127,15 @@ insertInto(customers) (customerId ++ dob ++ fName ++ lName ++ verified ++ created) .values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) ``` -In case you mess up the order of values - like e.g. you put Boolean where String is expected - or you don’t specify all the not null columns of the table, above query fails with compile-time error. +Compiler verifies your inserts and your query fails with compile-time error at any of the following situations: +- you mess up the order of values - e.g. you put Boolean where String is expected +- you don’t specify all the not null columns of the table +- you try to insert to columns from another table -Some details about syntax: *insertInto* method takes two value parameters. One is our table *customers* that we created before in *Table description* section. The other is an *HList like* collection of Expr’s, called *Selection*. You create it by appending Exprs with “++” operator. -*values* method takes a Tuple6 of type (UUID, LocalDate, String, String, Boolean, ZonedDateTime). The required tuple is dependent on combination of Exprs. Just like with normal sql insert, you could swap *fName* with *dob* Expr and corresponding values and your query will work just fine. Compiler will only let you build such queries that won’t explode in runtime (in case you described your table correctly of course ! ) +Some details about syntax: `insertInto` method takes two value parameters. One is our table `customers` that we created before in *Table description* section. The other is an *HList like* collection of Expr’s, called `Selection`. You create it by appending Exprs with “++” operator. +`values` method takes a Tuple6 of type (UUID, LocalDate, String, String, Boolean, ZonedDateTime). The required tuple is dependent on combination of Exprs. Just like with normal sql insert, you could swap `fName` with `dob` Expr and corresponding values and your query will work just fine. Compiler will only let you build such queries that won’t explode in runtime (in case you described your table correctly of course ! ) -If we need to insert multiple values at once, all we need to do is to create any *Seq* of tuples and stick it into the overloaded *values* method. +If we need to insert multiple values at once, all we need to do is to create any `Seq` of tuples and stick it into the overloaded `values` method. ```scala val data = List( @@ -188,7 +191,7 @@ val data : List[Customer] = ??? ### Show generated SQL query -In case you want to see the exact query that zio-sql generated, you can use *renderInsert* method inside repo that has PostgresModule (or TableModel from above example) mixed in. +In case you want to see the exact query that zio-sql generated, you can use `renderInsert` method inside repo that has PostgresModule (or TableModel from above example) mixed in. ```scala val query = insertInto(customers)( customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp @@ -199,7 +202,7 @@ val sqlString: String = renderInsert(query) ### Execute the query -In order to execute a query, we use *execute* method inside repo that has PostgresModule (or TableModel from the above example) mixed in. +In order to execute a query, we use `execute` method inside repo that has PostgresModule (or TableModel from the above example) mixed in. ```scala val query = insertInto(customers)( customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp @@ -207,7 +210,7 @@ val query = insertInto(customers)( val executed : ZIO[Has[SqlDriver], Exception, Int] = execute(query) ``` -As the type of *executed* indicates, you need to provide an SqlDriver in order to run this effect. The result *Int* is the number of rows updated. +As the type of `executed` indicates, you need to provide an SqlDriver in order to run this effect. The result *Int* is the number of rows updated. ### More examples More examples can be found in zio-sql test suite (PostgresModuleSpec, SqlServerModuleSpec, …) or in zio-sql-example application in resources. @@ -318,7 +321,7 @@ select customers.id, customers.first_name, customers.last_name, derived.order_da where customers.id = orders.customer_id order by orders.order_date desc limit 1 ) derived order by derived.order_date desc ``` -Now it’s starting to be a little more complicated. First we need to create a *subselect* which can access columns from another source table - *customers* in our case. Then we specify this source as a type parameter to *subselect*. In order to build the whole query we also need *derived.order_date* which is coming from *derived* table, so that we can extract that column. +Now it’s starting to be a little more complicated. First we need to create a `subselect` which can access columns from another source table - `customers` in our case. Then we specify this source as a type parameter to `subselect`. In order to build the whole query we also need `derived.order_date` which is coming from `derived` table, so that we can extract that column. We create `derivedTable` by calling `asTable(tableName: String)` method on `subselect`. ```scala val derivedTable = subselect[customers.TableType](orderDate) .from(orders) From af0824228e66e7ccbe50680d71f3dfa39daff5a6 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 16 Jan 2022 10:00:40 +0100 Subject: [PATCH 329/673] some typos --- docs/overview/index.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/overview/index.md b/docs/overview/index.md index 131e79575..1ee41265d 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -149,11 +149,11 @@ val query = insertInto(customers)( ).values(data) ``` -In this case, data is of type *List[(UUID, LocalDate, String, String, Boolean, ZonedDateTime)]* +In this case, data is of type `List[(UUID, LocalDate, String, String, Boolean, ZonedDateTime)]` ### Insert custom case class -ZIO_SQL lets you insert also your own case classes. -Let’s define a customer case class +ZIO SQL lets you insert also your own case classes. +Let’s define a *customer* case class: ```scala final case class Customer( @@ -183,7 +183,7 @@ val query = insertInto(customers)( customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp ).values(data) ``` -Or you can insert multiple rows at once. Just define data as a List. +Or you can insert multiple rows at once. Just define data as a `List` or any collection of your choice. ```scala val data : List[Customer] = ??? @@ -210,13 +210,13 @@ val query = insertInto(customers)( val executed : ZIO[Has[SqlDriver], Exception, Int] = execute(query) ``` -As the type of `executed` indicates, you need to provide an SqlDriver in order to run this effect. The result *Int* is the number of rows updated. +As the type of `executed` indicates, you need to provide an `SqlDriver` in order to run this effect. The result *Int* is the number of rows updated. ### More examples -More examples can be found in zio-sql test suite (PostgresModuleSpec, SqlServerModuleSpec, …) or in zio-sql-example application in resources. +More examples can be found in zio-sql test suite (`PostgresModuleSpec`, `SqlServerModuleSpec`, …) or in zio-sql-example application in resources. ### What is missing -As of now (February 2022) zio team is actively working on: +As of now - Q1 2022 - zio-sql contributors is actively working on: - returning generated IDs from inserts - introduce nullable columns - for which user won’t need to input values - introduce auto generated columns - for which user cannot input values @@ -235,7 +235,7 @@ select order_id, product_id, unit_price from order_details where unit_price > (select AVG(price) from product_prices ) ``` -We want to match details about orders, but we are interested only in those orders where price is higher than average price of all the products from product_prices table. +We want to match details about orders, but we are interested only in those orders where price is higher than average price of all the products from `product_prices` table. This is the meta model that we are working with: ```scala @@ -266,7 +266,7 @@ val result: ZStream[Has[SqlDriver],Exception,Row] = execute(query.to[UUID, UUID, val sqlQuery: String = renderRead(query) ``` -Similarly you can use subqueries inside select clause. +Similarly you can use subqueries inside `select` clause. ### Correlated subqueries Correlated subqueries are the ones that are executed after the outer query. They can be dependent on the result of the outer query and therefore they are executed for each resulting row of the outer query. @@ -299,9 +299,7 @@ val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) All of these examples and more can be found and run in zio-sql tests. ### Correlated subquery in from clause & Derived tables -Just one last, a little more complex example before we wrap up this section. - -Now we would use the same *customers* and *orders* tables as before. +Just one last, a little more complex example before we wrap up this section, for which we would use the same *customers* and *orders* tables as before. ```scala val customers = (uuid("id") ++ string("first_name") ++ string("last_name"))).table("customers") @@ -311,7 +309,7 @@ val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).tabl val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns ``` -Imagine we would want to write a query that would select all customers with the date of their last order. If you approach this problem with JOIN, you end up with one row of a customer with the newest order. In fact, this is a good example of correlated subquery inside *from* clause, where subquery needs to access *customer_id* of the outer query. For this type of problems postgres introduced **LATERAL** keyword and MSSQL Server have **CROSS APPLY** and **OUTER APPLY**. +Imagine we want to write a query that selects all customers with the date of their last order. If you approach this problem with JOIN, you end up with one row of a customer with the newest order. In fact, this is a good example of correlated subquery inside `from` clause, where subquery needs to access `customer_id` of the outer query. For this type of problems postgres introduced **LATERAL** keyword and MSSQL Server have **CROSS APPLY** and **OUTER APPLY**. ```sql select customers.id, customers.first_name, customers.last_name, derived.order_date from customers, From b40e4121f98256eb34be503952a364935c92617f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 17 Jan 2022 22:41:00 +0100 Subject: [PATCH 330/673] Update mysql-connector-java to 8.0.28 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9eb6701b1..a69cbdaf3 100644 --- a/build.sbt +++ b/build.sbt @@ -173,7 +173,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.26" % Test, + "mysql" % "mysql-connector-java" % "8.0.28" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) From bb64187321483b9ed0464c3e710b1861791c01e1 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 19 Jan 2022 16:15:14 +0100 Subject: [PATCH 331/673] Update database-commons, jdbc, mssqlserver, ... to 1.16.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a69cbdaf3..f7fa5c155 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "1.0.13" val zioSchemaVersion = "0.1.7" -val testcontainersVersion = "1.16.0" +val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.39.12" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 360fe14bba21926ab7ac0af380251e536f94bd63 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 23 Jan 2022 14:18:51 +0100 Subject: [PATCH 332/673] some ideas of how to make group by work with aggregate functions --- core/jvm/src/main/scala/zio/sql/Sql.scala | 3 + core/jvm/src/main/scala/zio/sql/expr.scala | 23 ++- .../jvm/src/main/scala/zio/sql/features.scala | 51 +++++- core/jvm/src/main/scala/zio/sql/select.scala | 172 ++++++++++++++++-- examples/src/main/scala/Example1.scala | 12 ++ .../main/scala/zio/sql/ConnectionPool.scala | 2 +- .../scala/zio/sql/JdbcInternalModule.scala | 2 +- .../scala/zio/sql/mysql/MysqlModule.scala | 10 +- .../scala/zio/sql/oracle/OracleModule.scala | 10 +- .../zio/sql/postgresql/PostgresModule.scala | 11 +- .../sql/postgresql/PostgresModuleSpec.scala | 23 +++ .../zio/sql/sqlserver/SqlServerModule.scala | 10 +- 12 files changed, 275 insertions(+), 54 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 84ec5f8c5..2b1ce782a 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -20,6 +20,9 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = SelectBuilder(selection) + def select[F, A, B <: SelectionSet[A]](selection: AggSelection[F, A, B]): AggSelectBuilder[F, A, B] = + AggSelectBuilder(selection) + def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] def subselectFrom[ParentTable, F, Source, B <: SelectionSet[Source]]( diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 7583bb87a..9918afcba 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -85,8 +85,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def isNotTrue[A1 <: A](implicit ev: B <:< Boolean): Expr[F, A1, Boolean] = Expr.Property(self, PropertyOp.IsNotTrue) - def as[B1 >: B](name: String): Selection[F, A, SelectionSet.Cons[A, B1, SelectionSet.Empty]] = - Selection.computedAs(self, name) + //TODO + def as[B1 >: B](name: String): Expr[F, A, B1] = { + val _ = name + self + } def ascending: Ordering[Expr[F, A, B]] = Ordering.Asc(self) @@ -105,7 +108,14 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } } - object Expr { + trait ExprToSelectionLowerPrio { + implicit def expToSelection[F: Features.IsNotAggregated, A, B]( + expr: Expr[F, A, B] + ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = + Selection.computedOption(expr, Expr.exprName(expr)) + } + + object Expr extends ExprToSelectionLowerPrio { implicit val subqueryToExpr = self.Read.Subselect.subselectToExpr _ sealed trait InvariantExpr[F, -A, B] extends Expr[F, A, B] { @@ -122,10 +132,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { case _ => None } - implicit def expToSelection[F, A, B]( + implicit def aggregatedExprToSelection[F: Features.IsFullyAggregated, A, B]( expr: Expr[F, A, B] - ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = - Selection.computedOption(expr, exprName(expr)) + ): AggSelection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = + AggSelection.computedOption(expr, exprName(expr)) sealed case class Subselect[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] @@ -273,6 +283,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { object AggregationDef { val Count = AggregationDef[Any, Long](FunctionName("count")) val Sum = AggregationDef[Double, Double](FunctionName("sum")) + //TODO what is Arbitrary??? it does not exists on postgresql def Arbitrary[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("arbitrary"))(expr) val Avg = AggregationDef[Double, Double](FunctionName("avg")) def Min[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("min"))(expr) diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index ffe15c441..ca35738e1 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -1,14 +1,12 @@ package zio.sql -import com.github.ghik.silencer.silent - import scala.annotation.implicitNotFound trait FeaturesModule { type :||:[A, B] = Features.Union[A, B] - object Features { + object Features extends PartialAggregationLowerPrio { type Aggregated[_] type Union[_, _] type Source[_] @@ -17,16 +15,33 @@ trait FeaturesModule { type Literal type Function0 - sealed trait IsAggregated[A] + sealed trait IsNotAggregated[A] + object IsNotAggregated { + implicit def UnionIsNotAgregated[A: IsNotAggregated, B: IsNotAggregated]: IsNotAggregated[Union[A, B]] = + new IsNotAggregated[Union[A, B]] {} + + implicit def SourceIsNotAggregated[A]: IsNotAggregated[Source[A]] = + new IsNotAggregated[Source[A]] {} + + implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = + new IsNotAggregated[Derived] {} + + implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = + new IsNotAggregated[Literal] {} + + implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = + new IsNotAggregated[Function0] {} + } + + sealed trait IsFullyAggregated[A] - object IsAggregated { - def apply[A](implicit is: IsAggregated[A]): IsAggregated[A] = is + object IsFullyAggregated { + def apply[A](implicit is: IsFullyAggregated[A]): IsFullyAggregated[A] = is - implicit def AggregatedIsAggregated[A]: IsAggregated[Aggregated[A]] = new IsAggregated[Aggregated[A]] {} + implicit def AggregatedIsAggregated[A]: IsFullyAggregated[Aggregated[A]] = new IsFullyAggregated[Aggregated[A]] {} - @silent - implicit def UnionIsAggregated[A: IsAggregated, B: IsAggregated]: IsAggregated[Union[A, B]] = - new IsAggregated[Union[A, B]] {} + implicit def UnionIsAggregated[A: IsFullyAggregated, B: IsFullyAggregated]: IsFullyAggregated[Union[A, B]] = + new IsFullyAggregated[Union[A, B]] {} } @implicitNotFound("You can only use this function on a column in the source table") @@ -37,4 +52,20 @@ trait FeaturesModule { } } + trait PartialAggregationLowerPrio { + sealed trait IsPartiallyAggregated[A] + + object IsPartiallyAggregated { + + def apply[A](implicit is: IsPartiallyAggregated[A]): IsPartiallyAggregated[A] = is + + implicit def AggregatedIsAggregated[A]: IsPartiallyAggregated[Features.Aggregated[A]] = new IsPartiallyAggregated[Features.Aggregated[A]] {} + + implicit def UnionIsAggregatedInB[A, B](implicit instB: IsPartiallyAggregated[B]): IsPartiallyAggregated[Features.Union[A, B]] = + new IsPartiallyAggregated[Features.Union[A, B]] {} + + implicit def UnionIsAggregatedInA[A, B](implicit instB: IsPartiallyAggregated[A]): IsPartiallyAggregated[Features.Union[A, B]] = + new IsPartiallyAggregated[Features.Union[A, B]] {} + } + } } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index e0d0ed475..9d187cd13 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -4,6 +4,84 @@ import scala.language.implicitConversions trait SelectModule { self: ExprModule with TableModule => + sealed case class AggSelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: AggSelection[F0, Source, B]){ + + def from[Source0 <: Source](table: Table.Aux[Source0])(implicit + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] + ): AggSelectBuilderGroupBy[ + F0, + selection.value.ResultTypeRepr, + Source0, + selection.value.ColumnHead, + selection.value.SelectionTail + ] = { + type B0 = SelectionSet.ConsAux[ + selection.value.ResultTypeRepr, + Source0, + selection.value.ColumnHead, + selection.value.SelectionTail + ] + val b: B0 = selection.value.asInstanceOf[B0] + + AggSelectBuilderGroupBy(Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true, Nil)) + } + } + + sealed trait AggVerifier[MainF, F1] + object AggVerifier { + + implicit def unionOf[MainF, F1, Remainder]( + implicit + ev1: MainF <:< Features.Union[F1, Remainder], + ev2: Features.IsFullyAggregated[Remainder] + ) : AggVerifier[MainF, F1] = new AggVerifier[MainF, F1] {} + + implicit def unionOfB[MainF, F1, Remainder]( + implicit + ev1: MainF <:< Features.Union[Remainder, F1], + ev2: Features.IsFullyAggregated[Remainder] + ) : AggVerifier[MainF, F1] = new AggVerifier[MainF, F1] {} + } + + // Features.Union[Features.Union[Features.Source[String("customer_id")], Features.Source[String("order_date")],] + // Features.Aggregated[Features.Source[String("id")]]] + + // select customer_id, order_date, count(id) + // from orders + // group by customer_id + + + // Features.Source[String("customer_id")] + //Features.Source[String("order_date")] + + // we require all the Exprs which are not aggregated from partially aggregated F and any other + // F here is always aggregated + sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source]]( + select: Read.Select[F, Repr, Source, Head, Tail]) { + import Read.ExprSet._ + + // format: off + def groupBy[F1, B](expr: Expr[F1, Source, B])( + implicit + ev1: Features.IsNotAggregated[F1], + ev2: AggVerifier[F, F1] + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs2 = NoExpr ++ expr) + + def groupBy[F1, F2](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2) + + def groupBy[F1, F2, F3](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2 ++ expr3) + + def groupBy[F1, F2, F3, F4](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4) + + def groupBy[F1, F2, F3, F4, F5](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5) + // format: on + } + sealed case class SelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: Selection[F0, Source, B]) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit @@ -58,6 +136,10 @@ trait SelectModule { self: ExprModule with TableModule => final class SubselectPartiallyApplied[ParentTable] { def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = SubselectBuilder(selection) + + //TODO fix + def apply[F, A, B <: SelectionSet[A]](selection: AggSelection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = + ??? //SubselectBuilder(selection) } sealed case class SubselectBuilder[F, Source, B <: SelectionSet[Source], ParentTable]( @@ -318,15 +400,36 @@ trait SelectModule { self: ExprModule with TableModule => type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] + sealed trait ExprSet[-Source] { + type Append[F2, Source1 <: Source, B2] <: ExprSet[Source1] + def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] + } + + object ExprSet { + type NoExpr = NoExpr.type + case object NoExpr extends ExprSet[Any] { + override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] + override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = ExprCons(that, NoExpr) + } + + sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) extends ExprSet[Source] { + override type Append[F2, Source1 <: Source, B2] = + ExprCons[F, Source1, B, tail.Append[F2, Source1, B2]] + override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = + ExprCons(head, tail.++[F2, Source1, B2](that)) + } + } + sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], table: Option[Table.Aux[Subsource]], whereExpr: Expr[_, Source, Boolean], - groupBy: List[Expr[_, Source, Any]] = Nil, + groupByExprs: List[Expr[_, Source, Any]] = Nil, havingExpr: Expr[_, Source, Boolean] = true, - orderBy: List[Ordering[Expr[_, Source, Any]]] = Nil, + orderByExprs: List[Ordering[Expr[_, Source, Any]]] = Nil, offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql - limit: Option[Long] = None + limit: Option[Long] = None, + groupByExprs2: ExprSet[Source] = ExprSet.NoExpr ) extends Read[Repr] { self => def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = @@ -340,20 +443,27 @@ trait SelectModule { self: ExprModule with TableModule => o: Ordering[Expr[_, Source, Any]], os: Ordering[Expr[_, Source, Any]]* ): Subselect[F, Repr, Source, Subsource, Head, Tail] = - copy(orderBy = self.orderBy ++ (o :: os.toList)) - - def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit - ev: Features.IsAggregated[F] - ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { - val _ = ev - copy(groupBy = groupBy ++ (key :: keys.toList)) + copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) + + def having(havingExpr2: Expr[_, Source, Boolean]) + // (implicit + // ev: Features.IsAggregated[F] + // ) + : Subselect[F, Repr, Source, Subsource, Head, Tail] = { + //val _ = ev + copy(havingExpr = self.havingExpr && havingExpr2) } - def having(havingExpr2: Expr[_, Source, Boolean])(implicit - ev: Features.IsAggregated[F] - ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { - val _ = ev - copy(havingExpr = self.havingExpr && havingExpr2) + /** + * what about this? xD + * select count(customer_id), count(id), '1' as "Hi" + from orders + group by "Hi" + */ + //TODO we can allow group by but only by Source.Expr, (at this point F is FullyAggregated) + // TODO found a way how to make Features.IsSource implicit for all Fs in varargs + def groupBy[X: Features.IsNotAggregated](key: Expr[X, Source, Any], keys: Expr[_, Source, Any]*): Subselect[F, Repr, Source, Subsource, Head, Tail] = { + copy(groupByExprs = groupByExprs ++ (key :: keys.toList)) } override def asTable( @@ -423,6 +533,29 @@ trait SelectModule { self: ExprModule with TableModule => def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) } + sealed case class AggSelection[F, -A, +B <: SelectionSet[A]](value: B) { self => + + type ColsRepr = value.ResultTypeRepr + + def ++[F2, A1 <: A, C <: SelectionSet[A1]]( + that: Selection[F2, A1, C] + ): AggSelection[F :||: F2, A1, self.value.Append[A1, C]] = + AggSelection(self.value ++ that.value) + + //TODO this is not correct by => age ++ Count(id) ++ Count(id) + def ++[F2, A1 <: A, C <: SelectionSet[A1]]( + that: AggSelection[F2, A1, C] + )(implicit ev: Features.IsFullyAggregated[F]): Selection[F :||: F2, A1, self.value.Append[A1, C]] = + Selection(self.value ++ that.value) + } + + object AggSelection { + import ColumnSelection._ + import SelectionSet.{ Cons, Empty } + def computedOption[F, A, B](expr: Expr[F, A, B], name: Option[ColumnName]): AggSelection[F, A, Cons[A, B, Empty]] = + AggSelection(Cons(Computed(expr, name), Empty)) + } + /** * A columnar selection of `B` from a source `A`, modeled as `A => B`. */ @@ -435,6 +568,15 @@ trait SelectModule { self: ExprModule with TableModule => ): Selection[F :||: F2, A1, self.value.Append[A1, C]] = Selection(self.value ++ that.value) + def ++[F2, A1 <: A, C <: SelectionSet[A1]]( + that: AggSelection[F2, A1, C] + ): AggSelection[F :||: F2, A1, self.value.Append[A1, C]] = + AggSelection(self.value ++ that.value) + + // (Arbitrary(age)) ++ (Count(1)) => Selection + // age ++ (Count(1)) => AggSelection + // (Count(1)) ++ age => AggSelection + // age ++ name => Selection } object Selection { diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index d8fdebdaa..a2283f889 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -32,10 +32,14 @@ object Example1 extends Sql { .offset(1000) .orderBy(age.descending) + val tt = ((age + 2) as "age") + val joined = select((age as "age") ++ (age2 as "age2")) .from(table.join(table2).on(name === name2)) + val xx = (Arbitrary(age) as "age") ++ (Count(1) as "count") + val aggregated = select((Arbitrary(age) as "age") ++ (Count(1) as "count")) .from(table) @@ -48,4 +52,12 @@ object Example1 extends Sql { .set(age, age + 2) .set(name, "foo") .where(age > 100) + + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + + val query = select(fkCustomerId ++ Count(orderId)) + .from(orders) + .groupBy(fkCustomerId) } diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index ca397f2f7..55ec2a2ca 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -11,7 +11,7 @@ import zio.clock._ trait ConnectionPool { /** - * Retrieves a JDBC [[java.sql.Connection]] as a [[zio.Managed]] resource. + * Retrieves a JDBC java.sql.Connection as a [[zio.Managed]] resource. * The managed resource will safely acquire and release the connection, and * may be interrupted or timed out if necessary. */ diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index d8da0c9ca..38715d2c5 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -109,7 +109,7 @@ trait JdbcInternalModule { self: Jdbc => read match { case Read.Mapped(read, _) => getColumns(read) - case Read.Subselect(selection, _, _, _, _, _, _, _) => + case Read.Subselect(selection, _, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag case t @ ColumnSelection.Computed(_, _) => t.typeTag diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index eb342be5d..59ac2f0fd 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -85,7 +85,7 @@ trait MysqlModule extends Jdbc { self => case Read.Mapped(read, _) => renderReadImpl(read) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -108,10 +108,10 @@ trait MysqlModule extends Jdbc { self => render(" WHERE ") renderExpr(whereExpr) } - groupBy match { + groupByExprs match { case _ :: _ => render(" GROUP BY ") - renderExprList(groupBy) + renderExprList(groupByExprs) havingExpr match { case Expr.Literal(true) => () @@ -121,10 +121,10 @@ trait MysqlModule extends Jdbc { self => } case Nil => () } - orderBy match { + orderByExprs match { case _ :: _ => render(" ORDER BY ") - renderOrderingList(orderBy) + renderOrderingList(orderByExprs) case Nil => () } limit match { diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 9af0ff15f..8aabe9c42 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -133,7 +133,7 @@ trait OracleModule extends Jdbc { self => read match { case Read.Mapped(read, _) => buildReadString(read, builder) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -156,10 +156,10 @@ trait OracleModule extends Jdbc { self => builder.append(" WHERE ") buildExpr(whereExpr, builder) } - groupBy match { + groupByExprs match { case _ :: _ => builder.append(" GROUP BY ") - buildExprList(groupBy, builder) + buildExprList(groupByExprs, builder) havingExpr match { case Expr.Literal(true) => () @@ -169,10 +169,10 @@ trait OracleModule extends Jdbc { self => } case Nil => () } - orderBy match { + orderByExprs match { case _ :: _ => builder.append(" ORDER BY ") - buildOrderingList(orderBy, builder) + buildOrderingList(orderByExprs, builder) case Nil => () } // NOTE: Limit doesn't exist in oracle 11g (>=12), for now replacing it with rownum keyword of oracle diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 019fe1d15..eb1506268 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -406,7 +406,6 @@ trait PostgresModule extends Jdbc { self => case Some(v) => v match { case BigDecimalType => - println("foo") render(value) case StandardType.InstantType(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") @@ -671,7 +670,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { case Read.Mapped(read, _) => renderReadImpl(read) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -695,10 +694,10 @@ trait PostgresModule extends Jdbc { self => render(" WHERE ") renderExpr(whereExpr) } - groupBy match { + groupByExprs match { case _ :: _ => render(" GROUP BY ") - renderExprList(groupBy) + renderExprList(groupByExprs) havingExpr match { case Expr.Literal(true) => () @@ -708,10 +707,10 @@ trait PostgresModule extends Jdbc { self => } case Nil => () } - orderBy match { + orderByExprs match { case _ :: _ => render(" ORDER BY ") - renderOrderingList(orderBy) + renderOrderingList(orderByExprs) case Nil => () } limit match { diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index ab0832c6a..7e2996bea 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -379,6 +379,29 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + testM("group by / order by order is correct") { + /** + select customer_id, count(id) + from orders + group by customer_id + order by count(id) desc + */ + + import AggregationDef._ + import Ordering._ + + val expected = List(6,5,5,5,4) + + val query = select(fkCustomerId ++ Count(orderId)) + .from(orders) + //.groupBy(fkCustomerId) + + val actual = execute(query.to[Long, Int](_.toInt)).runCollect.map(_.toList) + + assertM(actual)(equalTo(expected)) + + ??? + }, testM("insert - 1 rows into customers") { /** diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 0374e36fa..77cdbfaee 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -251,7 +251,7 @@ trait SqlServerModule extends Jdbc { self => case Read.Mapped(read, _) => buildReadString(read.asInstanceOf[Read[Out]]) //todo offset (needs orderBy, must use fetch _instead_ of top) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -279,10 +279,10 @@ trait SqlServerModule extends Jdbc { self => builder.append(" where ") buildExpr(whereExpr) } - groupBy match { + groupByExprs match { case _ :: _ => builder.append(" group by ") - buildExprList(groupBy) + buildExprList(groupByExprs) havingExpr match { case Expr.Literal(true) => () @@ -292,10 +292,10 @@ trait SqlServerModule extends Jdbc { self => } case Nil => () } - orderBy match { + orderByExprs match { case _ :: _ => builder.append(" order by ") - buildOrderingList(orderBy) + buildOrderingList(orderByExprs) case Nil => () } From c3489e17cf662f192adfd97abf5543d0e6360aca Mon Sep 17 00:00:00 2001 From: sviezypan Date: Wed, 26 Jan 2022 22:04:00 +0100 Subject: [PATCH 333/673] fix aggregation bug --- core/jvm/src/main/scala/zio/sql/Sql.scala | 9 +- core/jvm/src/main/scala/zio/sql/expr.scala | 17 +- .../jvm/src/main/scala/zio/sql/features.scala | 59 ++-- core/jvm/src/main/scala/zio/sql/select.scala | 306 ++++++++++-------- examples/src/main/scala/Example1.scala | 9 +- .../scala/zio/sql/JdbcInternalModule.scala | 2 +- .../scala/zio/sql/mysql/MysqlModule.scala | 16 +- .../scala/zio/sql/oracle/OracleModule.scala | 16 +- .../zio/sql/postgresql/PostgresModule.scala | 16 +- .../sql/postgresql/PostgresModuleSpec.scala | 8 +- .../zio/sql/sqlserver/SqlServerModule.scala | 16 +- 11 files changed, 264 insertions(+), 210 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 2b1ce782a..cfef2d88b 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,11 +17,10 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu * * SELECT ARBITRARY(age), COUNT(*) FROM person GROUP BY age */ - def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SelectBuilder[F, A, B] = - SelectBuilder(selection) - - def select[F, A, B <: SelectionSet[A]](selection: AggSelection[F, A, B]): AggSelectBuilder[F, A, B] = - AggSelectBuilder(selection) + def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])( + implicit i: Features.IsPartiallyAggregated[F] + ): Selector[F, A, B, i.Unaggregated] = + Selector[F, A, B, i.Unaggregated](selection) def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 9918afcba..fa20a7689 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,14 +108,8 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } } - trait ExprToSelectionLowerPrio { - implicit def expToSelection[F: Features.IsNotAggregated, A, B]( - expr: Expr[F, A, B] - ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = - Selection.computedOption(expr, Expr.exprName(expr)) - } + object Expr { - object Expr extends ExprToSelectionLowerPrio { implicit val subqueryToExpr = self.Read.Subselect.subselectToExpr _ sealed trait InvariantExpr[F, -A, B] extends Expr[F, A, B] { @@ -132,14 +126,15 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { case _ => None } - implicit def aggregatedExprToSelection[F: Features.IsFullyAggregated, A, B]( + implicit def expToSelection[F, A, B]( expr: Expr[F, A, B] - ): AggSelection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = - AggSelection.computedOption(expr, exprName(expr)) + ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = + Selection.computedOption[F, A, B](expr, Expr.exprName(expr)) + // aggregated F should not be propagated sealed case class Subselect[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] - ) extends InvariantExpr[F, Any, Head] { + ) extends InvariantExpr[Features.Derived, Any, Head] { override def typeTag: TypeTag[Head] = subselect.selection.value.head.toColumn.typeTag } diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index ca35738e1..34e9e0932 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -2,18 +2,17 @@ package zio.sql import scala.annotation.implicitNotFound -trait FeaturesModule { +trait FeaturesModule { type :||:[A, B] = Features.Union[A, B] - object Features extends PartialAggregationLowerPrio { + object Features { type Aggregated[_] type Union[_, _] type Source[_] - //TODO make Derived and Join tables return Expr of type "Derived" when .columns is called - type Derived type Literal type Function0 + type Derived sealed trait IsNotAggregated[A] object IsNotAggregated { @@ -23,12 +22,12 @@ trait FeaturesModule { implicit def SourceIsNotAggregated[A]: IsNotAggregated[Source[A]] = new IsNotAggregated[Source[A]] {} - implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = - new IsNotAggregated[Derived] {} - implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = new IsNotAggregated[Literal] {} + implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = + new IsNotAggregated[Derived] {} + implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = new IsNotAggregated[Function0] {} } @@ -40,6 +39,8 @@ trait FeaturesModule { implicit def AggregatedIsAggregated[A]: IsFullyAggregated[Aggregated[A]] = new IsFullyAggregated[Aggregated[A]] {} + implicit val LiteralIsAggregated: IsFullyAggregated[Literal] = new IsFullyAggregated[Literal] {} + implicit def UnionIsAggregated[A: IsFullyAggregated, B: IsFullyAggregated]: IsFullyAggregated[Union[A, B]] = new IsFullyAggregated[Union[A, B]] {} } @@ -50,22 +51,44 @@ trait FeaturesModule { object IsSource { implicit def isSource[ColumnIdentity]: IsSource[Source[ColumnIdentity]] = new IsSource[Source[ColumnIdentity]] {} } - } - trait PartialAggregationLowerPrio { - sealed trait IsPartiallyAggregated[A] + sealed trait IsPartiallyAggregated[A] { + type Unaggregated + } - object IsPartiallyAggregated { - - def apply[A](implicit is: IsPartiallyAggregated[A]): IsPartiallyAggregated[A] = is + object IsPartiallyAggregated extends IsPartiallyAggregatedLowPriorityImplicits { + + type WithRemainder[F, R] = IsPartiallyAggregated[F] { + type Unaggregated = R + } + + def apply[A](implicit is: IsPartiallyAggregated[A]): IsPartiallyAggregated.WithRemainder[A, is.Unaggregated] = is - implicit def AggregatedIsAggregated[A]: IsPartiallyAggregated[Features.Aggregated[A]] = new IsPartiallyAggregated[Features.Aggregated[A]] {} + implicit def AggregatedIsAggregated[A]: IsPartiallyAggregated.WithRemainder[Aggregated[A], Any] = new IsPartiallyAggregated[Aggregated[A]] { + override type Unaggregated = Any + } - implicit def UnionIsAggregatedInB[A, B](implicit instB: IsPartiallyAggregated[B]): IsPartiallyAggregated[Features.Union[A, B]] = - new IsPartiallyAggregated[Features.Union[A, B]] {} + implicit def UnionIsAggregated[A, B](implicit inA: IsPartiallyAggregated[A], inB: IsPartiallyAggregated[B]): IsPartiallyAggregated.WithRemainder[Union[A, B], inA.Unaggregated with inB.Unaggregated] = + new IsPartiallyAggregated[Union[A, B]] { + override type Unaggregated = inA.Unaggregated with inB.Unaggregated + } + + implicit val LiteralIsAggregated: IsPartiallyAggregated.WithRemainder[Literal, Any] = new IsPartiallyAggregated[Literal] { + override type Unaggregated = Any + } + + implicit val DerivedIsAggregated: IsPartiallyAggregated.WithRemainder[Derived, Any] = new IsPartiallyAggregated[Derived] { + override type Unaggregated = Any + } + + implicit val FunctionIsAggregated: IsPartiallyAggregated.WithRemainder[Function0, Any] = new IsPartiallyAggregated[Function0] { + override type Unaggregated = Any + } + } - implicit def UnionIsAggregatedInA[A, B](implicit instB: IsPartiallyAggregated[A]): IsPartiallyAggregated[Features.Union[A, B]] = - new IsPartiallyAggregated[Features.Union[A, B]] {} + trait IsPartiallyAggregatedLowPriorityImplicits { + implicit def SourceIsAggregated[A]: IsPartiallyAggregated.WithRemainder[Features.Source[A], Features.Source[A]] = new IsPartiallyAggregated[Features.Source[A]] { override type Unaggregated = Features.Source[A] + } } } } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 9d187cd13..d130ae6aa 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -4,7 +4,52 @@ import scala.language.implicitConversions trait SelectModule { self: ExprModule with TableModule => - sealed case class AggSelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: AggSelection[F0, Source, B]){ +sealed case class Selector[F, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F, Source, B]) + +object Selector extends SelectorImplicitLowerPriority { + implicit def aggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source]] + (selector: Selector[F, Source, B, Any])(implicit i: Features.IsFullyAggregated[F]): SelectBuilder[F, Source, B] = + SelectBuilder(selector.selection) + + implicit def notAggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source], Unaggregated] + (selector: Selector[F, Source, B, Unaggregated])(implicit i: Features.IsNotAggregated[F]): SelectBuilder[F, Source, B] = + SelectBuilder(selector.selection) +} + +trait SelectorImplicitLowerPriority { + implicit def partiallyAggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source], Unaggregated] + (selector: Selector[F, Source, B, Unaggregated]): AggSelectBuilder[F, Source, B, Unaggregated] = + AggSelectBuilder[F, Source, B, Unaggregated](selector.selection) + + // select(Sin(1.0)) + implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( + selectBuilder: Selector[F, Source, B, Any] + )(implicit + ev: B <:< SelectionSet.Cons[ + Source, + selectBuilder.selection.value.ColumnHead, + selectBuilder.selection.value.SelectionTail + ] + ): Read.Select[ + F, + selectBuilder.selection.value.ResultTypeRepr, + Source, + selectBuilder.selection.value.ColumnHead, + selectBuilder.selection.value.SelectionTail + ] = { + type B0 = SelectionSet.ConsAux[ + selectBuilder.selection.value.ResultTypeRepr, + Source, + selectBuilder.selection.value.ColumnHead, + selectBuilder.selection.value.SelectionTail + ] + val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] + + Read.Subselect(Selection[F, Source, B0](b), None, true) + } +} + + sealed case class AggSelectBuilder[F0, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F0, Source, B]){ def from[Source0 <: Source](table: Table.Aux[Source0])(implicit ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] @@ -13,7 +58,8 @@ trait SelectModule { self: ExprModule with TableModule => selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, - selection.value.SelectionTail + selection.value.SelectionTail, + Unaggregated ] = { type B0 = SelectionSet.ConsAux[ selection.value.ResultTypeRepr, @@ -23,62 +69,125 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - AggSelectBuilderGroupBy(Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true, Nil)) + AggSelectBuilderGroupBy[F0, selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail, Unaggregated](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true)) } } - sealed trait AggVerifier[MainF, F1] - object AggVerifier { - - implicit def unionOf[MainF, F1, Remainder]( - implicit - ev1: MainF <:< Features.Union[F1, Remainder], - ev2: Features.IsFullyAggregated[Remainder] - ) : AggVerifier[MainF, F1] = new AggVerifier[MainF, F1] {} - - implicit def unionOfB[MainF, F1, Remainder]( - implicit - ev1: MainF <:< Features.Union[Remainder, F1], - ev2: Features.IsFullyAggregated[Remainder] - ) : AggVerifier[MainF, F1] = new AggVerifier[MainF, F1] {} - } - - // Features.Union[Features.Union[Features.Source[String("customer_id")], Features.Source[String("order_date")],] - // Features.Aggregated[Features.Source[String("id")]]] - - // select customer_id, order_date, count(id) - // from orders - // group by customer_id - - - // Features.Source[String("customer_id")] - //Features.Source[String("order_date")] - - // we require all the Exprs which are not aggregated from partially aggregated F and any other - // F here is always aggregated - sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source]]( + //TODO add having + sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source], Unaggregated]( select: Read.Select[F, Repr, Source, Head, Tail]) { import Read.ExprSet._ // format: off def groupBy[F1, B](expr: Expr[F1, Source, B])( - implicit - ev1: Features.IsNotAggregated[F1], - ev2: AggVerifier[F, F1] + implicit ev1: F1 =:= Unaggregated ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs2 = NoExpr ++ expr) + select.copy(groupByExprs = NoExpr ++ expr) - def groupBy[F1, F2](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2) - - def groupBy[F1, F2, F3](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2 ++ expr3) - - def groupBy[F1, F2, F3, F4](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4) - - def groupBy[F1, F2, F3, F4, F5](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any]): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs2 = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5) + def groupBy[F1, F2](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any])( + implicit ev1: F1 with F2 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2) + + def groupBy[F1, F2, F3](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any])( + implicit ev1: F1 with F2 with F3 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3) + + def groupBy[F1, F2, F3, F4](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4) + + def groupBy[F1, F2, F3, F4, F5](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5) + + def groupBy[F1, F2, F3, F4, F5, F6](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6) + + def groupBy[F1, F2, F3, F4, F5, F6, F7](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F10, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F10, Source, Any], expr11: Expr[F11, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any], expr21: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21<:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21) + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any], expr21: Expr[F9, Source, Any], expr22: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21 with F22 <:< Unaggregated + ): Read.Select[F, Repr, Source, Head, Tail] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22) // format: on } @@ -101,45 +210,13 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true, Nil) - } - } - - object SelectBuilder { - implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( - selectBuilder: SelectBuilder[F, Source, B] - )(implicit - ev: B <:< SelectionSet.Cons[ - Source, - selectBuilder.selection.value.ColumnHead, - selectBuilder.selection.value.SelectionTail - ] - ): Read.Select[ - F, - selectBuilder.selection.value.ResultTypeRepr, - Source, - selectBuilder.selection.value.ColumnHead, - selectBuilder.selection.value.SelectionTail - ] = { - type B0 = SelectionSet.ConsAux[ - selectBuilder.selection.value.ResultTypeRepr, - Source, - selectBuilder.selection.value.ColumnHead, - selectBuilder.selection.value.SelectionTail - ] - val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] - - Read.Subselect(Selection[F, Source, B0](b), None, true) + Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true) } } final class SubselectPartiallyApplied[ParentTable] { def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = SubselectBuilder(selection) - - //TODO fix - def apply[F, A, B <: SelectionSet[A]](selection: AggSelection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = - ??? //SubselectBuilder(selection) } sealed case class SubselectBuilder[F, Source, B <: SelectionSet[Source], ParentTable]( @@ -424,12 +501,11 @@ trait SelectModule { self: ExprModule with TableModule => selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], table: Option[Table.Aux[Subsource]], whereExpr: Expr[_, Source, Boolean], - groupByExprs: List[Expr[_, Source, Any]] = Nil, + groupByExprs: ExprSet[Source] = ExprSet.NoExpr, havingExpr: Expr[_, Source, Boolean] = true, orderByExprs: List[Ordering[Expr[_, Source, Any]]] = Nil, offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql - limit: Option[Long] = None, - groupByExprs2: ExprSet[Source] = ExprSet.NoExpr + limit: Option[Long] = None ) extends Read[Repr] { self => def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = @@ -445,25 +521,18 @@ trait SelectModule { self: ExprModule with TableModule => ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) - def having(havingExpr2: Expr[_, Source, Boolean]) - // (implicit - // ev: Features.IsAggregated[F] - // ) - : Subselect[F, Repr, Source, Subsource, Head, Tail] = { - //val _ = ev + def having(havingExpr2: Expr[_, Source, Boolean])(implicit + ev: Features.IsFullyAggregated[F] + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { + val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) } - /** - * what about this? xD - * select count(customer_id), count(id), '1' as "Hi" - from orders - group by "Hi" - */ - //TODO we can allow group by but only by Source.Expr, (at this point F is FullyAggregated) - // TODO found a way how to make Features.IsSource implicit for all Fs in varargs - def groupBy[X: Features.IsNotAggregated](key: Expr[X, Source, Any], keys: Expr[_, Source, Any]*): Subselect[F, Repr, Source, Subsource, Head, Tail] = { - copy(groupByExprs = groupByExprs ++ (key :: keys.toList)) + def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit + ev: Features.IsFullyAggregated[F] + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { + val _ = ev + copy(groupByExprs = (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail))) } override def asTable( @@ -488,7 +557,7 @@ trait SelectModule { self: ExprModule with TableModule => object Subselect { implicit def subselectToExpr[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] - ): Expr[F, Any, Head] = + ): Expr[Features.Derived, Any, Head] = Expr.Subselect(subselect) } @@ -533,29 +602,6 @@ trait SelectModule { self: ExprModule with TableModule => def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) } - sealed case class AggSelection[F, -A, +B <: SelectionSet[A]](value: B) { self => - - type ColsRepr = value.ResultTypeRepr - - def ++[F2, A1 <: A, C <: SelectionSet[A1]]( - that: Selection[F2, A1, C] - ): AggSelection[F :||: F2, A1, self.value.Append[A1, C]] = - AggSelection(self.value ++ that.value) - - //TODO this is not correct by => age ++ Count(id) ++ Count(id) - def ++[F2, A1 <: A, C <: SelectionSet[A1]]( - that: AggSelection[F2, A1, C] - )(implicit ev: Features.IsFullyAggregated[F]): Selection[F :||: F2, A1, self.value.Append[A1, C]] = - Selection(self.value ++ that.value) - } - - object AggSelection { - import ColumnSelection._ - import SelectionSet.{ Cons, Empty } - def computedOption[F, A, B](expr: Expr[F, A, B], name: Option[ColumnName]): AggSelection[F, A, Cons[A, B, Empty]] = - AggSelection(Cons(Computed(expr, name), Empty)) - } - /** * A columnar selection of `B` from a source `A`, modeled as `A => B`. */ @@ -566,17 +612,7 @@ trait SelectModule { self: ExprModule with TableModule => def ++[F2, A1 <: A, C <: SelectionSet[A1]]( that: Selection[F2, A1, C] ): Selection[F :||: F2, A1, self.value.Append[A1, C]] = - Selection(self.value ++ that.value) - - def ++[F2, A1 <: A, C <: SelectionSet[A1]]( - that: AggSelection[F2, A1, C] - ): AggSelection[F :||: F2, A1, self.value.Append[A1, C]] = - AggSelection(self.value ++ that.value) - - // (Arbitrary(age)) ++ (Count(1)) => Selection - // age ++ (Count(1)) => AggSelection - // (Count(1)) ++ age => AggSelection - // age ++ name => Selection + Selection[F :||: F2, A1, self.value.Append[A1, C]](self.value ++ that.value) } object Selection { diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index a2283f889..01610c6c9 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -38,8 +38,6 @@ object Example1 extends Sql { select((age as "age") ++ (age2 as "age2")) .from(table.join(table2).on(name === name2)) - val xx = (Arbitrary(age) as "age") ++ (Count(1) as "count") - val aggregated = select((Arbitrary(age) as "age") ++ (Count(1) as "count")) .from(table) @@ -59,5 +57,10 @@ object Example1 extends Sql { val query = select(fkCustomerId ++ Count(orderId)) .from(orders) - .groupBy(fkCustomerId) + .groupBy(fkCustomerId, orderDate) + + //TODO remove - just to test group by / having + def test[F, A, B](expr: Expr[F,A, B])(implicit in: Features.IsPartiallyAggregated[F]) : in.Unaggregated = ??? + def test2[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit in: Features.IsPartiallyAggregated[F]) : in.Unaggregated = ??? + } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 38715d2c5..d8da0c9ca 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -109,7 +109,7 @@ trait JdbcInternalModule { self: Jdbc => read match { case Read.Mapped(read, _) => getColumns(read) - case Read.Subselect(selection, _, _, _, _, _, _, _, _) => + case Read.Subselect(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag case t @ ColumnSelection.Computed(_, _) => t.typeTag diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 59ac2f0fd..f5bcc2223 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -85,7 +85,7 @@ trait MysqlModule extends Jdbc { self => case Read.Mapped(read, _) => renderReadImpl(read) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -109,7 +109,7 @@ trait MysqlModule extends Jdbc { self => renderExpr(whereExpr) } groupByExprs match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => render(" GROUP BY ") renderExprList(groupByExprs) @@ -119,7 +119,7 @@ trait MysqlModule extends Jdbc { self => render(" HAVING ") renderExpr(havingExpr) } - case Nil => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -401,17 +401,17 @@ trait MysqlModule extends Jdbc { self => } } - private def renderExprList(expr: List[Expr[_, _, _]])(implicit render: Renderer): Unit = + private def renderExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = expr match { - case head :: tail => + case Read.ExprSet.ExprCons(head, tail) => renderExpr(head) tail match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => render(", ") renderExprList(tail) - case Nil => () + case Read.ExprSet.NoExpr => () } - case Nil => () + case Read.ExprSet.NoExpr => () } def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 8aabe9c42..86e368493 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -133,7 +133,7 @@ trait OracleModule extends Jdbc { self => read match { case Read.Mapped(read, _) => buildReadString(read, builder) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -157,7 +157,7 @@ trait OracleModule extends Jdbc { self => buildExpr(whereExpr, builder) } groupByExprs match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => builder.append(" GROUP BY ") buildExprList(groupByExprs, builder) @@ -167,7 +167,7 @@ trait OracleModule extends Jdbc { self => builder.append(" HAVING ") buildExpr(havingExpr, builder) } - case Nil => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -199,17 +199,17 @@ trait OracleModule extends Jdbc { self => val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping } - def buildExprList(expr: List[Expr[_, _, _]], builder: StringBuilder): Unit = + def buildExprList(expr: Read.ExprSet[_], builder: StringBuilder): Unit = expr match { - case head :: tail => + case Read.ExprSet.ExprCons(head, tail) => buildExpr(head, builder) tail match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => builder.append(", ") buildExprList(tail, builder) - case Nil => () + case Read.ExprSet.NoExpr => () } - case Nil => () + case Read.ExprSet.NoExpr => () } def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]], builder: StringBuilder): Unit = expr match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index eb1506268..d7f75a544 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -670,7 +670,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { case Read.Mapped(read, _) => renderReadImpl(read) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -695,7 +695,7 @@ trait PostgresModule extends Jdbc { self => renderExpr(whereExpr) } groupByExprs match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => render(" GROUP BY ") renderExprList(groupByExprs) @@ -705,7 +705,7 @@ trait PostgresModule extends Jdbc { self => render(" HAVING ") renderExpr(havingExpr) } - case Nil => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -732,17 +732,17 @@ trait PostgresModule extends Jdbc { self => render(" (", values.mkString(","), ") ") //todo fix needs escaping } - def renderExprList(expr: List[Expr[_, _, _]])(implicit render: Renderer): Unit = + def renderExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = expr match { - case head :: tail => + case Read.ExprSet.ExprCons(head, tail) => renderExpr(head) tail match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => render(", ") renderExprList(tail) - case Nil => () + case Read.ExprSet.NoExpr => () } - case Nil => () + case Read.ExprSet.NoExpr => () } def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 7e2996bea..c06ff3510 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -388,19 +388,17 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { */ import AggregationDef._ - import Ordering._ val expected = List(6,5,5,5,4) val query = select(fkCustomerId ++ Count(orderId)) .from(orders) - //.groupBy(fkCustomerId) + .groupBy(fkCustomerId) + .orderBy(Ordering.Desc(Count(orderId))) - val actual = execute(query.to[Long, Int](_.toInt)).runCollect.map(_.toList) + val actual = execute(query.to[UUID, Long, Int]((_: UUID, count: Long) => count.toInt)).runCollect.map(_.toList) assertM(actual)(equalTo(expected)) - - ??? }, testM("insert - 1 rows into customers") { diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 77cdbfaee..6907eb20b 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -251,7 +251,7 @@ trait SqlServerModule extends Jdbc { self => case Read.Mapped(read, _) => buildReadString(read.asInstanceOf[Read[Out]]) //todo offset (needs orderBy, must use fetch _instead_ of top) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _, _) => + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F type Repr @@ -280,7 +280,7 @@ trait SqlServerModule extends Jdbc { self => buildExpr(whereExpr) } groupByExprs match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => builder.append(" group by ") buildExprList(groupByExprs) @@ -290,7 +290,7 @@ trait SqlServerModule extends Jdbc { self => builder.append(" having ") buildExpr(havingExpr) } - case Nil => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -309,17 +309,17 @@ trait SqlServerModule extends Jdbc { self => val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping } - def buildExprList(expr: List[Expr[_, _, _]]): Unit = + def buildExprList(expr: Read.ExprSet[_]): Unit = expr match { - case head :: tail => + case Read.ExprSet.ExprCons(head, tail) => buildExpr(head) tail match { - case _ :: _ => + case Read.ExprSet.ExprCons(_, _) => builder.append(", ") buildExprList(tail) - case Nil => () + case Read.ExprSet.NoExpr => () } - case Nil => () + case Read.ExprSet.NoExpr => () } def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = expr match { From 1d49729710a96dfa4f82ac44fc0adb283ea690ba Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 27 Jan 2022 14:23:15 +0100 Subject: [PATCH 334/673] compilation 2.12 fixes --- core/jvm/src/main/scala/zio/sql/Sql.scala | 8 +- core/jvm/src/main/scala/zio/sql/expr.scala | 14 +-- .../jvm/src/main/scala/zio/sql/features.scala | 55 ++++---- core/jvm/src/main/scala/zio/sql/select.scala | 117 ++++++++++++------ .../scala/zio/sql/GroupByHavingSpec.scala | 2 +- examples/src/main/scala/Example1.scala | 63 +++++++++- .../src/main/scala/zio/sql/Examples.scala | 8 +- .../scala/zio/sql/mysql/MysqlModule.scala | 12 +- .../scala/zio/sql/oracle/OracleModule.scala | 14 +-- .../zio/sql/postgresql/PostgresModule.scala | 12 +- .../sql/postgresql/PostgresModuleSpec.scala | 57 ++++++--- .../zio/sql/sqlserver/SqlServerModule.scala | 14 +-- .../sql/sqlserver/SqlServerModuleSpec.scala | 4 +- 13 files changed, 250 insertions(+), 130 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index cfef2d88b..6ef8c1ca4 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -17,10 +17,10 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu * * SELECT ARBITRARY(age), COUNT(*) FROM person GROUP BY age */ - def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])( - implicit i: Features.IsPartiallyAggregated[F] - ): Selector[F, A, B, i.Unaggregated] = - Selector[F, A, B, i.Unaggregated](selection) + def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit + i: Features.IsPartiallyAggregated[F] + ): Selector[F, A, B, i.Unaggregated] = + Selector[F, A, B, i.Unaggregated](selection) def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index fa20a7689..173d053a1 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -131,7 +131,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { ): Selection[F, A, SelectionSet.Cons[A, B, SelectionSet.Empty]] = Selection.computedOption[F, A, B](expr, Expr.exprName(expr)) - // aggregated F should not be propagated + // aggregated F should not be propagated sealed case class Subselect[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] ) extends InvariantExpr[Features.Derived, Any, Head] { @@ -276,13 +276,11 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } object AggregationDef { - val Count = AggregationDef[Any, Long](FunctionName("count")) - val Sum = AggregationDef[Double, Double](FunctionName("sum")) - //TODO what is Arbitrary??? it does not exists on postgresql - def Arbitrary[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("arbitrary"))(expr) - val Avg = AggregationDef[Double, Double](FunctionName("avg")) - def Min[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("min"))(expr) - def Max[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("max"))(expr) + val Count = AggregationDef[Any, Long](FunctionName("count")) + val Sum = AggregationDef[Double, Double](FunctionName("sum")) + val Avg = AggregationDef[Double, Double](FunctionName("avg")) + def Min[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("min"))(expr) + def Max[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("max"))(expr) } sealed case class FunctionDef[-A, +B](name: FunctionName) { self => diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index 34e9e0932..c9cb69e54 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -2,7 +2,7 @@ package zio.sql import scala.annotation.implicitNotFound -trait FeaturesModule { +trait FeaturesModule { type :||:[A, B] = Features.Union[A, B] @@ -14,25 +14,25 @@ trait FeaturesModule { type Function0 type Derived - sealed trait IsNotAggregated[A] + sealed trait IsNotAggregated[A] object IsNotAggregated { - implicit def UnionIsNotAgregated[A: IsNotAggregated, B: IsNotAggregated]: IsNotAggregated[Union[A, B]] = + implicit def UnionIsNotAgregated[A: IsNotAggregated, B: IsNotAggregated]: IsNotAggregated[Union[A, B]] = new IsNotAggregated[Union[A, B]] {} - implicit def SourceIsNotAggregated[A]: IsNotAggregated[Source[A]] = + implicit def SourceIsNotAggregated[A]: IsNotAggregated[Source[A]] = new IsNotAggregated[Source[A]] {} - implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = + implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = new IsNotAggregated[Literal] {} - implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = + implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = new IsNotAggregated[Derived] {} - implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = + implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = new IsNotAggregated[Function0] {} } - sealed trait IsFullyAggregated[A] + sealed trait IsFullyAggregated[A] object IsFullyAggregated { def apply[A](implicit is: IsFullyAggregated[A]): IsFullyAggregated[A] = is @@ -64,31 +64,38 @@ trait FeaturesModule { def apply[A](implicit is: IsPartiallyAggregated[A]): IsPartiallyAggregated.WithRemainder[A, is.Unaggregated] = is - implicit def AggregatedIsAggregated[A]: IsPartiallyAggregated.WithRemainder[Aggregated[A], Any] = new IsPartiallyAggregated[Aggregated[A]] { - override type Unaggregated = Any - } + implicit def AggregatedIsAggregated[A]: IsPartiallyAggregated.WithRemainder[Aggregated[A], Any] = + new IsPartiallyAggregated[Aggregated[A]] { + override type Unaggregated = Any + } - implicit def UnionIsAggregated[A, B](implicit inA: IsPartiallyAggregated[A], inB: IsPartiallyAggregated[B]): IsPartiallyAggregated.WithRemainder[Union[A, B], inA.Unaggregated with inB.Unaggregated] = + implicit def UnionIsAggregated[A, B](implicit + inA: IsPartiallyAggregated[A], + inB: IsPartiallyAggregated[B] + ): IsPartiallyAggregated.WithRemainder[Union[A, B], inA.Unaggregated with inB.Unaggregated] = new IsPartiallyAggregated[Union[A, B]] { override type Unaggregated = inA.Unaggregated with inB.Unaggregated } - implicit val LiteralIsAggregated: IsPartiallyAggregated.WithRemainder[Literal, Any] = new IsPartiallyAggregated[Literal] { - override type Unaggregated = Any - } + implicit val LiteralIsAggregated: IsPartiallyAggregated.WithRemainder[Literal, Any] = + new IsPartiallyAggregated[Literal] { + override type Unaggregated = Any + } - implicit val DerivedIsAggregated: IsPartiallyAggregated.WithRemainder[Derived, Any] = new IsPartiallyAggregated[Derived] { - override type Unaggregated = Any - } - - implicit val FunctionIsAggregated: IsPartiallyAggregated.WithRemainder[Function0, Any] = new IsPartiallyAggregated[Function0] { - override type Unaggregated = Any - } + implicit val DerivedIsAggregated: IsPartiallyAggregated.WithRemainder[Derived, Any] = + new IsPartiallyAggregated[Derived] { + override type Unaggregated = Any + } + + implicit val FunctionIsAggregated: IsPartiallyAggregated.WithRemainder[Function0, Any] = + new IsPartiallyAggregated[Function0] { + override type Unaggregated = Any + } } trait IsPartiallyAggregatedLowPriorityImplicits { - implicit def SourceIsAggregated[A]: IsPartiallyAggregated.WithRemainder[Features.Source[A], Features.Source[A]] = new IsPartiallyAggregated[Features.Source[A]] { override type Unaggregated = Features.Source[A] - } + implicit def SourceIsAggregated[A]: IsPartiallyAggregated.WithRemainder[Features.Source[A], Features.Source[A]] = + new IsPartiallyAggregated[Features.Source[A]] { override type Unaggregated = Features.Source[A] } } } } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index d130ae6aa..d28fba06c 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -4,24 +4,26 @@ import scala.language.implicitConversions trait SelectModule { self: ExprModule with TableModule => -sealed case class Selector[F, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F, Source, B]) - -object Selector extends SelectorImplicitLowerPriority { - implicit def aggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source]] - (selector: Selector[F, Source, B, Any])(implicit i: Features.IsFullyAggregated[F]): SelectBuilder[F, Source, B] = - SelectBuilder(selector.selection) - - implicit def notAggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source], Unaggregated] - (selector: Selector[F, Source, B, Unaggregated])(implicit i: Features.IsNotAggregated[F]): SelectBuilder[F, Source, B] = - SelectBuilder(selector.selection) -} + sealed case class Selector[F, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F, Source, B]) + + object Selector extends SelectorImplicitLowerPriority { + implicit def aggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source]]( + selector: Selector[F, Source, B, Any] + )(implicit i: Features.IsFullyAggregated[F]): SelectBuilder[F, Source, B] = + SelectBuilder(selector.selection) + + implicit def notAggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source], Unaggregated]( + selector: Selector[F, Source, B, Unaggregated] + )(implicit i: Features.IsNotAggregated[F]): SelectBuilder[F, Source, B] = + SelectBuilder(selector.selection) + } -trait SelectorImplicitLowerPriority { - implicit def partiallyAggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source], Unaggregated] - (selector: Selector[F, Source, B, Unaggregated]): AggSelectBuilder[F, Source, B, Unaggregated] = - AggSelectBuilder[F, Source, B, Unaggregated](selector.selection) + trait SelectorImplicitLowerPriority { + implicit def partiallyAggregatedSelectorToBuilder[F, Source, B <: SelectionSet[Source], Unaggregated]( + selector: Selector[F, Source, B, Unaggregated] + ): AggSelectBuilder[F, Source, B, Unaggregated] = + AggSelectBuilder[F, Source, B, Unaggregated](selector.selection) - // select(Sin(1.0)) implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( selectBuilder: Selector[F, Source, B, Any] )(implicit @@ -47,16 +49,18 @@ trait SelectorImplicitLowerPriority { Read.Subselect(Selection[F, Source, B0](b), None, true) } -} + } - sealed case class AggSelectBuilder[F0, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F0, Source, B]){ + sealed case class AggSelectBuilder[F0, Source, B <: SelectionSet[Source], Unaggregated]( + selection: Selection[F0, Source, B] + ) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] ): AggSelectBuilderGroupBy[ F0, selection.value.ResultTypeRepr, - Source0, + Source0, selection.value.ColumnHead, selection.value.SelectionTail, Unaggregated @@ -69,13 +73,21 @@ trait SelectorImplicitLowerPriority { ] val b: B0 = selection.value.asInstanceOf[B0] - AggSelectBuilderGroupBy[F0, selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail, Unaggregated](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true)) + AggSelectBuilderGroupBy[ + F0, + selection.value.ResultTypeRepr, + Source0, + selection.value.ColumnHead, + selection.value.SelectionTail, + Unaggregated + ](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true)) } } - //TODO add having + //TODO add having !!!! sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source], Unaggregated]( - select: Read.Select[F, Repr, Source, Head, Tail]) { + select: Read.Select[F, Repr, Source, Head, Tail] + ) { import Read.ExprSet._ // format: off @@ -485,15 +497,17 @@ trait SelectorImplicitLowerPriority { object ExprSet { type NoExpr = NoExpr.type case object NoExpr extends ExprSet[Any] { - override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] - override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = ExprCons(that, NoExpr) + override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] + override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = + ExprCons(that, NoExpr) } - sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) extends ExprSet[Source] { - override type Append[F2, Source1 <: Source, B2] = + sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) + extends ExprSet[Source] { + override type Append[F2, Source1 <: Source, B2] = ExprCons[F, Source1, B, tail.Append[F2, Source1, B2]] - override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = - ExprCons(head, tail.++[F2, Source1, B2](that)) + override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = + ExprCons(head, tail.++[F2, Source1, B2](that)) } } @@ -508,7 +522,9 @@ trait SelectorImplicitLowerPriority { limit: Option[Long] = None ) extends Read[Repr] { self => - def where(whereExpr2: Expr[_, Source, Boolean]): Subselect[F, Repr, Source, Subsource, Head, Tail] = + def where[F2: Features.IsNotAggregated]( + whereExpr2: Expr[F2, Source, Boolean] + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(whereExpr = self.whereExpr && whereExpr2) def limit(n: Long): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(limit = Some(n)) @@ -521,19 +537,38 @@ trait SelectorImplicitLowerPriority { ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) - def having(havingExpr2: Expr[_, Source, Boolean])(implicit - ev: Features.IsFullyAggregated[F] - ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { - val _ = ev + /** + * TODO + * + * need to restrict varargs _ : IsAggregated + */ + def having(havingExpr2: Expr[_, Source, Boolean]) + //(implicit ev: Features.IsFullyAggregated[F]) + : Subselect[F, Repr, Source, Subsource, Head, Tail] = + // val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) - } - def groupBy(key: Expr[_, Source, Any], keys: Expr[_, Source, Any]*)(implicit - ev: Features.IsFullyAggregated[F] - ): Subselect[F, Repr, Source, Subsource, Head, Tail] = { - val _ = ev - copy(groupByExprs = (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail))) - } + /** + * TODO support + * select(fkCustomerId) + * .from(orders) + * .groupBy(fkCustomerId) + * + * DONT allow + * select(Count(orderId) ++ Count(orderId)) + * .from(orders) + * .groupBy(Count(orderId)) + * + * is there a way to restrict _ : IsNotAggregated + * (cannot move it up to AggBuilder because select(fkCustomerId).from(orders) is valid sql) + */ + def groupBy( + key: Expr[_, Source, Any], + keys: Expr[_, Source, Any]* + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = + copy(groupByExprs = + (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail)) + ) override def asTable( name: TableName @@ -612,7 +647,7 @@ trait SelectorImplicitLowerPriority { def ++[F2, A1 <: A, C <: SelectionSet[A1]]( that: Selection[F2, A1, C] ): Selection[F :||: F2, A1, self.value.Append[A1, C]] = - Selection[F :||: F2, A1, self.value.Append[A1, C]](self.value ++ that.value) + Selection[F :||: F2, A1, self.value.Append[A1, C]](self.value ++ that.value) } object Selection { diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 42161483b..c2862ac4a 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -37,7 +37,7 @@ object AggregatedProductSchema { val id :*: name :*: amount :*: price :*: _ = productTable.columns val orderValue = - select(Arbitrary(name) ++ Sum(price)) + select(name ++ Sum(price)) .from(productTable) .groupBy(name) .having(Sum(price) > 10) diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 01610c6c9..f79306e77 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -32,14 +32,14 @@ object Example1 extends Sql { .offset(1000) .orderBy(age.descending) - val tt = ((age + 2) as "age") + val tt = ((age + 2) as "age") val joined = select((age as "age") ++ (age2 as "age2")) .from(table.join(table2).on(name === name2)) val aggregated = - select((Arbitrary(age) as "age") ++ (Count(1) as "count")) + select((age as "age") ++ (Count(1) as "count")) .from(table) .groupBy(age) @@ -56,11 +56,62 @@ object Example1 extends Sql { val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns val query = select(fkCustomerId ++ Count(orderId)) - .from(orders) - .groupBy(fkCustomerId, orderDate) + .from(orders) + .groupBy(fkCustomerId, orderDate) //TODO remove - just to test group by / having - def test[F, A, B](expr: Expr[F,A, B])(implicit in: Features.IsPartiallyAggregated[F]) : in.Unaggregated = ??? - def test2[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit in: Features.IsPartiallyAggregated[F]) : in.Unaggregated = ??? + def test[F, A, B](expr: Expr[F, A, B])(implicit in: Features.IsPartiallyAggregated[F]): in.Unaggregated = ??? + def test2[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit + in: Features.IsPartiallyAggregated[F] + ): in.Unaggregated = ??? + + //HAVING OK + + // select(fkCustomerId) + // .from(orders) + // .groupBy(fkCustomerId) + // .having(Count(orderId) > 4) + + // select(Count(orderId)) + // .from(orders) + // .having(Count(orderId) > 26) + + // select(Count(orderId)) + // .from(orders) + // .groupBy(fkCustomerId) + // .having(Count(orderId) > 4) + + // select(Count(id), customerId) + // .from(orders) + // .groupBy(fkCustomerId) + // .having(Count(orderId) > 4) + + //HAVING FAIL + + // select(fkCustomerId) + // .from(orders) + // .having(Count(orderId) > 4) + + //RESTRICTIONS + // 1. Having needs to be aggregated + // 2. fully agregated expr do not need Group By + + type Value[_] + + sealed trait SomeTypeclass[F] + + object SomeTypeclass { + //instances + } + + def test(values: Value[_]*) = ??? + + def test[F1: SomeTypeclass](value1: Value[F1]) = ??? + def test[F1: SomeTypeclass, F2: SomeTypeclass](value1: Value[F1], value2: Value[F2]) = ??? + def test[F1: SomeTypeclass, F2: SomeTypeclass, F3: SomeTypeclass]( + value1: Value[F1], + value2: Value[F2], + value3: Value[F3] + ) = ??? } diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 2be0017b4..32ad4c142 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -55,9 +55,9 @@ object Examples extends App with ShopSchema with SqlServerModule { val orderValues = select( - (Arbitrary(userId)) ++ - (Arbitrary(fName)) ++ - (Arbitrary(lName)) ++ + userId ++ + fName ++ + lName ++ (Sum(quantity * unitPrice) as "total_spend") ++ Sum(Abs(quantity)) ) @@ -68,7 +68,7 @@ object Examples extends App with ShopSchema with SqlServerModule { .leftOuter(orderDetails) .on(orderId === fkOrderId) ) - .groupBy(userId, fName /*, lName */ ) //shouldn't compile without lName todo fix #38 + .groupBy(userId, fName, lName) println(renderRead(orderValues)) import scala.language.postfixOps diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index f5bcc2223..7bfcf1b3a 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -119,7 +119,7 @@ trait MysqlModule extends Jdbc { self => render(" HAVING ") renderExpr(havingExpr) } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -403,15 +403,15 @@ trait MysqlModule extends Jdbc { self => private def renderExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = expr match { - case Read.ExprSet.ExprCons(head, tail) => + case Read.ExprSet.ExprCons(head, tail) => renderExpr(head) - tail match { + tail.asInstanceOf[Read.ExprSet[_]] match { case Read.ExprSet.ExprCons(_, _) => render(", ") - renderExprList(tail) - case Read.ExprSet.NoExpr => () + renderExprList(tail.asInstanceOf[Read.ExprSet[_]]) + case Read.ExprSet.NoExpr => () } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 86e368493..3005c065b 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -167,7 +167,7 @@ trait OracleModule extends Jdbc { self => builder.append(" HAVING ") buildExpr(havingExpr, builder) } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -199,17 +199,17 @@ trait OracleModule extends Jdbc { self => val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping } - def buildExprList(expr: Read.ExprSet[_], builder: StringBuilder): Unit = + def buildExprList(expr: Read.ExprSet[_], builder: StringBuilder): Unit = expr match { - case Read.ExprSet.ExprCons(head, tail) => + case Read.ExprSet.ExprCons(head, tail) => buildExpr(head, builder) - tail match { + tail.asInstanceOf[Read.ExprSet[_]] match { case Read.ExprSet.ExprCons(_, _) => builder.append(", ") - buildExprList(tail, builder) - case Read.ExprSet.NoExpr => () + buildExprList(tail.asInstanceOf[Read.ExprSet[_]], builder) + case Read.ExprSet.NoExpr => () } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]], builder: StringBuilder): Unit = expr match { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index d7f75a544..9d0e620d3 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -705,7 +705,7 @@ trait PostgresModule extends Jdbc { self => render(" HAVING ") renderExpr(havingExpr) } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -734,15 +734,15 @@ trait PostgresModule extends Jdbc { self => def renderExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = expr match { - case Read.ExprSet.ExprCons(head, tail) => + case Read.ExprSet.ExprCons(head, tail) => renderExpr(head) - tail match { + tail.asInstanceOf[Read.ExprSet[_]] match { case Read.ExprSet.ExprCons(_, _) => render(", ") - renderExprList(tail) - case Read.ExprSet.NoExpr => () + renderExprList(tail.asInstanceOf[Read.ExprSet[_]]) + case Read.ExprSet.NoExpr => () } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index c06ff3510..1302e7072 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -17,7 +17,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { import Customers._ import Orders._ - private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { + private def customerSelectJoseAssertion[F: Features.IsNotAggregated]( + condition: Expr[F, customers.TableType, Boolean] + ) = { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = @@ -379,26 +381,51 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("group by / order by order is correct") { + testM("group by can be called on non aggregated collumn") { + /** - select customer_id, count(id) - from orders - group by customer_id - order by count(id) desc - */ + * select customer_id + * from orders + * group by customer_id + */ + + val expected = List( + "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", + "60b01fc9-c902-4468-8d49-3c0f989def37", + "df8215a2-d5fd-4c6c-9984-801a1b3a2a0b", + "784426a5-b90a-4759-afbb-571b7a0ba35e", + "f76c9ace-be07-4bf3-bd4c-4a9c62882e64" + ) + + val query = select(fkCustomerId) + .from(orders) + .groupBy(fkCustomerId) + + val actual = execute(query.to[UUID, String](_.toString())).runCollect.map(_.toList) + + assertM(actual)(equalTo(expected)) + }, + testM("group by have to be called on column from selection") { + + /** + * select customer_id, count(id) + * from orders + * group by customer_id + * order by count(id) desc + */ - import AggregationDef._ + import AggregationDef._ - val expected = List(6,5,5,5,4) + val expected = List(6, 5, 5, 5, 4) - val query = select(fkCustomerId ++ Count(orderId)) - .from(orders) - .groupBy(fkCustomerId) - .orderBy(Ordering.Desc(Count(orderId))) + val query = select(fkCustomerId ++ Count(orderId)) + .from(orders) + .groupBy(fkCustomerId) + .orderBy(Ordering.Desc(Count(orderId))) - val actual = execute(query.to[UUID, Long, Int]((_: UUID, count: Long) => count.toInt)).runCollect.map(_.toList) + val actual = execute(query.to[UUID, Long, Int]((_: UUID, count: Long) => count.toInt)).runCollect.map(_.toList) - assertM(actual)(equalTo(expected)) + assertM(actual)(equalTo(expected)) }, testM("insert - 1 rows into customers") { diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 6907eb20b..88bed37dc 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -290,7 +290,7 @@ trait SqlServerModule extends Jdbc { self => builder.append(" having ") buildExpr(havingExpr) } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } orderByExprs match { case _ :: _ => @@ -309,17 +309,17 @@ trait SqlServerModule extends Jdbc { self => val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping } - def buildExprList(expr: Read.ExprSet[_]): Unit = + def buildExprList(expr: Read.ExprSet[_]): Unit = expr match { - case Read.ExprSet.ExprCons(head, tail) => + case Read.ExprSet.ExprCons(head, tail) => buildExpr(head) - tail match { + tail.asInstanceOf[Read.ExprSet[_]] match { case Read.ExprSet.ExprCons(_, _) => builder.append(", ") - buildExprList(tail) - case Read.ExprSet.NoExpr => () + buildExprList(tail.asInstanceOf[Read.ExprSet[_]]) + case Read.ExprSet.NoExpr => () } - case Read.ExprSet.NoExpr => () + case Read.ExprSet.NoExpr => () } def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]]): Unit = expr match { diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index c9b31d9d4..b3b93f7d7 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -14,7 +14,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { import AggregationDef._ import DbSchema._ - private def customerSelectJoseAssertion(condition: Expr[_, customers.TableType, Boolean]) = { + private def customerSelectJoseAssertion[F: Features.IsNotAggregated]( + condition: Expr[F, customers.TableType, Boolean] + ) = { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = From 82c45c14b705e896e8d22f510d6c5f3e73e9acb2 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 30 Jan 2022 13:18:06 +0100 Subject: [PATCH 335/673] made execution of queries more user friendly --- core/jvm/src/main/scala/zio/sql/Sql.scala | 2 +- core/jvm/src/main/scala/zio/sql/select.scala | 264 ++++-------------- core/jvm/src/main/scala/zio/sql/utils.scala | 102 +++++++ examples/src/main/scala/Example1.scala | 2 + .../scala/zio/sql/JdbcInternalModule.scala | 34 ++- .../scala/zio/sql/TransactionModule.scala | 6 + .../scala/zio/sql/mysql/FunctionDefSpec.scala | 18 +- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 8 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 192 ++++++------- .../sql/postgresql/PostgresModuleSpec.scala | 84 +++--- .../sql/sqlserver/SqlServerModuleSpec.scala | 84 +++--- 11 files changed, 379 insertions(+), 417 deletions(-) create mode 100644 core/jvm/src/main/scala/zio/sql/utils.scala diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 6ef8c1ca4..d9d59c8f8 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -2,7 +2,7 @@ package zio.sql import zio.schema.Schema -trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertModule { +trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertModule with UtilsModule { self => /* diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index d28fba06c..a205976b6 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -2,7 +2,7 @@ package zio.sql import scala.language.implicitConversions -trait SelectModule { self: ExprModule with TableModule => +trait SelectModule { self: ExprModule with TableModule with UtilsModule => sealed case class Selector[F, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F, Source, B]) @@ -25,16 +25,17 @@ trait SelectModule { self: ExprModule with TableModule => AggSelectBuilder[F, Source, B, Unaggregated](selector.selection) implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( - selectBuilder: Selector[F, Source, B, Any] + selectBuilder: Selector[F, Source, B, Any], )(implicit ev: B <:< SelectionSet.Cons[ Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail - ] + ], + normalizer: TrailingUnitNormalizer[selectBuilder.selection.value.ResultTypeRepr] ): Read.Select[ F, - selectBuilder.selection.value.ResultTypeRepr, + normalizer.Out, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail @@ -47,7 +48,7 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F, Source, B0](b), None, true) + Read.Subselect(Selection[F, Source, B0](b), None, true).normalize } } @@ -56,10 +57,11 @@ trait SelectModule { self: ExprModule with TableModule => ) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit - ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail], + normalizer: TrailingUnitNormalizer[selection.value.ResultTypeRepr] ): AggSelectBuilderGroupBy[ F0, - selection.value.ResultTypeRepr, + normalizer.Out, Source0, selection.value.ColumnHead, selection.value.SelectionTail, @@ -75,12 +77,12 @@ trait SelectModule { self: ExprModule with TableModule => AggSelectBuilderGroupBy[ F0, - selection.value.ResultTypeRepr, + normalizer.Out, Source0, selection.value.ColumnHead, selection.value.SelectionTail, Unaggregated - ](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true)) + ](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true).normalize) } } @@ -206,10 +208,11 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class SelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: Selection[F0, Source, B]) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit - ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail], + normalizer: TrailingUnitNormalizer[selection.value.ResultTypeRepr] ): Read.Select[ F0, - selection.value.ResultTypeRepr, + normalizer.Out, Source0, selection.value.ColumnHead, selection.value.SelectionTail @@ -222,7 +225,7 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true) + Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true).normalize } } @@ -281,181 +284,10 @@ trait SelectModule { self: ExprModule with TableModule => */ def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = Read.Mapped(self, f) - - def to[A, Target](f: A => Target)(implicit ev: Out <:< (A, Unit)): Read[Target] = - self.map { resultType => - val (a, _) = ev(resultType) - - f(a) - } - - def to[A, B, Target]( - f: (A, B) => Target - )(implicit ev: Out <:< (A, (B, Unit))): Read[Target] = - self.map { resultType => - val (a, (b, _)) = ev(resultType) - - f(a, b) - } - - def to[A, B, C, Target]( - f: (A, B, C) => Target - )(implicit ev: Out <:< (A, (B, (C, Unit)))): Read[Target] = - self.map { resultType => - val (a, (b, (c, _))) = ev(resultType) - - f(a, b, c) - } - - def to[A, B, C, D, Target]( - f: (A, B, C, D) => Target - )(implicit ev: Out <:< (A, (B, (C, (D, Unit))))): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, _)))) = ev(resultType) - - f(a, b, c, d) - } - - def to[A, B, C, D, E, Target]( - f: (A, B, C, D, E) => Target - )(implicit ev: Out <:< (A, (B, (C, (D, (E, Unit)))))): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, _))))) = ev(resultType) - - f(a, b, c, d, e) - } - - def to[A, B, C, D, E, F, G, H, Target]( - f: (A, B, C, D, E, F, G, H) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, _)))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h) - } - - def to[A, B, C, D, E, F, G, H, I, Target]( - f: (A, B, C, D, E, F, G, H, I) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, _))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, _)))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, _))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, _)))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, _))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, _)))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Target - )(implicit - ev: Out <:< (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) - ): Read[Target] = + + def to[Target](f: Out => Target): Read[Target] = self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, _))))))))))))))))) = ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => Target - )(implicit - ev: Out <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))) - ) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, _)))))))))))))))))) = - ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => Target - )(implicit - ev: Out <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))) - ) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, _))))))))))))))))))) = - ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s) - } - - def to[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Target]( - f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Target - )(implicit - ev: Out <:< ( - A, - (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))) - ) - ): Read[Target] = - self.map { resultType => - val (a, (b, (c, (d, (e, (fArg, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, _)))))))))))))))))))) = - ev(resultType) - - f(a, b, c, d, e, fArg, g, h, i, j, k, l, m, n, o, p, q, r, s, t) + f(resultType) } def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = @@ -466,6 +298,28 @@ trait SelectModule { self: ExprModule with TableModule => } object Read { + sealed trait ExprSet[-Source] { + type Append[F2, Source1 <: Source, B2] <: ExprSet[Source1] + def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] + } + + object ExprSet { + type NoExpr = NoExpr.type + case object NoExpr extends ExprSet[Any] { + override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] + override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = + ExprCons(that, NoExpr) + } + + sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) + extends ExprSet[Source] { + override type Append[F2, Source1 <: Source, B2] = + ExprCons[F, Source1, B, tail.Append[F2, Source1, B2]] + override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = + ExprCons(head, tail.++[F2, Source1, B2](that)) + } + } + type Aux[ResultType0, Out] = Read[Out] { type ResultType = ResultType0 } @@ -489,28 +343,6 @@ trait SelectModule { self: ExprModule with TableModule => type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] - sealed trait ExprSet[-Source] { - type Append[F2, Source1 <: Source, B2] <: ExprSet[Source1] - def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] - } - - object ExprSet { - type NoExpr = NoExpr.type - case object NoExpr extends ExprSet[Any] { - override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] - override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = - ExprCons(that, NoExpr) - } - - sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) - extends ExprSet[Source] { - override type Append[F2, Source1 <: Source, B2] = - ExprCons[F, Source1, B, tail.Append[F2, Source1, B2]] - override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = - ExprCons(head, tail.++[F2, Source1, B2](that)) - } - } - sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( selection: Selection[F, Source, SelectionSet.ConsAux[Repr, Source, Head, Tail]], table: Option[Table.Aux[Subsource]], @@ -522,7 +354,8 @@ trait SelectModule { self: ExprModule with TableModule => limit: Option[Long] = None ) extends Read[Repr] { self => - def where[F2: Features.IsNotAggregated]( + //def where[F2: Features.IsNotAggregated]( + def where[F2]( whereExpr2: Expr[F2, Source, Boolean] ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(whereExpr = self.whereExpr && whereExpr2) @@ -570,6 +403,9 @@ trait SelectModule { self: ExprModule with TableModule => (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail)) ) + def normalize(implicit instance: TrailingUnitNormalizer[ResultType]): Subselect[F, instance.Out, Source, Subsource, Head, Tail] = + self.asInstanceOf[Subselect[F, instance.Out, Source, Subsource, Head, Tail]] + override def asTable( name: TableName ): Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]] = @@ -640,14 +476,14 @@ trait SelectModule { self: ExprModule with TableModule => /** * A columnar selection of `B` from a source `A`, modeled as `A => B`. */ - sealed case class Selection[F, -A, +B <: SelectionSet[A]](value: B) { self => + sealed case class Selection[F, -Source, +B <: SelectionSet[Source]](value: B) { self => type ColsRepr = value.ResultTypeRepr - def ++[F2, A1 <: A, C <: SelectionSet[A1]]( - that: Selection[F2, A1, C] - ): Selection[F :||: F2, A1, self.value.Append[A1, C]] = - Selection[F :||: F2, A1, self.value.Append[A1, C]](self.value ++ that.value) + def ++[F2, Source1 <: Source, C <: SelectionSet[Source1]]( + that: Selection[F2, Source1, C] + ): Selection[F :||: F2, Source1, self.value.Append[Source1, C]] = + Selection[F :||: F2, Source1, self.value.Append[Source1, C]](self.value ++ that.value) } object Selection { diff --git a/core/jvm/src/main/scala/zio/sql/utils.scala b/core/jvm/src/main/scala/zio/sql/utils.scala new file mode 100644 index 000000000..771a9be16 --- /dev/null +++ b/core/jvm/src/main/scala/zio/sql/utils.scala @@ -0,0 +1,102 @@ +package zio.sql + +trait UtilsModule { self => + sealed trait TrailingUnitNormalizer[In] { + type Out + } + + object TrailingUnitNormalizer { + type WithOut[In0, Out0] = TrailingUnitNormalizer[In0] { + type Out = Out0 + } + // format: off + implicit def arity1[In, A](implicit ev: In =:= (A, Unit)) : TrailingUnitNormalizer.WithOut[In, A] = new TrailingUnitNormalizer[In] { + override type Out = A + } + + implicit def arity2[In, A, B](implicit ev: In =:= (A, (B, Unit))) : TrailingUnitNormalizer.WithOut[In, (A, B)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B) + } + + implicit def arity3[In, A, B, C](implicit ev: In =:= (A, (B, (C, Unit)))) : TrailingUnitNormalizer.WithOut[In, (A, B, C)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C) + } + + implicit def arity4[In, A, B, C, D](implicit ev: In =:= (A, (B, (C, (D, Unit))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D) + } + + implicit def arity5[In, A, B, C, D, E](implicit ev: In =:= (A, (B, (C, (D, (E, Unit)))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E) + } + + implicit def arity6[In, A, B, C, D, E, F](implicit ev: In =:= (A, (B, (C, (D, (E, (F, Unit))))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F) + } + + implicit def arity7[In, A, B, C, D, E, F, G](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, Unit)))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G) + } + + implicit def arity8[In, A, B, C, D, E, F, G, H](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H) + } + + implicit def arity9[In, A, B, C, D, E, F, G, H, I](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit)))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I) + } + + implicit def arity10[In, A, B, C, D, E, F, G, H, I, J](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J) + } + + implicit def arity11[In, A, B, C, D, E, F, G, H, I, J, K](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit)))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K) + } + + implicit def arity12[In, A, B, C, D, E, F, G, H, I, J, K, L](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L) + } + + implicit def arity13[In, A, B, C, D, E, F, G, H, I, J, K, L, M](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit)))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M) + } + + implicit def arity14[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N) + } + + implicit def arity15[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit)))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) + } + + implicit def arity16[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) + } + + implicit def arity17[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit)))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) + } + + implicit def arity18[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) + } + + implicit def arity19[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) + } + + implicit def arity20[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) + } + + implicit def arity21[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit)))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) + } + + implicit def arity22[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit))))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new TrailingUnitNormalizer[In] { + override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) + } + // format: on + } +} \ No newline at end of file diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index f79306e77..7af0f0faa 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -114,4 +114,6 @@ object Example1 extends Sql { value3: Value[F3] ) = ??? + def test3[Out](read: Read[Out])(implicit in: TrailingUnitNormalizer[Out]) : in.Out = ??? + } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index d8da0c9ca..ef7fff0ee 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -122,17 +122,41 @@ trait JdbcInternalModule { self: Jdbc => resultSet: ResultSet, schema: Vector[(TypeTag[_], Int)] ): Either[DecodingError, A] = { - val result: Either[DecodingError, Any] = Right(()) + + val result: Either[DecodingError, List[Any]] = Right(List()) schema .foldRight(result) { - case (_, err @ Left(_)) => err // TODO: Accumulate errors + case (_, err@Left(_)) => err // TODO: Accumulate errors case ((typeTag, index), Right(vs)) => extractColumn(Left(index), resultSet, typeTag) match { case Left(err) => Left(err) - case Right(v) => Right((v, vs)) + case Right(v) => Right(v :: vs) } - } - .map(_.asInstanceOf[A]) + }.map { + case List(a) => (a) + case List(a, b) => (a, b) + case List(a, b, c) => (a, b, c) + case List(a, b, c, d) => (a, b, c, d) + case List(a, b, c, d, e) => (a, b, c, d, e) + case List(a, b, c, d, e, f) => (a, b, c, d, e, f) + case List(a, b, c, d, e, f, g) => (a, b, c, d, e, f, g) + case List(a, b, c, d, e, f, g, h) => (a, b, c, d, e, f, g, h) + case List(a, b, c, d, e, f, g, h, i) => (a, b, c, d, e, f, g, h, i) + case List(a, b, c, d, e, f, g, h, i, j) => (a, b, c, d, e, f, g, h, i, j) + case List(a, b, c, d, e, f, g, h, i, j, k) => (a, b, c, d, e, f, g, h, i, j, k) + case List(a, b, c, d, e, f, g, h, i, j, k, l) => (a, b, c, d, e, f, g, h, i, j, k, l) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m) => (a, b, c, d, e, f, g, h, i, j, k, l, m) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) + case _ => () + }.map(_.asInstanceOf[A]) } } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 578074c8a..db164ea36 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -5,6 +5,7 @@ import java.sql._ import zio._ import zio.blocking.Blocking import zio.stream._ +import zio.schema.Schema trait TransactionModule { self: Jdbc => private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) @@ -81,6 +82,11 @@ trait TransactionModule { self: Jdbc => txn.flatMap { case Txn(connection, coreDriver) => ZTransaction.fromEffect(coreDriver.updateOn(update, connection)) } + + def apply[Z: Schema](insert: self.Insert[_, Z]): ZTransaction[Any, Exception, Int] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.insertOn(insert, connection)) + } def apply(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = txn.flatMap { case Txn(connection, coreDriver) => diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 6df3651a5..4948055af 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -16,7 +16,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = "ronald" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -45,7 +45,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 0.8414709848078965 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -58,7 +58,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 32.0 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -71,7 +71,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 3259397556L - val testResult = execute(query.to[Long, Long](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -84,7 +84,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 180d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -97,7 +97,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 3d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -110,7 +110,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 6d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -123,7 +123,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 40 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -136,7 +136,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 3.141593d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 83029086e..41cc672d3 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -57,7 +57,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { val testResult = execute( query - .to[UUID, String, String, LocalDate, Customer] { case row => + .to { case row => Customer(row._1, row._2, row._3, row._4) } ) @@ -88,7 +88,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { val testResult = execute( query - .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + .to { case row => Customer(row._1, row._2, row._3, row._4, row._5) } ) @@ -118,7 +118,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { val testResult = execute( query - .to[UUID, String, String, LocalDate, Customer] { case row => + .to { case row => Customer(row._1, row._2, row._3, row._4) } ) @@ -162,7 +162,7 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { val result = execute( query - .to[String, String, LocalDate, Row] { case row => + .to { case row => Row(row._1, row._2, row._3) } ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 2b6834c19..46893f986 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -46,7 +46,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "1+2+3" ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("concat_ws #2 - combine columns") { @@ -63,7 +63,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "JoseJoseWiggins" ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("concat_ws #3 - combine columns and flat values") { @@ -79,7 +79,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person: Jose Wiggins" ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("concat_ws #3 - combine function calls together") { @@ -97,7 +97,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Name: Jose and Surname: Wiggins" ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("isfinite") { @@ -105,7 +105,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected: Boolean = true - val testResult = execute(query.to[Boolean, Boolean](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -118,7 +118,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(Length("hello")) val expected = 5 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -131,7 +131,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "hello " - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -144,7 +144,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = " hello" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -157,7 +157,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 40 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -170,7 +170,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.141592653589793 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -192,7 +192,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person" ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("format1") { @@ -208,7 +208,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person: Jose" ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("format2") { @@ -224,7 +224,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person: Jose Wiggins" ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("format3") { @@ -242,7 +242,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { s"""Person: Jose Wiggins with double quoted "identi fier" """ ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("format4") { @@ -266,7 +266,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { s"""Person: Jose Wiggins with null-literal 'FIXME: NULL' and non-null-literal 'literal' """ ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) }, testM("format5") { @@ -291,7 +291,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { s"""Person: Jose Wiggins with more arguments than placeholders: identifier 'esoJ' """ ) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) collectAndCompare(expected, testResult) } ) @@ -301,7 +301,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.14159 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -314,7 +314,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected: Double = 5 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -327,7 +327,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.141592653589793 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -340,7 +340,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ZioZioZio" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -353,7 +353,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.5235987755982989 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -366,7 +366,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.0986122886681097 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -379,7 +379,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.4711276743037347 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -392,7 +392,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "dcba" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -405,7 +405,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -1.0 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -418,7 +418,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2.718281828459045 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -431,7 +431,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -4.0 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -444,7 +444,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = (54.0, -53.0) - val testResult = execute(query.to[Double, Double, (Double, Double)]((a, b) => (a, b))) + val testResult = execute(query.to(value => (value._1, value._2))) val assertion = for { r <- testResult.runCollect @@ -457,7 +457,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.8414709848078965 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -470,7 +470,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.5 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -483,7 +483,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "def" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -494,7 +494,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("timeofday") { val query = select(TimeOfDay()) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { @@ -509,7 +509,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("localtime") { val query = select(Localtime) - val testResult = execute(query.to[LocalTime, LocalTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -521,7 +521,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val precision = 0 val query = select(LocaltimeWithPrecision(precision)) - val testResult = execute(query.to[LocalTime, LocalTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -532,7 +532,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("localtimestamp") { val query = select(Localtimestamp) - val testResult = execute(query.to[Instant, Instant](identity)) + val testResult = execute(query.to(identity)) val assertion = for { @@ -548,7 +548,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(LocaltimestampWithPrecision(precision)) - val testResult = execute(query.to[Instant, Instant](identity)) + val testResult = execute(query.to(identity)) val assertion = for { @@ -562,7 +562,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("now") { val query = select(Now()) - val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { @@ -576,7 +576,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("statement_timestamp") { val query = select(StatementTimestamp()) - val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { @@ -590,7 +590,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("transaction_timestamp") { val query = select(TransactionTimestamp()) - val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { @@ -604,7 +604,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("current_time") { val query = select(CurrentTime) - val testResult = execute(query.to[OffsetTime, OffsetTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { @@ -622,7 +622,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "3adbbad1791fbae3ec908894c4963870" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -643,7 +643,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = checkM(genTestString) { (testString) => val query = select(ParseIdent(testString)) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) for { r <- testResult.runCollect @@ -654,7 +654,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("parseIdent fails with invalid identifier") { val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect.run @@ -668,7 +668,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 11.0 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -681,7 +681,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "A" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -694,7 +694,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = LocalDate.now() - val testResult = execute(query.to[LocalDate, LocalDate](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -707,7 +707,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "Hi Thomas" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -720,7 +720,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 8.41 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -733,7 +733,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "7fffffff" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -746,7 +746,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "SGVsbG8sIFdvcmxkIQ==" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -759,7 +759,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Chunk.fromArray("Hello, World!".getBytes) - val testResult = execute(query.to[Chunk[Byte], Chunk[Byte]](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -772,7 +772,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 42d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -785,7 +785,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 10.81 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -798,7 +798,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -811,7 +811,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -1 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -824,7 +824,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -837,7 +837,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 343.000000000000000 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -850,7 +850,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -863,7 +863,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -3.0 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -876,7 +876,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "a2x5" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -889,7 +889,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ab" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -902,7 +902,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "de" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -915,7 +915,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.7853981634 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -928,7 +928,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -955,9 +955,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute( query - .to[UUID, String, String, Boolean, LocalDate, Customer]((id, fname, lname, verified, dob) => - Customer(id, fname, lname, verified, dob) - ) + .to{ + case (id, fname, lname, verified, dob) => Customer(id, fname, lname, verified, dob) + } ) val assertion = for { @@ -971,7 +971,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ronald" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -984,7 +984,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "lower" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -997,7 +997,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1010,7 +1010,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 120 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1023,7 +1023,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "RONALD" - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1036,7 +1036,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1049,7 +1049,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.0000000000051035 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1062,7 +1062,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 21d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1075,7 +1075,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 23562d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1088,7 +1088,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 4d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1101,7 +1101,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 28.64788975654116 - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1114,7 +1114,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2d - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1127,7 +1127,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 120 - val testResult = execute(query.to[Int, Int](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1138,7 +1138,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("random") { val query = select(Random()) - val testResult = execute(query.to[Double, Double](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1150,7 +1150,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(SetSeed(0.12) ++ Random() ++ Random()) from customers val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) - val testResult = execute(query.to[Unit, Double, Double, (Double, Double)]((_, b, c) => (b, c))) + val testResult = execute(query.to{ case (_, b, c) => (b, c) }) val assertion = for { r <- testResult.runCollect @@ -1164,7 +1164,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") - val result = execute(query.to[String, String](identity)) + val result = execute(query.to(identity)) val assertion = for { r <- result.runCollect @@ -1178,7 +1178,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Seq(6, 8, 4, 5, 4) - val result = execute(query.to[Int, Int](identity)) + val result = execute(query.to(identity)) val assertion = for { r <- result.runCollect @@ -1189,12 +1189,12 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("to_timestamp") { val query = select(ToTimestamp(1284352323L)) val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) - val testResult = execute(query.to[ZonedDateTime, ZonedDateTime](identity)) + val testResult = execute(query.to(identity)) val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) val roundTripQuery = select(createdString ++ createdTimestamp) from customers - val roundTripResults = execute(roundTripQuery.to[String, ZonedDateTime, (String, ZonedDateTime, ZonedDateTime)] { + val roundTripResults = execute(roundTripQuery.to { case row => (row._1, ZonedDateTime.parse(row._1), row._2) }) @@ -1222,7 +1222,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = ("Russe_", "special ::__::") val testResult = - execute(query.to[String, String, (String, String)] { case row => + execute(query.to { case row => (row._1, row._2) }) @@ -1237,7 +1237,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(LPad(s, 5, pad)) for { - r <- execute(query.to[String, String](identity)).runCollect + r <- execute(query.to(identity)).runCollect } yield r.head } @@ -1252,7 +1252,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(RPad(s, 5, pad)) for { - r <- execute(query.to[String, String](identity)).runCollect + r <- execute(query.to(identity)).runCollect } yield r.head } @@ -1265,7 +1265,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("pg_client_encoding") { val query = select(PgClientEncoding()) - val testResult = execute(query.to[String, String](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1279,7 +1279,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = LocalDate.of(2013, 7, 15) - val testResult = execute(query.to[LocalDate, LocalDate](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1293,7 +1293,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { MakeInterval(interval) ) for { - r <- execute(query.to[Interval, Interval](identity)).runCollect + r <- execute(query.to(identity)).runCollect } yield r.head } @@ -1310,7 +1310,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("make_time") { val query = select(MakeTime(8, 15, 23.5)) val expected = LocalTime.parse("08:15:23.500") - val testResult = execute(query.to[LocalTime, LocalTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1321,7 +1321,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("make_timestamp") { val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) val expected = LocalDateTime.parse("2013-07-15T08:15:23.500") - val testResult = execute(query.to[LocalDateTime, LocalDateTime](identity)) + val testResult = execute(query.to(identity)) val assertion = for { r <- testResult.runCollect @@ -1333,7 +1333,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { def runTest(tz: Timestampz) = { val query = select(MakeTimestampz(tz)) for { - r <- execute(query.to[Timestampz, Timestampz](identity)).runCollect + r <- execute(query.to(identity)).runCollect } yield r.head } @@ -1353,7 +1353,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("cannot compile a select without from clause if a table source is required") { //the following execute only compiles with 'from customers' clause - execute((select(CharLength(Customers.fName)) from customers).to[Int, Int](identity)) + execute((select(CharLength(Customers.fName)) from customers).to(identity)) // imports for Left and Right are necessary to make the typeCheck macro expansion compile // TODO: clean this up when https://github.com/zio/zio/issues/4927 is resolved diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 1302e7072..7b29f0b91 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -38,7 +38,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute( query - .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + .to[Customer] { case row => Customer(row._1, row._2, row._3, row._4, row._5) } ) @@ -92,7 +92,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute( query - .to[UUID, String, String, LocalDate, Customer] { case row => + .to[Customer] { case row => Customer(row._1, row._2, row._3, row._4) } ) @@ -175,10 +175,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) val testResult = execute( - query - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } + query.to(Customer tupled _) ) val assertion = for { @@ -192,7 +189,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5L - val result = execute(query.to[Long, Long](identity)) + val result = execute(query.to(identity)) for { r <- result.runCollect @@ -203,40 +200,35 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { case class Row(firstName: String, lastName: String, orderDate: LocalDate) - val expected = Seq( - Row("Ronald", "Russell", LocalDate.parse("2019-03-25")), - Row("Ronald", "Russell", LocalDate.parse("2018-06-04")), - Row("Alana", "Murray", LocalDate.parse("2019-08-19")), - Row("Jose", "Wiggins", LocalDate.parse("2019-08-30")), - Row("Jose", "Wiggins", LocalDate.parse("2019-03-07")), - Row("Ronald", "Russell", LocalDate.parse("2020-03-19")), - Row("Alana", "Murray", LocalDate.parse("2020-05-11")), - Row("Alana", "Murray", LocalDate.parse("2019-02-21")), - Row("Ronald", "Russell", LocalDate.parse("2018-05-06")), - Row("Mila", "Paterso", LocalDate.parse("2019-02-11")), - Row("Terrence", "Noel", LocalDate.parse("2019-10-12")), - Row("Ronald", "Russell", LocalDate.parse("2019-01-29")), - Row("Terrence", "Noel", LocalDate.parse("2019-02-10")), - Row("Ronald", "Russell", LocalDate.parse("2019-09-27")), - Row("Alana", "Murray", LocalDate.parse("2018-11-13")), - Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")), - Row("Terrence", "Noel", LocalDate.parse("2018-07-10")), - Row("Mila", "Paterso", LocalDate.parse("2019-08-01")), - Row("Alana", "Murray", LocalDate.parse("2019-12-08")), - Row("Mila", "Paterso", LocalDate.parse("2019-11-04")), - Row("Mila", "Paterso", LocalDate.parse("2018-10-14")), - Row("Terrence", "Noel", LocalDate.parse("2020-04-05")), - Row("Jose", "Wiggins", LocalDate.parse("2019-01-23")), - Row("Terrence", "Noel", LocalDate.parse("2019-05-14")), - Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) + val expected = List( + ("Ronald", "Russell", LocalDate.parse("2019-03-25")), + ("Ronald", "Russell", LocalDate.parse("2018-06-04")), + ("Alana", "Murray", LocalDate.parse("2019-08-19")), + ("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + ("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + ("Ronald", "Russell", LocalDate.parse("2020-03-19")), + ("Alana", "Murray", LocalDate.parse("2020-05-11")), + ("Alana", "Murray", LocalDate.parse("2019-02-21")), + ("Ronald", "Russell", LocalDate.parse("2018-05-06")), + ("Mila", "Paterso", LocalDate.parse("2019-02-11")), + ("Terrence", "Noel", LocalDate.parse("2019-10-12")), + ("Ronald", "Russell", LocalDate.parse("2019-01-29")), + ("Terrence", "Noel", LocalDate.parse("2019-02-10")), + ("Ronald", "Russell", LocalDate.parse("2019-09-27")), + ("Alana", "Murray", LocalDate.parse("2018-11-13")), + ("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + ("Terrence", "Noel", LocalDate.parse("2018-07-10")), + ("Mila", "Paterso", LocalDate.parse("2019-08-01")), + ("Alana", "Murray", LocalDate.parse("2019-12-08")), + ("Mila", "Paterso", LocalDate.parse("2019-11-04")), + ("Mila", "Paterso", LocalDate.parse("2018-10-14")), + ("Terrence", "Noel", LocalDate.parse("2020-04-05")), + ("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + ("Terrence", "Noel", LocalDate.parse("2019-05-14")), + ("Mila", "Paterso", LocalDate.parse("2020-04-30")) ) - val result = execute( - query - .to[String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3) - } - ) + val result = execute(query) val assertion = for { r <- result.runCollect @@ -281,9 +273,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val result = execute( query - .to[UUID, String, String, LocalDate, Row] { case row => - Row(row._1, row._2, row._3, row._4) - } + .to(Row tupled _) ) val assertion = for { @@ -319,7 +309,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val result = execute( query - .to[String, String, Long, Row] { case row => + .to{ case row => Row(row._1, row._2, row._3) } ) @@ -346,9 +336,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val testResult = execute( query - .to[UUID, String, String, LocalDate, Customer] { case row => - Customer(row._1, row._2, row._3, row._4) - } + .to { case (uuid, firstName, lastName, dob) => Customer(uuid, firstName, lastName, dob) } ) val assertion = for { @@ -401,7 +389,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { .from(orders) .groupBy(fkCustomerId) - val actual = execute(query.to[UUID, String](_.toString())).runCollect.map(_.toList) + val actual = execute(query.to(_.toString())).runCollect.map(_.toList) assertM(actual)(equalTo(expected)) }, @@ -423,7 +411,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { .groupBy(fkCustomerId) .orderBy(Ordering.Desc(Count(orderId))) - val actual = execute(query.to[UUID, Long, Int]((_: UUID, count: Long) => count.toInt)).runCollect.map(_.toList) + val actual = execute(query.to(arg => arg._2.toInt)).runCollect.map(_.toList) assertM(actual)(equalTo(expected)) }, diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index b3b93f7d7..168ef1928 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -35,7 +35,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val testResult = execute( query - .to[UUID, String, String, Boolean, LocalDate, Customer] { case row => + .to { case row => Customer(row._1, row._2, row._3, row._4, row._5) } ) @@ -89,7 +89,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val testResult = execute( query - .to[UUID, String, String, LocalDate, Customer] { case row => + .to { case row => Customer(row._1, row._2, row._3, row._4) } ) @@ -141,7 +141,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val testResult = execute( query - .to[UUID, String, String, LocalDate, Customer] { case row => + .to { case row => Customer(row._1, row._2, row._3, row._4) } ) @@ -157,7 +157,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val expected = 5L - val result = execute(query.to[Long, Long](identity)) + val result = execute(query.to(identity)) for { r <- result.runCollect @@ -190,7 +190,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[String, String, Long, Row] { case row => + .to { case row => Row(row._1, row._2, row._3) } ) @@ -216,42 +216,46 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { unitPrice > select(Avg(price)).from(productPrices) ) - case class Row(orderId: UUID, productId: UUID, unitPrice: BigDecimal) + case class Row(orderId: UUID, productId: UUID, unitPrice: scala.math.BigDecimal) object Row { - def apply(orderId: String, productId: String, unitPrice: BigDecimal): Row = + def create(orderId: String, productId: String, unitPrice: BigDecimal): Row = new Row(UUID.fromString(orderId), UUID.fromString(productId), unitPrice) } val expected = Seq( - Row("04912093-CC2E-46AC-B64C-1BD7BB7758C3", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("9022DD0D-06D6-4A43-9121-2993FC7712A1", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("38D66D44-3CFA-488A-AC77-30277751418F", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("7B2627D5-0150-44DF-9171-3462E20797EE", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("62CD4109-3E5D-40CC-8188-3899FC1F8BDF", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 72.7200), - Row("9473A0BC-396A-4936-96B0-3EEA922AF36B", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), - Row("B8BAC18D-769F-48ED-809D-4B6C0E4D1795", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), - Row("BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), - Row("742D45A0-E81A-41CE-95AD-55B4CABBA258", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), - Row("618AA21F-700B-4CA7-933C-67066CF4CD97", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("606DA090-DD33-4A77-8746-6ED0E8443AB2", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), - Row("FD0FA8D4-E1A0-4369-BE07-945450DB5D36", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), - Row("876B6034-B33C-4497-81EE-B4E8742164C2", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("91CAA28A-A5FE-40D7-979C-BD6A128D0418", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("2C3FC180-D0DF-4D7B-A271-E6CCD2440393", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 70.0000), - Row("763A7C39-833F-4EE8-9939-E80DFDBFC0FC", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), - Row("5011D206-8EFF-42C4-868E-F1A625E1F186", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), - Row("A243FA42-817A-44EC-8B67-22193D212D82", "D5137D3A-894A-4109-9986-E982541B434F", 45.4500), - Row("62CD4109-3E5D-40CC-8188-3899FC1F8BDF", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), - Row("9473A0BC-396A-4936-96B0-3EEA922AF36B", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000), - Row("852E2DC9-4EC3-4225-A6F7-4F42F8FF728E", "D5137D3A-894A-4109-9986-E982541B434F", 45.4500), - Row("D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), - Row("2C3FC180-D0DF-4D7B-A271-E6CCD2440393", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), - Row("5883CB62-D792-4EE3-ACBC-FE85B6BAA998", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000) + Row.create("04912093-CC2E-46AC-B64C-1BD7BB7758C3", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("9022DD0D-06D6-4A43-9121-2993FC7712A1", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("38D66D44-3CFA-488A-AC77-30277751418F", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("7B2627D5-0150-44DF-9171-3462E20797EE", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("62CD4109-3E5D-40CC-8188-3899FC1F8BDF", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 72.7200), + Row.create("9473A0BC-396A-4936-96B0-3EEA922AF36B", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), + Row.create("B8BAC18D-769F-48ED-809D-4B6C0E4D1795", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row.create("BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row.create("742D45A0-E81A-41CE-95AD-55B4CABBA258", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row.create("618AA21F-700B-4CA7-933C-67066CF4CD97", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("606DA090-DD33-4A77-8746-6ED0E8443AB2", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 67.2700), + Row.create("FD0FA8D4-E1A0-4369-BE07-945450DB5D36", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), + Row.create("876B6034-B33C-4497-81EE-B4E8742164C2", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("91CAA28A-A5FE-40D7-979C-BD6A128D0418", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("2C3FC180-D0DF-4D7B-A271-E6CCD2440393", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 70.0000), + Row.create("763A7C39-833F-4EE8-9939-E80DFDBFC0FC", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 80.0000), + Row.create("5011D206-8EFF-42C4-868E-F1A625E1F186", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A", "105A2701-EF93-4E25-81AB-8952CC7D9DAA", 74.0000), + Row.create("A243FA42-817A-44EC-8B67-22193D212D82", "D5137D3A-894A-4109-9986-E982541B434F", 45.4500), + Row.create("62CD4109-3E5D-40CC-8188-3899FC1F8BDF", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), + Row.create("9473A0BC-396A-4936-96B0-3EEA922AF36B", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000), + Row.create("852E2DC9-4EC3-4225-A6F7-4F42F8FF728E", "D5137D3A-894A-4109-9986-E982541B434F", 45.4500), + Row.create("D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), + Row.create("2C3FC180-D0DF-4D7B-A271-E6CCD2440393", "D5137D3A-894A-4109-9986-E982541B434F", 50.0000), + Row.create("5883CB62-D792-4EE3-ACBC-FE85B6BAA998", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000) ) - val result = execute(query.to[UUID, UUID, BigDecimal, Row](Row.apply)) + //TODO try to support apply + //val result = execute(query.to[Row](Row.apply)) + val result = execute(query.to{ + case (id, productId, price) => Row(id, productId, price) + }) val assertion = for { r <- result.runCollect @@ -334,7 +338,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[UUID, UUID, BigDecimal, Row] { case row => + .to { case row => Row(row._1, row._2, row._3) } ) @@ -382,7 +386,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[UUID, String, String, LocalDate, Row] { case row => + .to { case row => Row(row._1, row._2, row._3, row._4) } ) @@ -414,7 +418,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[String, String, LocalDate, CustomerAndDateRow] { case row => + .to { case row => CustomerAndDateRow(row._1, row._2, row._3) } ) @@ -436,7 +440,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[String, String, LocalDate, CustomerAndDateRow] { case row => + .to { case row => CustomerAndDateRow(row._1, row._2, row._3) } ) @@ -458,7 +462,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[String, String, LocalDate, CustomerAndDateRow] { case row => + .to { case row => CustomerAndDateRow(row._1, row._2, row._3) } ) @@ -480,7 +484,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[String, String, LocalDate, CustomerAndDateRow] { case row => + .to { case row => CustomerAndDateRow(row._1, row._2, row._3) } ) @@ -526,7 +530,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute( query - .to[String, String, LocalDate, Row] { case row => + .to { case row => Row(row._1, row._2, row._3) } ) From d280f0499bc539874b07214a2424bf3234d8403f Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 31 Jan 2022 00:24:13 +0100 Subject: [PATCH 336/673] Add basic Selects documentation --- docs/overview/deep.md | 6 ++++++ docs/overview/index.md | 47 ++++++++++++++++++++++++++++++++++++++++-- website/sidebars.json | 3 ++- 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 docs/overview/deep.md diff --git a/docs/overview/deep.md b/docs/overview/deep.md new file mode 100644 index 000000000..fe3bf349e --- /dev/null +++ b/docs/overview/deep.md @@ -0,0 +1,6 @@ +--- +id: deep_dive +title: "Deep dive" +--- + +TODO: \ No newline at end of file diff --git a/docs/overview/index.md b/docs/overview/index.md index 1ee41265d..a197103a8 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -57,7 +57,7 @@ val orders = (uuid("id") ++ uuid("product_id") ++ int("quantity") ++ localDate("order_date")).table("orders") ``` -You can compose column set out of smaller column sets. This could be useful when your tables share some common set of columns. +Column sets are composable - this could be useful when your tables share some common columns. ```scala import ColumnSet._ @@ -78,7 +78,50 @@ val orders = orderColumns.table("orders") ## Selects -TODO: details +Simple select. + +```scala +val allProducts = select(productId ++ name ++ price).from(products) +``` + +Using `where` clause. + +```scala +def productById(id: UUID) = + select(productId ++ name ++ price).from(products).where(productId === id) +``` + +Inner join. + +```scala +val ordersWithProductNames = + select(orderId ++ name).from(products.join(orders).on(productId === fkProductId)) +``` + +Left outer join. + +```scala +val leftOuter = + select(orderId ++ name).from(products.leftOuter(orders).on(productId === fkProductId)) +``` + +Right outer join. + +```scala +val rightOuter = + select(orderId ++ name).from(products.rightOuter(orders).on(productId === fkProductId)) +``` + +Using `limit` and `offset` + +```scala +val limitedResults = + select(orderId ++ name) + .from(products.join(orders) + .on(productId === fkProductId)) + .limit(5) + .offset(10) +``` ## Inserts diff --git a/website/sidebars.json b/website/sidebars.json index 39f810ba5..9084741d1 100755 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -1,7 +1,8 @@ { "overview-sidebar": { "Overview": [ - "overview/overview_index" + "overview/overview_index", + "overview/deep_dive" ] }, "usecases-sidebar": { From 003371a8fce97759d8e5acbe448e6262905cc7ad Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 31 Jan 2022 18:33:35 +0100 Subject: [PATCH 337/673] added nullable aspect --- core/jvm/src/main/scala/zio/sql/Sql.scala | 15 +- core/jvm/src/main/scala/zio/sql/insert.scala | 92 +++++----- core/jvm/src/main/scala/zio/sql/select.scala | 30 ++-- core/jvm/src/main/scala/zio/sql/table.scala | 70 +++++++- core/jvm/src/main/scala/zio/sql/typetag.scala | 2 +- core/jvm/src/main/scala/zio/sql/utils.scala | 4 +- examples/src/main/scala/Example1.scala | 2 +- .../scala/zio/sql/JdbcInternalModule.scala | 167 ++++++++++-------- .../scala/zio/sql/TransactionModule.scala | 2 +- .../scala/zio/sql/mysql/MysqlModule.scala | 4 +- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 28 ++- .../zio/sql/postgresql/PostgresModule.scala | 16 +- postgres/src/test/resources/shop_schema.sql | 17 ++ .../zio/sql/postgresql/FunctionDefSpec.scala | 14 +- .../sql/postgresql/PostgresModuleSpec.scala | 41 ++++- .../scala/zio/sql/postgresql/ShopSchema.scala | 11 ++ .../sql/sqlserver/SqlServerModuleSpec.scala | 81 ++++----- 17 files changed, 356 insertions(+), 240 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index d9d59c8f8..1cba50b96 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -2,7 +2,14 @@ package zio.sql import zio.schema.Schema -trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModule with TableModule with InsertModule with UtilsModule { +trait Sql + extends SelectModule + with DeleteModule + with UpdateModule + with ExprModule + with TableModule + with InsertModule + with UtilsModule { self => /* @@ -43,12 +50,12 @@ trait Sql extends SelectModule with DeleteModule with UpdateModule with ExprModu def renderUpdate(update: self.Update[_]): String - def insertInto[F, Source, AllColumnIdentities, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( + def insertInto[F, Source, AllColumnIdentities, B <: SelectionSet[Source]]( table: Table.Source.Aux_[Source, AllColumnIdentities] )( - sources: Selection.Aux[F, Source, B, ColsRepr] + sources: Selection[F, Source, B] ) = - InsertBuilder(table, sources) + InsertBuilder[F, Source, AllColumnIdentities, B, sources.ColsRepr](table, sources) def renderInsert[A: Schema](insert: self.Insert[_, A]): String } diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index b1c2ab7d3..07a2483bc 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -15,7 +15,7 @@ import zio.schema.Schema */ trait InsertModule { self: ExprModule with TableModule with SelectModule => - sealed case class InsertBuilder[F, Source, AllColumnIdentities, B <: SelectionSet.Aux[Source, ColsRepr], ColsRepr]( + sealed case class InsertBuilder[F, Source, AllColumnIdentities, B <: SelectionSet[Source], ColsRepr]( table: Table.Source.Aux_[Source, AllColumnIdentities], sources: Selection.Aux[F, Source, B, ColsRepr] ) { @@ -36,7 +36,6 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) //TODO find a way for more meaningful error messages - //@implicitNotFound("This insert would blow up at runtime!!!") sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] // format: off @@ -45,7 +44,8 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[A1], ev2: ColsRepr <:< (A1, Unit), ev3: F <:< Features.Source[Identity1], - ev4: AllColumnIdentities <:< Identity1 + //TODO find other way to check if selection set contains some set of columns from table + ev4: AllColumnIdentities =:= Identity1 ): SchemaValidity[F, A1, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, A1, ColsRepr, AllColumnIdentities] {} @@ -53,7 +53,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2)], ev2: ColsRepr <:< (A1, (A2, Unit)), ev3: F <:< Features.Union[Features.Source[Identity1], Features.Source[Identity2]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 + ev4: AllColumnIdentities =:= Identity1 with Identity2 ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities] {} @@ -61,7 +61,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3)], ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities] {} @@ -69,7 +69,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities] {} @@ -78,7 +78,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities] {} @@ -87,7 +87,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities] {} @@ -96,7 +96,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities] {} @@ -105,7 +105,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities] {} @@ -114,7 +114,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities] {} @@ -123,7 +123,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities] {} @@ -132,7 +132,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities] {} @@ -141,7 +141,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities] {} @@ -150,7 +150,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities] {} @@ -159,7 +159,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities] {} @@ -168,7 +168,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities] {} @@ -177,7 +177,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities] {} @@ -186,7 +186,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities] {} @@ -195,7 +195,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities] {} @@ -204,7 +204,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities] {} @@ -213,7 +213,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities] {} @@ -222,7 +222,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities] {} @@ -231,7 +231,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], - ev4: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities] {} } @@ -243,7 +243,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass1[A, Z], ev: ColsRepr <:< (A, Unit), ev2: F <:< Features.Source[Identity1], - ev3: AllColumnIdentities <:< Identity1 + ev3: AllColumnIdentities =:= Identity1 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -251,7 +251,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass2[A1, A2, Z], ev: ColsRepr <:< (A1, (A2, Unit)), ev2: F <:< :||:[Features.Source[Identity1], Features.Source[Identity2]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 + ev3: AllColumnIdentities =:= Identity1 with Identity2 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -259,7 +259,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass3[A1, A2, A3, Z], ev: ColsRepr <:< (A1, (A2, (A3, Unit))), ev2: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -267,7 +267,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass4[A1, A2, A3, A4, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -275,7 +275,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass5[A1, A2, A3, A4, A5, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -283,7 +283,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass6[A1, A2, A3, A4, A5, A6, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -291,7 +291,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -299,7 +299,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -307,7 +307,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -315,7 +315,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -324,7 +324,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -332,7 +332,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -340,7 +340,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -348,7 +348,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ccSchema: Schema.CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -359,7 +359,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit)))))))))))))) ), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -371,7 +371,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit))))))))))))))) ), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -383,7 +383,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit)))))))))))))))) ), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -399,7 +399,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -420,7 +420,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], + ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -448,7 +448,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], + ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -478,7 +478,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], + ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} @@ -514,7 +514,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], + ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index a205976b6..ccaca3b31 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -25,7 +25,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => AggSelectBuilder[F, Source, B, Unaggregated](selector.selection) implicit def noTable[F, Source >: Any, B <: SelectionSet[Source]]( - selectBuilder: Selector[F, Source, B, Any], + selectBuilder: Selector[F, Source, B, Any] )(implicit ev: B <:< SelectionSet.Cons[ Source, @@ -284,7 +284,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => */ def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = Read.Mapped(self, f) - + def to[Target](f: Out => Target): Read[Target] = self.map { resultType => f(resultType) @@ -403,7 +403,9 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail)) ) - def normalize(implicit instance: TrailingUnitNormalizer[ResultType]): Subselect[F, instance.Out, Source, Subsource, Head, Tail] = + def normalize(implicit + instance: TrailingUnitNormalizer[ResultType] + ): Subselect[F, instance.Out, Source, Subsource, Head, Tail] = self.asInstanceOf[Subselect[F, instance.Out, Source, Subsource, Head, Tail]] override def asTable( @@ -476,14 +478,14 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => /** * A columnar selection of `B` from a source `A`, modeled as `A => B`. */ - sealed case class Selection[F, -Source, +B <: SelectionSet[Source]](value: B) { self => + sealed case class Selection[F, -A, +B <: SelectionSet[A]](value: B) { self => type ColsRepr = value.ResultTypeRepr - def ++[F2, Source1 <: Source, C <: SelectionSet[Source1]]( - that: Selection[F2, Source1, C] - ): Selection[F :||: F2, Source1, self.value.Append[Source1, C]] = - Selection[F :||: F2, Source1, self.value.Append[Source1, C]](self.value ++ that.value) + def ++[F2, A1 <: A, C <: SelectionSet[A1]]( + that: Selection[F2, A1, C] + ): Selection[F :||: F2, A1, self.value.Append[A1, C]] = + Selection(self.value ++ that.value) } object Selection { @@ -650,18 +652,14 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => } object DecodingError { - sealed case class UnexpectedNull(column: Either[Int, String]) extends DecodingError { - private def label = column.fold(index => index.toString, name => name) - - def message = s"Expected column ${label} to be non-null" + sealed case class UnexpectedNull(column: Int) extends DecodingError { + def message = s"Expected column with index ${column} to be non-null" } sealed case class UnexpectedType(expected: TypeTag[_], actual: Int) extends DecodingError { def message = s"Expected type ${expected} but found ${actual}" } - sealed case class MissingColumn(column: Either[Int, String]) extends DecodingError { - private def label = column.fold(index => index.toString, name => name) - - def message = s"The column ${label} does not exist" + sealed case class MissingColumn(column: Int) extends DecodingError { + def message = s"The column with index ${column} does not exist" } case object Closed extends DecodingError { def message = s"The ResultSet has been closed, so decoding is impossible" diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 30322cdcc..e75dd3a65 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -68,6 +68,17 @@ trait TableModule { self: ExprModule with SelectModule => override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped + def @@[HeadType[_]]( + columnSetAspect: ColumnSetAspect.Aux[HeadType] + )(implicit + ev: B <:< ColumnSet.Empty, + typeTagA: TypeTag.NotNull[A] + ): ColumnSet.Cons[HeadType[A], B, HeadIdentity] { + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType[A]], self.tail.ColumnsRepr[T]) + type Append[That <: ColumnSet] = Cons[HeadType[A], self.tail.Append[That], HeadIdentity] + type AllColumnIdentities = HeadIdentity with self.tail.AllColumnIdentities + } = columnSetAspect.applyCons(self) + def table(name0: TableName): Table.Aux_[ColumnsRepr, A, B, AllColumnIdentities, HeadIdentity] = new Table.Source { override type ColumnHead = A @@ -125,6 +136,8 @@ trait TableModule { self: ExprModule with SelectModule => def typeTag: TypeTag[A] def name: Option[String] + + def nullable[A1 >: A](implicit ev: TypeTag.NotNull[A1]): Column.Aux[Option[A1], Identity] } object Column { @@ -139,6 +152,9 @@ trait TableModule { self: ExprModule with SelectModule => override def typeTag: TypeTag[A] = implicitly[TypeTag[A]] override def name = Some(columnName) + + override def nullable[A1 >: A](implicit ev: TypeTag.NotNull[A1]): Column.Aux[Option[A1], Identity] = + Column.Named[Option[A1], ColumnIdentity](columnName) } sealed case class Indexed[A: TypeTag, ColumnIdentity]() extends Column[A] { @@ -148,6 +164,9 @@ trait TableModule { self: ExprModule with SelectModule => override def typeTag: TypeTag[A] = implicitly[TypeTag[A]] override def name = None + + override def nullable[A1 >: A](implicit ev: TypeTag.NotNull[A1]): Column.Aux[Option[A1], Identity] = + Column.Indexed[Option[A1], ColumnIdentity]() } type Untyped = Column[_] @@ -215,12 +234,6 @@ trait TableModule { self: ExprModule with SelectModule => val columnSet: ColumnSet.ConsAux[A, B, ColumnsRepr, HeadIdentity] } - // Absence of "Insanity" trait causes following known problems: - // * in db modules - // - The outer reference in this type test cannot be checked at run time?! - // case sourceTable: self.Table.Source => - // * compiletime error in updating of table like - // - update(table).set(age, age + 2)... trait Insanity { def ahhhhhhhhhhhhh[A]: A } @@ -314,4 +327,49 @@ trait TableModule { self: ExprModule with SelectModule => } type TableExtension[A] <: Table.TableEx[A] + + trait ColumnSetAspect { self => + + type HeadType[_] + + def applyCons[A: TypeTag.NotNull, B <: ColumnSet, HeadIdentity]( + columnSet: ColumnSet.Cons[A, B, HeadIdentity] + ): ColumnSet.Cons[HeadType[A], B, HeadIdentity] { + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType[A]], columnSet.tail.ColumnsRepr[T]) + type Append[That <: ColumnSet] = ColumnSet.Cons[HeadType[A], columnSet.tail.Append[That], HeadIdentity] + type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities + } + } + + object ColumnSetAspect { + + type Aux[HeadType0[_]] = ColumnSetAspect { + type HeadType[A] = HeadType0[A] + } + + val nullable: ColumnSetAspect.Aux[Option] = new ColumnSetAspect { + + override type HeadType[A] = Option[A] + + def applyCons[A: TypeTag.NotNull, B <: ColumnSet, HeadIdentity]( + columnSet: ColumnSet.Cons[A, B, HeadIdentity] + ): ColumnSet.Cons[Option[A], B, HeadIdentity] { + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, Option[A]], columnSet.tail.ColumnsRepr[T]) + type Append[That <: ColumnSet] = ColumnSet.Cons[Option[A], columnSet.tail.Append[That], HeadIdentity] + type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities + } = { + val head = columnSet.head.nullable + + ColumnSet + .Cons(head, columnSet.tail) + .asInstanceOf[ + ColumnSet.Cons[Option[A], B, HeadIdentity] { + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, Option[A]], columnSet.tail.ColumnsRepr[T]) + type Append[That <: ColumnSet] = ColumnSet.Cons[Option[A], columnSet.tail.Append[That], HeadIdentity] + type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities + } + ] + } + } + } } diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index d29994c38..5615f89bd 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -10,7 +10,7 @@ trait TypeTagModule { self: SelectModule => type TypeTagExtension[+A] <: Tag[A] with Decodable[A] trait Decodable[+A] { - def decode(column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, A] + def decode(column: Int, resultSet: ResultSet): Either[DecodingError, A] } trait Tag[+A] { diff --git a/core/jvm/src/main/scala/zio/sql/utils.scala b/core/jvm/src/main/scala/zio/sql/utils.scala index 771a9be16..3447cbba1 100644 --- a/core/jvm/src/main/scala/zio/sql/utils.scala +++ b/core/jvm/src/main/scala/zio/sql/utils.scala @@ -2,7 +2,7 @@ package zio.sql trait UtilsModule { self => sealed trait TrailingUnitNormalizer[In] { - type Out + type Out } object TrailingUnitNormalizer { @@ -99,4 +99,4 @@ trait UtilsModule { self => } // format: on } -} \ No newline at end of file +} diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 7af0f0faa..3f5324104 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -114,6 +114,6 @@ object Example1 extends Sql { value3: Value[F3] ) = ??? - def test3[Out](read: Read[Out])(implicit in: TrailingUnitNormalizer[Out]) : in.Out = ??? + def test3[Out](read: Read[Out])(implicit in: TrailingUnitNormalizer[Out]): in.Out = ??? } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index ef7fff0ee..986f43b0e 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -6,9 +6,9 @@ import java.time.{ OffsetDateTime, OffsetTime, ZoneId, ZoneOffset } import zio.Chunk trait JdbcInternalModule { self: Jdbc => - // TODO: Only support indexes! + private[sql] def extractColumn[A]( - column: Either[Int, String], + columnIndex: Int, resultSet: ResultSet, typeTag: TypeTag[A], nonNull: Boolean = true @@ -17,91 +17,94 @@ trait JdbcInternalModule { self: Jdbc => val metaData = resultSet.getMetaData() - def tryDecode[A](decoder: => A)(implicit expectedType: TypeTag[A]): Either[DecodingError, A] = + def tryDecode[A](decoder: => Option[A])(implicit expectedType: TypeTag[A]): Either[DecodingError, A] = if (resultSet.isClosed()) Left(DecodingError.Closed) else { - val columnExists = - column.fold( - index => index >= 1 || index <= metaData.getColumnCount(), - name => - try { - val _ = resultSet.findColumn(name) - true - } catch { case _: SQLException => false } - ) + val columnExists = columnIndex >= 1 || columnIndex <= metaData.getColumnCount() - if (!columnExists) Left(DecodingError.MissingColumn(column)) + if (!columnExists) Left(DecodingError.MissingColumn(columnIndex)) else try { val value = decoder - if (value == null && nonNull) Left(DecodingError.UnexpectedNull(column)) - else Right(value) + value match { + case Some(value) => Right(value) + case None => + //TODO following would not be sound - e.g. by outer join any column can be null + // if (nonNull) + // Left(DecodingError.UnexpectedNull(column)) + // else + Right(null.asInstanceOf[A]) + } } catch { case _: SQLException => - lazy val columnNames = (1 to metaData.getColumnCount()).toVector.map(metaData.getColumnName(_)) - val columnIndex = column.fold(index => index, name => columnNames.indexOf(name) + 1) - Left(DecodingError.UnexpectedType(expectedType, metaData.getColumnType(columnIndex))) } } typeTag match { - case TBigDecimal => tryDecode[BigDecimal](column.fold(resultSet.getBigDecimal(_), resultSet.getBigDecimal(_))) - case TBoolean => tryDecode[Boolean](column.fold(resultSet.getBoolean(_), resultSet.getBoolean(_))) - case TByte => tryDecode[Byte](column.fold(resultSet.getByte(_), resultSet.getByte(_))) + + case TBigDecimal => + // could not do tryDecode[BigDecimal](Option(resultSet.getBigDecimal(columnIndex))) because of + // suspicious application of an implicit view (math.this.BigDecimal.javaBigDecimal2bigDecimal) in the argument to Option.apply + val result = resultSet.getBigDecimal(columnIndex) + if (result == null) + Right(null.asInstanceOf[A]) + else { + Right(BigDecimal.javaBigDecimal2bigDecimal(result).asInstanceOf[A]) + } + case TBoolean => tryDecode[Boolean](Option(resultSet.getBoolean(columnIndex))) + case TByte => tryDecode[Byte](Option(resultSet.getByte(columnIndex))) case TByteArray => - tryDecode[Chunk[Byte]](Chunk.fromArray(column.fold(resultSet.getBytes(_), resultSet.getBytes(_)))) - case TChar => tryDecode[Char](column.fold(resultSet.getString(_), resultSet.getString(_)).charAt(0)) - case TDouble => tryDecode[Double](column.fold(resultSet.getDouble(_), resultSet.getDouble(_))) - case TFloat => tryDecode[Float](column.fold(resultSet.getFloat(_), resultSet.getFloat(_))) + tryDecode[Chunk[Byte]](Option(resultSet.getBytes(columnIndex)).map(Chunk.fromArray(_))) + case TChar => tryDecode[Char](Option(resultSet.getString(columnIndex)).map(_.charAt(0))) + case TDouble => tryDecode[Double](Option(resultSet.getDouble(columnIndex))) + case TFloat => tryDecode[Float](Option(resultSet.getFloat(columnIndex))) case TInstant => - tryDecode[java.time.Instant](column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant()) - case TInt => tryDecode[Int](column.fold(resultSet.getInt(_), resultSet.getInt(_))) + tryDecode[java.time.Instant](Option(resultSet.getTimestamp(columnIndex)).map(_.toInstant())) + case TInt => tryDecode[Int](Option(resultSet.getInt(columnIndex))) case TLocalDate => tryDecode[java.time.LocalDate]( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalDate() + Option(resultSet.getTimestamp(columnIndex)).map(_.toLocalDateTime().toLocalDate()) ) case TLocalDateTime => - tryDecode[java.time.LocalDateTime]( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime() - ) + tryDecode[java.time.LocalDateTime](Option(resultSet.getTimestamp(columnIndex)).map(_.toLocalDateTime())) case TLocalTime => tryDecode[java.time.LocalTime]( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toLocalDateTime().toLocalTime() + Option(resultSet.getTimestamp(columnIndex)).map(_.toLocalDateTime().toLocalTime()) ) - case TLong => tryDecode[Long](column.fold(resultSet.getLong(_), resultSet.getLong(_))) + case TLong => tryDecode[Long](Option(resultSet.getLong(columnIndex))) case TOffsetDateTime => tryDecode[OffsetDateTime]( - column - .fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)) - .toLocalDateTime() - .atOffset(ZoneOffset.UTC) + Option(resultSet.getTimestamp(columnIndex)).map(_.toLocalDateTime().atOffset(ZoneOffset.UTC)) ) case TOffsetTime => tryDecode[OffsetTime]( - column - .fold(resultSet.getTime(_), resultSet.getTime(_)) - .toLocalTime - .atOffset(ZoneOffset.UTC) + Option(resultSet.getTime(columnIndex)).map(_.toLocalTime.atOffset(ZoneOffset.UTC)) ) - case TShort => tryDecode[Short](column.fold(resultSet.getShort(_), resultSet.getShort(_))) - case TString => tryDecode[String](column.fold(resultSet.getString(_), resultSet.getString(_))) + case TShort => tryDecode[Short](Option(resultSet.getShort(columnIndex))) + case TString => tryDecode[String](Option(resultSet.getString(columnIndex))) case TUUID => tryDecode[java.util.UUID]( - java.util.UUID.fromString(column.fold(resultSet.getString(_), resultSet.getString(_))) + Option(resultSet.getString(columnIndex)).map(java.util.UUID.fromString(_)) ) case TZonedDateTime => //2013-07-15 08:15:23.5+00 tryDecode[java.time.ZonedDateTime]( - java.time.ZonedDateTime - .ofInstant( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, - ZoneId.of(ZoneOffset.UTC.getId) + Option(resultSet.getTimestamp(columnIndex)) + .map(_.toInstant()) + .map(instant => + java.time.ZonedDateTime + .ofInstant( + instant, + ZoneId.of(ZoneOffset.UTC.getId) + ) ) ) - case TDialectSpecific(t) => t.decode(column, resultSet) - case t @ Nullable() => extractColumn(column, resultSet, t.typeTag, false).map(Option(_)) + case TDialectSpecific(t) => t.decode(columnIndex, resultSet) + case t @ Nullable() => + val _ = nonNull + extractColumn(columnIndex, resultSet, t.typeTag, false).map(Option(_)) } } @@ -127,36 +130,44 @@ trait JdbcInternalModule { self: Jdbc => schema .foldRight(result) { - case (_, err@Left(_)) => err // TODO: Accumulate errors + case (_, err @ Left(_)) => err // TODO: Accumulate errors case ((typeTag, index), Right(vs)) => - extractColumn(Left(index), resultSet, typeTag) match { + extractColumn(index, resultSet, typeTag) match { case Left(err) => Left(err) - case Right(v) => Right(v :: vs) + case Right(v) => Right(v :: vs) } - }.map { - case List(a) => (a) - case List(a, b) => (a, b) - case List(a, b, c) => (a, b, c) - case List(a, b, c, d) => (a, b, c, d) - case List(a, b, c, d, e) => (a, b, c, d, e) - case List(a, b, c, d, e, f) => (a, b, c, d, e, f) - case List(a, b, c, d, e, f, g) => (a, b, c, d, e, f, g) - case List(a, b, c, d, e, f, g, h) => (a, b, c, d, e, f, g, h) - case List(a, b, c, d, e, f, g, h, i) => (a, b, c, d, e, f, g, h, i) - case List(a, b, c, d, e, f, g, h, i, j) => (a, b, c, d, e, f, g, h, i, j) - case List(a, b, c, d, e, f, g, h, i, j, k) => (a, b, c, d, e, f, g, h, i, j, k) - case List(a, b, c, d, e, f, g, h, i, j, k, l) => (a, b, c, d, e, f, g, h, i, j, k, l) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m) => (a, b, c, d, e, f, g, h, i, j, k, l, m) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) - case _ => () - }.map(_.asInstanceOf[A]) + } + .map { + case List(a) => (a) + case List(a, b) => (a, b) + case List(a, b, c) => (a, b, c) + case List(a, b, c, d) => (a, b, c, d) + case List(a, b, c, d, e) => (a, b, c, d, e) + case List(a, b, c, d, e, f) => (a, b, c, d, e, f) + case List(a, b, c, d, e, f, g) => (a, b, c, d, e, f, g) + case List(a, b, c, d, e, f, g, h) => (a, b, c, d, e, f, g, h) + case List(a, b, c, d, e, f, g, h, i) => (a, b, c, d, e, f, g, h, i) + case List(a, b, c, d, e, f, g, h, i, j) => (a, b, c, d, e, f, g, h, i, j) + case List(a, b, c, d, e, f, g, h, i, j, k) => (a, b, c, d, e, f, g, h, i, j, k) + case List(a, b, c, d, e, f, g, h, i, j, k, l) => (a, b, c, d, e, f, g, h, i, j, k, l) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m) => (a, b, c, d, e, f, g, h, i, j, k, l, m) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) + case _ => () + } + .map(_.asInstanceOf[A]) } } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index db164ea36..c63284655 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -82,7 +82,7 @@ trait TransactionModule { self: Jdbc => txn.flatMap { case Txn(connection, coreDriver) => ZTransaction.fromEffect(coreDriver.updateOn(update, connection)) } - + def apply[Z: Schema](insert: self.Insert[_, Z]): ZTransaction[Any, Exception, Int] = txn.flatMap { case Txn(connection, coreDriver) => ZTransaction.fromEffect(coreDriver.insertOn(insert, connection)) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 7bfcf1b3a..09ea510d2 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -16,9 +16,9 @@ trait MysqlModule extends Jdbc { self => object MysqlTypeTag { implicit case object TYear extends MysqlTypeTag[Year] { - override def decode(column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, Year] = + override def decode(column: Int, resultSet: ResultSet): Either[DecodingError, Year] = scala.util - .Try(Year.of(column.fold(resultSet.getByte(_), resultSet.getByte(_)).toInt)) + .Try(Year.of(resultSet.getByte(column).toInt)) .fold( _ => Left(DecodingError.UnexpectedNull(column)), r => Right(r) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 41cc672d3..57daba5b9 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -56,10 +56,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val testResult = execute( - query - .to { case row => - Customer(row._1, row._2, row._3, row._4) - } + query.to { case row => + Customer(row._1, row._2, row._3, row._4) + } ) val assertion = for { @@ -87,10 +86,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val testResult = execute( - query - .to { case row => - Customer(row._1, row._2, row._3, row._4, row._5) - } + query.to { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } ) val assertion = for { @@ -117,10 +115,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val testResult = execute( - query - .to { case row => - Customer(row._1, row._2, row._3, row._4) - } + query.to { case row => + Customer(row._1, row._2, row._3, row._4) + } ) val assertion = for { @@ -161,10 +158,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val result = execute( - query - .to { case row => - Row(row._1, row._2, row._3) - } + query.to { case row => + Row(row._1, row._2, row._3) + } ) val assertion = for { diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 9d0e620d3..5b906fade 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -84,9 +84,9 @@ trait PostgresModule extends Jdbc { self => trait PostgresTypeTag[+A] extends Tag[A] with Decodable[A] object PostgresTypeTag { implicit case object TVoid extends PostgresTypeTag[Unit] { - override def decode(column: Either[Int, String], resultSet: ResultSet): Either[DecodingError, Unit] = + override def decode(column: Int, resultSet: ResultSet): Either[DecodingError, Unit] = scala.util - .Try(column.fold(resultSet.getObject(_), resultSet.getObject(_))) + .Try(resultSet.getObject(column)) .fold( _ => Left(DecodingError.UnexpectedNull(column)), _ => Right(()) @@ -94,11 +94,11 @@ trait PostgresModule extends Jdbc { self => } implicit case object TInterval extends PostgresTypeTag[Interval] { override def decode( - column: Either[Int, String], + column: Int, resultSet: ResultSet ): Either[DecodingError, Interval] = scala.util - .Try(Interval.fromPgInterval(new PGInterval(column.fold(resultSet.getString(_), resultSet.getString(_))))) + .Try(Interval.fromPgInterval(new PGInterval(resultSet.getString(column)))) .fold( _ => Left(DecodingError.UnexpectedNull(column)), r => Right(r) @@ -106,7 +106,7 @@ trait PostgresModule extends Jdbc { self => } implicit case object TTimestampz extends PostgresTypeTag[Timestampz] { override def decode( - column: Either[Int, String], + column: Int, resultSet: ResultSet ): Either[DecodingError, Timestampz] = scala.util @@ -114,7 +114,7 @@ trait PostgresModule extends Jdbc { self => Timestampz.fromZonedDateTime( ZonedDateTime .ofInstant( - column.fold(resultSet.getTimestamp(_), resultSet.getTimestamp(_)).toInstant, + resultSet.getTimestamp(column).toInstant, ZoneId.of(ZoneOffset.UTC.getId) ) ) @@ -445,12 +445,14 @@ trait PostgresModule extends Jdbc { self => } case None => () } - //TODO what about other cases? case DynamicValue.Transform(that) => renderDynamicValue(that) case DynamicValue.Tuple(left, right) => renderDynamicValue(left) render(", ") renderDynamicValue(right) + case DynamicValue.SomeValue(value) => renderDynamicValue(value) + case DynamicValue.NoneValue => render(s"null") + //TODO what about other cases? case _ => () } diff --git a/postgres/src/test/resources/shop_schema.sql b/postgres/src/test/resources/shop_schema.sql index 6c1064e3e..c65f6ccda 100644 --- a/postgres/src/test/resources/shop_schema.sql +++ b/postgres/src/test/resources/shop_schema.sql @@ -39,6 +39,14 @@ create table order_details unit_price money not null ); +create table persons +( + id uuid not null primary key, + first_name varchar not null, + last_name varchar, + dob date +); + insert into customers (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) values @@ -48,6 +56,15 @@ values ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', true, '1995-11-12', '2020-11-21T12:10:25-07:00', '2020-11-21 12:10:25-07'), ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', false, '1987-03-23', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'); +insert into persons + (id, first_name, last_name, dob) +values + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', '1983-01-05'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', null), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', '1990-11-16'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', '1995-11-12'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', null, null); + insert into products (id, name, description, image_url) values diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 46893f986..9dbbf9146 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -954,10 +954,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) val testResult = execute( - query - .to{ - case (id, fname, lname, verified, dob) => Customer(id, fname, lname, verified, dob) - } + query.to { case (id, fname, lname, verified, dob) => + Customer(id, fname, lname, verified, dob) + } ) val assertion = for { @@ -1150,7 +1149,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(SetSeed(0.12) ++ Random() ++ Random()) from customers val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) - val testResult = execute(query.to{ case (_, b, c) => (b, c) }) + val testResult = execute(query.to { case (_, b, c) => (b, c) }) val assertion = for { r <- testResult.runCollect @@ -1194,9 +1193,8 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) val roundTripQuery = select(createdString ++ createdTimestamp) from customers - val roundTripResults = execute(roundTripQuery.to { - case row => - (row._1, ZonedDateTime.parse(row._1), row._2) + val roundTripResults = execute(roundTripQuery.to { case row => + (row._1, ZonedDateTime.parse(row._1), row._2) }) val roundTripExpected = List( ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 7b29f0b91..72b16ddfc 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -308,10 +308,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) val result = execute( - query - .to{ case row => - Row(row._1, row._2, row._3) - } + query.to { case row => + Row(row._1, row._2, row._3) + } ) val assertion = for { @@ -335,8 +334,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) val testResult = execute( - query - .to { case (uuid, firstName, lastName, dob) => Customer(uuid, firstName, lastName, dob) } + query.to { case (uuid, firstName, lastName, dob) => Customer(uuid, firstName, lastName, dob) } ) val assertion = for { @@ -617,6 +615,37 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = insertInto(products)(productId ++ productName ++ description ++ imageURL).values(tupleData) assertM(execute(query))(equalTo(4)) + }, + testM("insert and query nullable field") { + import Persons._ + + val query = select(fName ++ lName ++ dob) + .from(persons) + + val insertSome = insertInto(persons)(personId ++ fName ++ lName ++ dob) + .values((UUID.randomUUID(), "Charles", "Dent", Option(java.time.LocalDate.now()))) + // TODO improve on inserting nulls + // we don't allow inserting null on non nullable columns -> There is no schema or dynamic value for nulls + val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) + .values((UUID.randomUUID(), "Martin", "Harvey", Option(null.asInstanceOf[java.time.LocalDate]))) + + val result = for { + _ <- execute(insertSome) + _ <- execute(insertNone) + persons <- execute(query).runCollect + } yield (persons.toList) + + val expected = List( + ("Ronald", "Russell", Some(LocalDate.of(1983, 1, 5))), + ("Terrence", "Noel", None), + ("Mila", "Paterso", Some(LocalDate.of(1990, 11, 16))), + ("Alana", "Murray", Some(LocalDate.of(1995, 11, 12))), + ("Jose", null, None), + ("Charles", "Dent", Some(LocalDate.of(2022, 1, 31))), + ("Martin", "Harvey", None) + ) + + assertM(result)(equalTo(expected)) } ) @@ sequential } diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index 7cc37e5e8..a69e82b85 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -5,6 +5,17 @@ import zio.sql.Jdbc trait ShopSchema extends Jdbc { self => import self.ColumnSet._ + object Persons { + + import ColumnSetAspect._ + + val persons = + (uuid("id") ++ string("first_name") ++ string("last_name") ++ (localDate("dob") @@ nullable)) + .table("persons") + + val personId :*: fName :*: lName :*: dob :*: _ = persons.columns + } + object Customers { //https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string val customers = diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 168ef1928..c04840516 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -34,10 +34,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val testResult = execute( - query - .to { case row => - Customer(row._1, row._2, row._3, row._4, row._5) - } + query.to { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } ) val assertion = for { @@ -88,10 +87,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val testResult = execute( - query - .to { case row => - Customer(row._1, row._2, row._3, row._4) - } + query.to { case row => + Customer(row._1, row._2, row._3, row._4) + } ) val assertion = for { @@ -140,10 +138,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val testResult = execute( - query - .to { case row => - Customer(row._1, row._2, row._3, row._4) - } + query.to { case row => + Customer(row._1, row._2, row._3, row._4) + } ) val assertion = for { @@ -189,10 +186,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) val result = execute( - query - .to { case row => - Row(row._1, row._2, row._3) - } + query.to { case row => + Row(row._1, row._2, row._3) + } ) val assertion = for { @@ -253,8 +249,8 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { //TODO try to support apply //val result = execute(query.to[Row](Row.apply)) - val result = execute(query.to{ - case (id, productId, price) => Row(id, productId, price) + val result = execute(query.to { case (id, productId, price) => + Row(id, productId, price) }) val assertion = for { @@ -337,10 +333,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val result = execute( - query - .to { case row => - Row(row._1, row._2, row._3) - } + query.to { case row => + Row(row._1, row._2, row._3) + } ) val assertion = for { @@ -385,10 +380,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { .orderBy(Ordering.Desc(orderDateDerived)) val result = execute( - query - .to { case row => - Row(row._1, row._2, row._3, row._4) - } + query.to { case row => + Row(row._1, row._2, row._3, row._4) + } ) val assertion = for { @@ -417,10 +411,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) val result = execute( - query - .to { case row => - CustomerAndDateRow(row._1, row._2, row._3) - } + query.to { case row => + CustomerAndDateRow(row._1, row._2, row._3) + } ) val assertion = for { @@ -439,10 +432,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) val result = execute( - query - .to { case row => - CustomerAndDateRow(row._1, row._2, row._3) - } + query.to { case row => + CustomerAndDateRow(row._1, row._2, row._3) + } ) val assertion = for { @@ -461,10 +453,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) val result = execute( - query - .to { case row => - CustomerAndDateRow(row._1, row._2, row._3) - } + query.to { case row => + CustomerAndDateRow(row._1, row._2, row._3) + } ) val assertion = for { @@ -483,10 +474,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.outerApply(subquery)) val result = execute( - query - .to { case row => - CustomerAndDateRow(row._1, row._2, row._3) - } + query.to { case row => + CustomerAndDateRow(row._1, row._2, row._3) + } ) val assertion = for { @@ -529,10 +519,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val result = execute( - query - .to { case row => - Row(row._1, row._2, row._3) - } + query.to { case row => + Row(row._1, row._2, row._3) + } ) val assertion = for { From 36a1e5f95af9526b1e8915290dfc0af2d0585cd0 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Feb 2022 21:32:37 +0100 Subject: [PATCH 338/673] Update postgresql to 42.2.25 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a69cbdaf3..312060b31 100644 --- a/build.sbt +++ b/build.sbt @@ -215,7 +215,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.24" % Compile, + "org.postgresql" % "postgresql" % "42.2.25" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 79f9db31740ed4e390a74036c32371280dd92742 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Wed, 2 Feb 2022 23:01:28 +0100 Subject: [PATCH 339/673] added todo --- core/jvm/src/main/scala/zio/sql/expr.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 173d053a1..3d24898f2 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -85,7 +85,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def isNotTrue[A1 <: A](implicit ev: B <:< Boolean): Expr[F, A1, Boolean] = Expr.Property(self, PropertyOp.IsNotTrue) - //TODO + //TODO https://github.com/zio/zio-sql/issues/564 def as[B1 >: B](name: String): Expr[F, A, B1] = { val _ = name self From ddb0b80e74ecf86c15007e30dc6d588f43af9b61 Mon Sep 17 00:00:00 2001 From: Antonio Morales Date: Wed, 2 Feb 2022 16:23:19 -0800 Subject: [PATCH 340/673] Make it compile --- build.sbt | 2 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 2 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 4 +- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 2 +- .../zio/sql/mysql/MysqlRunnableSpec.scala | 3 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 4 +- .../sql/postgresql/PostgresRunnableSpec.scala | 1 - .../test/scala/zio/sql/TestContainer.scala | 17 ++++---- .../sql/sqlserver/SqlServerModuleSpec.scala | 40 +++++++++---------- .../sql/sqlserver/SqlServerRunnableSpec.scala | 5 +-- 10 files changed, 38 insertions(+), 42 deletions(-) diff --git a/build.sbt b/build.sbt index 717edad04..ba6823387 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-M6-2" +val zioVersion = "2.0.0-RC2" val zioSchemaVersion = "0.1.7" val testcontainersVersion = "1.16.0" val testcontainersScalaVersion = "0.39.12" diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 7236b7d54..706ecb474 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -84,7 +84,7 @@ trait SqlDriverLiveModule { self: Jdbc => } override def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] = - blocking.effectBlocking { + ZIO.attemptBlocking { val query = renderInsert(insert) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 0238b7b92..3d8f3d5be 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -36,8 +36,8 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi _.get.delete(delete) ) - def execute[A: Schema](insert: Insert[_, A]): ZIO[Has[SqlDriver], Exception, Int] = - ZIO.accessM[Has[SqlDriver]]( + def execute[A: Schema](insert: Insert[_, A]): ZIO[SqlDriver, Exception, Int] = + ZIO.environmentWithZIO[SqlDriver]( _.get.insert(insert) ) } diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index fb4e6ea1e..b97cf4dc7 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -18,5 +18,5 @@ trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { (connectionPoolLayer >+> SqlDriver.live).orDie } - final lazy val jdbcLayer = TestEnvironment.live >+> executorLayer + final lazy val jdbcLayer = TestEnvironment.live >>> executorLayer } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 7ce8a3d90..af7716dc7 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -2,9 +2,8 @@ package zio.sql.mysql import java.util.Properties -import zio._ +import zio.ZEnvironment import zio.sql._ -import zio.test.TestEnvironment import zio.test._ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index efa7c8385..5db85615a 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -152,7 +152,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("bit_length") { + test("bit_length") { val query = select(BitLength("hello")) val expected = 40 @@ -165,7 +165,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("pi") { + test("pi") { val query = select(Pi) val expected = 3.141592653589793 diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 4b1929a20..506aab178 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,7 +1,6 @@ package zio.sql.postgresql import zio.test._ -import zio.test.TestEnvironment import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } import zio.ZEnvironment diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/TestContainer.scala index bedf1dbc7..ab12f2a84 100644 --- a/sqlserver/src/test/scala/zio/sql/TestContainer.scala +++ b/sqlserver/src/test/scala/zio/sql/TestContainer.scala @@ -4,23 +4,22 @@ import com.dimafeng.testcontainers.SingleContainer import com.dimafeng.testcontainers.MSSQLServerContainer import org.testcontainers.utility.DockerImageName import zio._ -import zio.blocking.{ effectBlocking, Blocking } object TestContainer { - def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Blocking, Throwable, Has[C]] = - ZManaged.make { - effectBlocking { + def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Any, Throwable, C] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { c.start() c } - }(container => effectBlocking(container.stop()).orDie).toLayer + }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer def postgres( imageName: String = "mcr.microsoft.com/mssql/server:2017-latest" - ): ZLayer[Blocking, Throwable, Has[MSSQLServerContainer]] = - ZManaged.make { - effectBlocking { + ): ZLayer[Any, Throwable, MSSQLServerContainer] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { val c = new MSSQLServerContainer( dockerImageName = DockerImageName.parse(imageName) ).configure { a => @@ -31,7 +30,7 @@ object TestContainer { c } } { container => - effectBlocking(container.stop()).orDie + ZIO.attemptBlocking(container.stop()).orDie }.toLayer } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index c9b31d9d4..ececa97c3 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -46,7 +46,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { } override def specLayered = suite("MSSQL Server module")( - testM("Can select from single table") { + test("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = select(customerId ++ fName ++ lName ++ dob).from(customers) @@ -98,31 +98,31 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can select with property unary operator") { + test("Can select with property unary operator") { customerSelectJoseAssertion(verified isNotTrue) }, - testM("Can select with property binary operator with UUID") { + test("Can select with property binary operator with UUID") { customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) }, - testM("Can select with property binary operator with String") { + test("Can select with property binary operator with String") { customerSelectJoseAssertion(fName === "Jose") }, - testM("Can select with property binary operator with LocalDate") { + test("Can select with property binary operator with LocalDate") { customerSelectJoseAssertion(dob === LocalDate.parse("1987-03-23")) }, - testM("Can select with property binary operator with LocalDateTime") { + test("Can select with property binary operator with LocalDateTime") { customerSelectJoseAssertion(dob === LocalDateTime.parse("1987-03-23T00:00:00")) }, - testM("Can select with property binary operator with OffsetDateTime") { + test("Can select with property binary operator with OffsetDateTime") { customerSelectJoseAssertion(dob === OffsetDateTime.parse("1987-03-23T00:00:00Z")) }, - testM("Can select with property binary operator with ZonedLocalDate") { + test("Can select with property binary operator with ZonedLocalDate") { customerSelectJoseAssertion(dob === ZonedDateTime.parse("1987-03-23T00:00:00Z")) }, - testM("Can select with property binary operator with Instant") { + test("Can select with property binary operator with Instant") { customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) }, - testM("Can select from single table with limit, offset and order by") { + test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) val query = select(customerId ++ fName ++ lName ++ dob).from(customers).limit(1).offset(1).orderBy(fName) @@ -150,7 +150,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can count rows") { + test("Can count rows") { val query = select(Count(customerId)).from(customers) val expected = 5L @@ -161,7 +161,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { r <- result.runCollect } yield assert(r.head)(equalTo(expected)) }, - testM("correlated subqueries in selections - counts orders for each customer") { + test("correlated subqueries in selections - counts orders for each customer") { /** * select first_name, last_name, ( @@ -199,7 +199,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("subquery in where clause") { + test("subquery in where clause") { import SqlServerSpecific.SqlServerFunctionDef._ /** @@ -257,7 +257,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("correlated subquery in where clause - return orders where price was above average for particular product") { + test("correlated subquery in where clause - return orders where price was above average for particular product") { import SqlServerSpecific.SqlServerFunctionDef._ /** @@ -343,7 +343,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cross apply - top 1 order_date") { + test("cross apply - top 1 order_date") { /** * select customers.id, customers.first_name, customers.last_name, derived.order_date @@ -391,7 +391,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cross apply with subselect") { + test("cross apply with subselect") { /** * select customers.first_name, customers.last_name, ooo.order_date @@ -423,7 +423,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cross apply with subquery") { + test("cross apply with subquery") { import SqlServerSpecific.SqlServerTable._ val subquery = customers.subselect(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") @@ -445,7 +445,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("cross apply with subselect from") { + test("cross apply with subselect from") { import SqlServerSpecific.SqlServerTable._ val subquery = subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") @@ -467,7 +467,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("outer apply") { + test("outer apply") { import SqlServerSpecific.SqlServerTable._ val subquery = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") @@ -489,7 +489,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - testM("Can select from joined tables (inner join)") { + test("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) case class Row(firstName: String, lastName: String, orderDate: LocalDate) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index 0d72ae32f..4aff158f0 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -1,10 +1,9 @@ package zio.sql.sqlserver import zio.test._ -import zio.test.environment.TestEnvironment import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } -import zio.Has +import zio.ZEnvironment trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { @@ -20,7 +19,7 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { val poolConfigLayer = TestContainer .postgres() .map(a => - Has( + ZEnvironment( ConnectionPoolConfig( url = a.get.jdbcUrl, properties = connProperties(a.get.username, a.get.password), From 64e1e1a988508d7aaac7f2832948dfc533ad69e6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 3 Feb 2022 03:05:24 +0100 Subject: [PATCH 341/673] Update ojdbc8 to 21.5.0.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a69cbdaf3..02fb4a48d 100644 --- a/build.sbt +++ b/build.sbt @@ -194,7 +194,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.3.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, "com.dimafeng" % "testcontainers-scala-oracle-xe_2.13" % testcontainersScalaVersion % Test ) ) From 9c9b0fba16b0a1d75b34609d4f2156300a6bde8a Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 3 Feb 2022 18:33:03 +0100 Subject: [PATCH 342/673] get rid of trailing unit when deconstructing columns --- core/jvm/src/main/scala/zio/sql/select.scala | 60 ++---- core/jvm/src/main/scala/zio/sql/table.scala | 10 +- core/jvm/src/main/scala/zio/sql/utils.scala | 45 ++++ .../scala/zio/sql/GroupByHavingSpec.scala | 2 +- .../test/scala/zio/sql/ProductSchema.scala | 2 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 2 +- examples/src/main/scala/Example1.scala | 7 +- examples/src/main/scala/ShopSchema.scala | 10 +- .../scala/zio/sql/JdbcInternalModule.scala | 40 +--- .../scala/zio/sql/SqlDriverLiveModule.scala | 9 +- .../scala/zio/sql/TransactionModule.scala | 2 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 4 +- .../scala/zio/sql/mysql/MysqlModule.scala | 3 - .../scala/zio/sql/mysql/FunctionDefSpec.scala | 18 +- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 14 +- .../test/scala/zio/sql/mysql/ShopSchema.scala | 10 +- .../scala/zio/sql/mysql/TransactionSpec.scala | 8 +- .../scala/zio/sql/oracle/OracleModule.scala | 2 - .../zio/sql/postgresql/PostgresModule.scala | 1 - .../zio/sql/postgresql/FunctionDefSpec.scala | 194 +++++++++--------- .../sql/postgresql/PostgresModuleSpec.scala | 36 +--- .../scala/zio/sql/postgresql/ShopSchema.scala | 16 +- .../zio/sql/postgresql/TransactionSpec.scala | 10 +- .../zio/sql/sqlserver/SqlServerModule.scala | 2 - .../scala/zio/sql/sqlserver/DbSchema.scala | 12 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 70 +++---- 26 files changed, 252 insertions(+), 337 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index ccaca3b31..d21f74e38 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -2,7 +2,7 @@ package zio.sql import scala.language.implicitConversions -trait SelectModule { self: ExprModule with TableModule with UtilsModule => +trait SelectModule { self: ExprModule with TableModule => sealed case class Selector[F, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F, Source, B]) @@ -31,11 +31,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail - ], - normalizer: TrailingUnitNormalizer[selectBuilder.selection.value.ResultTypeRepr] + ] ): Read.Select[ F, - normalizer.Out, + selectBuilder.selection.value.ResultTypeRepr, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail @@ -48,7 +47,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => ] val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F, Source, B0](b), None, true).normalize + Read.Subselect(Selection[F, Source, B0](b), None, true)//.normalize } } @@ -57,11 +56,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => ) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit - ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail], - normalizer: TrailingUnitNormalizer[selection.value.ResultTypeRepr] + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] ): AggSelectBuilderGroupBy[ F0, - normalizer.Out, + selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail, @@ -77,12 +75,12 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => AggSelectBuilderGroupBy[ F0, - normalizer.Out, + selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail, Unaggregated - ](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true).normalize) + ](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true)) } } @@ -208,11 +206,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => sealed case class SelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: Selection[F0, Source, B]) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit - ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail], - normalizer: TrailingUnitNormalizer[selection.value.ResultTypeRepr] + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] ): Read.Select[ F0, - normalizer.Out, + selection.value.ResultTypeRepr, Source0, selection.value.ColumnHead, selection.value.SelectionTail @@ -225,7 +222,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true).normalize + Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true) } } @@ -278,18 +275,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => def asTable(name: TableName): Table.DerivedTable[Out, Read[Out]] - /** - * Maps the [[Read]] query's output to another type by providing a function - * that can transform from the current type to the new type. - */ - def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = - Read.Mapped(self, f) - - def to[Target](f: Out => Target): Read[Target] = - self.map { resultType => - f(resultType) - } - + //TODO use this def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = Read.Union[ResultType, Out1](self, that, true) @@ -324,23 +310,6 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => type ResultType = ResultType0 } - sealed case class Mapped[Repr, Out, Out2](read: Read.Aux[Repr, Out], f: Out => Out2) extends Read[Out2] { self => - override type ResultType = Repr - - override val mapper = read.mapper.andThen(f) - - override type ColumnHead = read.ColumnHead - override type ColumnTail = read.ColumnTail - override type CS = read.CS - - override type HeadIdentity = read.HeadIdentity - - override val columnSet: CS = read.columnSet - - override def asTable(name: TableName): Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]] = - Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]](self, name) - } - type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( @@ -403,11 +372,6 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail)) ) - def normalize(implicit - instance: TrailingUnitNormalizer[ResultType] - ): Subselect[F, instance.Out, Source, Subsource, Head, Tail] = - self.asInstanceOf[Subselect[F, instance.Out, Source, Subsource, Head, Tail]] - override def asTable( name: TableName ): Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]] = diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index e75dd3a65..76d313326 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -5,7 +5,7 @@ import zio.Chunk import java.time._ import java.util.UUID -trait TableModule { self: ExprModule with SelectModule => +trait TableModule { self: ExprModule with SelectModule with UtilsModule => sealed trait Singleton0[A] { type SingletonIdentity @@ -127,10 +127,6 @@ trait TableModule { self: ExprModule with SelectModule => Cons(Column.Named[A, ColumnIdentity](name), Empty) } - object :*: { - def unapply[A, B](tuple: (A, B)): Some[(A, B)] = Some(tuple) - } - sealed trait Column[+A] { type Identity def typeTag: TypeTag[A] @@ -208,8 +204,8 @@ trait TableModule { self: ExprModule with SelectModule => new Table.JoinBuilder[self.TableType, That](JoinType.RightOuter, self, that) final val subselect: SubselectPartiallyApplied[TableType] = new SubselectPartiallyApplied[TableType] - - final def columns = columnSet.makeColumns[TableType](columnToExpr) + + def columns(implicit i: TrailingUnitNormalizer[columnSet.ColumnsRepr[TableType]]): i.Out = i.apply(columnSet.makeColumns[TableType](columnToExpr)) val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] diff --git a/core/jvm/src/main/scala/zio/sql/utils.scala b/core/jvm/src/main/scala/zio/sql/utils.scala index 3447cbba1..c294281cb 100644 --- a/core/jvm/src/main/scala/zio/sql/utils.scala +++ b/core/jvm/src/main/scala/zio/sql/utils.scala @@ -3,6 +3,8 @@ package zio.sql trait UtilsModule { self => sealed trait TrailingUnitNormalizer[In] { type Out + + def apply(in: In): Out } object TrailingUnitNormalizer { @@ -12,90 +14,133 @@ trait UtilsModule { self => // format: off implicit def arity1[In, A](implicit ev: In =:= (A, Unit)) : TrailingUnitNormalizer.WithOut[In, A] = new TrailingUnitNormalizer[In] { override type Out = A + + override def apply(in: In): A = in._1 } implicit def arity2[In, A, B](implicit ev: In =:= (A, (B, Unit))) : TrailingUnitNormalizer.WithOut[In, (A, B)] = new TrailingUnitNormalizer[In] { override type Out = (A, B) + + override def apply(in: In): Out = (in._1, in._2._1) } implicit def arity3[In, A, B, C](implicit ev: In =:= (A, (B, (C, Unit)))) : TrailingUnitNormalizer.WithOut[In, (A, B, C)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1) } implicit def arity4[In, A, B, C, D](implicit ev: In =:= (A, (B, (C, (D, Unit))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1) } implicit def arity5[In, A, B, C, D, E](implicit ev: In =:= (A, (B, (C, (D, (E, Unit)))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1) } implicit def arity6[In, A, B, C, D, E, F](implicit ev: In =:= (A, (B, (C, (D, (E, (F, Unit))))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1) } implicit def arity7[In, A, B, C, D, E, F, G](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, Unit)))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1) } implicit def arity8[In, A, B, C, D, E, F, G, H](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1) } implicit def arity9[In, A, B, C, D, E, F, G, H, I](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit)))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1) } implicit def arity10[In, A, B, C, D, E, F, G, H, I, J](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1) } implicit def arity11[In, A, B, C, D, E, F, G, H, I, J, K](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit)))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity12[In, A, B, C, D, E, F, G, H, I, J, K, L](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity13[In, A, B, C, D, E, F, G, H, I, J, K, L, M](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit)))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity14[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity15[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit)))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity16[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity17[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit)))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity18[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity19[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) +override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity20[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity21[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit)))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } implicit def arity22[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit))))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) + + override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) } // format: on } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index c2862ac4a..d6bd9d7c5 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -34,7 +34,7 @@ object AggregatedProductSchema { double("price") ).table("product") - val id :*: name :*: amount :*: price :*: _ = productTable.columns + val (id, name, amount, price) = productTable.columns val orderValue = select(name ++ Sum(price)) diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 8dd1496c6..0058e8410 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -22,7 +22,7 @@ object ProductSchema { boolean("deleted") ).table("product") - val id :*: lastUpdated :*: name :*: baseAmount :*: finalAmount :*: deleted :*: _ = productTable.columns + val (id, lastUpdated, name, baseAmount, finalAmount, deleted) = productTable.columns val selectAll = select(id ++ lastUpdated ++ baseAmount ++ deleted) from productTable } diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 2815bc2ab..ddf838c44 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -16,7 +16,7 @@ object TestBasicSelect { val userTable = (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") - val userId :*: dob :*: fName :*: lName :*: _ = userTable.columns + val (userId, dob, fName, lName) = userTable.columns //todo this should compile using column names defined in the table val basicSelect = select(fName ++ lName) from userTable diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 3f5324104..c56503d95 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -18,9 +18,9 @@ object Example1 extends Sql { val table2 = columnSet.table("person2") - val age :*: name :*: _ = table.columns + val (age, name) = table.columns - val age2 :*: name2 :*: _ = table2.columns + val (age2, name2) = table2.columns import FunctionDef._ import AggregationDef._ @@ -53,7 +53,8 @@ object Example1 extends Sql { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + // val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + val (orderId, fkCustomerId, orderDate) = orders.columns val query = select(fkCustomerId ++ Count(orderId)) .from(orders) diff --git a/examples/src/main/scala/ShopSchema.scala b/examples/src/main/scala/ShopSchema.scala index 1c286b8b6..15f5bd2fd 100644 --- a/examples/src/main/scala/ShopSchema.scala +++ b/examples/src/main/scala/ShopSchema.scala @@ -6,24 +6,24 @@ trait ShopSchema extends Jdbc { self => object Users { val users = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") - val userId :*: dob :*: fName :*: lName :*: _ = users.columns + val (userId, dob, fName, lName) = users.columns } object Orders { val orders = (uuid("id") ++ uuid("usr_id") ++ localDate("order_date")).table("orders") - val orderId :*: fkUserId :*: orderDate :*: _ = orders.columns + val (orderId, fkUserId, orderDate) = orders.columns } object Products { val products = (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - val productId :*: description :*: imageURL :*: _ = products.columns + val (productId, name, description, imageURL) = products.columns } object ProductPrices { val productPrices = (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - val fkProductId :*: effective :*: price :*: _ = productPrices.columns + val (fkProductId, effective, price) = productPrices.columns } object OrderDetails { @@ -33,6 +33,6 @@ trait ShopSchema extends Jdbc { self => "order_details" ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. - val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns } } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 986f43b0e..efb719520 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -110,8 +110,6 @@ trait JdbcInternalModule { self: Jdbc => private[sql] def getColumns(read: Read[_]): Vector[TypeTag[_]] = read match { - case Read.Mapped(read, _) => getColumns(read) - case Read.Subselect(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag @@ -121,12 +119,11 @@ trait JdbcInternalModule { self: Jdbc => case v @ Read.Literal(_) => scala.collection.immutable.Vector(v.typeTag) } - private[sql] def unsafeExtractRow[A]( + private[sql] def unsafeExtractRow[A]( resultSet: ResultSet, schema: Vector[(TypeTag[_], Int)] ): Either[DecodingError, A] = { - - val result: Either[DecodingError, List[Any]] = Right(List()) + val result: Either[DecodingError, Any] = Right(()) schema .foldRight(result) { @@ -134,40 +131,9 @@ trait JdbcInternalModule { self: Jdbc => case ((typeTag, index), Right(vs)) => extractColumn(index, resultSet, typeTag) match { case Left(err) => Left(err) - case Right(v) => Right(v :: vs) + case Right(v) => Right((v, vs)) } } - .map { - case List(a) => (a) - case List(a, b) => (a, b) - case List(a, b, c) => (a, b, c) - case List(a, b, c, d) => (a, b, c, d) - case List(a, b, c, d, e) => (a, b, c, d, e) - case List(a, b, c, d, e, f) => (a, b, c, d, e, f) - case List(a, b, c, d, e, f, g) => (a, b, c, d, e, f, g) - case List(a, b, c, d, e, f, g, h) => (a, b, c, d, e, f, g, h) - case List(a, b, c, d, e, f, g, h, i) => (a, b, c, d, e, f, g, h, i) - case List(a, b, c, d, e, f, g, h, i, j) => (a, b, c, d, e, f, g, h, i, j) - case List(a, b, c, d, e, f, g, h, i, j, k) => (a, b, c, d, e, f, g, h, i, j, k) - case List(a, b, c, d, e, f, g, h, i, j, k, l) => (a, b, c, d, e, f, g, h, i, j, k, l) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m) => (a, b, c, d, e, f, g, h, i, j, k, l, m) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) => - (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) => - (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) => - (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) => - (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => - (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) - case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) => - (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) - case _ => () - } .map(_.asInstanceOf[A]) } } diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index f992ccb8b..0cb69e457 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -14,7 +14,7 @@ trait SqlDriverLiveModule { self: Jdbc => def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] - def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] + def readOn[A](read: Read[A], conn: Connection)(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] } @@ -46,14 +46,12 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] - def read[A]( - read: Read[A] - ): Stream[Exception, A] = + def read[A](read: Read[A])(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] = ZStream .managed(pool.connection) .flatMap(readOn(read, _)) - override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = + override def readOn[A](read: Read[A], conn: Connection)(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] = Stream.unwrap { blocking.effectBlocking { val schema = getColumns(read).zipWithIndex.map { case (value, index) => @@ -81,6 +79,7 @@ trait SqlDriverLiveModule { self: Jdbc => } else ZIO.succeed(None) } .map(read.mapper) + .map(a => in.apply(a)) } else ZStream.empty }.refineToOrDie[Exception] diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index c63284655..e65676840 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -69,7 +69,7 @@ trait TransactionModule { self: Jdbc => object ZTransaction { def apply[A]( read: self.Read[A] - ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = + )(implicit in: TrailingUnitNormalizer[A]): ZTransaction[Any, Exception, zio.stream.Stream[Exception, in.Out]] = txn.flatMap { case Txn(connection, coreDriver) => // FIXME: Find a way to NOT load the whole result set into memory at once!!! val stream = diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 40d2203b4..7f9aa605b 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -11,7 +11,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def update(update: Update[_]): IO[Exception, Int] - def read[A](read: Read[A]): Stream[Exception, A] + def read[A](read: Read[A])(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] @@ -28,7 +28,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def execute[R <: Has[SqlDriver], A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = ZManaged.accessManaged[R](_.get.transact(tx)) - def execute[A](read: Read[A]): ZStream[Has[SqlDriver], Exception, A] = + def execute[A](read: Read[A])(implicit in: TrailingUnitNormalizer[A]): ZStream[Has[SqlDriver], Exception, in.Out] = ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read))) def execute(delete: Delete[_]): ZIO[Has[SqlDriver], Exception, Int] = diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 09ea510d2..d0d890386 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -82,9 +82,6 @@ trait MysqlModule extends Jdbc { self => def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { - case Read.Mapped(read, _) => - renderReadImpl(read) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 4948055af..23ac16ac2 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -16,7 +16,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = "ronald" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -45,7 +45,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 0.8414709848078965 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -58,7 +58,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 32.0 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -71,7 +71,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 3259397556L - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -84,7 +84,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 180d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -97,7 +97,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 3d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -110,7 +110,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 6d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -123,7 +123,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 40 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -136,7 +136,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val expected = 3.141593d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index 57daba5b9..a2c7a7294 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -56,10 +56,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val testResult = execute( - query.to { case row => + query).map { case row => Customer(row._1, row._2, row._3, row._4) } - ) val assertion = for { r <- testResult.runCollect @@ -86,10 +85,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val testResult = execute( - query.to { case row => + query).map { case row => Customer(row._1, row._2, row._3, row._4, row._5) } - ) val assertion = for { r <- testResult.runCollect @@ -114,11 +112,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query.to { case row => + val testResult = execute(query).map { case row => Customer(row._1, row._2, row._3, row._4) } - ) val assertion = for { r <- testResult.runCollect @@ -157,11 +153,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { Row("Jose", "Wiggins", LocalDate.parse("2020-01-15")) ) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => Row(row._1, row._2, row._3) } - ) val assertion = for { r <- result.runCollect diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala index 87beae495..1ed78a4a8 100644 --- a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala +++ b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala @@ -10,24 +10,24 @@ trait ShopSchema extends Jdbc { self => (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) .table("customers") - val customerId :*: dob :*: fName :*: lName :*: verified :*: _ = customers.columns + val (customerId, dob, fName, lName, verified) = customers.columns } object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + val (orderId, fkCustomerId, orderDate) = orders.columns } object Products { val products = (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - val productId :*: description :*: imageURL :*: _ = products.columns + val (productId, producttName, description, imageURL) = products.columns } object ProductPrices { val productPrices = (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - val fkProductId :*: effective :*: price :*: _ = productPrices.columns + val (fkProductId, effective, price) = productPrices.columns } object OrderDetails { @@ -37,6 +37,6 @@ trait ShopSchema extends Jdbc { self => "order_details" ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. - val fkOrderId :*: fkProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns } } diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index b1e01fe41..d57bbfa53 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -37,11 +37,11 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged_ _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged_ } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) @@ -53,9 +53,9 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val tx = ZTransaction(deleteQuery) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged_ _ <- execute(tx) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged_ } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 3005c065b..43fc54acf 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -131,8 +131,6 @@ trait OracleModule extends Jdbc { self => def buildReadString(read: self.Read[_], builder: StringBuilder): Unit = read match { - case Read.Mapped(read, _) => buildReadString(read, builder) - case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 5b906fade..877130ecd 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -671,7 +671,6 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { - case Read.Mapped(read, _) => renderReadImpl(read) case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 9dbbf9146..5a569c4d5 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -46,7 +46,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "1+2+3" ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("concat_ws #2 - combine columns") { @@ -63,7 +63,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "JoseJoseWiggins" ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("concat_ws #3 - combine columns and flat values") { @@ -79,7 +79,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person: Jose Wiggins" ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("concat_ws #3 - combine function calls together") { @@ -97,7 +97,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Name: Jose and Surname: Wiggins" ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("isfinite") { @@ -105,7 +105,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected: Boolean = true - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -118,7 +118,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(Length("hello")) val expected = 5 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -131,7 +131,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "hello " - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -144,7 +144,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = " hello" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -157,7 +157,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 40 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -170,7 +170,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.141592653589793 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -192,7 +192,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person" ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("format1") { @@ -208,7 +208,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person: Jose" ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("format2") { @@ -224,7 +224,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { "Person: Jose Wiggins" ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("format3") { @@ -242,7 +242,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { s"""Person: Jose Wiggins with double quoted "identi fier" """ ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("format4") { @@ -266,7 +266,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { s"""Person: Jose Wiggins with null-literal 'FIXME: NULL' and non-null-literal 'literal' """ ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) }, testM("format5") { @@ -291,7 +291,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { s"""Person: Jose Wiggins with more arguments than placeholders: identifier 'esoJ' """ ) - val testResult = execute(query.to(identity)) + val testResult = execute(query) collectAndCompare(expected, testResult) } ) @@ -301,7 +301,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.14159 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -314,7 +314,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected: Double = 5 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -327,7 +327,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3.141592653589793 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -340,7 +340,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ZioZioZio" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -353,7 +353,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.5235987755982989 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -366,7 +366,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.0986122886681097 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -379,7 +379,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.4711276743037347 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -392,7 +392,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "dcba" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -405,7 +405,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -1.0 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -418,7 +418,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2.718281828459045 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -431,7 +431,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -4.0 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -444,7 +444,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = (54.0, -53.0) - val testResult = execute(query.to(value => (value._1, value._2))) + val testResult = execute(query).map(value => (value._1, value._2)) val assertion = for { r <- testResult.runCollect @@ -457,7 +457,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.8414709848078965 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -470,7 +470,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.5 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -483,7 +483,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "def" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -494,7 +494,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("timeofday") { val query = select(TimeOfDay()) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { @@ -509,7 +509,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("localtime") { val query = select(Localtime) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -521,7 +521,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val precision = 0 val query = select(LocaltimeWithPrecision(precision)) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -532,7 +532,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("localtimestamp") { val query = select(Localtimestamp) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { @@ -548,7 +548,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(LocaltimestampWithPrecision(precision)) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { @@ -562,7 +562,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("now") { val query = select(Now()) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { @@ -576,7 +576,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("statement_timestamp") { val query = select(StatementTimestamp()) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { @@ -590,7 +590,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("transaction_timestamp") { val query = select(TransactionTimestamp()) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { @@ -604,7 +604,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("current_time") { val query = select(CurrentTime) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { @@ -622,7 +622,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "3adbbad1791fbae3ec908894c4963870" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -643,7 +643,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = checkM(genTestString) { (testString) => val query = select(ParseIdent(testString)) - val testResult = execute(query.to(identity)) + val testResult = execute(query) for { r <- testResult.runCollect @@ -654,7 +654,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("parseIdent fails with invalid identifier") { val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect.run @@ -668,7 +668,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 11.0 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -681,7 +681,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "A" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -694,7 +694,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = LocalDate.now() - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -707,7 +707,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "Hi Thomas" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -720,7 +720,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 8.41 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -733,7 +733,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "7fffffff" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -746,7 +746,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "SGVsbG8sIFdvcmxkIQ==" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -759,7 +759,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Chunk.fromArray("Hello, World!".getBytes) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -772,7 +772,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 42d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -785,7 +785,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 10.81 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -798,7 +798,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -811,7 +811,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -1 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -824,7 +824,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -837,7 +837,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 343.000000000000000 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -850,7 +850,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -863,7 +863,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = -3.0 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -876,7 +876,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "a2x5" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -889,7 +889,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ab" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -902,7 +902,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "de" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -915,7 +915,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 0.7853981634 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -928,7 +928,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -953,11 +953,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query.to { case (id, fname, lname, verified, dob) => + val testResult = execute(query).map { case (id, fname, lname, verified, dob) => Customer(id, fname, lname, verified, dob) } - ) val assertion = for { r <- testResult.runCollect @@ -970,7 +968,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "ronald" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -983,7 +981,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "lower" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -996,7 +994,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1009,7 +1007,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 120 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1022,7 +1020,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = "RONALD" - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1035,7 +1033,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 3 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1048,7 +1046,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 1.0000000000051035 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1061,7 +1059,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 21d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1074,7 +1072,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 23562d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1087,7 +1085,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 4d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1100,7 +1098,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 28.64788975654116 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1113,7 +1111,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 2d - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1126,7 +1124,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = 120 - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1137,7 +1135,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("random") { val query = select(Random()) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1149,7 +1147,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(SetSeed(0.12) ++ Random() ++ Random()) from customers val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) - val testResult = execute(query.to { case (_, b, c) => (b, c) }) + val testResult = execute(query).map { case (_, b, c) => (b, c) } val assertion = for { r <- testResult.runCollect @@ -1163,7 +1161,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") - val result = execute(query.to(identity)) + val result = execute(query) val assertion = for { r <- result.runCollect @@ -1177,7 +1175,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = Seq(6, 8, 4, 5, 4) - val result = execute(query.to(identity)) + val result = execute(query) val assertion = for { r <- result.runCollect @@ -1188,14 +1186,14 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("to_timestamp") { val query = select(ToTimestamp(1284352323L)) val expected = ZonedDateTime.of(2010, 9, 13, 4, 32, 3, 0, ZoneId.of(ZoneOffset.UTC.getId)) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) val roundTripQuery = select(createdString ++ createdTimestamp) from customers - val roundTripResults = execute(roundTripQuery.to { case row => + val roundTripResults = execute(roundTripQuery).map { case row => (row._1, ZonedDateTime.parse(row._1), row._2) - }) + } val roundTripExpected = List( ("2020-11-21T19:10:25+00:00", ZonedDateTime.parse("2020-11-21T19:10:25+00:00"), expectedRoundTripTimestamp), ("2020-11-21T15:10:25-04:00", ZonedDateTime.parse("2020-11-21T15:10:25-04:00"), expectedRoundTripTimestamp), @@ -1220,9 +1218,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = ("Russe_", "special ::__::") val testResult = - execute(query.to { case row => + execute(query).map { case row => (row._1, row._2) - }) + } val assertion = for { r <- testResult.runCollect @@ -1235,7 +1233,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(LPad(s, 5, pad)) for { - r <- execute(query.to(identity)).runCollect + r <- execute(query).runCollect } yield r.head } @@ -1250,7 +1248,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val query = select(RPad(s, 5, pad)) for { - r <- execute(query.to(identity)).runCollect + r <- execute(query).runCollect } yield r.head } @@ -1263,7 +1261,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("pg_client_encoding") { val query = select(PgClientEncoding()) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1277,7 +1275,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val expected = LocalDate.of(2013, 7, 15) - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1291,7 +1289,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { MakeInterval(interval) ) for { - r <- execute(query.to(identity)).runCollect + r <- execute(query).runCollect } yield r.head } @@ -1308,7 +1306,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("make_time") { val query = select(MakeTime(8, 15, 23.5)) val expected = LocalTime.parse("08:15:23.500") - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1319,7 +1317,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { testM("make_timestamp") { val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) val expected = LocalDateTime.parse("2013-07-15T08:15:23.500") - val testResult = execute(query.to(identity)) + val testResult = execute(query) val assertion = for { r <- testResult.runCollect @@ -1331,7 +1329,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { def runTest(tz: Timestampz) = { val query = select(MakeTimestampz(tz)) for { - r <- execute(query.to(identity)).runCollect + r <- execute(query).runCollect } yield r.head } @@ -1351,7 +1349,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { }, testM("cannot compile a select without from clause if a table source is required") { //the following execute only compiles with 'from customers' clause - execute((select(CharLength(Customers.fName)) from customers).to(identity)) + execute((select(CharLength(Customers.fName)) from customers)) // imports for Left and Right are necessary to make the typeCheck macro expansion compile // TODO: clean this up when https://github.com/zio/zio/issues/4927 is resolved diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 72b16ddfc..7840039cc 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -36,12 +36,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query - .to[Customer] { case row => + val testResult = execute(query).map { case row => Customer(row._1, row._2, row._3, row._4, row._5) } - ) val assertion = for { r <- testResult.runCollect @@ -90,12 +87,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query - .to[Customer] { case row => + val testResult = execute(query).map { case row => Customer(row._1, row._2, row._3, row._4) } - ) val assertion = for { r <- testResult.runCollect @@ -174,9 +168,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query.to(Customer tupled _) - ) + val testResult = execute(query).map(Customer tupled _) val assertion = for { r <- testResult.runCollect @@ -189,7 +181,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val expected = 5L - val result = execute(query.to(identity)) + val result = execute(query) for { r <- result.runCollect @@ -271,10 +263,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { .from(customers.lateral(orderDateDerivedTable)) .orderBy(Ordering.Desc(orderDateDerived)) - val result = execute( - query - .to(Row tupled _) - ) + val result = execute(query).map(Row tupled _) val assertion = for { r <- result.runCollect @@ -307,11 +296,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => Row(row._1, row._2, row._3) } - ) val assertion = for { r <- result.runCollect @@ -333,9 +320,8 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query.to { case (uuid, firstName, lastName, dob) => Customer(uuid, firstName, lastName, dob) } - ) + val testResult = execute(query).map { case (uuid, firstName, lastName, dob) => Customer(uuid, firstName, lastName, dob) } + val assertion = for { r <- testResult.runCollect @@ -387,7 +373,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { .from(orders) .groupBy(fkCustomerId) - val actual = execute(query.to(_.toString())).runCollect.map(_.toList) + val actual = execute(query).map(_.toString()).runCollect.map(_.toList) assertM(actual)(equalTo(expected)) }, @@ -409,7 +395,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { .groupBy(fkCustomerId) .orderBy(Ordering.Desc(Count(orderId))) - val actual = execute(query.to(arg => arg._2.toInt)).runCollect.map(_.toList) + val actual = execute(query).map(arg => arg._2.toInt).runCollect.map(_.toList) assertM(actual)(equalTo(expected)) }, @@ -623,7 +609,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { .from(persons) val insertSome = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Charles", "Dent", Option(java.time.LocalDate.now()))) + .values((UUID.randomUUID(), "Charles", "Dent", Option(LocalDate.of(2022, 1, 31)))) // TODO improve on inserting nulls // we don't allow inserting null on non nullable columns -> There is no schema or dynamic value for nulls val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index a69e82b85..48af9fc2b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -13,7 +13,7 @@ trait ShopSchema extends Jdbc { self => (uuid("id") ++ string("first_name") ++ string("last_name") ++ (localDate("dob") @@ nullable)) .table("persons") - val personId :*: fName :*: lName :*: dob :*: _ = persons.columns + val (personId, fName, lName, dob) = persons.columns } object Customers { @@ -24,25 +24,25 @@ trait ShopSchema extends Jdbc { self => ) ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) .table("customers") - val customerId :*: dob :*: fName :*: lName :*: verified :*: createdString :*: createdTimestamp :*: _ = + val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = customers.columns } object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + val (orderId, fkCustomerId, orderDate) = orders.columns } object Products { val products = (uuid("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - val productId :*: productName :*: description :*: imageURL :*: _ = products.columns + val (productId, productName, description, imageURL) = products.columns } object ProductPrices { val productPrices = (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - val fkProductId :*: effective :*: price :*: _ = productPrices.columns + val (fkProductId, effective, price) = productPrices.columns } object OrderDetails { @@ -52,7 +52,7 @@ trait ShopSchema extends Jdbc { self => "order_details" ) - val orderDetailsOrderId :*: orderDetailsProductId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + val (orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) = orderDetails.columns } object DerivedTables { @@ -63,7 +63,7 @@ trait ShopSchema extends Jdbc { self => val orderDetailsDerived = select(orderDetailsOrderId ++ orderDetailsProductId ++ unitPrice).from(orderDetails).asTable("derived") - val derivedOrderId :*: derivedProductId :*: derivedUnitPrice :*: _ = orderDetailsDerived.columns + val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns val orderDateDerivedTable = customers .subselect(orderDate) .from(orders) @@ -72,6 +72,6 @@ trait ShopSchema extends Jdbc { self => .orderBy(Ordering.Desc(orderDate)) .asTable("derived") - val orderDateDerived :*: _ = orderDateDerivedTable.columns + val orderDateDerived = orderDateDerivedTable.columns } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index 167092fe5..3deddb789 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -1,7 +1,5 @@ package zio.sql.postgresql -import java.util.UUID - import zio._ import zio.test.Assertion._ import zio.test._ @@ -39,11 +37,11 @@ object TransactionSpec extends PostgresRunnableSpec with ShopSchema { val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query).runCount.toManaged_ _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query).runCount.toManaged_ } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) @@ -55,9 +53,9 @@ object TransactionSpec extends PostgresRunnableSpec with ShopSchema { val tx = ZTransaction(deleteQuery) val result = (for { - allCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + allCustomersCount <- execute(query).runCount.toManaged_ _ <- execute(tx) - remainingCustomersCount <- execute(query.to(identity[UUID](_))).runCount.toManaged_ + remainingCustomersCount <- execute(query).runCount.toManaged_ } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 88bed37dc..8748adc8c 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -248,8 +248,6 @@ trait SqlServerModule extends Jdbc { self => def buildReadString[Out](read: Read[Out]): Unit = read match { - case Read.Mapped(read, _) => buildReadString(read.asInstanceOf[Read[Out]]) - //todo offset (needs orderBy, must use fetch _instead_ of top) case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 5703d0701..8797132a5 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -11,26 +11,26 @@ trait DbSchema extends Jdbc { self => (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) .table("customers") - val customerId :*: fName :*: lName :*: verified :*: dob :*: _ = + val (customerId, fName, lName, verified, dob) = customers.columns val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns + val (orderId, fkCustomerId, orderDate) = orders.columns val productPrices = (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - val fkProductId :*: effective :*: price :*: _ = productPrices.columns + val (fkProductId, effective, price) = productPrices.columns val orderDetails = (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")).table("order_details") - val orderDetailsId :*: productId :*: quantity :*: unitPrice :*: _ = orderDetails.columns + val (orderDetailsId, productId, quantity, unitPrice) = orderDetails.columns val orderDetailsDerived = select(orderDetailsId ++ productId ++ unitPrice).from(orderDetails).asTable("derived") - val derivedOrderId :*: derivedProductId :*: derivedUnitPrice :*: _ = orderDetailsDerived.columns + val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns val orderDateDerivedTable = customers .subselect(orderDate) @@ -40,6 +40,6 @@ trait DbSchema extends Jdbc { self => .orderBy(Ordering.Desc(orderDate)) .asTable("derived") - val orderDateDerived :*: _ = orderDateDerivedTable.columns + val orderDateDerived = orderDateDerivedTable.columns } } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index c04840516..60b389e33 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -33,11 +33,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) ) - val testResult = execute( - query.to { case row => + val testResult = execute(query).map { row => Customer(row._1, row._2, row._3, row._4, row._5) } - ) val assertion = for { r <- testResult.runCollect @@ -86,11 +84,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) ) - val testResult = execute( - query.to { case row => + val testResult = execute(query).map { case row => Customer(row._1, row._2, row._3, row._4) } - ) val assertion = for { r <- testResult.runCollect @@ -137,11 +133,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) ) - val testResult = execute( - query.to { case row => + val testResult = execute(query).map { case row => Customer(row._1, row._2, row._3, row._4) } - ) val assertion = for { r <- testResult.runCollect @@ -154,7 +148,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val expected = 5L - val result = execute(query.to(identity)) + val result = execute(query) for { r <- result.runCollect @@ -185,11 +179,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => Row(row._1, row._2, row._3) } - ) val assertion = for { r <- result.runCollect @@ -247,11 +239,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { Row.create("5883CB62-D792-4EE3-ACBC-FE85B6BAA998", "D5137D3A-894A-4109-9986-E982541B434F", 55.0000) ) - //TODO try to support apply - //val result = execute(query.to[Row](Row.apply)) - val result = execute(query.to { case (id, productId, price) => + val result = execute(query).map { case (id, productId, price) => Row(id, productId, price) - }) + } val assertion = for { r <- result.runCollect @@ -332,11 +322,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { Row("0a48ffb0-ec61-4147-af56-fc4dbca8de0a", "f35b0053-855b-4145-abe1-dc62bc1fdb96", 6.0) ) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => Row(row._1, row._2, row._3) } - ) val assertion = for { r <- result.runCollect @@ -379,11 +367,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { .from(customers.crossApply(orderDateDerivedTable)) .orderBy(Ordering.Desc(orderDateDerived)) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => Row(row._1, row._2, row._3, row._4) } - ) val assertion = for { r <- result.runCollect @@ -406,15 +392,13 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val subquery = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - val orderDateDerived :*: _ = subquery.columns + val orderDateDerived = subquery.columns val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) - } - ) + } val assertion = for { r <- result.runCollect @@ -427,15 +411,13 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val subquery = customers.subselect(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - val orderDateDerived :*: _ = subquery.columns + val orderDateDerived = subquery.columns val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) - } - ) + } val assertion = for { r <- result.runCollect @@ -448,15 +430,13 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val subquery = subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - val orderDateDerived :*: _ = subquery.columns + val orderDateDerived = subquery.columns val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) - } - ) + } val assertion = for { r <- result.runCollect @@ -469,15 +449,13 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val subquery = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - val orderDateDerived :*: _ = subquery.columns + val orderDateDerived = subquery.columns val query = select(fName ++ lName ++ orderDateDerived).from(customers.outerApply(subquery)) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) - } - ) + } val assertion = for { r <- result.runCollect @@ -518,11 +496,9 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { Row("Mila", "Paterso", LocalDate.parse("2020-04-30")) ) - val result = execute( - query.to { case row => + val result = execute(query).map { case row => Row(row._1, row._2, row._3) - } - ) + } val assertion = for { r <- result.runCollect From 1a5dfd87517b37a3ca2f37ae01269ee04e3e73ac Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 3 Feb 2022 18:56:59 +0100 Subject: [PATCH 343/673] added restrictions to having and where --- core/jvm/src/main/scala/zio/sql/select.scala | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index d21f74e38..0de8f30da 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -323,8 +323,7 @@ trait SelectModule { self: ExprModule with TableModule => limit: Option[Long] = None ) extends Read[Repr] { self => - //def where[F2: Features.IsNotAggregated]( - def where[F2]( + def where[F2: Features.IsNotAggregated]( whereExpr2: Expr[F2, Source, Boolean] ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(whereExpr = self.whereExpr && whereExpr2) @@ -339,24 +338,18 @@ trait SelectModule { self: ExprModule with TableModule => ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) - /** - * TODO - * - * need to restrict varargs _ : IsAggregated - */ - def having(havingExpr2: Expr[_, Source, Boolean]) - //(implicit ev: Features.IsFullyAggregated[F]) + def having[F2: Features.IsFullyAggregated](havingExpr2: Expr[F2, Source, Boolean]) : Subselect[F, Repr, Source, Subsource, Head, Tail] = - // val _ = ev copy(havingExpr = self.havingExpr && havingExpr2) /** - * TODO support + * TODO + * allow * select(fkCustomerId) * .from(orders) * .groupBy(fkCustomerId) * - * DONT allow + * don't allow * select(Count(orderId) ++ Count(orderId)) * .from(orders) * .groupBy(Count(orderId)) From d30abed72cdc5eb45fadac4591bda95b277ccb1b Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 5 Feb 2022 14:15:39 +0100 Subject: [PATCH 344/673] compilation fixes for 2.12 --- core/jvm/src/main/scala/zio/sql/select.scala | 1 + core/jvm/src/main/scala/zio/sql/table.scala | 32 ++-- core/jvm/src/main/scala/zio/sql/utils.scala | 176 ++++++++++++++----- 3 files changed, 149 insertions(+), 60 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 0de8f30da..159fc95fd 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -338,6 +338,7 @@ trait SelectModule { self: ExprModule with TableModule => ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) + // how about two havings ? def having[F2: Features.IsFullyAggregated](havingExpr2: Expr[F2, Source, Boolean]) : Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(havingExpr = self.havingExpr && havingExpr2) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 76d313326..5ad125617 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -68,14 +68,14 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped - def @@[HeadType[_]]( - columnSetAspect: ColumnSetAspect.Aux[HeadType] + def @@[HeadType]( + columnSetAspect: ColumnSetAspect.Aux[A, HeadType] )(implicit ev: B <:< ColumnSet.Empty, typeTagA: TypeTag.NotNull[A] - ): ColumnSet.Cons[HeadType[A], B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType[A]], self.tail.ColumnsRepr[T]) - type Append[That <: ColumnSet] = Cons[HeadType[A], self.tail.Append[That], HeadIdentity] + ): ColumnSet.Cons[HeadType, B, HeadIdentity] { + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType], self.tail.ColumnsRepr[T]) + type Append[That <: ColumnSet] = Cons[HeadType, self.tail.Append[That], HeadIdentity] type AllColumnIdentities = HeadIdentity with self.tail.AllColumnIdentities } = columnSetAspect.applyCons(self) @@ -324,30 +324,30 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => type TableExtension[A] <: Table.TableEx[A] - trait ColumnSetAspect { self => + trait ColumnSetAspect[A] { self => - type HeadType[_] + type HeadType - def applyCons[A: TypeTag.NotNull, B <: ColumnSet, HeadIdentity]( + def applyCons[B <: ColumnSet, HeadIdentity]( columnSet: ColumnSet.Cons[A, B, HeadIdentity] - ): ColumnSet.Cons[HeadType[A], B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType[A]], columnSet.tail.ColumnsRepr[T]) - type Append[That <: ColumnSet] = ColumnSet.Cons[HeadType[A], columnSet.tail.Append[That], HeadIdentity] + ): ColumnSet.Cons[HeadType, B, HeadIdentity] { + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType], columnSet.tail.ColumnsRepr[T]) + type Append[That <: ColumnSet] = ColumnSet.Cons[HeadType, columnSet.tail.Append[That], HeadIdentity] type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities } } object ColumnSetAspect { - type Aux[HeadType0[_]] = ColumnSetAspect { - type HeadType[A] = HeadType0[A] + type Aux[A, HeadType0] = ColumnSetAspect[A] { + type HeadType = HeadType0 } - val nullable: ColumnSetAspect.Aux[Option] = new ColumnSetAspect { + def nullable[A: TypeTag.NotNull]: ColumnSetAspect.Aux[A, Option[A]] = new ColumnSetAspect[A] { - override type HeadType[A] = Option[A] + override type HeadType = Option[A] - def applyCons[A: TypeTag.NotNull, B <: ColumnSet, HeadIdentity]( + def applyCons[B <: ColumnSet, HeadIdentity]( columnSet: ColumnSet.Cons[A, B, HeadIdentity] ): ColumnSet.Cons[Option[A], B, HeadIdentity] { type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, Option[A]], columnSet.tail.ColumnsRepr[T]) diff --git a/core/jvm/src/main/scala/zio/sql/utils.scala b/core/jvm/src/main/scala/zio/sql/utils.scala index c294281cb..15263b453 100644 --- a/core/jvm/src/main/scala/zio/sql/utils.scala +++ b/core/jvm/src/main/scala/zio/sql/utils.scala @@ -12,135 +12,223 @@ trait UtilsModule { self => type Out = Out0 } // format: off - implicit def arity1[In, A](implicit ev: In =:= (A, Unit)) : TrailingUnitNormalizer.WithOut[In, A] = new TrailingUnitNormalizer[In] { + //ev needs to be reversed because scala 2.12 cannot prove In =:= (A, Unit), therefore asInstanceOf + implicit def arity1[In, A](implicit ev: (A, Unit) =:= In) : TrailingUnitNormalizer.WithOut[In, A] = new TrailingUnitNormalizer[In] { override type Out = A - override def apply(in: In): A = in._1 + override def apply(in0: In): A = { + val in = in0.asInstanceOf[(A, Unit)] + + in._1 + } } - implicit def arity2[In, A, B](implicit ev: In =:= (A, (B, Unit))) : TrailingUnitNormalizer.WithOut[In, (A, B)] = new TrailingUnitNormalizer[In] { + implicit def arity2[In, A, B](implicit ev: (A, (B, Unit)) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B)] = new TrailingUnitNormalizer[In] { override type Out = (A, B) - override def apply(in: In): Out = (in._1, in._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, Unit))] + + (in._1, in._2._1) + } } - implicit def arity3[In, A, B, C](implicit ev: In =:= (A, (B, (C, Unit)))) : TrailingUnitNormalizer.WithOut[In, (A, B, C)] = new TrailingUnitNormalizer[In] { + implicit def arity3[In, A, B, C](implicit ev: (A, (B, (C, Unit))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, Unit)))] + + (in._1, in._2._1, in._2._2._1) + } } - implicit def arity4[In, A, B, C, D](implicit ev: In =:= (A, (B, (C, (D, Unit))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D)] = new TrailingUnitNormalizer[In] { + implicit def arity4[In, A, B, C, D](implicit ev: (A, (B, (C, (D, Unit)))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, Unit))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1) + } } - implicit def arity5[In, A, B, C, D, E](implicit ev: In =:= (A, (B, (C, (D, (E, Unit)))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E)] = new TrailingUnitNormalizer[In] { + implicit def arity5[In, A, B, C, D, E](implicit ev: (A, (B, (C, (D, (E, Unit))))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, Unit)))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1) + } } - implicit def arity6[In, A, B, C, D, E, F](implicit ev: In =:= (A, (B, (C, (D, (E, (F, Unit))))))) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F)] = new TrailingUnitNormalizer[In] { + implicit def arity6[In, A, B, C, D, E, F](implicit ev: (A, (B, (C, (D, (E, (F, Unit)))))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, Unit))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1) + } } - implicit def arity7[In, A, B, C, D, E, F, G](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, Unit)))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G)] = new TrailingUnitNormalizer[In] { + implicit def arity7[In, A, B, C, D, E, F, G](implicit ev: (A, (B, (C, (D, (E, (F, (G, Unit))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, Unit)))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1) + } } - implicit def arity8[In, A, B, C, D, E, F, G, H](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H)] = new TrailingUnitNormalizer[In] { + implicit def arity8[In, A, B, C, D, E, F, G, H](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1) + } } - implicit def arity9[In, A, B, C, D, E, F, G, H, I](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit)))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I)] = new TrailingUnitNormalizer[In] { + implicit def arity9[In, A, B, C, D, E, F, G, H, I](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, Unit)))))))))] + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1) + } } - implicit def arity10[In, A, B, C, D, E, F, G, H, I, J](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J)] = new TrailingUnitNormalizer[In] { + implicit def arity10[In, A, B, C, D, E, F, G, H, I, J](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit)))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity11[In, A, B, C, D, E, F, G, H, I, J, K](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit)))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K)] = new TrailingUnitNormalizer[In] { + implicit def arity11[In, A, B, C, D, E, F, G, H, I, J, K](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit)))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity12[In, A, B, C, D, E, F, G, H, I, J, K, L](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L)] = new TrailingUnitNormalizer[In] { + implicit def arity12[In, A, B, C, D, E, F, G, H, I, J, K, L](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity13[In, A, B, C, D, E, F, G, H, I, J, K, L, M](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit)))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M)] = new TrailingUnitNormalizer[In] { + implicit def arity13[In, A, B, C, D, E, F, G, H, I, J, K, L, M](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit)))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity14[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new TrailingUnitNormalizer[In] { + implicit def arity14[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity15[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit)))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new TrailingUnitNormalizer[In] { + implicit def arity15[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit)))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity16[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new TrailingUnitNormalizer[In] { + implicit def arity16[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit))))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity17[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit)))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new TrailingUnitNormalizer[In] { + implicit def arity17[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit)))))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity18[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new TrailingUnitNormalizer[In] { + implicit def arity18[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit)))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity19[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new TrailingUnitNormalizer[In] { + implicit def arity19[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) -override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity20[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new TrailingUnitNormalizer[In] { + implicit def arity20[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit)))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity21[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit)))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new TrailingUnitNormalizer[In] { + implicit def arity21[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit))))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit)))))))))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } - implicit def arity22[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](implicit ev: In =:= (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit))))))))))))))))))))))): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new TrailingUnitNormalizer[In] { + implicit def arity22[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit)))))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new TrailingUnitNormalizer[In] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) - override def apply(in: In): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + override def apply(in0: In): Out = { + val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit))))))))))))))))))))))] + + (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) + } } // format: on } From c69a60b2fdf37eee1e0eb6b3ec381812acf4a67b Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 5 Feb 2022 16:30:24 +0100 Subject: [PATCH 345/673] reverted the use of nromalizer --- core/jvm/src/main/scala/zio/sql/select.scala | 64 +++++++++++++++---- examples/src/main/scala/Example1.scala | 5 ++ .../scala/zio/sql/JdbcInternalModule.scala | 36 ++++++++++- .../scala/zio/sql/SqlDriverLiveModule.scala | 7 +- .../scala/zio/sql/TransactionModule.scala | 2 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 4 +- .../scala/zio/sql/mysql/MysqlModule.scala | 2 + .../scala/zio/sql/oracle/OracleModule.scala | 2 + .../zio/sql/postgresql/PostgresModule.scala | 2 + .../zio/sql/sqlserver/SqlServerModule.scala | 2 + 10 files changed, 103 insertions(+), 23 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 159fc95fd..6efa7cfa8 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -2,7 +2,7 @@ package zio.sql import scala.language.implicitConversions -trait SelectModule { self: ExprModule with TableModule => +trait SelectModule { self: ExprModule with TableModule with UtilsModule => sealed case class Selector[F, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F, Source, B]) @@ -31,10 +31,11 @@ trait SelectModule { self: ExprModule with TableModule => Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail - ] + ], + normalizer: TrailingUnitNormalizer[selectBuilder.selection.value.ResultTypeRepr] ): Read.Select[ F, - selectBuilder.selection.value.ResultTypeRepr, + normalizer.Out, Source, selectBuilder.selection.value.ColumnHead, selectBuilder.selection.value.SelectionTail @@ -47,7 +48,7 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selectBuilder.selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F, Source, B0](b), None, true)//.normalize + Read.Subselect(Selection[F, Source, B0](b), None, true).normalize } } @@ -56,10 +57,11 @@ trait SelectModule { self: ExprModule with TableModule => ) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit - ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail], + normalizer: TrailingUnitNormalizer[selection.value.ResultTypeRepr] ): AggSelectBuilderGroupBy[ F0, - selection.value.ResultTypeRepr, + normalizer.Out, Source0, selection.value.ColumnHead, selection.value.SelectionTail, @@ -75,12 +77,12 @@ trait SelectModule { self: ExprModule with TableModule => AggSelectBuilderGroupBy[ F0, - selection.value.ResultTypeRepr, + normalizer.Out, Source0, selection.value.ColumnHead, selection.value.SelectionTail, Unaggregated - ](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true)) + ](Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true).normalize) } } @@ -206,10 +208,11 @@ trait SelectModule { self: ExprModule with TableModule => sealed case class SelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: Selection[F0, Source, B]) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit - ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail] + ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail], + normalizer : TrailingUnitNormalizer[selection.value.ResultTypeRepr] ): Read.Select[ F0, - selection.value.ResultTypeRepr, + normalizer.Out, Source0, selection.value.ColumnHead, selection.value.SelectionTail @@ -222,7 +225,7 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true) + Read.Subselect(Selection[F0, Source0, B0](b), Some(table), true).normalize } } @@ -236,10 +239,11 @@ trait SelectModule { self: ExprModule with TableModule => ) { def from[Source0](table: Table.Aux[Source0])(implicit ev1: Source0 with ParentTable <:< Source, - ev2: B <:< SelectionSet.Cons[Source, selection.value.ColumnHead, selection.value.SelectionTail] + ev2: B <:< SelectionSet.Cons[Source, selection.value.ColumnHead, selection.value.SelectionTail], + normalizer: TrailingUnitNormalizer[selection.value.ResultTypeRepr] ): Read.Subselect[ F, - selection.value.ResultTypeRepr, + normalizer.Out, Source with ParentTable, Source0, selection.value.ColumnHead, @@ -253,7 +257,7 @@ trait SelectModule { self: ExprModule with TableModule => ] val b: B0 = selection.value.asInstanceOf[B0] - Read.Subselect(Selection[F, Source with ParentTable, B0](b), Some(table), true) + Read.Subselect(Selection[F, Source with ParentTable, B0](b), Some(table), true).normalize } } @@ -273,8 +277,21 @@ trait SelectModule { self: ExprModule with TableModule => val columnSet: CS + /** + * Maps the [[Read]] query's output to another type by providing a function + * that can transform from the current type to the new type. + */ + def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = + Read.Mapped(self, f) + def asTable(name: TableName): Table.DerivedTable[Out, Read[Out]] + + def to[Target](f: Out => Target): Read[Target] = + self.map { resultType => + f(resultType) + } + //TODO use this def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = Read.Union[ResultType, Out1](self, that, true) @@ -310,6 +327,23 @@ trait SelectModule { self: ExprModule with TableModule => type ResultType = ResultType0 } + sealed case class Mapped[Repr, Out, Out2](read: Read.Aux[Repr, Out], f: Out => Out2) extends Read[Out2] { self => + override type ResultType = Repr + + override val mapper = read.mapper.andThen(f) + + override type ColumnHead = read.ColumnHead + override type ColumnTail = read.ColumnTail + override type CS = read.CS + + override type HeadIdentity = read.HeadIdentity + + override val columnSet: CS = read.columnSet + + override def asTable(name: TableName): Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]] = + Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]](self, name) + } + type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( @@ -366,6 +400,8 @@ trait SelectModule { self: ExprModule with TableModule => (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail)) ) + def normalize(implicit instance: TrailingUnitNormalizer[ResultType]): Subselect[F, instance.Out, Source, Subsource, Head, Tail] = self.asInstanceOf[Subselect[F, instance.Out, Source, Subsource, Head, Tail]] + override def asTable( name: TableName ): Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]] = diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index c56503d95..5971f0518 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -56,6 +56,11 @@ object Example1 extends Sql { // val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns val (orderId, fkCustomerId, orderDate) = orders.columns + // Selection[Features.Union[Features.Union[Features.Source[String("id")],Features.Source[String("customer_id")]],Features.Source[String("order_date")]], + // orders.TableType, + // SelectionSet.Cons[orders.TableType,UUID,SelectionSet.Cons[orders.TableType,UUID,SelectionSet.Cons[orders.TableType,LocalDate,SelectionSet.Empty]]]] + val xxxx = orderId ++ fkCustomerId ++ orderDate + val query = select(fkCustomerId ++ Count(orderId)) .from(orders) .groupBy(fkCustomerId, orderDate) diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index efb719520..f82e6ec3f 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -110,6 +110,7 @@ trait JdbcInternalModule { self: Jdbc => private[sql] def getColumns(read: Read[_]): Vector[TypeTag[_]] = read match { + case Read.Mapped(read, _) => getColumns(read) case Read.Subselect(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag @@ -123,7 +124,7 @@ trait JdbcInternalModule { self: Jdbc => resultSet: ResultSet, schema: Vector[(TypeTag[_], Int)] ): Either[DecodingError, A] = { - val result: Either[DecodingError, Any] = Right(()) + val result: Either[DecodingError, List[Any]] = Right(List()) schema .foldRight(result) { @@ -131,8 +132,39 @@ trait JdbcInternalModule { self: Jdbc => case ((typeTag, index), Right(vs)) => extractColumn(index, resultSet, typeTag) match { case Left(err) => Left(err) - case Right(v) => Right((v, vs)) + case Right(v) => Right(v :: vs) } + } + .map { + case List(a) => (a) + case List(a, b) => (a, b) + case List(a, b, c) => (a, b, c) + case List(a, b, c, d) => (a, b, c, d) + case List(a, b, c, d, e) => (a, b, c, d, e) + case List(a, b, c, d, e, f) => (a, b, c, d, e, f) + case List(a, b, c, d, e, f, g) => (a, b, c, d, e, f, g) + case List(a, b, c, d, e, f, g, h) => (a, b, c, d, e, f, g, h) + case List(a, b, c, d, e, f, g, h, i) => (a, b, c, d, e, f, g, h, i) + case List(a, b, c, d, e, f, g, h, i, j) => (a, b, c, d, e, f, g, h, i, j) + case List(a, b, c, d, e, f, g, h, i, j, k) => (a, b, c, d, e, f, g, h, i, j, k) + case List(a, b, c, d, e, f, g, h, i, j, k, l) => (a, b, c, d, e, f, g, h, i, j, k, l) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m) => (a, b, c, d, e, f, g, h, i, j, k, l, m) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) + case List(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) => + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) + case _ => () } .map(_.asInstanceOf[A]) } diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 0cb69e457..f68da00d1 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -14,7 +14,7 @@ trait SqlDriverLiveModule { self: Jdbc => def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] - def readOn[A](read: Read[A], conn: Connection)(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] + def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] } @@ -46,12 +46,12 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] - def read[A](read: Read[A])(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] = + def read[A](read: Read[A]): Stream[Exception, A] = ZStream .managed(pool.connection) .flatMap(readOn(read, _)) - override def readOn[A](read: Read[A], conn: Connection)(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] = + override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = Stream.unwrap { blocking.effectBlocking { val schema = getColumns(read).zipWithIndex.map { case (value, index) => @@ -79,7 +79,6 @@ trait SqlDriverLiveModule { self: Jdbc => } else ZIO.succeed(None) } .map(read.mapper) - .map(a => in.apply(a)) } else ZStream.empty }.refineToOrDie[Exception] diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index e65676840..c63284655 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -69,7 +69,7 @@ trait TransactionModule { self: Jdbc => object ZTransaction { def apply[A]( read: self.Read[A] - )(implicit in: TrailingUnitNormalizer[A]): ZTransaction[Any, Exception, zio.stream.Stream[Exception, in.Out]] = + ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = txn.flatMap { case Txn(connection, coreDriver) => // FIXME: Find a way to NOT load the whole result set into memory at once!!! val stream = diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 7f9aa605b..40d2203b4 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -11,7 +11,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def update(update: Update[_]): IO[Exception, Int] - def read[A](read: Read[A])(implicit in: TrailingUnitNormalizer[A]): Stream[Exception, in.Out] + def read[A](read: Read[A]): Stream[Exception, A] def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] @@ -28,7 +28,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def execute[R <: Has[SqlDriver], A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = ZManaged.accessManaged[R](_.get.transact(tx)) - def execute[A](read: Read[A])(implicit in: TrailingUnitNormalizer[A]): ZStream[Has[SqlDriver], Exception, in.Out] = + def execute[A](read: Read[A]): ZStream[Has[SqlDriver], Exception, A] = ZStream.unwrap(ZIO.access[Has[SqlDriver]](_.get.read(read))) def execute(delete: Delete[_]): ZIO[Has[SqlDriver], Exception, Int] = diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index d0d890386..62765508c 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -82,6 +82,8 @@ trait MysqlModule extends Jdbc { self => def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { + case Read.Mapped(read, _) => renderReadImpl(read) + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 43fc54acf..682c70f50 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -131,6 +131,8 @@ trait OracleModule extends Jdbc { self => def buildReadString(read: self.Read[_], builder: StringBuilder): Unit = read match { + case Read.Mapped(read, _) => buildReadString(read, builder) + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 877130ecd..7bc8d5b4e 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -671,6 +671,8 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { + case Read.Mapped(read, _) => renderReadImpl(read) + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 8748adc8c..88bed37dc 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -248,6 +248,8 @@ trait SqlServerModule extends Jdbc { self => def buildReadString[Out](read: Read[Out]): Unit = read match { + case Read.Mapped(read, _) => buildReadString(read.asInstanceOf[Read[Out]]) + //todo offset (needs orderBy, must use fetch _instead_ of top) case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { From 0bda0210693d43ffb470d86455b03b6fd2ba4b4e Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 5 Feb 2022 17:07:46 +0100 Subject: [PATCH 346/673] format + few todos --- core/jvm/src/main/scala/zio/sql/select.scala | 51 ++++++++------- core/jvm/src/main/scala/zio/sql/table.scala | 5 +- examples/src/main/scala/Example1.scala | 65 +------------------ .../scala/zio/sql/JdbcInternalModule.scala | 6 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 2 +- .../scala/zio/sql/mysql/MysqlModuleTest.scala | 22 +++---- .../scala/zio/sql/oracle/OracleModule.scala | 2 +- .../zio/sql/postgresql/PostgresModule.scala | 2 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 4 +- .../sql/postgresql/PostgresModuleSpec.scala | 17 ++--- .../scala/zio/sql/postgresql/ShopSchema.scala | 2 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 34 +++++----- 12 files changed, 78 insertions(+), 134 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 6efa7cfa8..20a902a9c 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -86,7 +86,6 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => } } - //TODO add having !!!! sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source], Unaggregated]( select: Read.Select[F, Repr, Source, Head, Tail] ) { @@ -209,7 +208,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => def from[Source0 <: Source](table: Table.Aux[Source0])(implicit ev: B <:< SelectionSet.Cons[Source0, selection.value.ColumnHead, selection.value.SelectionTail], - normalizer : TrailingUnitNormalizer[selection.value.ResultTypeRepr] + normalizer: TrailingUnitNormalizer[selection.value.ResultTypeRepr] ): Read.Select[ F0, normalizer.Out, @@ -277,7 +276,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => val columnSet: CS - /** + /** * Maps the [[Read]] query's output to another type by providing a function * that can transform from the current type to the new type. */ @@ -286,13 +285,11 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => def asTable(name: TableName): Table.DerivedTable[Out, Read[Out]] - def to[Target](f: Out => Target): Read[Target] = self.map { resultType => f(resultType) } - //TODO use this def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = Read.Union[ResultType, Out1](self, that, true) @@ -357,7 +354,17 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => limit: Option[Long] = None ) extends Read[Repr] { self => - def where[F2: Features.IsNotAggregated]( + /** + * The follwing expr would not compile in where clause with F2: Features.IsNotAggregated + * + * List(minStationsQuery, maxStationsQuery) + * .flatten + * .reduceLeftOption[Expr[_, metroLine.TableType, Boolean]](_ && _) + * .get + * + * TODO try to make phantom type F2 composable + */ + def where[F2]( whereExpr2: Expr[F2, Source, Boolean] ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(whereExpr = self.whereExpr && whereExpr2) @@ -372,25 +379,20 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) - // how about two havings ? - def having[F2: Features.IsFullyAggregated](havingExpr2: Expr[F2, Source, Boolean]) - : Subselect[F, Repr, Source, Subsource, Head, Tail] = + /** + * TODO find a way to make following not compile -> fkCustomerId need to be `groupped by` + * select(fkCustomerId) + * .from(orders) + * .having(Count(orderId) > 4) + */ + def having[F2: Features.IsFullyAggregated]( + havingExpr2: Expr[F2, Source, Boolean] + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(havingExpr = self.havingExpr && havingExpr2) /** - * TODO - * allow - * select(fkCustomerId) - * .from(orders) - * .groupBy(fkCustomerId) - * - * don't allow - * select(Count(orderId) ++ Count(orderId)) - * .from(orders) - * .groupBy(Count(orderId)) - * - * is there a way to restrict _ : IsNotAggregated - * (cannot move it up to AggBuilder because select(fkCustomerId).from(orders) is valid sql) + * TODO restrict _ : IsNotAggregated (hopefully without 22 boilerplate overrides) + * cannot move it toAggBuilder because select(fkCustomerId).from(orders) is valid sql) */ def groupBy( key: Expr[_, Source, Any], @@ -400,7 +402,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail)) ) - def normalize(implicit instance: TrailingUnitNormalizer[ResultType]): Subselect[F, instance.Out, Source, Subsource, Head, Tail] = self.asInstanceOf[Subselect[F, instance.Out, Source, Subsource, Head, Tail]] + def normalize(implicit + instance: TrailingUnitNormalizer[ResultType] + ): Subselect[F, instance.Out, Source, Subsource, Head, Tail] = + self.asInstanceOf[Subselect[F, instance.Out, Source, Subsource, Head, Tail]] override def asTable( name: TableName diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 5ad125617..19f20e4e8 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -204,8 +204,9 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => new Table.JoinBuilder[self.TableType, That](JoinType.RightOuter, self, that) final val subselect: SubselectPartiallyApplied[TableType] = new SubselectPartiallyApplied[TableType] - - def columns(implicit i: TrailingUnitNormalizer[columnSet.ColumnsRepr[TableType]]): i.Out = i.apply(columnSet.makeColumns[TableType](columnToExpr)) + + def columns(implicit i: TrailingUnitNormalizer[columnSet.ColumnsRepr[TableType]]): i.Out = + i.apply(columnSet.makeColumns[TableType](columnToExpr)) val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 5971f0518..2cc4fadc7 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -53,73 +53,12 @@ object Example1 extends Sql { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - // val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns val (orderId, fkCustomerId, orderDate) = orders.columns - // Selection[Features.Union[Features.Union[Features.Source[String("id")],Features.Source[String("customer_id")]],Features.Source[String("order_date")]], - // orders.TableType, - // SelectionSet.Cons[orders.TableType,UUID,SelectionSet.Cons[orders.TableType,UUID,SelectionSet.Cons[orders.TableType,LocalDate,SelectionSet.Empty]]]] - val xxxx = orderId ++ fkCustomerId ++ orderDate - val query = select(fkCustomerId ++ Count(orderId)) .from(orders) .groupBy(fkCustomerId, orderDate) - //TODO remove - just to test group by / having - def test[F, A, B](expr: Expr[F, A, B])(implicit in: Features.IsPartiallyAggregated[F]): in.Unaggregated = ??? - def test2[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit - in: Features.IsPartiallyAggregated[F] - ): in.Unaggregated = ??? - - //HAVING OK - - // select(fkCustomerId) - // .from(orders) - // .groupBy(fkCustomerId) - // .having(Count(orderId) > 4) - - // select(Count(orderId)) - // .from(orders) - // .having(Count(orderId) > 26) - - // select(Count(orderId)) - // .from(orders) - // .groupBy(fkCustomerId) - // .having(Count(orderId) > 4) - - // select(Count(id), customerId) - // .from(orders) - // .groupBy(fkCustomerId) - // .having(Count(orderId) > 4) - - //HAVING FAIL - - // select(fkCustomerId) - // .from(orders) - // .having(Count(orderId) > 4) - - //RESTRICTIONS - // 1. Having needs to be aggregated - // 2. fully agregated expr do not need Group By - - type Value[_] - - sealed trait SomeTypeclass[F] - - object SomeTypeclass { - //instances - } - - def test(values: Value[_]*) = ??? - - def test[F1: SomeTypeclass](value1: Value[F1]) = ??? - def test[F1: SomeTypeclass, F2: SomeTypeclass](value1: Value[F1], value2: Value[F2]) = ??? - def test[F1: SomeTypeclass, F2: SomeTypeclass, F3: SomeTypeclass]( - value1: Value[F1], - value2: Value[F2], - value3: Value[F3] - ) = ??? - - def test3[Out](read: Read[Out])(implicit in: TrailingUnitNormalizer[Out]): in.Out = ??? - + val e = select(Count(orderId) ++ Count(orderId)) + .from(orders) } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index f82e6ec3f..7603ee725 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -110,7 +110,7 @@ trait JdbcInternalModule { self: Jdbc => private[sql] def getColumns(read: Read[_]): Vector[TypeTag[_]] = read match { - case Read.Mapped(read, _) => getColumns(read) + case Read.Mapped(read, _) => getColumns(read) case Read.Subselect(selection, _, _, _, _, _, _, _) => selection.value.selectionsUntyped.toVector.map(_.asInstanceOf[ColumnSelection[_, _]]).map { case t @ ColumnSelection.Constant(_, _) => t.typeTag @@ -120,7 +120,7 @@ trait JdbcInternalModule { self: Jdbc => case v @ Read.Literal(_) => scala.collection.immutable.Vector(v.typeTag) } - private[sql] def unsafeExtractRow[A]( + private[sql] def unsafeExtractRow[A]( resultSet: ResultSet, schema: Vector[(TypeTag[_], Int)] ): Either[DecodingError, A] = { @@ -135,7 +135,7 @@ trait JdbcInternalModule { self: Jdbc => case Right(v) => Right(v :: vs) } } - .map { + .map { case List(a) => (a) case List(a, b) => (a, b) case List(a, b, c) => (a, b, c) diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index f68da00d1..31aa31ddc 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -51,7 +51,7 @@ trait SqlDriverLiveModule { self: Jdbc => .managed(pool.connection) .flatMap(readOn(read, _)) - override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = + override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = Stream.unwrap { blocking.effectBlocking { val schema = getColumns(read).zipWithIndex.map { case (value, index) => diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala index a2c7a7294..137ec36ac 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala @@ -55,10 +55,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query).map { case row => - Customer(row._1, row._2, row._3, row._4) - } + val testResult = execute(query).map { case row => + Customer(row._1, row._2, row._3, row._4) + } val assertion = for { r <- testResult.runCollect @@ -84,10 +83,9 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) ) - val testResult = execute( - query).map { case row => - Customer(row._1, row._2, row._3, row._4, row._5) - } + val testResult = execute(query).map { case row => + Customer(row._1, row._2, row._3, row._4, row._5) + } val assertion = for { r <- testResult.runCollect @@ -113,8 +111,8 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val testResult = execute(query).map { case row => - Customer(row._1, row._2, row._3, row._4) - } + Customer(row._1, row._2, row._3, row._4) + } val assertion = for { r <- testResult.runCollect @@ -154,8 +152,8 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { ) val result = execute(query).map { case row => - Row(row._1, row._2, row._3) - } + Row(row._1, row._2, row._3) + } val assertion = for { r <- result.runCollect diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 682c70f50..3005c065b 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -132,7 +132,7 @@ trait OracleModule extends Jdbc { self => def buildReadString(read: self.Read[_], builder: StringBuilder): Unit = read match { case Read.Mapped(read, _) => buildReadString(read, builder) - + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 7bc8d5b4e..94d401b4f 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -672,7 +672,7 @@ trait PostgresModule extends Jdbc { self => private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { case Read.Mapped(read, _) => renderReadImpl(read) - + case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 5a569c4d5..8a02b8d62 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -954,8 +954,8 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { ) val testResult = execute(query).map { case (id, fname, lname, verified, dob) => - Customer(id, fname, lname, verified, dob) - } + Customer(id, fname, lname, verified, dob) + } val assertion = for { r <- testResult.runCollect diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 7840039cc..893940ba6 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -37,8 +37,8 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) val testResult = execute(query).map { case row => - Customer(row._1, row._2, row._3, row._4, row._5) - } + Customer(row._1, row._2, row._3, row._4, row._5) + } val assertion = for { r <- testResult.runCollect @@ -88,8 +88,8 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) val testResult = execute(query).map { case row => - Customer(row._1, row._2, row._3, row._4) - } + Customer(row._1, row._2, row._3, row._4) + } val assertion = for { r <- testResult.runCollect @@ -297,8 +297,8 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) val result = execute(query).map { case row => - Row(row._1, row._2, row._3) - } + Row(row._1, row._2, row._3) + } val assertion = for { r <- result.runCollect @@ -320,8 +320,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ) ) - val testResult = execute(query).map { case (uuid, firstName, lastName, dob) => Customer(uuid, firstName, lastName, dob) } - + val testResult = execute(query).map { case (uuid, firstName, lastName, dob) => + Customer(uuid, firstName, lastName, dob) + } val assertion = for { r <- testResult.runCollect diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index 48af9fc2b..87076a384 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -64,7 +64,7 @@ trait ShopSchema extends Jdbc { self => select(orderDetailsOrderId ++ orderDetailsProductId ++ unitPrice).from(orderDetails).asTable("derived") val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns - val orderDateDerivedTable = customers + val orderDateDerivedTable = customers .subselect(orderDate) .from(orders) .limit(1) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 60b389e33..c9fcdfe76 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -34,8 +34,8 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val testResult = execute(query).map { row => - Customer(row._1, row._2, row._3, row._4, row._5) - } + Customer(row._1, row._2, row._3, row._4, row._5) + } val assertion = for { r <- testResult.runCollect @@ -85,8 +85,8 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val testResult = execute(query).map { case row => - Customer(row._1, row._2, row._3, row._4) - } + Customer(row._1, row._2, row._3, row._4) + } val assertion = for { r <- testResult.runCollect @@ -134,8 +134,8 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val testResult = execute(query).map { case row => - Customer(row._1, row._2, row._3, row._4) - } + Customer(row._1, row._2, row._3, row._4) + } val assertion = for { r <- testResult.runCollect @@ -180,8 +180,8 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) val result = execute(query).map { case row => - Row(row._1, row._2, row._3) - } + Row(row._1, row._2, row._3) + } val assertion = for { r <- result.runCollect @@ -323,8 +323,8 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val result = execute(query).map { case row => - Row(row._1, row._2, row._3) - } + Row(row._1, row._2, row._3) + } val assertion = for { r <- result.runCollect @@ -368,8 +368,8 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { .orderBy(Ordering.Desc(orderDateDerived)) val result = execute(query).map { case row => - Row(row._1, row._2, row._3, row._4) - } + Row(row._1, row._2, row._3, row._4) + } val assertion = for { r <- result.runCollect @@ -397,7 +397,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) val result = execute(query).map { case row => - CustomerAndDateRow(row._1, row._2, row._3) + CustomerAndDateRow(row._1, row._2, row._3) } val assertion = for { @@ -416,7 +416,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) val result = execute(query).map { case row => - CustomerAndDateRow(row._1, row._2, row._3) + CustomerAndDateRow(row._1, row._2, row._3) } val assertion = for { @@ -435,7 +435,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) val result = execute(query).map { case row => - CustomerAndDateRow(row._1, row._2, row._3) + CustomerAndDateRow(row._1, row._2, row._3) } val assertion = for { @@ -454,7 +454,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { val query = select(fName ++ lName ++ orderDateDerived).from(customers.outerApply(subquery)) val result = execute(query).map { case row => - CustomerAndDateRow(row._1, row._2, row._3) + CustomerAndDateRow(row._1, row._2, row._3) } val assertion = for { @@ -497,7 +497,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { ) val result = execute(query).map { case row => - Row(row._1, row._2, row._3) + Row(row._1, row._2, row._3) } val assertion = for { From 2e2c1f90986dcf6178246cf3aae5aae03aa09e57 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 7 Feb 2022 16:10:34 +0100 Subject: [PATCH 347/673] simplified utils module --- core/jvm/src/main/scala/zio/sql/utils.scala | 154 ++++++-------------- 1 file changed, 44 insertions(+), 110 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/utils.scala b/core/jvm/src/main/scala/zio/sql/utils.scala index 15263b453..c5723fe67 100644 --- a/core/jvm/src/main/scala/zio/sql/utils.scala +++ b/core/jvm/src/main/scala/zio/sql/utils.scala @@ -12,223 +12,157 @@ trait UtilsModule { self => type Out = Out0 } // format: off - //ev needs to be reversed because scala 2.12 cannot prove In =:= (A, Unit), therefore asInstanceOf - implicit def arity1[In, A](implicit ev: (A, Unit) =:= In) : TrailingUnitNormalizer.WithOut[In, A] = new TrailingUnitNormalizer[In] { + implicit def arity1[In, A]: TrailingUnitNormalizer.WithOut[(A, Unit), A] = new TrailingUnitNormalizer[(A, Unit)] { override type Out = A - override def apply(in0: In): A = { - val in = in0.asInstanceOf[(A, Unit)] - + override def apply(in: (A, Unit)): A = in._1 - } } - implicit def arity2[In, A, B](implicit ev: (A, (B, Unit)) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B)] = new TrailingUnitNormalizer[In] { + implicit def arity2[In, A, B]: TrailingUnitNormalizer.WithOut[(A, (B, Unit)), (A, B)] = new TrailingUnitNormalizer[(A, (B, Unit))] { override type Out = (A, B) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, Unit))] - + override def apply(in: (A, (B, Unit))): Out = (in._1, in._2._1) - } } - implicit def arity3[In, A, B, C](implicit ev: (A, (B, (C, Unit))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C)] = new TrailingUnitNormalizer[In] { + implicit def arity3[In, A, B, C]: TrailingUnitNormalizer.WithOut[(A, (B, (C, Unit))), (A, B, C)] = new TrailingUnitNormalizer[(A, (B, (C, Unit)))] { override type Out = (A, B, C) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, Unit)))] - + override def apply(in: (A, (B, (C, Unit))) ): Out = (in._1, in._2._1, in._2._2._1) - } } - implicit def arity4[In, A, B, C, D](implicit ev: (A, (B, (C, (D, Unit)))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D)] = new TrailingUnitNormalizer[In] { + implicit def arity4[In, A, B, C, D]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, Unit)))), (A, B, C, D)] = new TrailingUnitNormalizer[(A, (B, (C, (D, Unit))))] { override type Out = (A, B, C, D) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, Unit))))] - + override def apply(in: (A, (B, (C, (D, Unit))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1) - } } - implicit def arity5[In, A, B, C, D, E](implicit ev: (A, (B, (C, (D, (E, Unit))))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E)] = new TrailingUnitNormalizer[In] { + implicit def arity5[In, A, B, C, D, E]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, Unit))))), (A, B, C, D, E)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, Unit)))))] { override type Out = (A, B, C, D, E) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, Unit)))))] - + override def apply(in: (A, (B, (C, (D, (E, Unit)))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1) - } } - implicit def arity6[In, A, B, C, D, E, F](implicit ev: (A, (B, (C, (D, (E, (F, Unit)))))) =:= In) : TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F)] = new TrailingUnitNormalizer[In] { + implicit def arity6[In, A, B, C, D, E, F]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, Unit)))))), (A, B, C, D, E, F)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, Unit))))))] { override type Out = (A, B, C, D, E, F) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, Unit))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, Unit))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1) - } } - implicit def arity7[In, A, B, C, D, E, F, G](implicit ev: (A, (B, (C, (D, (E, (F, (G, Unit))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G)] = new TrailingUnitNormalizer[In] { + implicit def arity7[In, A, B, C, D, E, F, G]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, Unit))))))), (A, B, C, D, E, F, G)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, Unit)))))))] { override type Out = (A, B, C, D, E, F, G) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, Unit)))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, Unit)))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1) - } } - implicit def arity8[In, A, B, C, D, E, F, G, H](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H)] = new TrailingUnitNormalizer[In] { + implicit def arity8[In, A, B, C, D, E, F, G, H]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, Unit)))))))), (A, B, C, D, E, F, G, H)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))] { override type Out = (A, B, C, D, E, F, G, H) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, Unit))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1) - } } - implicit def arity9[In, A, B, C, D, E, F, G, H, I](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I)] = new TrailingUnitNormalizer[In] { + implicit def arity9[In, A, B, C, D, E, F, G, H, I]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, Unit))))))))), (A, B, C, D, E, F, G, H, I)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, Unit)))))))))] { override type Out = (A, B, C, D, E, F, G, H, I) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, Unit)))))))))] + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, Unit)))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1) - } } - implicit def arity10[In, A, B, C, D, E, F, G, H, I, J](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit)))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J)] = new TrailingUnitNormalizer[In] { + implicit def arity10[In, A, B, C, D, E, F, G, H, I, J]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit)))))))))), (A, B, C, D, E, F, G, H, I, J)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, Unit))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity11[In, A, B, C, D, E, F, G, H, I, J, K](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K)] = new TrailingUnitNormalizer[In] { + implicit def arity11[In, A, B, C, D, E, F, G, H, I, J, K]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit))))))))))), (A, B, C, D, E, F, G, H, I, J, K)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit)))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit)))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, Unit)))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity12[In, A, B, C, D, E, F, G, H, I, J, K, L](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L)] = new TrailingUnitNormalizer[In] { + implicit def arity12[In, A, B, C, D, E, F, G, H, I, J, K, L]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit)))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, Unit))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity13[In, A, B, C, D, E, F, G, H, I, J, K, L, M](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M)] = new TrailingUnitNormalizer[In] { + implicit def arity13[In, A, B, C, D, E, F, G, H, I, J, K, L, M]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit)))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit)))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, Unit)))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity14[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new TrailingUnitNormalizer[In] { + implicit def arity14[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit)))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, Unit))))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity15[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new TrailingUnitNormalizer[In] { + implicit def arity15[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit)))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit)))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, Unit)))))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity16[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new TrailingUnitNormalizer[In] { + implicit def arity16[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit))))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit))))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, Unit)))))))))))))))) ): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity17[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new TrailingUnitNormalizer[In] { + implicit def arity17[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit))))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit)))))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit)))))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, Unit)))))))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity18[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit)))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new TrailingUnitNormalizer[In] { + implicit def arity18[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit)))))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, Unit))))))))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity19[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new TrailingUnitNormalizer[In] { + implicit def arity19[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit))))))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit)))))))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, Unit))))))))))))))))))) ): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity20[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit)))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new TrailingUnitNormalizer[In] { + implicit def arity20[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit)))))))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, Unit))))))))))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity21[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit))))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new TrailingUnitNormalizer[In] { + implicit def arity21[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit))))))))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit)))))))))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit)))))))))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, Unit)))))))))))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } - implicit def arity22[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](implicit ev: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit)))))))))))))))))))))) =:= In): TrailingUnitNormalizer.WithOut[In, (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new TrailingUnitNormalizer[In] { + implicit def arity22[In, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]: TrailingUnitNormalizer.WithOut[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit)))))))))))))))))))))), (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)] = new TrailingUnitNormalizer[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit))))))))))))))))))))))] { override type Out = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) - override def apply(in0: In): Out = { - val in = in0.asInstanceOf[(A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit))))))))))))))))))))))] - + override def apply(in: (A, (B, (C, (D, (E, (F, (G, (H, (I, (J, (K, (L, (M, (N, (O, (P, (Q, (R, (S, (T, (U, (V, Unit))))))))))))))))))))))): Out = (in._1, in._2._1, in._2._2._1, in._2._2._2._1, in._2._2._2._2._1, in._2._2._2._2._2._1, in._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1, in._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._2._1) - } } // format: on } From 3ca7a667e3f874089573698dc23170e05478067e Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 8 Feb 2022 10:27:17 +0100 Subject: [PATCH 348/673] run scalafix to finish migration --- build.sbt | 72 +++++++++---------- .../scala/zio/sql/ArithmeticOpsSpec.scala | 5 +- .../test/scala/zio/sql/BitwiseOpSpec.scala | 5 +- .../scala/zio/sql/GroupByHavingSpec.scala | 5 +- .../test/scala/zio/sql/LogicalOpsSpec.scala | 5 +- .../test/scala/zio/sql/PredicateOpSpec.scala | 5 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 3 +- .../test/scala/zio-sql/HelloWorldSpec.scala | 3 +- .../scala/zio/sql/TransactionModule.scala | 8 +-- jdbc/src/main/scala/zio/sql/jdbc.scala | 16 ++--- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 20 +++--- .../test/scala/zio/sql/TestContainer.scala | 4 +- .../zio/sql/mysql/MysqlRunnableSpec.scala | 16 ++--- .../test/scala/zio/sql/TestContainer.scala | 4 +- .../sql/postgresql/PostgresRunnableSpec.scala | 12 ++-- .../test/scala/zio/sql/TestContainer.scala | 4 +- .../sql/sqlserver/SqlServerRunnableSpec.scala | 13 ++-- 17 files changed, 94 insertions(+), 106 deletions(-) diff --git a/build.sbt b/build.sbt index ba6823387..81e24d9f7 100644 --- a/build.sbt +++ b/build.sbt @@ -79,12 +79,12 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .settings(buildInfoSettings("zio.sql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -118,9 +118,9 @@ lazy val examples = project publish / skip := true, moduleName := "examples", libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided ) ) @@ -132,11 +132,11 @@ lazy val driver = project .settings(buildInfoSettings("zio.sql.driver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -147,12 +147,12 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -165,10 +165,10 @@ lazy val mysql = project .settings(buildInfoSettings("zio.sql.mysql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, @@ -186,10 +186,10 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, @@ -207,10 +207,10 @@ lazy val postgres = project .settings(buildInfoSettings("zio.sql.postgres")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, @@ -228,10 +228,10 @@ lazy val sqlserver = project .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, diff --git a/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala b/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala index d9a9ff93b..68aeb23bd 100644 --- a/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/ArithmeticOpsSpec.scala @@ -1,9 +1,10 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, DefaultRunnableSpec } +import zio.test.assert +import zio.test.ZIOSpecDefault -object ArithmeticOpsSpec extends DefaultRunnableSpec { +object ArithmeticOpsSpec extends ZIOSpecDefault { import ProductSchema._ def spec = suite("Arithmetic operators")( diff --git a/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala b/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala index a5068081c..97aae4133 100644 --- a/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/BitwiseOpSpec.scala @@ -1,9 +1,10 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, DefaultRunnableSpec } +import zio.test.assert +import zio.test.ZIOSpecDefault -object BitwiseOpSpec extends DefaultRunnableSpec { +object BitwiseOpSpec extends ZIOSpecDefault { import ProductSchema._ def spec = suite("Bitwise operators")( diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 42161483b..38ce7769d 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -1,10 +1,11 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, DefaultRunnableSpec } +import zio.test.assert import zio.schema.Schema +import zio.test.ZIOSpecDefault -object GroupByHavingSpec extends DefaultRunnableSpec { +object GroupByHavingSpec extends ZIOSpecDefault { import AggregatedProductSchema._ diff --git a/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala b/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala index ac9c5d4e3..14bf043d9 100644 --- a/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/LogicalOpsSpec.scala @@ -1,9 +1,10 @@ package zio.sql import zio.test.Assertion.anything -import zio.test.{ assert, DefaultRunnableSpec } +import zio.test.assert +import zio.test.ZIOSpecDefault -class LogicalOpsSpec extends DefaultRunnableSpec { +class LogicalOpsSpec extends ZIOSpecDefault { import ProductSchema._ def spec = suite("Relational operators")( diff --git a/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala b/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala index 9ad907cee..25b90c130 100644 --- a/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/PredicateOpSpec.scala @@ -1,9 +1,10 @@ package zio.sql -import zio.test.{ assert, DefaultRunnableSpec } +import zio.test.assert import zio.test.Assertion.anything +import zio.test.ZIOSpecDefault -object PredicateOpSpec extends DefaultRunnableSpec { +object PredicateOpSpec extends ZIOSpecDefault { import ProductSchema._ def spec = suite("Unary operators")( diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 2815bc2ab..3a153bc16 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -3,6 +3,7 @@ package zio.sql import zio.test._ import zio.test.Assertion._ import zio.schema.Schema +import zio.test.ZIOSpecDefault object TestBasicSelect { val userSql = new Sql { self => @@ -28,7 +29,7 @@ object TestBasicSelect { } } -object TestBasicSelectSpec extends DefaultRunnableSpec { +object TestBasicSelectSpec extends ZIOSpecDefault { import TestBasicSelect.userSql._ def spec = suite("TestBasicSelectSpec")( diff --git a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala index f8cbe93e1..1a58ea7ff 100644 --- a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala +++ b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala @@ -5,6 +5,7 @@ import zio.test._ import zio.test.Assertion._ import HelloWorld._ +import zio.test.ZIOSpecDefault object HelloWorld { @@ -12,7 +13,7 @@ object HelloWorld { Console.printLine("Hello, World!") } -object HelloWorldSpec extends DefaultRunnableSpec { +object HelloWorldSpec extends ZIOSpecDefault { def spec = suite("HelloWorldSpec")( test("sayHello correctly displays output") { diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index ec039c4c5..6a0debbb1 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -24,7 +24,7 @@ trait TransactionModule { self: Jdbc => r <- ZManaged.environment[R] a <- self.unwrap .mapError(ev) - .provideEnvironment(ZEnvironment((r.get, txn))) + .provideService((r.get, txn)) .tapBoth( _ => ZIO @@ -100,11 +100,11 @@ trait TransactionModule { self: Jdbc => def fromEffect[R: ZTag: IsNotIntersection, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = ZTransaction(for { - tuple <- ZManaged.environment[(R, Txn)] - a <- zio.provideEnvironment(ZEnvironment(tuple.get._1)).toManaged + tuple <- ZManaged.service[(R, Txn)] + a <- zio.provideService((tuple._1)).toManaged } yield a) private val txn: ZTransaction[Any, Nothing, Txn] = - ZTransaction(ZManaged.environment[(Any, Txn)].map(_.get._2)) + ZTransaction(ZManaged.service[(Any, Txn)].map(_._2)) } } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 3d8f3d5be..061690a86 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -18,26 +18,20 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi } object SqlDriver { val live: ZLayer[ConnectionPool, Nothing, SqlDriver] = - (for { - pool <- ZIO.service[ConnectionPool] - } yield SqlDriverLive(pool)).toLayer + (SqlDriverLive(_)).toLayer } def execute[R <: SqlDriver: ZTag: IsNotIntersection, A]( tx: ZTransaction[R, Exception, A] ): ZManaged[R, Exception, A] = - ZManaged.environmentWithManaged[R](_.get.transact(tx)) + ZManaged.serviceWithManaged(_.transact(tx)) def execute[A](read: Read[A]): ZStream[SqlDriver, Exception, A] = - ZStream.unwrap(ZIO.environmentWith[SqlDriver](_.get.read(read))) + ZStream.serviceWithStream(_.read(read)) def execute(delete: Delete[_]): ZIO[SqlDriver, Exception, Int] = - ZIO.environmentWithZIO[SqlDriver]( - _.get.delete(delete) - ) + ZIO.serviceWithZIO(_.delete(delete)) def execute[A: Schema](insert: Insert[_, A]): ZIO[SqlDriver, Exception, Int] = - ZIO.environmentWithZIO[SqlDriver]( - _.get.insert(insert) - ) + ZIO.serviceWithZIO[SqlDriver](_.insert(insert)) } diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index b97cf4dc7..45d3a7dd5 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -1,22 +1,20 @@ package zio.sql import zio.test.TestEnvironment -import zio.test.DefaultRunnableSpec import zio.ZLayer -import zio.Clock +import zio.test.ZIOSpecDefault +import zio.test.TestFailure -trait JdbcRunnableSpec extends DefaultRunnableSpec with Jdbc { +trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { type JdbcEnvironment = TestEnvironment with SqlDriver val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] - final lazy val executorLayer = { - val connectionPoolLayer: ZLayer[Clock, Throwable, ConnectionPool] = - (poolConfigLayer ++ Clock.any) >>> ConnectionPool.live - - (connectionPoolLayer >+> SqlDriver.live).orDie - } - - final lazy val jdbcLayer = TestEnvironment.live >>> executorLayer + final lazy val jdbcLayer: ZLayer[TestEnvironment, TestFailure[Any], SqlDriver] = + ZLayer.makeSome[TestEnvironment, SqlDriver]( + poolConfigLayer.orDie, + ConnectionPool.live.orDie, + SqlDriver.live + ) } diff --git a/mysql/src/test/scala/zio/sql/TestContainer.scala b/mysql/src/test/scala/zio/sql/TestContainer.scala index cc20b0a83..babc6c17a 100644 --- a/mysql/src/test/scala/zio/sql/TestContainer.scala +++ b/mysql/src/test/scala/zio/sql/TestContainer.scala @@ -15,7 +15,7 @@ object TestContainer { } }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer - def mysql(imageName: String = "mysql"): ZLayer[Any, Throwable, MySQLContainer] = + def mysql(imageName: String = "mysql"): ZManaged[Any, Throwable, MySQLContainer] = ZManaged.acquireReleaseWith { ZIO.attemptBlocking { val c = new MySQLContainer( @@ -27,6 +27,6 @@ object TestContainer { c.start() c } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer + }(container => ZIO.attemptBlocking(container.stop()).orDie) } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index af7716dc7..b4cbd2de7 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -2,9 +2,9 @@ package zio.sql.mysql import java.util.Properties -import zio.ZEnvironment import zio.sql._ import zio.test._ +import zio.ZLayer trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { @@ -15,19 +15,13 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { props } - val poolConfigLayer = TestContainer + val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = TestContainer .mysql() - .map(a => - ZEnvironment( - ConnectionPoolConfig( - a.get.jdbcUrl, - connProperties(a.get.username, a.get.password) - ) - ) - ) + .map(a => ConnectionPoolConfig(a.jdbcUrl, connProperties(a.username, a.password))) + .toLayer override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = - specLayered.provideCustomShared(jdbcLayer) + specLayered.provideCustomLayerShared(jdbcLayer) def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] diff --git a/postgres/src/test/scala/zio/sql/TestContainer.scala b/postgres/src/test/scala/zio/sql/TestContainer.scala index 3da5e095a..b987548fe 100644 --- a/postgres/src/test/scala/zio/sql/TestContainer.scala +++ b/postgres/src/test/scala/zio/sql/TestContainer.scala @@ -15,7 +15,7 @@ object TestContainer { } }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer - def postgres(imageName: String = "postgres:alpine"): ZLayer[Any, Throwable, PostgreSQLContainer] = + def postgres(imageName: String = "postgres:alpine"): ZManaged[Any, Throwable, PostgreSQLContainer] = ZManaged.acquireReleaseWith { ZIO.attemptBlocking { val c = new PostgreSQLContainer( @@ -29,6 +29,6 @@ object TestContainer { } } { container => ZIO.attemptBlocking(container.stop()).orDie - }.toLayer + } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 506aab178..7ca4eee8f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -3,7 +3,6 @@ package zio.sql.postgresql import zio.test._ import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } -import zio.ZEnvironment trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { @@ -19,14 +18,13 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { val poolConfigLayer = TestContainer .postgres() .map(a => - ZEnvironment( - ConnectionPoolConfig( - url = a.get.jdbcUrl, - properties = connProperties(a.get.username, a.get.password), - autoCommit = autoCommit - ) + ConnectionPoolConfig( + url = a.jdbcUrl, + properties = connProperties(a.username, a.password), + autoCommit = autoCommit ) ) + .toLayer override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomShared(jdbcLayer) diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/TestContainer.scala index ab12f2a84..9c31e789d 100644 --- a/sqlserver/src/test/scala/zio/sql/TestContainer.scala +++ b/sqlserver/src/test/scala/zio/sql/TestContainer.scala @@ -17,7 +17,7 @@ object TestContainer { def postgres( imageName: String = "mcr.microsoft.com/mssql/server:2017-latest" - ): ZLayer[Any, Throwable, MSSQLServerContainer] = + ): ZManaged[Any, Throwable, MSSQLServerContainer] = ZManaged.acquireReleaseWith { ZIO.attemptBlocking { val c = new MSSQLServerContainer( @@ -31,6 +31,6 @@ object TestContainer { } } { container => ZIO.attemptBlocking(container.stop()).orDie - }.toLayer + } } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index 4aff158f0..abcc4a023 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -3,7 +3,6 @@ package zio.sql.sqlserver import zio.test._ import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } -import zio.ZEnvironment trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { @@ -19,18 +18,16 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { val poolConfigLayer = TestContainer .postgres() .map(a => - ZEnvironment( - ConnectionPoolConfig( - url = a.get.jdbcUrl, - properties = connProperties(a.get.username, a.get.password), - autoCommit = autoCommit - ) + ConnectionPoolConfig( + url = a.jdbcUrl, + properties = connProperties(a.username, a.password), + autoCommit = autoCommit ) ) + .toLayer override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(jdbcLayer) def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] - } From b56f17f7509a2102f472078b3564a4a725ad3655 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 8 Feb 2022 10:35:15 +0100 Subject: [PATCH 349/673] removed provided keyword from build.sbt --- build.sbt | 74 +++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/build.sbt b/build.sbt index 9eb6701b1..eb76f0b59 100644 --- a/build.sbt +++ b/build.sbt @@ -79,12 +79,12 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .settings(buildInfoSettings("zio.sql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -118,10 +118,10 @@ lazy val examples = project publish / skip := true, moduleName := "examples", libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion ) ) .dependsOn(sqlserver) @@ -132,11 +132,11 @@ lazy val driver = project .settings(buildInfoSettings("zio.sql.driver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -147,12 +147,12 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -165,10 +165,10 @@ lazy val mysql = project .settings(buildInfoSettings("zio.sql.mysql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, @@ -186,10 +186,10 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, @@ -207,10 +207,10 @@ lazy val postgres = project .settings(buildInfoSettings("zio.sql.postgres")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, @@ -228,10 +228,10 @@ lazy val sqlserver = project .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion % Provided, - "dev.zio" %% "zio-streams" % zioVersion % Provided, - "dev.zio" %% "zio-schema" % zioSchemaVersion % Provided, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Provided, + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, From 43b07d51faa13c2bed29d06f0f0ef6c909463ae6 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Wed, 16 Feb 2022 16:26:41 +0100 Subject: [PATCH 350/673] fixed bug with group by and two columns from different tables having the same name --- core/jvm/src/main/scala/zio/sql/Sql.scala | 12 +- core/jvm/src/main/scala/zio/sql/expr.scala | 4 +- .../jvm/src/main/scala/zio/sql/features.scala | 12 +- core/jvm/src/main/scala/zio/sql/insert.scala | 370 +++++++++--------- core/jvm/src/main/scala/zio/sql/select.scala | 26 +- core/jvm/src/main/scala/zio/sql/table.scala | 25 +- .../zio/sql/postgresql/PostgresModule.scala | 6 +- postgres/src/test/resources/shop_schema.sql | 70 ++++ .../{ShopSchema.scala => DbSchema.scala} | 26 +- .../scala/zio/sql/postgresql/DeleteSpec.scala | 2 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 2 +- .../sql/postgresql/PostgresModuleSpec.scala | 76 +++- .../zio/sql/postgresql/TransactionSpec.scala | 2 +- .../zio/sql/sqlserver/SqlServerModule.scala | 6 +- 14 files changed, 394 insertions(+), 245 deletions(-) rename postgres/src/test/scala/zio/sql/postgresql/{ShopSchema.scala => DbSchema.scala} (73%) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 1cba50b96..de841581b 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -44,12 +44,6 @@ trait Sql def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) - def renderDelete(delete: self.Delete[_]): String - - def renderRead(read: self.Read[_]): String - - def renderUpdate(update: self.Update[_]): String - def insertInto[F, Source, AllColumnIdentities, B <: SelectionSet[Source]]( table: Table.Source.Aux_[Source, AllColumnIdentities] )( @@ -57,5 +51,11 @@ trait Sql ) = InsertBuilder[F, Source, AllColumnIdentities, B, sources.ColsRepr](table, sources) + def renderDelete(delete: self.Delete[_]): String + + def renderRead(read: self.Read[_]): String + + def renderUpdate(update: self.Update[_]): String + def renderInsert[A: Schema](insert: self.Insert[_, A]): String } diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 3d24898f2..5871bca2b 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -138,10 +138,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { override def typeTag: TypeTag[Head] = subselect.selection.value.head.toColumn.typeTag } - sealed case class Source[-A, B, ColumnIdentity] private[sql] ( + sealed case class Source[-A, B, ColumnIdentity, TableType] private[sql] ( tableName: TableName, column: Column.Aux[B, ColumnIdentity] - ) extends InvariantExpr[Features.Source[ColumnIdentity], A, B] { + ) extends InvariantExpr[Features.Source[ColumnIdentity, TableType], A, B] { def typeTag: TypeTag[B] = column.typeTag } diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index c9cb69e54..de36adc3f 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -9,7 +9,7 @@ trait FeaturesModule { object Features { type Aggregated[_] type Union[_, _] - type Source[_] + type Source[ColumnName, TableType] type Literal type Function0 type Derived @@ -19,8 +19,8 @@ trait FeaturesModule { implicit def UnionIsNotAgregated[A: IsNotAggregated, B: IsNotAggregated]: IsNotAggregated[Union[A, B]] = new IsNotAggregated[Union[A, B]] {} - implicit def SourceIsNotAggregated[A]: IsNotAggregated[Source[A]] = - new IsNotAggregated[Source[A]] {} + implicit def SourceIsNotAggregated[ColumnName, TableType]: IsNotAggregated[Source[ColumnName, TableType]] = + new IsNotAggregated[Source[ColumnName, TableType]] {} implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = new IsNotAggregated[Literal] {} @@ -49,7 +49,7 @@ trait FeaturesModule { sealed trait IsSource[A] object IsSource { - implicit def isSource[ColumnIdentity]: IsSource[Source[ColumnIdentity]] = new IsSource[Source[ColumnIdentity]] {} + implicit def isSource[ColumnName, TableType]: IsSource[Source[ColumnName, TableType]] = new IsSource[Source[ColumnName, TableType]] {} } sealed trait IsPartiallyAggregated[A] { @@ -94,8 +94,8 @@ trait FeaturesModule { } trait IsPartiallyAggregatedLowPriorityImplicits { - implicit def SourceIsAggregated[A]: IsPartiallyAggregated.WithRemainder[Features.Source[A], Features.Source[A]] = - new IsPartiallyAggregated[Features.Source[A]] { override type Unaggregated = Features.Source[A] } + implicit def SourceIsAggregated[ColumnName, TableType]: IsPartiallyAggregated.WithRemainder[Features.Source[ColumnName, TableType], Features.Source[ColumnName, TableType]] = + new IsPartiallyAggregated[Features.Source[ColumnName, TableType]] { override type Unaggregated = Features.Source[ColumnName, TableType] } } } } diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 07a2483bc..2ef2f95c0 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -2,8 +2,6 @@ package zio.sql import zio.schema.Schema -//import scala.annotation.implicitNotFound - /** * val data = List( * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Richard', 'Dent, true' 1999-11-02), @@ -22,12 +20,12 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => def values[Z](values: Seq[Z])(implicit schemaCC: Schema[Z], - schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] + schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] ): Insert[Source, Z] = Insert(table, sources.value, values) def values[Z](value: Z)(implicit schemaCC: Schema[Z], - schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] + schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] ): Insert[Source, Z] = Insert(table, sources.value, Seq(value)) } @@ -35,360 +33,356 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => schemaN: Schema[Z] ) - //TODO find a way for more meaningful error messages - sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] + sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] // format: off object SchemaValidity extends SchemaValidityCaseClasses { - implicit def tuple1[F, A1, ColsRepr, AllColumnIdentities, Identity1](implicit + implicit def tuple1[F, A1, ColsRepr, AllColumnIdentities, Source, Identity1](implicit ev1: Schema[A1], ev2: ColsRepr <:< (A1, Unit), - ev3: F <:< Features.Source[Identity1], + ev3: F <:< Features.Source[Identity1, Source], //TODO find other way to check if selection set contains some set of columns from table ev4: AllColumnIdentities =:= Identity1 - ): SchemaValidity[F, A1, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, A1, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Identity1, Identity2](implicit + implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit ev1: Schema[(A1, A2)], ev2: ColsRepr <:< (A1, (A2, Unit)), - ev3: F <:< Features.Union[Features.Source[Identity1], Features.Source[Identity2]], + ev3: F <:< Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 - ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple3[F, A1, A2, A3, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3](implicit + implicit def tuple3[F, A1, A2, A3, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3](implicit ev1: Schema[(A1, A2, A3)], ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), - ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], + ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 - ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple4[F, A1, A2, A3, A4, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4](implicit + implicit def tuple4[F, A1, A2, A3, A4, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4](implicit ev1: Schema[(A1, A2, A3, A4)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 - ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple5[F, A1, A2, A3, A4, A5, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5] + implicit def tuple5[F, A1, A2, A3, A4, A5, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5] (implicit ev1: Schema[(A1, A2, A3, A4, A5)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 - ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple6[F, A1, A2, A3, A4, A5, A6, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] + implicit def tuple6[F, A1, A2, A3, A4, A5, A6, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] + implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] + implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] + implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] + implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] + implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] + implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] + implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] + implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] + implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] + implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] + implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] + implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] + implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] + implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] + implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] {} - implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] + implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)], ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] {} } - trait SchemaValidityCaseClasses { - - implicit def caseClass1[F, A, Z, ColsRepr, AllColumnIdentities, Identity1](implicit + implicit def caseClass1[F, A, Z, ColsRepr, AllColumnIdentities, Source, Identity1](implicit ccSchema: Schema.CaseClass1[A, Z], ev: ColsRepr <:< (A, Unit), - ev2: F <:< Features.Source[Identity1], + ev2: F <:< Features.Source[Identity1, Source], ev3: AllColumnIdentities =:= Identity1 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2](implicit + implicit def caseClass2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit ccSchema: Schema.CaseClass2[A1, A2, Z], ev: ColsRepr <:< (A1, (A2, Unit)), - ev2: F <:< :||:[Features.Source[Identity1], Features.Source[Identity2]], + ev2: F <:< :||:[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3](implicit + implicit def caseClass3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3](implicit ccSchema: Schema.CaseClass3[A1, A2, A3, Z], ev: ColsRepr <:< (A1, (A2, (A3, Unit))), - ev2: F <:< Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ev2: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4](implicit + implicit def caseClass4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4](implicit ccSchema: Schema.CaseClass4[A1, A2, A3, A4, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5](implicit + implicit def caseClass5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5](implicit ccSchema: Schema.CaseClass5[A1, A2, A3, A4, A5, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6](implicit + implicit def caseClass6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6](implicit ccSchema: Schema.CaseClass6[A1, A2, A3, A4, A5, A6, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7](implicit + implicit def caseClass7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7](implicit ccSchema: Schema.CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8](implicit + implicit def caseClass8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8](implicit ccSchema: Schema.CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9](implicit + implicit def caseClass9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9](implicit ccSchema: Schema.CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10](implicit + implicit def caseClass10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10](implicit ccSchema: Schema.CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} - + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11](implicit + implicit def caseClass11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11](implicit ccSchema: Schema.CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12](implicit + implicit def caseClass12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12](implicit ccSchema: Schema.CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13](implicit + implicit def caseClass13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13](implicit ccSchema: Schema.CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14](implicit + implicit def caseClass14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14](implicit ccSchema: Schema.CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15](implicit + implicit def caseClass15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15](implicit ccSchema: Schema.CaseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z], ev: ColsRepr <:< ( A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit)))))))))))))) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16]( + implicit def caseClass16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16]( implicit ccSchema: Schema.CaseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z], ev: ColsRepr <:< ( A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit))))))))))))))) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17]( + implicit def caseClass17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17]( implicit ccSchema: Schema.CaseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z], ev: ColsRepr <:< ( A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit)))))))))))))))) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} implicit def caseClass18[ - F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18 + F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18 ](implicit ccSchema: Schema.CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z], ev: ColsRepr <:< ( @@ -398,13 +392,13 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))) ) ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} implicit def caseClass19[ - F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19 + F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19 ](implicit ccSchema: Schema.CaseClass19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z], ev: ColsRepr <:< ( @@ -420,13 +414,13 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} implicit def caseClass20[ - F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20 + F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20 ](implicit ccSchema: Schema.CaseClass20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z], ev: ColsRepr <:< ( @@ -448,12 +442,12 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21 + implicit def caseClass21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21 ](implicit ccSchema: Schema.CaseClass21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z], ev: ColsRepr <:< ( @@ -478,12 +472,12 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - implicit def caseClass22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z, ColsRepr, AllColumnIdentities, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22 + implicit def caseClass22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22 ](implicit ccSchema: Schema.CaseClass22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z], ev: ColsRepr <:< ( @@ -514,10 +508,10 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => ) ) ), - ev2: F =:= Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1], Features.Source[Identity2]], Features.Source[Identity3]], Features.Source[Identity4]], Features.Source[Identity5]], Features.Source[Identity6]], Features.Source[Identity7]], Features.Source[Identity8]], Features.Source[Identity9]], Features.Source[Identity10]], Features.Source[Identity11]], Features.Source[Identity12]], Features.Source[Identity13]], Features.Source[Identity14]], Features.Source[Identity15]], Features.Source[Identity16]], Features.Source[Identity17]], Features.Source[Identity18]], Features.Source[Identity19]], Features.Source[Identity20]], Features.Source[Identity21]], Features.Source[Identity22]], + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] {} + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} } // format: on } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 20a902a9c..f274e45fd 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -354,16 +354,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => limit: Option[Long] = None ) extends Read[Repr] { self => - /** - * The follwing expr would not compile in where clause with F2: Features.IsNotAggregated - * - * List(minStationsQuery, maxStationsQuery) - * .flatten - * .reduceLeftOption[Expr[_, metroLine.TableType, Boolean]](_ && _) - * .get - * - * TODO try to make phantom type F2 composable - */ + //TODO add F2: Features.IsNotAggregated constraint when https://github.com/zio/zio-sql/issues/583 is fixed def where[F2]( whereExpr2: Expr[F2, Source, Boolean] ): Subselect[F, Repr, Source, Subsource, Head, Tail] = @@ -383,7 +374,15 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => * TODO find a way to make following not compile -> fkCustomerId need to be `groupped by` * select(fkCustomerId) * .from(orders) - * .having(Count(orderId) > 4) + * .having(Count(fkCustomerId) > 4) + * + * VALID + select customer_id + from orders + group by customer_id + having Count(order_date) > 4 + + can having exist without group by ?? -> only when selection contains full aggregagation - lets require F: IsFullyAggregated here and move having app to AggBuilder somehow */ def having[F2: Features.IsFullyAggregated]( havingExpr2: Expr[F2, Source, Boolean] @@ -391,8 +390,9 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => copy(havingExpr = self.havingExpr && havingExpr2) /** - * TODO restrict _ : IsNotAggregated (hopefully without 22 boilerplate overrides) - * cannot move it toAggBuilder because select(fkCustomerId).from(orders) is valid sql) + * TODO restrict _ : Features.IsSource + * allow only `select customer_id from orders group by customer_id` + * cannot move it to AggBuilder because select(fkCustomerId).from(orders) is valid sql (AggBuilder handles cases where selection contains mix of aggregated and non aggregated columns) */ def groupBy( key: Expr[_, Source, Any], diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 19f20e4e8..caa16f699 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -58,7 +58,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => sealed case class Cons[A, B <: ColumnSet, HeadIdentity](head: Column.Aux[A, HeadIdentity], tail: B) extends ColumnSet { self => - override type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, A], tail.ColumnsRepr[T]) + override type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, A], tail.ColumnsRepr[T]) override type Append[That <: ColumnSet] = Cons[A, tail.Append[That], HeadIdentity] @@ -74,7 +74,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => ev: B <:< ColumnSet.Empty, typeTagA: TypeTag.NotNull[A] ): ColumnSet.Cons[HeadType, B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType], self.tail.ColumnsRepr[T]) + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, HeadType], self.tail.ColumnsRepr[T]) type Append[That <: ColumnSet] = Cons[HeadType, self.tail.Append[That], HeadIdentity] type AllColumnIdentities = HeadIdentity with self.tail.AllColumnIdentities } = columnSetAspect.applyCons(self) @@ -93,7 +93,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr, HeadIdentity] = self override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr.Source[TableType, A, column.Identity] = Expr.Source(name0, column) + def toExpr[A](column: Column[A]): Expr.Source[TableType, A, column.Identity, TableType] = Expr.Source(name0, column) } } @@ -178,7 +178,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => } trait ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity], TableType, A] + def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity, TableType], TableType, A] } sealed trait Table { self => @@ -216,6 +216,9 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => object Table { class JoinBuilder[A, B](joinType: JoinType, left: Table.Aux[A], right: Table.Aux[B]) { + // TODO on(expr1 == expr2) yields false, which may be surprising + // https://github.com/zio/zio-sql/issues/587 + // idea -> restrict F so its union or anything just not literal def on[F](expr: Expr[F, A with B, Boolean]): Table.Aux[A with B] = Joined(joinType, left, right, expr) } @@ -274,11 +277,11 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = if (left.columnSet.contains(column)) - left.columnToExpr.toExpr(column) + left.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] else - right.columnToExpr.toExpr(column) + right.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] } } @@ -292,7 +295,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = read.columnSet override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity], TableType, A] = + def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity, TableType], TableType, A] = Expr.Source(name, column) } } @@ -332,7 +335,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => def applyCons[B <: ColumnSet, HeadIdentity]( columnSet: ColumnSet.Cons[A, B, HeadIdentity] ): ColumnSet.Cons[HeadType, B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, HeadType], columnSet.tail.ColumnsRepr[T]) + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, HeadType], columnSet.tail.ColumnsRepr[T]) type Append[That <: ColumnSet] = ColumnSet.Cons[HeadType, columnSet.tail.Append[That], HeadIdentity] type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities } @@ -351,7 +354,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => def applyCons[B <: ColumnSet, HeadIdentity]( columnSet: ColumnSet.Cons[A, B, HeadIdentity] ): ColumnSet.Cons[Option[A], B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, Option[A]], columnSet.tail.ColumnsRepr[T]) + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, Option[A]], columnSet.tail.ColumnsRepr[T]) type Append[That <: ColumnSet] = ColumnSet.Cons[Option[A], columnSet.tail.Append[That], HeadIdentity] type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities } = { @@ -361,7 +364,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => .Cons(head, columnSet.tail) .asInstanceOf[ ColumnSet.Cons[Option[A], B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity], T, Option[A]], columnSet.tail.ColumnsRepr[T]) + type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, Option[A]], columnSet.tail.ColumnsRepr[T]) type Append[That <: ColumnSet] = ColumnSet.Cons[Option[A], columnSet.tail.Append[That], HeadIdentity] type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 94d401b4f..deb8c8f8d 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -51,11 +51,11 @@ trait PostgresModule extends Jdbc { self => left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = if (left.columnSet.contains(column)) - left.columnToExpr.toExpr(column) + left.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] else - right.columnToExpr.toExpr(column) + right.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] } } diff --git a/postgres/src/test/resources/shop_schema.sql b/postgres/src/test/resources/shop_schema.sql index c65f6ccda..23cbfca2c 100644 --- a/postgres/src/test/resources/shop_schema.sql +++ b/postgres/src/test/resources/shop_schema.sql @@ -47,6 +47,36 @@ create table persons dob date ); +CREATE TABLE city( + id SERIAL, + name VARCHAR NOT NULL, + population INTEGER NOT NULL, + area FLOAT NOT NULL, + link VARCHAR +); +ALTER TABLE city ADD CONSTRAINT city_id PRIMARY KEY(id); + +CREATE TABLE metro_system( + id SERIAL, + city_id INTEGER NOT NULL, + name VARCHAR NOT NULL, + daily_ridership INTEGER NOT NULL +); +ALTER TABLE metro_system ADD CONSTRAINT metro_system_id PRIMARY KEY(id); +ALTER TABLE metro_system ADD CONSTRAINT metro_system_city_fk + FOREIGN KEY(city_id) REFERENCES city(id) ON DELETE CASCADE ON UPDATE CASCADE; + +CREATE TABLE metro_line( + id SERIAL, + system_id INTEGER NOT NULl, + name VARCHAR NOT NULL, + station_count INTEGER NOT NULL, + track_type INT NOT NULL +); +ALTER TABLE metro_line ADD CONSTRAINT metro_line_id PRIMARY KEY(id); +ALTER TABLE metro_line ADD CONSTRAINT metro_line_system_fk + FOREIGN KEY(system_id) REFERENCES metro_system(id) ON DELETE CASCADE ON UPDATE CASCADE; + insert into customers (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) values @@ -208,3 +238,43 @@ values ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); + +INSERT INTO city(id, name, population, area, link) VALUES + (1, 'Warszawa', 1748916, 517.24, 'http://www.um.warszawa.pl/en'), + (2, 'Paris', 2243833, 105.4, 'http://paris.fr'), + (3, 'Chongqing', 49165500, 82403, NULL) RETURNING id; + +ALTER SEQUENCE city_id_seq RESTART WITH 4; + +INSERT INTO metro_system(id, city_id, name, daily_ridership) VALUES + (10, 1, 'Metro Warszawskie', 568000), + (20, 2, 'Métro de Paris', 4160000), + (30, 3, 'Chongqing Metro', 1730000); + +ALTER SEQUENCE metro_system_id_seq RESTART WITH 40; + +INSERT INTO metro_line(id, system_id, name, station_count, track_type) VALUES + (100, 10, 'M1', 21, 1), + (101, 10, 'M2', 7, 1), + (200, 20, '1', 25, 3), + (201, 20, '2', 25, 1), + (202, 20, '3', 25, 1), + (203, 20, '3bis', 4, 1), + (204, 20, '4', 27, 3), + (205, 20, '5', 22, 1), + (206, 20, '6', 28, 3), + (207, 20, '7', 38, 1), + (208, 20, '7bis', 8, 1), + (209, 20, '8', 38, 1), + (210, 20, '9', 37, 1), + (211, 20, '10', 23, 1), + (212, 20, '11', 13, 3), + (213, 20, '12', 29, 1), + (214, 20, '13', 32, 1), + (215, 20, '14', 9, 3), + (300, 30, '1', 23, 1), + (301, 30, '2', 25, 2), + (302, 30, '3', 45, 2), + (303, 30, '6', 33, 1); + +ALTER SEQUENCE metro_line_id_seq RESTART WITH 400; \ No newline at end of file diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala similarity index 73% rename from postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala rename to postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala index 87076a384..de0fde5d0 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala @@ -2,11 +2,10 @@ package zio.sql.postgresql import zio.sql.Jdbc -trait ShopSchema extends Jdbc { self => +trait DbSchema extends Jdbc { self => import self.ColumnSet._ object Persons { - import ColumnSetAspect._ val persons = @@ -27,6 +26,7 @@ trait ShopSchema extends Jdbc { self => val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = customers.columns } + object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") @@ -74,4 +74,24 @@ trait ShopSchema extends Jdbc { self => val orderDateDerived = orderDateDerivedTable.columns } -} + + object Cities { + case class CityId(id: Int) + case class City(cityId: CityId, name: String, population: Int, area: Float, link: Option[String]) + + import ColumnSet._ + + val city = (int("id") ++ string("name") ++ + int("population") ++ float("area") ++ string("link")).table("city") + + val (cityId, cityName, population, area, link) = city.columns + + val metroSystem = (int("id") ++ int("city_id") ++ string("name") ++ int("daily_ridership")).table("metro_system") + + val (metroSystemId, cityIdFk, metroSystemName, dailyRidership) = metroSystem.columns + + val metroLine = (int("id") ++ int("system_id") ++ string("name") ++ int("station_count") ++ int("track_type")).table("metro_line") + + val (metroLineId, systemId, metroLineName, stationCount, trackType) = metroLine.columns + } +} \ No newline at end of file diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index f55160b9b..acc77ec32 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -4,7 +4,7 @@ import zio.Cause import zio.test.Assertion._ import zio.test._ -object DeleteSpec extends PostgresRunnableSpec with ShopSchema { +object DeleteSpec extends PostgresRunnableSpec with DbSchema { import Customers._ diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 8a02b8d62..03749ff20 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -11,7 +11,7 @@ import zio.test._ import zio.test.TestAspect.{ ignore, timeout } import zio.duration._ -object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { +object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { import Customers._ import FunctionDef.{ CharLength => _, _ } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 893940ba6..da7f368f6 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -2,7 +2,7 @@ package zio.sql.postgresql import zio._ import zio.test.Assertion._ -import zio.test.TestAspect.sequential +import zio.test.TestAspect._ import zio.test._ import java.time._ @@ -11,7 +11,7 @@ import scala.language.postfixOps import zio.schema.Schema import java.time.format.DateTimeFormatter -object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { +object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { import AggregationDef._ import Customers._ @@ -609,16 +609,41 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { val query = select(fName ++ lName ++ dob) .from(persons) + final case class Person(id: UUID, firstName: String, lastName: String, dateOfBirth: Option[LocalDate]) + + implicit val localDateSchema = Schema.option[LocalDate]( + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) + ) + + implicit val personSchema = Schema.CaseClass4[UUID, String, String, Option[LocalDate], Person]( + Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("dateOfBirth", localDateSchema), + Person.apply, + _.id, + _.firstName, + _.lastName, + _.dateOfBirth + ) + + val personValue = Person(UUID.randomUUID(), "Charles", "Harvey", None) + val insertSome = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Charles", "Dent", Option(LocalDate.of(2022, 1, 31)))) - // TODO improve on inserting nulls - // we don't allow inserting null on non nullable columns -> There is no schema or dynamic value for nulls + .values((UUID.randomUUID(), "Charles", "Dent", Option(LocalDate.of(2022, 1, 31)))) + + // TODO improve + // https://github.com/zio/zio-sql/issues/585 val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Martin", "Harvey", Option(null.asInstanceOf[java.time.LocalDate]))) + .values((UUID.randomUUID(), "Martin", "Harvey", None.asInstanceOf[Option[LocalDate]])) + + val insertNone2 = insertInto(persons)(personId ++ fName ++ lName ++ dob) + .values(personValue) val result = for { _ <- execute(insertSome) _ <- execute(insertNone) + _ <- execute(insertNone2) persons <- execute(query).runCollect } yield (persons.toList) @@ -629,9 +654,46 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { ("Alana", "Murray", Some(LocalDate.of(1995, 11, 12))), ("Jose", null, None), ("Charles", "Dent", Some(LocalDate.of(2022, 1, 31))), - ("Martin", "Harvey", None) + ("Martin", "Harvey", None), + ("Charles", "Harvey", None) ) + assertM(result)(equalTo(expected)) + }, + testM("in joined tables, columns of the same name from different table are treated as different columns") { + import Cities._ + import Ordering._ + + /** + * SELECT ms.name, c.name, COUNT(ml.id) as line_count + * FROM metro_line as ml + * JOIN metro_system as ms on ml.system_id = ms.id + * JOIN city AS c ON ms.city_id = c.id + * GROUP BY ms.name, c.name + * ORDER BY line_count DESC + */ + val lineCount = (Count(metroLineId) as "line_count") + + val complexQuery = select(metroSystemName ++ cityName ++ lineCount) + .from( + metroLine + .join(metroSystem) + .on(metroSystemId === systemId) + .join(city) + .on(cityIdFk === cityId) + ) + .groupBy(metroSystemName, cityName) + .orderBy(Desc(lineCount)) + + val result = execute(complexQuery).runCollect + + val expected = + Chunk( + ("Métro de Paris", "Paris", 16L), + ("Chongqing Metro", "Chongqing", 4L), + ("Metro Warszawskie", "Warszawa", 2L) + ) + assertM(result)(equalTo(expected)) } ) @@ sequential diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index 3deddb789..1627250f7 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -5,7 +5,7 @@ import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.sequential -object TransactionSpec extends PostgresRunnableSpec with ShopSchema { +object TransactionSpec extends PostgresRunnableSpec with DbSchema { override val autoCommit = false diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 88bed37dc..902218557 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -37,11 +37,11 @@ trait SqlServerModule extends Jdbc { self => left.columnSet ++ right.columnSet override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity], A with B, C] = + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = if (left.columnSet.contains(column)) - left.columnToExpr.toExpr(column) + left.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] else - right.columnToExpr.toExpr(column) + right.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] } } From 32004aaaf7cfe6aa4737fd9795e51b50900f5578 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 17 Feb 2022 21:31:56 +0100 Subject: [PATCH 351/673] Update sbt-buildinfo to 0.11.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ef4d589ab..315766487 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.12") From 3521b534557d94073f0cf10136c26f9be4f2b620 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 18 Feb 2022 13:11:31 +0100 Subject: [PATCH 352/673] Update sbt-bloop to 1.4.13 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ef4d589ab..fa4f2b80b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.12") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.13") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From dc75d2e583a1d0b8d1c7939242c7f48ce2e76b10 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 19 Feb 2022 09:25:14 +0100 Subject: [PATCH 353/673] Update sbt-tpolecat to 0.1.22 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ef4d589ab..2ef583568 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.22") From 5ffbe8238092711d5dc051e054f05171b2ae06ef Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 20 Feb 2022 16:52:12 +0100 Subject: [PATCH 354/673] Update testcontainers-scala-mssqlserver, ... to 0.40.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b77239cd3..f37a7c73e 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC2" val zioSchemaVersion = "0.1.7" val testcontainersVersion = "1.16.3" -val testcontainersScalaVersion = "0.39.12" +val testcontainersScalaVersion = "0.40.2" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From eae4c0c0a9692b80ca54404a1439be2fb5499088 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 20 Feb 2022 18:47:52 +0100 Subject: [PATCH 355/673] Update postgresql to 42.3.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 8e690b768..1bf31f871 100644 --- a/build.sbt +++ b/build.sbt @@ -215,7 +215,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.2.25" % Compile, + "org.postgresql" % "postgresql" % "42.3.3" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 86573d82caa3eba9f4134116005ae0b1208d8af9 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 20 Feb 2022 20:07:04 +0100 Subject: [PATCH 356/673] fixed group by & having edge cases --- core/jvm/src/main/scala/zio/sql/Sql.scala | 1 + core/jvm/src/main/scala/zio/sql/expr.scala | 24 ++ .../src/main/scala/zio/sql/groupbyutils.scala | 154 +++++++++++++ core/jvm/src/main/scala/zio/sql/select.scala | 216 ++++++------------ .../scala/zio/sql/GroupByHavingSpec.scala | 19 ++ 5 files changed, 268 insertions(+), 146 deletions(-) create mode 100644 core/jvm/src/main/scala/zio/sql/groupbyutils.scala diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index de841581b..4ae4d947d 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -4,6 +4,7 @@ import zio.schema.Schema trait Sql extends SelectModule + with GroupByUtilsModule with DeleteModule with UpdateModule with ExprModule diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 5871bca2b..033c4afee 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,8 +108,32 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } } + object Where { + + def fold[F: Features.IsNotAggregated]( + in: Iterable[Expr[F, _, Boolean]] + )(zero: Expr[Features.Literal, _, Boolean])(combine: (Expr[_, _, Boolean], Expr[_, _, Boolean]) => Expr[F, _, Boolean]): Expr[Features.Derived, _, Boolean] = ??? + //in.fold(Expr.literal(true))(_ && _) + } + object Expr { + final class FoldSourcePartiallyApplied[Source] { + + def apply[F]( + in: Iterable[Expr[F, Source, Boolean]] + )(combine: (Expr[F, Source, Boolean], Expr[F, Source, Boolean]) => Expr[F, Source, Boolean]) : Expr[F, Source, Boolean] = ??? + } + + def foldFrom[Source] = new FoldSourcePartiallyApplied[Source] + + def fold[F]( + in: Iterable[Expr[F, _, Boolean]] + )(zero: Expr[Features.Literal, _, Boolean])(combine: (Expr[_, _, Boolean], Expr[_, _, Boolean]) => Expr[F, _, Boolean]): Expr[F, _, Boolean] = ??? + //in.fold(Expr.literal(true))(_ && _) + //in.foldLeft(zero.asInstanceOf[Expr[F, _, Boolean]])((a, b) => combine(a.asInstanceOf[Expr[_, _, Boolean]], b.asInstanceOf[Expr[_, _, Boolean]])) + + implicit val subqueryToExpr = self.Read.Subselect.subselectToExpr _ sealed trait InvariantExpr[F, -A, B] extends Expr[F, A, B] { diff --git a/core/jvm/src/main/scala/zio/sql/groupbyutils.scala b/core/jvm/src/main/scala/zio/sql/groupbyutils.scala new file mode 100644 index 000000000..2cc99f8cb --- /dev/null +++ b/core/jvm/src/main/scala/zio/sql/groupbyutils.scala @@ -0,0 +1,154 @@ +package zio.sql + + +/** + * User lands in this builder in case there is a "partial aggregation" in a query like: + * + * select Count(id), customer_id + * from orders + * group by customer_id + * + * In such a case its not possible to execute query before we group by customer_id. + * As we need to check F of every `Expr`groupBy is overloaded by 22 arities - even though partically, mostly only few are necessary. + * + * Without group by clause, `AggSelectBuilderGroupBy` is not executable so calling group b is the only choice. + * The query won't compile unless user groups atleast by required columns. + * + * In case we are not dealing with partial aggregation, this builder is skipped and user can groupBy in Read.Subselect as usual. + * Following are all valid queries not using this `AggSelectBuilderGroupBy` + * + * select Count(id) + * from orders + * group by customer_id + * + * select Count(id) + * from orders + * + * select customer_id + * from orders + * group by customer_id + * + * select customer_id + * from orders + * group by customer_id + */ +trait GroupByUtilsModule { self: SelectModule with ExprModule => + + sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source], Unaggregated]( + select: Read.Select[F, Repr, Source, Head, Tail] + ) { + import Read.ExprSet._ + + // format: off + def groupBy[F1, B](expr: Expr[F1, Source, B])( + implicit ev1: F1 =:= Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1] = + select.copy(groupByExprs = NoExpr ++ expr).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1]] + + def groupBy[F1, F2](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any])( + implicit ev1: F1 with F2 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2]] + + def groupBy[F1, F2, F3](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any])( + implicit ev1: F1 with F2 with F3 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3]] + + def groupBy[F1, F2, F3, F4](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4]] + + def groupBy[F1, F2, F3, F4, F5](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5]] + + def groupBy[F1, F2, F3, F4, F5, F6](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F10, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F10, Source, Any], expr11: Expr[F11, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any], expr21: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21<:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21]] + + def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any], expr21: Expr[F9, Source, Any], expr22: Expr[F9, Source, Any])( + implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21 with F22 <:< Unaggregated + ): Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21 with F22] = + select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21 with F22]] + // format: on + } +} \ No newline at end of file diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index f274e45fd..0ec53e830 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -2,7 +2,7 @@ package zio.sql import scala.language.implicitConversions -trait SelectModule { self: ExprModule with TableModule with UtilsModule => +trait SelectModule { self: ExprModule with TableModule with UtilsModule with GroupByUtilsModule => sealed case class Selector[F, Source, B <: SelectionSet[Source], Unaggregated](selection: Selection[F, Source, B]) @@ -86,124 +86,6 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => } } - sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source], Unaggregated]( - select: Read.Select[F, Repr, Source, Head, Tail] - ) { - import Read.ExprSet._ - - // format: off - def groupBy[F1, B](expr: Expr[F1, Source, B])( - implicit ev1: F1 =:= Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr) - - def groupBy[F1, F2](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any])( - implicit ev1: F1 with F2 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2) - - def groupBy[F1, F2, F3](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any])( - implicit ev1: F1 with F2 with F3 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3) - - def groupBy[F1, F2, F3, F4](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4) - - def groupBy[F1, F2, F3, F4, F5](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5) - - def groupBy[F1, F2, F3, F4, F5, F6](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6) - - def groupBy[F1, F2, F3, F4, F5, F6, F7](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F10, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F10, Source, Any], expr11: Expr[F11, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any], expr21: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21<:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21) - - def groupBy[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22](expr: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any], expr8: Expr[F8, Source, Any], expr9: Expr[F9, Source, Any], expr10: Expr[F9, Source, Any], expr11: Expr[F9, Source, Any], expr12: Expr[F9, Source, Any], expr13: Expr[F9, Source, Any], expr14: Expr[F9, Source, Any], expr15: Expr[F9, Source, Any], expr16: Expr[F9, Source, Any], expr17: Expr[F9, Source, Any], expr18: Expr[F9, Source, Any], expr19: Expr[F9, Source, Any], expr20: Expr[F9, Source, Any], expr21: Expr[F9, Source, Any], expr22: Expr[F9, Source, Any])( - implicit ev1: F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21 with F22 <:< Unaggregated - ): Read.Select[F, Repr, Source, Head, Tail] = - select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22) - // format: on - } - sealed case class SelectBuilder[F0, Source, B <: SelectionSet[Source]](selection: Selection[F0, Source, B]) { def from[Source0 <: Source](table: Table.Aux[Source0])(implicit @@ -299,20 +181,32 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => object Read { sealed trait ExprSet[-Source] { + + type Features + type Append[F2, Source1 <: Source, B2] <: ExprSet[Source1] def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] } object ExprSet { + + type WithF[-Source, F] = ExprSet[Source] { + type Features = F + } + type NoExpr = NoExpr.type case object NoExpr extends ExprSet[Any] { + override type Features = Any override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] + override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = ExprCons(that, NoExpr) } sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) extends ExprSet[Source] { + + override type Features = F with tail.Features override type Append[F2, Source1 <: Source, B2] = ExprCons[F, Source1, B, tail.Append[F2, Source1, B2]] override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = @@ -354,6 +248,8 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => limit: Option[Long] = None ) extends Read[Repr] { self => + type GroupByF <: Any + //TODO add F2: Features.IsNotAggregated constraint when https://github.com/zio/zio-sql/issues/583 is fixed def where[F2]( whereExpr2: Expr[F2, Source, Boolean] @@ -371,36 +267,57 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) /** - * TODO find a way to make following not compile -> fkCustomerId need to be `groupped by` - * select(fkCustomerId) - * .from(orders) - * .having(Count(fkCustomerId) > 4) - * - * VALID - select customer_id - from orders - group by customer_id - having Count(order_date) > 4 - - can having exist without group by ?? -> only when selection contains full aggregagation - lets require F: IsFullyAggregated here and move having app to AggBuilder somehow - */ - def having[F2: Features.IsFullyAggregated]( + * `HAVING` can only be called: + * 1. with aggregate functions - `having Count(id) > 5` + * 2. within `fully aggregated` selection - meaning either only aggregate functions are in `select` or columns which are selected are also groupped by. + * `Remainder` references not aggregated columns. GroupByF is a type containing `F` by which `groupBy` was called. + */ + def having[F2: Features.IsFullyAggregated, Remainder]( havingExpr2: Expr[F2, Source, Boolean] - ): Subselect[F, Repr, Source, Subsource, Head, Tail] = - copy(havingExpr = self.havingExpr && havingExpr2) + )(implicit + i : Features.IsPartiallyAggregated.WithRemainder[F, Remainder], + ev: GroupByF <:< Remainder) + : Subselect[F, Repr, Source, Subsource, Head, Tail] = + copy(havingExpr = self.havingExpr && havingExpr2) + + // format: off + def groupBy[F1: Features.IsNotAggregated](expr1: Expr[F1, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1] = + new Subselect(selection, table, whereExpr, self.groupByExprs ++ expr1, havingExpr, orderByExprs, offset, limit) { + override type GroupByF = self.GroupByF with F1 + } + + def groupBy[F1: Features.IsNotAggregated, F2: Features.IsNotAggregated](expr1: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1 with F2] = + new Subselect(selection, table, whereExpr, self.groupByExprs ++ expr1 ++ expr2, havingExpr, orderByExprs, offset, limit) { + override type GroupByF = self.GroupByF with F1 with F2 + } + def groupBy[F1: Features.IsNotAggregated, F2: Features.IsNotAggregated, F3: Features.IsNotAggregated](expr1: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1 with F2 with F3] = + new Subselect(selection, table, whereExpr,self.groupByExprs ++ expr1 ++ expr2 ++ expr3, havingExpr, orderByExprs, offset, limit) { + override type GroupByF = self.GroupByF with F1 with F2 with F3 + } + + def groupBy[F1: Features.IsNotAggregated, F2: Features.IsNotAggregated, F3: Features.IsNotAggregated, F4: Features.IsNotAggregated](expr1: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1 with F2 with F3 with F4] = + new Subselect(selection, table, whereExpr, self.groupByExprs ++ expr1 ++ expr2 ++ expr3 ++ expr4, havingExpr, orderByExprs, offset, limit) { + override type GroupByF = self.GroupByF with F1 with F2 with F3 with F4 + } + + def groupBy[F1: Features.IsNotAggregated, F2: Features.IsNotAggregated, F3: Features.IsNotAggregated, F4: Features.IsNotAggregated, F5: Features.IsNotAggregated](expr1: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1 with F2 with F3 with F4 with F5] = + new Subselect(selection, table, whereExpr, self.groupByExprs ++ expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5, havingExpr, orderByExprs, offset, limit) { + override type GroupByF = self.GroupByF with F1 with F2 with F3 with F4 with F5 + } + + def groupBy[F1: Features.IsNotAggregated, F2: Features.IsNotAggregated, F3: Features.IsNotAggregated, F4: Features.IsNotAggregated, F5: Features.IsNotAggregated, F6: Features.IsNotAggregated](expr1: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1 with F2 with F3 with F4 with F5 with F6] = + new Subselect(selection, table, whereExpr, self.groupByExprs ++ expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6, havingExpr, orderByExprs, offset, limit) { + override type GroupByF = self.GroupByF with F1 with F2 with F3 with F4 with F5 with F6 + } /** - * TODO restrict _ : Features.IsSource - * allow only `select customer_id from orders group by customer_id` - * cannot move it to AggBuilder because select(fkCustomerId).from(orders) is valid sql (AggBuilder handles cases where selection contains mix of aggregated and non aggregated columns) - */ - def groupBy( - key: Expr[_, Source, Any], - keys: Expr[_, Source, Any]* - ): Subselect[F, Repr, Source, Subsource, Head, Tail] = - copy(groupByExprs = - (key :: keys.toList).foldLeft[ExprSet[Source]](ExprSet.NoExpr)((tail, head) => ExprSet.ExprCons(head, tail)) - ) + * TODO add arities up to 22 when needed + */ + def groupBy[F1: Features.IsNotAggregated, F2: Features.IsNotAggregated, F3: Features.IsNotAggregated, F4: Features.IsNotAggregated, F5: Features.IsNotAggregated, F6: Features.IsNotAggregated, F7: Features.IsNotAggregated](expr1: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1 with F2 with F3 with F4 with F5 with F6 with F7] = + new Subselect(selection, table, whereExpr, self.groupByExprs ++ expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7, havingExpr, orderByExprs, offset, limit) { + override type GroupByF = self.GroupByF with F1 with F2 with F3 with F4 with F5 with F6 with F7 + } + // format: on def normalize(implicit instance: TrailingUnitNormalizer[ResultType] @@ -427,6 +344,13 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => } object Subselect { + + type WithGroupByF[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source], GroupByF0] = + Subselect[F, Repr, Source, Subsource, Head, Tail] { + type GroupByF = GroupByF0 + } + + implicit def subselectToExpr[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] ): Expr[Features.Derived, Any, Head] = diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index d6bd9d7c5..f35a89564 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -36,9 +36,28 @@ object AggregatedProductSchema { val (id, name, amount, price) = productTable.columns + val e = select(name ++ amount) + + select(Count(price)) + .from(productTable) + .groupBy(price) + val orderValue = select(name ++ Sum(price)) + .from(productTable) + .groupBy(name, price) + .having(Sum(price) > 10) + + val orderValue2 = + select(Sum(price)) .from(productTable) .groupBy(name) .having(Sum(price) > 10) + + val orderValue3 = + select(name ++ amount ++ price) + .from(productTable) + .groupBy(name, amount, price) + .having(Sum(price) > 10) + } From 169f4ea747d0409121b1eca8afd60f66d0984cf1 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 20 Feb 2022 20:12:33 +0100 Subject: [PATCH 357/673] format --- core/jvm/src/main/scala/zio/sql/expr.scala | 25 -------- .../jvm/src/main/scala/zio/sql/features.scala | 22 ++++--- .../src/main/scala/zio/sql/groupbyutils.scala | 63 +++++++++---------- core/jvm/src/main/scala/zio/sql/select.scala | 33 +++++----- core/jvm/src/main/scala/zio/sql/table.scala | 10 ++- .../scala/zio/sql/GroupByHavingSpec.scala | 6 +- .../zio/sql/postgresql/PostgresModule.scala | 8 ++- .../scala/zio/sql/postgresql/DbSchema.scala | 11 ++-- .../sql/postgresql/PostgresModuleSpec.scala | 8 +-- .../zio/sql/sqlserver/SqlServerModule.scala | 8 ++- 10 files changed, 93 insertions(+), 101 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 033c4afee..9bc97050e 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -108,32 +108,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { } } - object Where { - - def fold[F: Features.IsNotAggregated]( - in: Iterable[Expr[F, _, Boolean]] - )(zero: Expr[Features.Literal, _, Boolean])(combine: (Expr[_, _, Boolean], Expr[_, _, Boolean]) => Expr[F, _, Boolean]): Expr[Features.Derived, _, Boolean] = ??? - //in.fold(Expr.literal(true))(_ && _) - } - object Expr { - - final class FoldSourcePartiallyApplied[Source] { - - def apply[F]( - in: Iterable[Expr[F, Source, Boolean]] - )(combine: (Expr[F, Source, Boolean], Expr[F, Source, Boolean]) => Expr[F, Source, Boolean]) : Expr[F, Source, Boolean] = ??? - } - - def foldFrom[Source] = new FoldSourcePartiallyApplied[Source] - - def fold[F]( - in: Iterable[Expr[F, _, Boolean]] - )(zero: Expr[Features.Literal, _, Boolean])(combine: (Expr[_, _, Boolean], Expr[_, _, Boolean]) => Expr[F, _, Boolean]): Expr[F, _, Boolean] = ??? - //in.fold(Expr.literal(true))(_ && _) - //in.foldLeft(zero.asInstanceOf[Expr[F, _, Boolean]])((a, b) => combine(a.asInstanceOf[Expr[_, _, Boolean]], b.asInstanceOf[Expr[_, _, Boolean]])) - - implicit val subqueryToExpr = self.Read.Subselect.subselectToExpr _ sealed trait InvariantExpr[F, -A, B] extends Expr[F, A, B] { diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index de36adc3f..faaea40b8 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -16,19 +16,19 @@ trait FeaturesModule { sealed trait IsNotAggregated[A] object IsNotAggregated { - implicit def UnionIsNotAgregated[A: IsNotAggregated, B: IsNotAggregated]: IsNotAggregated[Union[A, B]] = + implicit def UnionIsNotAgregated[A: IsNotAggregated, B: IsNotAggregated]: IsNotAggregated[Union[A, B]] = new IsNotAggregated[Union[A, B]] {} - implicit def SourceIsNotAggregated[ColumnName, TableType]: IsNotAggregated[Source[ColumnName, TableType]] = + implicit def SourceIsNotAggregated[ColumnName, TableType]: IsNotAggregated[Source[ColumnName, TableType]] = new IsNotAggregated[Source[ColumnName, TableType]] {} - implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = + implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = new IsNotAggregated[Literal] {} - implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = + implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = new IsNotAggregated[Derived] {} - implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = + implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = new IsNotAggregated[Function0] {} } @@ -49,7 +49,8 @@ trait FeaturesModule { sealed trait IsSource[A] object IsSource { - implicit def isSource[ColumnName, TableType]: IsSource[Source[ColumnName, TableType]] = new IsSource[Source[ColumnName, TableType]] {} + implicit def isSource[ColumnName, TableType]: IsSource[Source[ColumnName, TableType]] = + new IsSource[Source[ColumnName, TableType]] {} } sealed trait IsPartiallyAggregated[A] { @@ -94,8 +95,13 @@ trait FeaturesModule { } trait IsPartiallyAggregatedLowPriorityImplicits { - implicit def SourceIsAggregated[ColumnName, TableType]: IsPartiallyAggregated.WithRemainder[Features.Source[ColumnName, TableType], Features.Source[ColumnName, TableType]] = - new IsPartiallyAggregated[Features.Source[ColumnName, TableType]] { override type Unaggregated = Features.Source[ColumnName, TableType] } + implicit def SourceIsAggregated[ColumnName, TableType]: IsPartiallyAggregated.WithRemainder[ + Features.Source[ColumnName, TableType], + Features.Source[ColumnName, TableType] + ] = + new IsPartiallyAggregated[Features.Source[ColumnName, TableType]] { + override type Unaggregated = Features.Source[ColumnName, TableType] + } } } } diff --git a/core/jvm/src/main/scala/zio/sql/groupbyutils.scala b/core/jvm/src/main/scala/zio/sql/groupbyutils.scala index 2cc99f8cb..ad355d513 100644 --- a/core/jvm/src/main/scala/zio/sql/groupbyutils.scala +++ b/core/jvm/src/main/scala/zio/sql/groupbyutils.scala @@ -1,37 +1,36 @@ package zio.sql - /** - * User lands in this builder in case there is a "partial aggregation" in a query like: - * - * select Count(id), customer_id - * from orders - * group by customer_id - * - * In such a case its not possible to execute query before we group by customer_id. - * As we need to check F of every `Expr`groupBy is overloaded by 22 arities - even though partically, mostly only few are necessary. - * - * Without group by clause, `AggSelectBuilderGroupBy` is not executable so calling group b is the only choice. - * The query won't compile unless user groups atleast by required columns. - * - * In case we are not dealing with partial aggregation, this builder is skipped and user can groupBy in Read.Subselect as usual. - * Following are all valid queries not using this `AggSelectBuilderGroupBy` - * - * select Count(id) - * from orders - * group by customer_id - * - * select Count(id) - * from orders - * - * select customer_id - * from orders - * group by customer_id - * - * select customer_id - * from orders - * group by customer_id - */ + * User lands in this builder in case there is a "partial aggregation" in a query like: + * + * select Count(id), customer_id + * from orders + * group by customer_id + * + * In such a case its not possible to execute query before we group by customer_id. + * As we need to check F of every `Expr`groupBy is overloaded by 22 arities - even though partically, mostly only few are necessary. + * + * Without group by clause, `AggSelectBuilderGroupBy` is not executable so calling group b is the only choice. + * The query won't compile unless user groups atleast by required columns. + * + * In case we are not dealing with partial aggregation, this builder is skipped and user can groupBy in Read.Subselect as usual. + * Following are all valid queries not using this `AggSelectBuilderGroupBy` trait. + * + * select Count(id) + * from orders + * group by customer_id + * + * select Count(id) + * from orders + * + * select customer_id + * from orders + * group by customer_id + * + * select customer_id + * from orders + * group by customer_id + */ trait GroupByUtilsModule { self: SelectModule with ExprModule => sealed case class AggSelectBuilderGroupBy[F, Repr, Source, Head, Tail <: SelectionSet[Source], Unaggregated]( @@ -151,4 +150,4 @@ trait GroupByUtilsModule { self: SelectModule with ExprModule => select.copy(groupByExprs = NoExpr ++ expr ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22).asInstanceOf[Read.Subselect.WithGroupByF[F, Repr, Source, Source, Head, Tail, F1 with F2 with F3 with F4 with F5 with F6 with F7 with F8 with F9 with F10 with F11 with F12 with F13 with F14 with F15 with F16 with F17 with F18 with F19 with F20 with F21 with F22]] // format: on } -} \ No newline at end of file +} diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 0ec53e830..3fec85961 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -196,7 +196,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro type NoExpr = NoExpr.type case object NoExpr extends ExprSet[Any] { - override type Features = Any + override type Features = Any override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = @@ -206,7 +206,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) extends ExprSet[Source] { - override type Features = F with tail.Features + override type Features = F with tail.Features override type Append[F2, Source1 <: Source, B2] = ExprCons[F, Source1, B, tail.Append[F2, Source1, B2]] override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = @@ -267,18 +267,18 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) /** - * `HAVING` can only be called: - * 1. with aggregate functions - `having Count(id) > 5` - * 2. within `fully aggregated` selection - meaning either only aggregate functions are in `select` or columns which are selected are also groupped by. - * `Remainder` references not aggregated columns. GroupByF is a type containing `F` by which `groupBy` was called. - */ + * `HAVING` can only be called: + * 1. with aggregate functions - `having Count(id) > 5` + * 2. within `fully aggregated` selection - meaning either only aggregate functions are in `select` or columns which are selected are also groupped by. + * `Remainder` references not aggregated columns. GroupByF is a type containing `F` by which `groupBy` was called. + */ def having[F2: Features.IsFullyAggregated, Remainder]( havingExpr2: Expr[F2, Source, Boolean] - )(implicit - i : Features.IsPartiallyAggregated.WithRemainder[F, Remainder], - ev: GroupByF <:< Remainder) - : Subselect[F, Repr, Source, Subsource, Head, Tail] = - copy(havingExpr = self.havingExpr && havingExpr2) + )(implicit + i: Features.IsPartiallyAggregated.WithRemainder[F, Remainder], + ev: GroupByF <:< Remainder + ): Subselect[F, Repr, Source, Subsource, Head, Tail] = + copy(havingExpr = self.havingExpr && havingExpr2) // format: off def groupBy[F1: Features.IsNotAggregated](expr1: Expr[F1, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1] = @@ -345,11 +345,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro object Subselect { - type WithGroupByF[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source], GroupByF0] = - Subselect[F, Repr, Source, Subsource, Head, Tail] { - type GroupByF = GroupByF0 - } - + type WithGroupByF[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source], GroupByF0] = + Subselect[F, Repr, Source, Subsource, Head, Tail] { + type GroupByF = GroupByF0 + } implicit def subselectToExpr[F <: Features.Aggregated[_], Repr, Source, Subsource, Head]( subselect: Read.Subselect[F, Repr, _ <: Source, Subsource, Head, SelectionSet.Empty] diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index caa16f699..c554d791c 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -93,7 +93,8 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr, HeadIdentity] = self override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr.Source[TableType, A, column.Identity, TableType] = Expr.Source(name0, column) + def toExpr[A](column: Column[A]): Expr.Source[TableType, A, column.Identity, TableType] = + Expr.Source(name0, column) } } @@ -281,7 +282,9 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => if (left.columnSet.contains(column)) left.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] else - right.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + right.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] } } @@ -364,7 +367,8 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => .Cons(head, columnSet.tail) .asInstanceOf[ ColumnSet.Cons[Option[A], B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, Option[A]], columnSet.tail.ColumnsRepr[T]) + type ColumnsRepr[T] = + (Expr[Features.Source[HeadIdentity, T], T, Option[A]], columnSet.tail.ColumnsRepr[T]) type Append[That <: ColumnSet] = ColumnSet.Cons[Option[A], columnSet.tail.Append[That], HeadIdentity] type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities } diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index f35a89564..c007ac464 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -36,9 +36,9 @@ object AggregatedProductSchema { val (id, name, amount, price) = productTable.columns - val e = select(name ++ amount) + val e = select(name ++ amount) - select(Count(price)) + select(Count(price)) .from(productTable) .groupBy(price) @@ -59,5 +59,5 @@ object AggregatedProductSchema { .from(productTable) .groupBy(name, amount, price) .having(Sum(price) > 10) - + } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index deb8c8f8d..dbf35239b 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -53,9 +53,13 @@ trait PostgresModule extends Jdbc { self => override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = if (left.columnSet.contains(column)) - left.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + left.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] else - right.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + right.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala index de0fde5d0..8fd602d1f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala @@ -15,7 +15,7 @@ trait DbSchema extends Jdbc { self => val (personId, fName, lName, dob) = persons.columns } - object Customers { + object Customers { //https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string val customers = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( @@ -81,8 +81,8 @@ trait DbSchema extends Jdbc { self => import ColumnSet._ - val city = (int("id") ++ string("name") ++ - int("population") ++ float("area") ++ string("link")).table("city") + val city = (int("id") ++ string("name") ++ + int("population") ++ float("area") ++ string("link")).table("city") val (cityId, cityName, population, area, link) = city.columns @@ -90,8 +90,9 @@ trait DbSchema extends Jdbc { self => val (metroSystemId, cityIdFk, metroSystemName, dailyRidership) = metroSystem.columns - val metroLine = (int("id") ++ int("system_id") ++ string("name") ++ int("station_count") ++ int("track_type")).table("metro_line") + val metroLine = + (int("id") ++ int("system_id") ++ string("name") ++ int("station_count") ++ int("track_type")).table("metro_line") val (metroLineId, systemId, metroLineName, stationCount, trackType) = metroLine.columns } -} \ No newline at end of file +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index da7f368f6..cbdcee73d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -625,14 +625,14 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { _.firstName, _.lastName, _.dateOfBirth - ) + ) val personValue = Person(UUID.randomUUID(), "Charles", "Harvey", None) - + val insertSome = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Charles", "Dent", Option(LocalDate.of(2022, 1, 31)))) + .values((UUID.randomUUID(), "Charles", "Dent", Option(LocalDate.of(2022, 1, 31)))) - // TODO improve + // TODO improve // https://github.com/zio/zio-sql/issues/585 val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) .values((UUID.randomUUID(), "Martin", "Harvey", None.asInstanceOf[Option[LocalDate]])) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 902218557..432829b99 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -39,9 +39,13 @@ trait SqlServerModule extends Jdbc { self => override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = if (left.columnSet.contains(column)) - left.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + left.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] else - right.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + right.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] } } From 8d1f7842bc7fe28a506d02a68914240b7f948a41 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sun, 20 Feb 2022 20:14:51 +0100 Subject: [PATCH 358/673] Update FunctionDefSpec.scala --- .../src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index abfd4858f..bc1894d97 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -513,7 +513,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { val assertion = for { r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{3}")) + } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{6}")) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, From 0858f90c608fbec620226c609e41a630b92bc080 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 20 Feb 2022 20:17:51 +0100 Subject: [PATCH 359/673] changed testM to test --- .../src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 8ac504d2c..659c6c95c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -660,7 +660,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { assertM(result)(equalTo(expected)) }, - testM("in joined tables, columns of the same name from different table are treated as different columns") { + test("in joined tables, columns of the same name from different table are treated as different columns") { import Cities._ import Ordering._ From 37341fe629ff92c135b03930f3b0ad543f4bee72 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 20 Feb 2022 20:28:13 +0100 Subject: [PATCH 360/673] self review --- core/jvm/src/main/scala/zio/sql/groupbyutils.scala | 8 ++++---- core/jvm/src/main/scala/zio/sql/select.scala | 11 ----------- .../src/test/scala/zio/sql/GroupByHavingSpec.scala | 2 -- .../test/resources/{shop_schema.sql => db_schema.sql} | 1 + postgres/src/test/scala/zio/sql/TestContainer.scala | 2 +- 5 files changed, 6 insertions(+), 18 deletions(-) rename postgres/src/test/resources/{shop_schema.sql => db_schema.sql} (99%) diff --git a/core/jvm/src/main/scala/zio/sql/groupbyutils.scala b/core/jvm/src/main/scala/zio/sql/groupbyutils.scala index ad355d513..9882a55b7 100644 --- a/core/jvm/src/main/scala/zio/sql/groupbyutils.scala +++ b/core/jvm/src/main/scala/zio/sql/groupbyutils.scala @@ -8,13 +8,13 @@ package zio.sql * group by customer_id * * In such a case its not possible to execute query before we group by customer_id. - * As we need to check F of every `Expr`groupBy is overloaded by 22 arities - even though partically, mostly only few are necessary. + * As we need to check F of every `Expr`, `groupBy` method is overloaded by 22 arities - even though partically, mostly only few are necessary. * - * Without group by clause, `AggSelectBuilderGroupBy` is not executable so calling group b is the only choice. - * The query won't compile unless user groups atleast by required columns. + * Without group by clause, `AggSelectBuilderGroupBy` is not executable so calling `groupBy` is the only choice. + * The query won't compile unless user groups at least by required columns. * * In case we are not dealing with partial aggregation, this builder is skipped and user can groupBy in Read.Subselect as usual. - * Following are all valid queries not using this `AggSelectBuilderGroupBy` trait. + * Following are all valid examples of queries not using this `AggSelectBuilderGroupBy` trait. * * select Count(id) * from orders diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 3fec85961..388882aa4 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -181,22 +181,13 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro object Read { sealed trait ExprSet[-Source] { - - type Features - type Append[F2, Source1 <: Source, B2] <: ExprSet[Source1] def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] } object ExprSet { - - type WithF[-Source, F] = ExprSet[Source] { - type Features = F - } - type NoExpr = NoExpr.type case object NoExpr extends ExprSet[Any] { - override type Features = Any override type Append[F2, Source1 <: Any, B2] = ExprCons[F2, Source1, B2, NoExpr] override def ++[F2, Source1 <: Any, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = @@ -205,8 +196,6 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro sealed case class ExprCons[F, Source, B, T <: ExprSet[Source]](head: Expr[F, Source, B], tail: T) extends ExprSet[Source] { - - override type Features = F with tail.Features override type Append[F2, Source1 <: Source, B2] = ExprCons[F, Source1, B, tail.Append[F2, Source1, B2]] override def ++[F2, Source1 <: Source, B2](that: Expr[F2, Source1, B2]): Append[F2, Source1, B2] = diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index cd883e3d1..8327fa619 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -37,8 +37,6 @@ object AggregatedProductSchema { val (id, name, amount, price) = productTable.columns - val e = select(name ++ amount) - select(Count(price)) .from(productTable) .groupBy(price) diff --git a/postgres/src/test/resources/shop_schema.sql b/postgres/src/test/resources/db_schema.sql similarity index 99% rename from postgres/src/test/resources/shop_schema.sql rename to postgres/src/test/resources/db_schema.sql index 23cbfca2c..9f324157d 100644 --- a/postgres/src/test/resources/shop_schema.sql +++ b/postgres/src/test/resources/db_schema.sql @@ -47,6 +47,7 @@ create table persons dob date ); +-- city, metro_system, metro_line and inserted values are copied from https://github.com/softwaremill/scala-sql-compare CREATE TABLE city( id SERIAL, name VARCHAR NOT NULL, diff --git a/postgres/src/test/scala/zio/sql/TestContainer.scala b/postgres/src/test/scala/zio/sql/TestContainer.scala index b987548fe..ccfe227cd 100644 --- a/postgres/src/test/scala/zio/sql/TestContainer.scala +++ b/postgres/src/test/scala/zio/sql/TestContainer.scala @@ -21,7 +21,7 @@ object TestContainer { val c = new PostgreSQLContainer( dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) ).configure { a => - a.withInitScript("shop_schema.sql") + a.withInitScript("db_schema.sql") () } c.start() From 32ef6218000193a6f0ce35363846ee9385f23475 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 20 Feb 2022 21:20:22 +0100 Subject: [PATCH 361/673] Update scalafmt-core to 3.4.3 --- .scalafmt.conf | 10 +++-- build.sbt | 14 +++--- core/jvm/src/main/scala/zio/sql/expr.scala | 12 ++--- .../jvm/src/main/scala/zio/sql/features.scala | 8 ++-- core/jvm/src/main/scala/zio/sql/insert.scala | 2 +- .../jvm/src/main/scala/zio/sql/newtypes.scala | 2 +- core/jvm/src/main/scala/zio/sql/select.scala | 2 +- core/jvm/src/main/scala/zio/sql/table.scala | 2 +- core/jvm/src/main/scala/zio/sql/update.scala | 2 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 2 +- examples/src/main/scala/ShopSchema.scala | 2 +- .../src/main/scala/zio/sql/Examples.scala | 10 ++--- .../scala/zio/sql/JdbcInternalModule.scala | 4 +- jdbc/src/main/scala/zio/sql/Renderer.scala | 8 ++-- .../scala/zio/sql/SqlDriverLiveModule.scala | 10 +++-- .../scala/zio/sql/mysql/MysqlModule.scala | 16 +++---- .../test/scala/zio/sql/mysql/ShopSchema.scala | 2 +- .../scala/zio/sql/oracle/OracleModule.scala | 10 ++--- .../zio/sql/postgresql/PostgresModule.scala | 44 +++++++++---------- .../zio/sql/postgresql/FunctionDefSpec.scala | 8 ++-- .../sql/postgresql/PostgresModuleSpec.scala | 4 +- .../scala/zio/sql/postgresql/ShopSchema.scala | 2 +- project/BuildHelper.scala | 18 ++++---- .../zio/sql/sqlserver/SqlServerModule.scala | 14 +++--- 24 files changed, 106 insertions(+), 102 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 6cef2840d..091eddf67 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,15 +1,17 @@ -version = "2.7.5" +version = "3.4.3" maxColumn = 120 -align = most +align.preset = most continuationIndent.defnSite = 2 assumeStandardLibraryStripMargin = true -docstrings = JavaDoc +docstrings.style = keep lineEndings = preserve includeCurlyBraceInSelectChains = false -danglingParentheses = true +danglingParentheses.preset = true spaces { inImportCurlyBraces = true } optIn.annotationNewlines = true +runner.dialect = scala213 + rewrite.rules = [SortImports, RedundantBraces] diff --git a/build.sbt b/build.sbt index 6fea213ab..9e6fd43d0 100644 --- a/build.sbt +++ b/build.sbt @@ -5,16 +5,16 @@ import sbtcrossproject.CrossPlugin.autoImport.crossProject inThisBuild( List( - organization := "dev.zio", - homepage := Some(url("https://zio.github.io/zio-sql/")), - licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), - developers := List( + organization := "dev.zio", + homepage := Some(url("https://zio.github.io/zio-sql/")), + licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), + developers := List( Developer("jdegoes", "John De Goes", "john@degoes.net", url("http://degoes.net")) ), pgpPassphrase := sys.env.get("PGP_PASSWORD").map(_.toArray), pgpPublicRing := file("/tmp/public.asc"), pgpSecretRing := file("/tmp/secret.asc"), - scmInfo := Some( + scmInfo := Some( ScmInfo(url("https://github.com/zio/zio-sql/"), "scm:git:git@github.com:zio/zio-sql.git") ) ) @@ -98,7 +98,7 @@ lazy val docs = project .in(file("zio-sql-docs")) .settings( publish / skip := true, - moduleName := "zio-sql-docs", + moduleName := "zio-sql-docs", scalacOptions -= "-Yno-imports", scalacOptions -= "-Xfatal-warnings", libraryDependencies ++= Seq( @@ -116,7 +116,7 @@ lazy val examples = project .settings(stdSettings("examples")) .settings( publish / skip := true, - moduleName := "examples", + moduleName := "examples", libraryDependencies ++= Seq( "dev.zio" %% "zio" % zioVersion, "dev.zio" %% "zio-streams" % zioVersion, diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 3d24898f2..b73a41d55 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -23,7 +23,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def *[F2, A1 <: A, B1 >: B](that: Expr[F2, A1, B1])(implicit ev: IsNumeric[B1]): Expr[F :||: F2, A1, B1] = Expr.Binary(self, that, BinaryOp.Mul[B1]()) - //todo do something special for divide by 0? also Mod/log/whatever else is really a partial function.. PartialExpr? + // todo do something special for divide by 0? also Mod/log/whatever else is really a partial function.. PartialExpr? def /[F2, A1 <: A, B1 >: B](that: Expr[F2, A1, B1])(implicit ev: IsNumeric[B1]): Expr[F :||: F2, A1, B1] = Expr.Binary(self, that, BinaryOp.Div[B1]()) @@ -85,7 +85,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { def isNotTrue[A1 <: A](implicit ev: B <:< Boolean): Expr[F, A1, Boolean] = Expr.Property(self, PropertyOp.IsNotTrue) - //TODO https://github.com/zio/zio-sql/issues/564 + // TODO https://github.com/zio/zio-sql/issues/564 def as[B1 >: B](name: String): Expr[F, A, B1] = { val _ = name self @@ -389,7 +389,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { object FunctionDef { - //math functions + // math functions val Abs = FunctionDef[Double, Double](FunctionName("abs")) val Acos = FunctionDef[Double, Double](FunctionName("acos")) val Asin = FunctionDef[Double, Double](FunctionName("asin")) @@ -409,10 +409,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val Tan = FunctionDef[Double, Double](FunctionName("tan")) val WidthBucket = FunctionDef[(Double, Double, Double, Int), Int](FunctionName("width_bucket")) - //string functions + // string functions val Ascii = FunctionDef[String, Int](FunctionName("ascii")) val CharLength = FunctionDef[String, Int](FunctionName("character_length")) - val Concat = FunctionDef[(String, String), String](FunctionName("concat")) //todo varargs + val Concat = FunctionDef[(String, String), String](FunctionName("concat")) // todo varargs val ConcatWs2 = FunctionDef[(String, String), String](FunctionName("concat_ws")) val ConcatWs3 = FunctionDef[(String, String, String), String](FunctionName("concat_ws")) val ConcatWs4 = FunctionDef[(String, String, String, String), String](FunctionName("concat_ws")) @@ -424,7 +424,7 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val Replace = FunctionDef[(String, String, String), String](FunctionName("replace")) val Rtrim = FunctionDef[String, String](FunctionName("rtrim")) val Substring = FunctionDef[(String, Int, Option[Int]), String](FunctionName("substring")) - //TODO substring regex + // TODO substring regex val Trim = FunctionDef[String, String](FunctionName("trim")) val Upper = FunctionDef[String, String](FunctionName("upper")) diff --git a/core/jvm/src/main/scala/zio/sql/features.scala b/core/jvm/src/main/scala/zio/sql/features.scala index c9cb69e54..baccacdea 100644 --- a/core/jvm/src/main/scala/zio/sql/features.scala +++ b/core/jvm/src/main/scala/zio/sql/features.scala @@ -19,16 +19,16 @@ trait FeaturesModule { implicit def UnionIsNotAgregated[A: IsNotAggregated, B: IsNotAggregated]: IsNotAggregated[Union[A, B]] = new IsNotAggregated[Union[A, B]] {} - implicit def SourceIsNotAggregated[A]: IsNotAggregated[Source[A]] = + implicit def SourceIsNotAggregated[A]: IsNotAggregated[Source[A]] = new IsNotAggregated[Source[A]] {} - implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = + implicit val LiteralIsNotAggregated: IsNotAggregated[Literal] = new IsNotAggregated[Literal] {} - implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = + implicit val DerivedIsNotAggregated: IsNotAggregated[Derived] = new IsNotAggregated[Derived] {} - implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = + implicit val Function0IsNotAggregated: IsNotAggregated[Function0] = new IsNotAggregated[Function0] {} } diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 07a2483bc..36c43b460 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -35,7 +35,7 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => schemaN: Schema[Z] ) - //TODO find a way for more meaningful error messages + // TODO find a way for more meaningful error messages sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities] // format: off diff --git a/core/jvm/src/main/scala/zio/sql/newtypes.scala b/core/jvm/src/main/scala/zio/sql/newtypes.scala index 5e9ba4fa5..2ebc986c3 100644 --- a/core/jvm/src/main/scala/zio/sql/newtypes.scala +++ b/core/jvm/src/main/scala/zio/sql/newtypes.scala @@ -3,7 +3,7 @@ package zio.sql trait NewtypesModule { type ColumnName = String - //TODO we could use zio-prelude new types + // TODO we could use zio-prelude new types type TableName = String sealed case class FunctionName(name: String) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 20a902a9c..b34fb3e5e 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -350,7 +350,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule => groupByExprs: ExprSet[Source] = ExprSet.NoExpr, havingExpr: Expr[_, Source, Boolean] = true, orderByExprs: List[Ordering[Expr[_, Source, Any]]] = Nil, - offset: Option[Long] = None, //todo don't know how to do this outside of postgres/mysql + offset: Option[Long] = None, // todo don't know how to do this outside of postgres/mysql limit: Option[Long] = None ) extends Read[Repr] { self => diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 19f20e4e8..69bef74d2 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -241,7 +241,7 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule => val name: TableName - override def ahhhhhhhhhhhhh[A]: A = ??? //don't remove or it'll break + override def ahhhhhhhhhhhhh[A]: A = ??? // don't remove or it'll break } object Source { diff --git a/core/jvm/src/main/scala/zio/sql/update.scala b/core/jvm/src/main/scala/zio/sql/update.scala index 27d9eeb1a..dfa8586f6 100644 --- a/core/jvm/src/main/scala/zio/sql/update.scala +++ b/core/jvm/src/main/scala/zio/sql/update.scala @@ -10,7 +10,7 @@ trait UpdateModule { self: ExprModule with TableModule with SelectModule => // UPDATE table // SET foo = bar // WHERE baz > buzz - //todo `set` must be non-empty + // todo `set` must be non-empty sealed case class Update[A](table: Table.Aux[A], set: List[Set[_, A]], whereExpr: Expr[_, A, Boolean]) { def set[F: Features.IsSource, Value: TypeTag](lhs: Expr[F, A, Value], rhs: Expr[_, A, Value]): Update[A] = diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index b1a98add6..4031c56bf 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -19,7 +19,7 @@ object TestBasicSelect { val (userId, dob, fName, lName) = userTable.columns - //todo this should compile using column names defined in the table + // todo this should compile using column names defined in the table val basicSelect = select(fName ++ lName) from userTable // fName and lName already have column names, shouldn't have to do this diff --git a/examples/src/main/scala/ShopSchema.scala b/examples/src/main/scala/ShopSchema.scala index 15f5bd2fd..db25702fa 100644 --- a/examples/src/main/scala/ShopSchema.scala +++ b/examples/src/main/scala/ShopSchema.scala @@ -31,7 +31,7 @@ trait ShopSchema extends Jdbc { self => (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) .table( "order_details" - ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. + ) // todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns } diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 32ad4c142..23b28ceca 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -9,17 +9,17 @@ object Examples extends App with ShopSchema with SqlServerModule { import this.Orders._ import this.Users._ - //select first_name, last_name from users + // select first_name, last_name from users val basicSelect = select(fName ++ lName).from(users) println(renderRead(basicSelect)) - //select first_name as first, last_name as last from users + // select first_name as first, last_name as last from users val basicSelectWithAliases = select((fName as "first") ++ (lName as "last")).from(users) println(renderRead(basicSelectWithAliases)) - //select top 2 first_name, last_name from users order by last_name, first_name desc + // select top 2 first_name, last_name from users order by last_name, first_name desc val selectWithRefinements = select(fName ++ lName) .from(users) @@ -32,7 +32,7 @@ object Examples extends App with ShopSchema with SqlServerModule { // execute(selectWithRefinements).to(Person) // execute(selectWithRefinements).to((_, _)) - //delete from users where first_name = 'Terrence' + // delete from users where first_name = 'Terrence' val basicDelete = deleteFrom(users).where(fName === "Terrence") println(renderDelete(basicDelete)) @@ -42,7 +42,7 @@ object Examples extends App with ShopSchema with SqlServerModule { select(userId as "id") from users where (fName === "Fred") //todo fix issue #36 }) */ - //select first_name, last_name, order_date from users left join orders on users.usr_id = orders.usr_id + // select first_name, last_name, order_date from users left join orders on users.usr_id = orders.usr_id val basicJoin = select(fName ++ lName ++ orderDate).from(users.leftOuter(orders).on(fkUserId === userId)) println(renderRead(basicJoin)) diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 7603ee725..731abe593 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -30,7 +30,7 @@ trait JdbcInternalModule { self: Jdbc => value match { case Some(value) => Right(value) case None => - //TODO following would not be sound - e.g. by outer join any column can be null + // TODO following would not be sound - e.g. by outer join any column can be null // if (nonNull) // Left(DecodingError.UnexpectedNull(column)) // else @@ -89,7 +89,7 @@ trait JdbcInternalModule { self: Jdbc => Option(resultSet.getString(columnIndex)).map(java.util.UUID.fromString(_)) ) case TZonedDateTime => - //2013-07-15 08:15:23.5+00 + // 2013-07-15 08:15:23.5+00 tryDecode[java.time.ZonedDateTime]( Option(resultSet.getTimestamp(columnIndex)) .map(_.toInstant()) diff --git a/jdbc/src/main/scala/zio/sql/Renderer.scala b/jdbc/src/main/scala/zio/sql/Renderer.scala index aa96cbe1a..35123d7d2 100644 --- a/jdbc/src/main/scala/zio/sql/Renderer.scala +++ b/jdbc/src/main/scala/zio/sql/Renderer.scala @@ -1,14 +1,14 @@ package zio.sql private[sql] class Renderer(val builder: StringBuilder) extends AnyVal { - //not using vararg to avoid allocating `Seq`s - def apply(s1: Any): Unit = { + // not using vararg to avoid allocating `Seq`s + def apply(s1: Any): Unit = { val _ = builder.append(s1) } - def apply(s1: Any, s2: Any): Unit = { + def apply(s1: Any, s2: Any): Unit = { val _ = builder.append(s1).append(s2) } - def apply(s1: Any, s2: Any, s3: Any): Unit = { + def apply(s1: Any, s2: Any, s3: Any): Unit = { val _ = builder.append(s1).append(s2).append(s3) } def apply(s1: Any, s2: Any, s3: Any, s4: Any): Unit = { diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 2259e290b..9af3bebc5 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -67,10 +67,12 @@ trait SqlDriverLiveModule { self: Jdbc => ZStream .unfoldZIO(resultSet) { rs => if (rs.next()) { - try unsafeExtractRow[read.ResultType](resultSet, schema) match { - case Left(error) => ZIO.fail(error) - case Right(value) => ZIO.succeed(Some((value, rs))) - } catch { + try + unsafeExtractRow[read.ResultType](resultSet, schema) match { + case Left(error) => ZIO.fail(error) + case Right(value) => ZIO.succeed(Some((value, rs))) + } + catch { case e: SQLException => ZIO.fail(e) } } else ZIO.succeed(None) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 62765508c..6224c51c9 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -142,7 +142,7 @@ trait MysqlModule extends Jdbc { self => renderReadImpl(right) case Read.Literal(values) => - render(" (", values.mkString(","), ") ") //todo fix needs escaping + render(" (", values.mkString(","), ") ") // todo fix needs escaping } private def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = @@ -157,13 +157,13 @@ trait MysqlModule extends Jdbc { self => render(" = ") renderExpr(setEq.rhs) } - case Nil => //TODO restrict Update to not allow empty set + case Nil => // TODO restrict Update to not allow empty set } private def renderTable(table: Table)(implicit render: Renderer): Unit = table match { case Table.DialectSpecificTable(_) => ??? - //The outer reference in this type test cannot be checked at run time?! + // The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) case Table.DerivedTable(read, name) => @@ -322,7 +322,7 @@ trait MysqlModule extends Jdbc { self => lit.value.asInstanceOf[Chunk[Byte]].map("""\%02X""" format _).mkString("x'", "", "'") ) // todo fix `cast` infers correctly but map doesn't work for some reason case tt @ TChar => - render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping + render("'", tt.cast(lit.value), "'") // todo is this the same as a string? fix escaping case tt @ TInstant => render("TIMESTAMP '", tt.cast(lit.value), "'") case tt @ TLocalDate => @@ -356,9 +356,9 @@ trait MysqlModule extends Jdbc { self => case TShort => render(lit.value) case TString => - render("'", lit.value, "'") //todo fix escaping + render("'", lit.value, "'") // todo fix escaping case _ => - render(lit.value) //todo fix add TypeTag.Nullable[_] => + render(lit.value) // todo fix add TypeTag.Nullable[_] => } } @@ -383,7 +383,7 @@ trait MysqlModule extends Jdbc { self => private def renderColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => - render(value) //todo fix escaping + render(value) // todo fix escaping name match { case Some(name) => render(" AS ", name) case None => () @@ -396,7 +396,7 @@ trait MysqlModule extends Jdbc { self => case Some(sourceName) if name != sourceName => render(" AS ", name) case _ => () } - case _ => () //todo what do we do if we don't have a name? + case _ => () // todo what do we do if we don't have a name? } } diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala index 1ed78a4a8..9124cd3e6 100644 --- a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala +++ b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala @@ -35,7 +35,7 @@ trait ShopSchema extends Jdbc { self => (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) .table( "order_details" - ) //todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. + ) // todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns } diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala index 3005c065b..3f5bafce6 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala @@ -38,7 +38,7 @@ trait OracleModule extends Jdbc { self => buildExpr(value, builder) buildReadString(set, builder) case Expr.Literal(value) => - val _ = builder.append(value.toString) //todo fix escaping + val _ = builder.append(value.toString) // todo fix escaping case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") @@ -196,7 +196,7 @@ trait OracleModule extends Jdbc { self => buildReadString(right, builder) case Read.Literal(values) => - val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + val _ = builder.append(" (").append(values.mkString(",")).append(") ") // todo fix needs escaping } def buildExprList(expr: Read.ExprSet[_], builder: StringBuilder): Unit = @@ -250,7 +250,7 @@ trait OracleModule extends Jdbc { self => def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B], builder: StringBuilder): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => - builder.append(value.toString()) //todo fix escaping + builder.append(value.toString()) // todo fix escaping name match { case Some(name) => val _ = builder.append(" AS ").append(name) @@ -265,13 +265,13 @@ trait OracleModule extends Jdbc { self => val _ = builder.append(" AS ").append(name) case _ => () } - case _ => () //todo what do we do if we don't have a name? + case _ => () // todo what do we do if we don't have a name? } } def buildTable(table: Table, builder: StringBuilder): Unit = table match { case Table.DialectSpecificTable(_) => ??? - //The outer reference in this type test cannot be checked at run time?! + // The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) case Table.DerivedTable(read, name) => diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 94d401b4f..c4eab6d61 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -139,7 +139,7 @@ trait PostgresModule extends Jdbc { self => s"""$year, $month, $day, $hour, $minute, $second, '$timeZone'""" } - //Based upon https://github.com/tminglei/slick-pg/blob/master/src/main/scala/com/github/tminglei/slickpg/PgDateSupport.scala + // Based upon https://github.com/tminglei/slick-pg/blob/master/src/main/scala/com/github/tminglei/slickpg/PgDateSupport.scala sealed case class Interval( years: Int = 0, months: Int = 0, @@ -155,8 +155,8 @@ trait PostgresModule extends Jdbc { self => format.setDecimalFormatSymbols(dfs) format } - def milliseconds: Int = (microseconds + (if (microseconds < 0) -500 else 500)) / 1000 - def microseconds: Int = (seconds * 1000000.0).asInstanceOf[Int] + def milliseconds: Int = (microseconds + (if (microseconds < 0) -500 else 500)) / 1000 + def microseconds: Int = (seconds * 1000000.0).asInstanceOf[Int] def +:(cal: Calendar): Calendar = { cal.add(Calendar.MILLISECOND, milliseconds) @@ -345,7 +345,7 @@ trait PostgresModule extends Jdbc { self => } object PostgresRenderModule { - //todo split out to separate module + // todo split out to separate module def renderInsertImpl[A](insert: Insert[_, A])(implicit render: Renderer, schema: Schema[A]) = { render("INSERT INTO ") @@ -359,7 +359,7 @@ trait PostgresModule extends Jdbc { self => } def renderInsertValues[A](col: Seq[A])(implicit render: Renderer, schema: Schema[A]): Unit = - //TODO any performance penalty because of toList ? + // TODO any performance penalty because of toList ? col.toList match { case head :: Nil => render("(") @@ -452,7 +452,7 @@ trait PostgresModule extends Jdbc { self => renderDynamicValue(right) case DynamicValue.SomeValue(value) => renderDynamicValue(value) case DynamicValue.NoneValue => render(s"null") - //TODO what about other cases? + // TODO what about other cases? case _ => () } @@ -505,7 +505,7 @@ trait PostgresModule extends Jdbc { self => render(" = ") renderExpr(setEq.rhs) } - case Nil => //TODO restrict Update to not allow empty set + case Nil => // TODO restrict Update to not allow empty set } private[zio] def renderLit[A, B](lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { @@ -523,7 +523,7 @@ trait PostgresModule extends Jdbc { self => lit.value.asInstanceOf[Chunk[Byte]].map("""\%03o""" format _).mkString("E\'", "", "\'") ) // todo fix `cast` infers correctly but map doesn't work for some reason case tt @ TChar => - render("'", tt.cast(lit.value), "'") //todo is this the same as a string? fix escaping + render("'", tt.cast(lit.value), "'") // todo is this the same as a string? fix escaping case tt @ TInstant => render("TIMESTAMP '", tt.cast(lit.value), "'") case tt @ TLocalDate => render("DATE '", tt.cast(lit.value), "'") case tt @ TLocalDateTime => render("DATE '", tt.cast(lit.value), "'") @@ -533,16 +533,16 @@ trait PostgresModule extends Jdbc { self => case tt @ TUUID => render("'", tt.cast(lit.value), "'") case tt @ TZonedDateTime => render("DATE '", tt.cast(lit.value), "'") - case TByte => render(lit.value) //default toString is probably ok - case TBigDecimal => render(lit.value) //default toString is probably ok - case TBoolean => render(lit.value) //default toString is probably ok - case TDouble => render(lit.value) //default toString is probably ok - case TFloat => render(lit.value) //default toString is probably ok - case TInt => render(lit.value) //default toString is probably ok - case TLong => render(lit.value) //default toString is probably ok - case TShort => render(lit.value) //default toString is probably ok - case TString => render("'", lit.value, "'") //todo fix escaping - case _ => render(lit.value) //todo fix add TypeTag.Nullable[_] => + case TByte => render(lit.value) // default toString is probably ok + case TBigDecimal => render(lit.value) // default toString is probably ok + case TBoolean => render(lit.value) // default toString is probably ok + case TDouble => render(lit.value) // default toString is probably ok + case TFloat => render(lit.value) // default toString is probably ok + case TInt => render(lit.value) // default toString is probably ok + case TLong => render(lit.value) // default toString is probably ok + case TShort => render(lit.value) // default toString is probably ok + case TString => render("'", lit.value, "'") // todo fix escaping + case _ => render(lit.value) // todo fix add TypeTag.Nullable[_] => } } @@ -732,7 +732,7 @@ trait PostgresModule extends Jdbc { self => renderReadImpl(right) case Read.Literal(values) => - render(" (", values.mkString(","), ") ") //todo fix needs escaping + render(" (", values.mkString(","), ") ") // todo fix needs escaping } def renderExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = @@ -787,7 +787,7 @@ trait PostgresModule extends Jdbc { self => def renderColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => - render(value) //todo fix escaping + render(value) // todo fix escaping name match { case Some(name) => render(" AS ", name) case None => () @@ -800,7 +800,7 @@ trait PostgresModule extends Jdbc { self => case Some(sourceName) if name != sourceName => render(" AS ", name) case _ => () } - case _ => () //todo what do we do if we don't have a name? + case _ => () // todo what do we do if we don't have a name? } } @@ -815,7 +815,7 @@ trait PostgresModule extends Jdbc { self => renderTable(derivedTable) } - //The outer reference in this type test cannot be checked at run time?! + // The outer reference in this type test cannot be checked at run time?! case sourceTable: self.Table.Source => render(sourceTable.name) case Table.DerivedTable(read, name) => render(" ( ") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index bc1894d97..f0ebc3b8f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -35,7 +35,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { test("concat_ws #1 - combine flat values") { import Expr._ - //note: a plain number (3) would and should not compile + // note: a plain number (3) would and should not compile val query = select(ConcatWs4("+", "1", "2", "3")) from customers val expected = Seq( // note: one for each row @@ -634,7 +634,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { test("parseIdent removes quoting of individual identifiers") { val someString: Gen[ZioRandom with Sized, String] = Gen.string .filter(x => x.length < 50 && x.length > 1) - //NOTE: I don't know if property based testing is worth doing here, I just wanted to try it + // NOTE: I don't know if property based testing is worth doing here, I just wanted to try it val genTestString: Gen[ZioRandom with Sized, String] = for { string1 <- someString @@ -1269,7 +1269,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } - @@ ignore, //todo fix - select(PgClientEncoding())? + @@ ignore, // todo fix - select(PgClientEncoding())? test("make_date") { val query = select(MakeDate(2013, 7, 15)) @@ -1348,7 +1348,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with ShopSchema { } yield t1 && t2 && t3 && t4 && t5).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("cannot compile a select without from clause if a table source is required") { - //the following execute only compiles with 'from customers' clause + // the following execute only compiles with 'from customers' clause execute((select(CharLength(Customers.fName)) from customers)) // imports for Left and Right are necessary to make the typeCheck macro expansion compile diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 377de8855..3d249dd66 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -121,7 +121,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { test("Can select with property binary operator with Instant") { customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) }, - //TODO try to translate money as "::numeric" + // TODO try to translate money as "::numeric" // test("Can select with property binary operator with numbers") { // case class OrderDetails(orderId: UUID, product_id: UUID, quantity: Int, unitPrice: BigDecimal) // @@ -520,7 +520,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with ShopSchema { case class OrderDetailsRow(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - //TODO we need schema for scala.math.BigDecimal. Probably directly in zio-schema ? + // TODO we need schema for scala.math.BigDecimal. Probably directly in zio-schema ? implicit val bigDecimalSchema: Schema[BigDecimal] = Schema.Transform( Schema.primitive[java.math.BigDecimal](zio.schema.StandardType.BigDecimalType), diff --git a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala index 87076a384..1a2a59da5 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/ShopSchema.scala @@ -17,7 +17,7 @@ trait ShopSchema extends Jdbc { self => } object Customers { - //https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string + // https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string val customers = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( "verified" diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 2e5e44a5c..321d4883e 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -16,9 +16,9 @@ object BuildHelper { def buildInfoSettings(packageName: String) = Seq( - buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, isSnapshot), + buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, isSnapshot), buildInfoPackage := packageName, - buildInfoObject := "BuildInfo" + buildInfoObject := "BuildInfo" ) private val stdOptions = Seq( @@ -110,7 +110,7 @@ object BuildHelper { else Seq() }, - Compile / doc / sources := { + Compile / doc / sources := { val old = (Compile / doc / sources).value if (scalaVersion.value == ScalaDotty) { Nil @@ -146,11 +146,11 @@ object BuildHelper { ) def stdSettings(prjName: String) = Seq( - name := s"$prjName", - scalacOptions := stdOptions, - crossScalaVersions := Seq(Scala213, Scala212), - ThisBuild / scalaVersion := Scala213, //ScalaDotty, - scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), + name := s"$prjName", + scalacOptions := stdOptions, + crossScalaVersions := Seq(Scala213, Scala212), + ThisBuild / scalaVersion := Scala213, // ScalaDotty, + scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), libraryDependencies ++= { if (scalaVersion.value == ScalaDotty) Seq( @@ -164,7 +164,7 @@ object BuildHelper { }, Test / parallelExecution := true, incOptions ~= (_.withLogRecompileOnMacro(false)), - autoAPIMappings := true, + autoAPIMappings := true, unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library") ) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index 88bed37dc..7e48d8d82 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -132,7 +132,7 @@ trait SqlServerModule extends Jdbc { self => case literal @ Expr.Literal(value) => val lit = literal.typeTag match { case TypeTag.TBoolean => - //MSSQL server variant of true/false + // MSSQL server variant of true/false if (value.asInstanceOf[Boolean]) { "0 = 0" } else { @@ -250,7 +250,7 @@ trait SqlServerModule extends Jdbc { self => read match { case Read.Mapped(read, _) => buildReadString(read.asInstanceOf[Read[Out]]) - //todo offset (needs orderBy, must use fetch _instead_ of top) + // todo offset (needs orderBy, must use fetch _instead_ of top) case read0 @ Read.Subselect(_, _, _, _, _, _, _, _) => object Dummy { type F @@ -306,7 +306,7 @@ trait SqlServerModule extends Jdbc { self => buildReadString(right) case Read.Literal(values) => - val _ = builder.append(" (").append(values.mkString(",")).append(") ") //todo fix needs escaping + val _ = builder.append(" (").append(values.mkString(",")).append(") ") // todo fix needs escaping } def buildExprList(expr: Read.ExprSet[_]): Unit = @@ -360,7 +360,7 @@ trait SqlServerModule extends Jdbc { self => def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B]): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => - builder.append(value.toString()) //todo fix escaping + builder.append(value.toString()) // todo fix escaping name match { case Some(name) => val _ = builder.append(" as ").append(name) @@ -375,20 +375,20 @@ trait SqlServerModule extends Jdbc { self => val _ = builder.append(" as ").append(name) case _ => () } - case _ => () //todo what do we do if we don't have a name? + case _ => () // todo what do we do if we don't have a name? } } def buildTable(table: Table): Unit = table match { - case Table.DerivedTable(read, name) => + case Table.DerivedTable(read, name) => builder.append(" ( ") builder.append(renderRead(read.asInstanceOf[Read[_]])) builder.append(" ) ") val _ = builder.append(name) - case sourceTable: self.Table.Source => + case sourceTable: self.Table.Source => val _ = builder.append(sourceTable.name) case Table.DialectSpecificTable(tableExtension) => From 43d6038bf1141103f5a7104df1ba8bc432cdde7c Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Tue, 22 Feb 2022 00:43:45 +0100 Subject: [PATCH 362/673] Move detailed description of inserts and subqueries to the Deep dive page --- docs/overview/deep.md | 258 +++++++++++++++++++++++++++++++++++++++- docs/overview/index.md | 261 ++--------------------------------------- 2 files changed, 264 insertions(+), 255 deletions(-) diff --git a/docs/overview/deep.md b/docs/overview/deep.md index fe3bf349e..ea3bf122c 100644 --- a/docs/overview/deep.md +++ b/docs/overview/deep.md @@ -3,4 +3,260 @@ id: deep_dive title: "Deep dive" --- -TODO: \ No newline at end of file +## Inserts in depth + +### Table description +As usual, in order to use the DSL, first thing we need to do is to create meta-model of our table. Let’s imagine we have a *customers* table in postgres (in case of a different database just extend the appropriate module) +```scala +import zio.sql.postgresql.PostgresModule + +trait TableModel extends PostgresModule { + + import ColumnSet._ + + val customers = + (uuid("id") ++ localDate(“date_of_birth”) ++ string("first_name") ++ string("last_name") ++ boolean("verified_customer") ++ zonedDateTime("created")) + .table("customers") + + val customerId :*: dob :*: fName :*: lName :*: verified :*: created :*: _ = customers.columns +} +``` +Then, to use zio-sql ’s inserts, just mix in `TableModel` trait from above, to your repository. + +In case you’re wondering what those extracted columns are (customerId, dob etc), they are of a type called *Expr*. +`Expr[F, A, B]` is fundamental abstraction in zio-sql which basically represents description of any SQL expression of type `B`, having a source of type `A` and a phantom type `F`. +To give specific example, type of `fName` is +```scala +Expr[Features.Source[String(“first_name”)], customers.TableType, String]. +``` +This gives DSL huge power to remember table from which the column comes from, type of the columns and what kind of Expr we are dealing with. Don’t worry, you don’t need to remember any of this, but from now on we will use those Expr instances in our inserts. + +In general, DSL is giving us two options how to approach inserts. We can insert either tuple values or used defined case class - which requires zio-schema instance (more on that later). +Also your custom data type or tuple need to consist only of the types for which there is a `TypeTag` instance defined. Each sql module has a finite set of such types - those are the types that particular module can work with. In other words, types inside your tuples or case class need to correspond with the types of the extracted Exprs. + +### Insert tuples +Let’s say we want to build the query like the following one: +```sql +insert into + customers(id, date_of_birth, first_name, last_name, verified_customer, created) +values + ('60b01fc9-c902-4468-8d49-3c0f989def37', ‘1983-01-05’, 'Ronald', 'Russell', true, '2020-11-21 19:10:25+00') +``` +zio-sql gives us nice typesafe DSL that feels similar to writing SQL: +```scala +insertInto(customers) + (customerId ++ dob ++ fName ++ lName ++ verified ++ created) + .values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) +``` +Compiler verifies your inserts and your query fails with compile-time error at any of the following situations: +- you mess up the order of values - e.g. you put Boolean where String is expected +- you don’t specify all the not null columns of the table +- you try to insert to columns from another table + +Some details about syntax: `insertInto` method takes two value parameters. One is our table `customers` that we created before in *Table description* section. The other is an *HList like* collection of Expr’s, called `Selection`. You create it by appending Exprs with “++” operator. +`values` method takes a Tuple6 of type (UUID, LocalDate, String, String, Boolean, ZonedDateTime). The required tuple is dependent on combination of Exprs. Just like with normal sql insert, you could swap `fName` with `dob` Expr and corresponding values and your query will work just fine. Compiler will only let you build such queries that won’t explode in runtime (in case you described your table correctly of course ! ) + +If we need to insert multiple values at once, all we need to do is to create any `Seq` of tuples and stick it into the overloaded `values` method. +```scala +val data = + List( + (UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald1", "Russel1", true, ZonedDateTime.now()), + (UUID.randomUUID(), LocalDate.ofYearDay(1980, 1), "Ronald2", "Russel2", false, ZonedDateTime.now()), + (UUID.randomUUID(), LocalDate.ofYearDay(1970, 1), "Ronald3", "Russel3", true, ZonedDateTime.now()) + ) + +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values(data) +``` + +In this case, data is of type `List[(UUID, LocalDate, String, String, Boolean, ZonedDateTime)]` + +### Insert custom case class +ZIO SQL lets you insert also your own case classes. +Let’s define a *customer* case class: + +```scala +final case class Customer( + id: UUID, + dateOfBirth: LocalDate, + firstName: String, + lastName: String, + verified: Boolean, + createdTimestamp: ZonedDateTime + ) +``` + +In this case, the name of the fields makes no difference. Similarly to writing sql, the order of the fields is important. + +zio-sql also needs an implicit instance of zio-schema for your data type. You can define it easily: + +```scala +import zio.schema.DeriveSchema +implicit val customerSchema = DeriveSchema.gen[Customer] +``` + +Then your insert looks almost the same as before: +```scala +val data: Customer = Customer(UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russel", true, ZonedDateTime.now()) + +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values(data) +``` +Or you can insert multiple rows at once. Just define data as a `List` or any collection of your choice. + +```scala +val data : List[Customer] = ??? +``` + +### Show generated SQL query + +In case you want to see the exact query that zio-sql generated, you can use `renderInsert` method inside repo that has PostgresModule (or TableModel from above example) mixed in. +```scala +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) + +val sqlString: String = renderInsert(query) +``` + +### Execute the query + +In order to execute a query, we use `execute` method inside repo that has PostgresModule (or TableModel from the above example) mixed in. +```scala +val query = insertInto(customers)( + customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) + +val executed : ZIO[Has[SqlDriver], Exception, Int] = execute(query) +``` +As the type of `executed` indicates, you need to provide an `SqlDriver` in order to run this effect. The result *Int* is the number of rows updated. + +### More examples +More examples can be found in zio-sql test suite (`PostgresModuleSpec`, `SqlServerModuleSpec`, …) or in zio-sql-example application in resources. + +### What is missing +As of now - Q1 2022 - zio-sql contributors is actively working on: +- returning generated IDs from inserts +- introduce nullable columns - for which user won’t need to input values +- introduce auto generated columns - for which user cannot input values + +## Subqueries & Correlated subqueries + +The goal of ZIO SQL is to give users the ability to describe also queries much more complex than just simple selects or joins. In this section we will introduce a few examples of subqueries and correlated subqueries. In case you will find a query which is not possible to write with zio-sql - or the generated sql query looks differently then expected - please contact us on discord and we will try to add your use case to the next release :) Now let’s explore what is possible today. + +### Subquery +Subquery is a query which is a part of another query. It’s executed first - before outer query - and then its result is used in outer query. + +Now let’s say we want to build following query (this is on MSSQL Server) : + +```sql +select order_id, product_id, unit_price +from order_details +where unit_price > (select AVG(price) from product_prices ) +``` +We want to match details about orders, but we are interested only in those orders where price is higher than average price of all the products from `product_prices` table. + +This is the meta model that we are working with: +```scala +val productPrices = + (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + +val id :*: effective :*: price :*: _ = productPrices.columns + +val orderDetails = + (uuid("order_id") ++ uuid("product_id") ++ bigDecimal("unit_price")).table("order_details") + +val orderDetailsId :*: productId :*: unitPrice :*: _ = orderDetails.columns +``` +We can create query very easily. In fact, just type it like a regular sql query and let your IDE auto completion guide you! +```scala +val query = select(orderDetailsId ++ productId ++ unitPrice) + .from(orderDetails) + .where( + unitPrice > select(Avg(price)).from(productPrices) + ) +``` +Then you can either execute the query to selected types or inspect sql query represented as a String. +You just need a custom data type (Row in our example) to encapsulate results of a selection. +```scala +case class Row(orderId: UUID, productId: UUID, unitPrice: BigDecimal) + +val result: ZStream[Has[SqlDriver],Exception,Row] = execute(query.to[UUID, UUID, BigDecimal, Row](Row.apply)) + +val sqlQuery: String = renderRead(query) +``` +Similarly you can use subqueries inside `select` clause. + +### Correlated subqueries +Correlated subqueries are the ones that are executed after the outer query. They can be dependent on the result of the outer query and therefore they are executed for each resulting row of the outer query. + +Lets say we want to build the following query: +```sql +select first_name, last_name, + ( select count(orders.id) from orders where customers.id = orders.customer_id ) as "count" +from customers +``` +This would return the count of orders for each customer. + +Description of tables: +```scala +val customers = (uuid("id") ++ string("first_name") ++ string("last_name"))).table("customers") + +val customerId :*: fName :*: lName _ = customers.columns + +val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + +val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns +``` +ZIO SQL query: +```scala +val subquery = + customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) + +val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) +``` +All of these examples and more can be found and run in zio-sql tests. + +### Correlated subquery in from clause & Derived tables +Just one last, a little more complex example before we wrap up this section, for which we would use the same *customers* and *orders* tables as before. +```scala +val customers = (uuid("id") ++ string("first_name") ++ string("last_name"))).table("customers") + +val customerId :*: fName :*: lName _ = customers.columns + +val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + +val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns +``` +Imagine we want to write a query that selects all customers with the date of their last order. If you approach this problem with JOIN, you end up with one row of a customer with the newest order. In fact, this is a good example of correlated subquery inside `from` clause, where subquery needs to access `customer_id` of the outer query. For this type of problems postgres introduced **LATERAL** keyword and MSSQL Server have **CROSS APPLY** and **OUTER APPLY**. +```sql +select customers.id, customers.first_name, customers.last_name, derived.order_date + from customers, + lateral ( + select orders.order_date + from orders + where customers.id = orders.customer_id + order by orders.order_date desc limit 1 ) derived order by derived.order_date desc +``` +Now it’s starting to be a little more complicated. First we need to create a `subselect` which can access columns from another source table - `customers` in our case. Then we specify this source as a type parameter to `subselect`. In order to build the whole query we also need `derived.order_date` which is coming from `derived` table, so that we can extract that column. We create `derivedTable` by calling `asTable(tableName: String)` method on `subselect`. +```scala + val derivedTable = subselect[customers.TableType](orderDate) + .from(orders) + .limit(1) + .where(customerId === fkCustomerId) + .orderBy(Ordering.Desc(orderDate)) + .asTable("derived") + +val orderDateDerived :*: _ = derivedTable +``` +Finally, we have all the ingredients we need to describe our query with zio-sql. +```scala +import PostgresSpecific.PostgresSpecificTable._ + +val query = + select(customerId ++ fName ++ lName ++ orderDateDerived) + .from(customers.lateral(derivedTable)) + .orderBy(Ordering.Desc(orderDateDerived)) +``` \ No newline at end of file diff --git a/docs/overview/index.md b/docs/overview/index.md index a197103a8..ff4a4cef6 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -76,6 +76,10 @@ val orderColumns = uuid("id") ++ uuid("product_id") ++ int("quantity") ++ localD val orders = orderColumns.table("orders") ``` +## Table schema decomposition + +TODO + ## Selects Simple select. @@ -125,263 +129,12 @@ val limitedResults = ## Inserts -In this chapter we will explore how to write type safe inserts with zio-sql. - -### Table description -As usual, in order to use the DSL, first thing we need to do is to create meta-model of our table. Let’s imagine we have a *customers* table in postgres (in case of a different database just extend the appropriate module) -```scala -import zio.sql.postgresql.PostgresModule - -trait TableModel extends PostgresModule { - - import ColumnSet._ - - val customers = - (uuid("id") ++ localDate(“date_of_birth”) ++ string("first_name") ++ string("last_name") ++ boolean("verified_customer") ++ zonedDateTime("created")) - .table("customers") - - val customerId :*: dob :*: fName :*: lName :*: verified :*: created :*: _ = customers.columns -} -``` -Then, to use zio-sql ’s inserts, just mix in `TableModel` trait from above, to your repository. - -In case you’re wondering what those extracted columns are (customerId, dob etc), they are of a type called *Expr*. -`Expr[F, A, B]` is fundamental abstraction in zio-sql which basically represents description of any SQL expression of type `B`, having a source of type `A` and a phantom type `F`. -To give specific example, type of `fName` is -```scala -Expr[Features.Source[String(“first_name”)], customers.TableType, String]. -``` -This gives DSL huge power to remember table from which the column comes from, type of the columns and what kind of Expr we are dealing with. Don’t worry, you don’t need to remember any of this, but from now on we will use those Expr instances in our inserts. - -In general, DSL is giving us two options how to approach inserts. We can insert either tuple values or used defined case class - which requires zio-schema instance (more on that later). -Also your custom data type or tuple need to consist only of the types for which there is a `TypeTag` instance defined. Each sql module has a finite set of such types - those are the types that particular module can work with. In other words, types inside your tuples or case class need to correspond with the types of the extracted Exprs. - -### Insert tuples -Let’s say we want to build the query like the following one: -```sql -insert into - customers(id, date_of_birth, first_name, last_name, verified_customer, created) -values - ('60b01fc9-c902-4468-8d49-3c0f989def37', ‘1983-01-05’, 'Ronald', 'Russell', true, '2020-11-21 19:10:25+00') -``` -zio-sql gives us nice typesafe DSL that feels similar to writing SQL: -```scala -insertInto(customers) - (customerId ++ dob ++ fName ++ lName ++ verified ++ created) - .values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) -``` -Compiler verifies your inserts and your query fails with compile-time error at any of the following situations: -- you mess up the order of values - e.g. you put Boolean where String is expected -- you don’t specify all the not null columns of the table -- you try to insert to columns from another table - -Some details about syntax: `insertInto` method takes two value parameters. One is our table `customers` that we created before in *Table description* section. The other is an *HList like* collection of Expr’s, called `Selection`. You create it by appending Exprs with “++” operator. -`values` method takes a Tuple6 of type (UUID, LocalDate, String, String, Boolean, ZonedDateTime). The required tuple is dependent on combination of Exprs. Just like with normal sql insert, you could swap `fName` with `dob` Expr and corresponding values and your query will work just fine. Compiler will only let you build such queries that won’t explode in runtime (in case you described your table correctly of course ! ) - -If we need to insert multiple values at once, all we need to do is to create any `Seq` of tuples and stick it into the overloaded `values` method. -```scala -val data = - List( - (UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald1", "Russel1", true, ZonedDateTime.now()), - (UUID.randomUUID(), LocalDate.ofYearDay(1980, 1), "Ronald2", "Russel2", false, ZonedDateTime.now()), - (UUID.randomUUID(), LocalDate.ofYearDay(1970, 1), "Ronald3", "Russel3", true, ZonedDateTime.now()) - ) - -val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp - ).values(data) -``` - -In this case, data is of type `List[(UUID, LocalDate, String, String, Boolean, ZonedDateTime)]` - -### Insert custom case class -ZIO SQL lets you insert also your own case classes. -Let’s define a *customer* case class: - -```scala -final case class Customer( - id: UUID, - dateOfBirth: LocalDate, - firstName: String, - lastName: String, - verified: Boolean, - createdTimestamp: ZonedDateTime - ) -``` - -In this case, the name of the fields makes no difference. Similarly to writing sql, the order of the fields is important. - -zio-sql also needs an implicit instance of zio-schema for your data type. You can define it easily: - -```scala -import zio.schema.DeriveSchema -implicit val customerSchema = DeriveSchema.gen[Customer] -``` - -Then your insert looks almost the same as before: -```scala -val data: Customer = Customer(UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russel", true, ZonedDateTime.now()) - -val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp - ).values(data) -``` -Or you can insert multiple rows at once. Just define data as a `List` or any collection of your choice. - -```scala -val data : List[Customer] = ??? -``` - -### Show generated SQL query - -In case you want to see the exact query that zio-sql generated, you can use `renderInsert` method inside repo that has PostgresModule (or TableModel from above example) mixed in. -```scala -val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp - ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) - -val sqlString: String = renderInsert(query) -``` - -### Execute the query - -In order to execute a query, we use `execute` method inside repo that has PostgresModule (or TableModel from the above example) mixed in. ```scala -val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp - ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) - -val executed : ZIO[Has[SqlDriver], Exception, Int] = execute(query) -``` -As the type of `executed` indicates, you need to provide an `SqlDriver` in order to run this effect. The result *Int* is the number of rows updated. - -### More examples -More examples can be found in zio-sql test suite (`PostgresModuleSpec`, `SqlServerModuleSpec`, …) or in zio-sql-example application in resources. - -### What is missing -As of now - Q1 2022 - zio-sql contributors is actively working on: -- returning generated IDs from inserts -- introduce nullable columns - for which user won’t need to input values -- introduce auto generated columns - for which user cannot input values - -## Subqueries & Correlated subqueries - -The goal of ZIO SQL is to give users the ability to describe also queries much more complex than just simple selects or joins. In this section we will introduce a few examples of subqueries and correlated subqueries. In case you will find a query which is not possible to write with zio-sql - or the generated sql query looks differently then expected - please contact us on discord and we will try to add your use case to the next release :) Now let’s explore what is possible today. - -### Subquery -Subquery is a query which is a part of another query. It’s executed first - before outer query - and then its result is used in outer query. - -Now let’s say we want to build following query (this is on MSSQL Server) : - -```sql -select order_id, product_id, unit_price -from order_details -where unit_price > (select AVG(price) from product_prices ) -``` -We want to match details about orders, but we are interested only in those orders where price is higher than average price of all the products from `product_prices` table. - -This is the meta model that we are working with: -```scala -val productPrices = - (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - -val id :*: effective :*: price :*: _ = productPrices.columns - -val orderDetails = - (uuid("order_id") ++ uuid("product_id") ++ bigDecimal("unit_price")).table("order_details") - -val orderDetailsId :*: productId :*: unitPrice :*: _ = orderDetails.columns -``` -We can create query very easily. In fact, just type it like a regular sql query and let your IDE auto completion guide you! -```scala -val query = select(orderDetailsId ++ productId ++ unitPrice) - .from(orderDetails) - .where( - unitPrice > select(Avg(price)).from(productPrices) - ) +insertInto(products) + (productId ++ name ++ price) + .values((UUID.randomUUID(), "Zionomicon", 10.5)) ``` -Then you can either execute the query to selected types or inspect sql query represented as a String. -You just need a custom data type (Row in our example) to encapsulate results of a selection. -```scala -case class Row(orderId: UUID, productId: UUID, unitPrice: BigDecimal) - -val result: ZStream[Has[SqlDriver],Exception,Row] = execute(query.to[UUID, UUID, BigDecimal, Row](Row.apply)) - -val sqlQuery: String = renderRead(query) -``` -Similarly you can use subqueries inside `select` clause. - -### Correlated subqueries -Correlated subqueries are the ones that are executed after the outer query. They can be dependent on the result of the outer query and therefore they are executed for each resulting row of the outer query. -Lets say we want to build the following query: -```sql -select first_name, last_name, - ( select count(orders.id) from orders where customers.id = orders.customer_id ) as "count" -from customers -``` -This would return the count of orders for each customer. - -Description of tables: -```scala -val customers = (uuid("id") ++ string("first_name") ++ string("last_name"))).table("customers") - -val customerId :*: fName :*: lName _ = customers.columns - -val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - -val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns -``` -ZIO SQL query: -```scala -val subquery = - customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) - -val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) -``` -All of these examples and more can be found and run in zio-sql tests. - -### Correlated subquery in from clause & Derived tables -Just one last, a little more complex example before we wrap up this section, for which we would use the same *customers* and *orders* tables as before. -```scala -val customers = (uuid("id") ++ string("first_name") ++ string("last_name"))).table("customers") - -val customerId :*: fName :*: lName _ = customers.columns - -val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - -val orderId :*: fkCustomerId :*: orderDate :*: _ = orders.columns -``` -Imagine we want to write a query that selects all customers with the date of their last order. If you approach this problem with JOIN, you end up with one row of a customer with the newest order. In fact, this is a good example of correlated subquery inside `from` clause, where subquery needs to access `customer_id` of the outer query. For this type of problems postgres introduced **LATERAL** keyword and MSSQL Server have **CROSS APPLY** and **OUTER APPLY**. -```sql -select customers.id, customers.first_name, customers.last_name, derived.order_date - from customers, - lateral ( - select orders.order_date - from orders - where customers.id = orders.customer_id - order by orders.order_date desc limit 1 ) derived order by derived.order_date desc -``` -Now it’s starting to be a little more complicated. First we need to create a `subselect` which can access columns from another source table - `customers` in our case. Then we specify this source as a type parameter to `subselect`. In order to build the whole query we also need `derived.order_date` which is coming from `derived` table, so that we can extract that column. We create `derivedTable` by calling `asTable(tableName: String)` method on `subselect`. -```scala - val derivedTable = subselect[customers.TableType](orderDate) - .from(orders) - .limit(1) - .where(customerId === fkCustomerId) - .orderBy(Ordering.Desc(orderDate)) - .asTable("derived") - -val orderDateDerived :*: _ = derivedTable -``` -Finally, we have all the ingredients we need to describe our query with zio-sql. -```scala -import PostgresSpecific.PostgresSpecificTable._ - -val query = - select(customerId ++ fName ++ lName ++ orderDateDerived) - .from(customers.lateral(derivedTable)) - .orderBy(Ordering.Desc(orderDateDerived)) -``` ## Updates TODO: details From cb769b6ce74debc9245d9439a7d02fbb378f088a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 22 Feb 2022 15:00:38 +0100 Subject: [PATCH 363/673] Update zio-schema, zio-schema-derivation to 0.1.8 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9e6fd43d0..097217855 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "2.0.0-RC2" -val zioSchemaVersion = "0.1.7" +val zioSchemaVersion = "0.1.8" val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.2" From 051b29d0c13ce06fae2e84707eed81e32f60ae16 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 22 Feb 2022 21:27:25 +0100 Subject: [PATCH 364/673] having is sound now --- core/jvm/src/main/scala/zio/sql/select.scala | 31 +++++++--- .../scala/zio/sql/GroupByHavingSpec.scala | 61 +++++++++++++++++-- 2 files changed, 77 insertions(+), 15 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 388882aa4..e98c66f79 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -224,6 +224,23 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]](self, name) } + /** + * `HAVING` can only be called: + * + * 1. If its called with an aggregated function returning boolean like `Having Count(id) > 5`, + * while all the previously selected columns appeared in group by clause. + * 2. If its called with a normal expression returning boolean like `having customer_id = '636ae137-5b1a-4c8c-b11f-c47c624d9cdc`` + * and all the previously selected columns appeared in group by clause. + */ + trait HavingIsSound[F, GroupByF] + + object HavingIsSound { + implicit def havingWasGroupedBy[F, GroupByF, Remainder](implicit + i: Features.IsPartiallyAggregated.WithRemainder[F, Remainder], + ev: GroupByF <:< Remainder + ): HavingIsSound[F, GroupByF] = new HavingIsSound[F, GroupByF] {} + } + type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] sealed case class Subselect[F, Repr, Source, Subsource, Head, Tail <: SelectionSet[Source]]( @@ -255,17 +272,13 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) - /** - * `HAVING` can only be called: - * 1. with aggregate functions - `having Count(id) > 5` - * 2. within `fully aggregated` selection - meaning either only aggregate functions are in `select` or columns which are selected are also groupped by. - * `Remainder` references not aggregated columns. GroupByF is a type containing `F` by which `groupBy` was called. - */ - def having[F2: Features.IsFullyAggregated, Remainder]( + + def having[F2, Remainder]( havingExpr2: Expr[F2, Source, Boolean] )(implicit i: Features.IsPartiallyAggregated.WithRemainder[F, Remainder], - ev: GroupByF <:< Remainder + ev: GroupByF <:< Remainder, + i2: HavingIsSound[F2, GroupByF] ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(havingExpr = self.havingExpr && havingExpr2) @@ -300,7 +313,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro override type GroupByF = self.GroupByF with F1 with F2 with F3 with F4 with F5 with F6 } /** - * TODO add arities up to 22 when needed + * TODO add arities up to 22 when needed / requested by users */ def groupBy[F1: Features.IsNotAggregated, F2: Features.IsNotAggregated, F3: Features.IsNotAggregated, F4: Features.IsNotAggregated, F5: Features.IsNotAggregated, F6: Features.IsNotAggregated, F7: Features.IsNotAggregated](expr1: Expr[F1, Source, Any], expr2: Expr[F2, Source, Any], expr3: Expr[F3, Source, Any], expr4: Expr[F4, Source, Any], expr5: Expr[F5, Source, Any], expr6: Expr[F6, Source, Any], expr7: Expr[F7, Source, Any]): Subselect.WithGroupByF[F, Repr, Source, Subsource, Head, Tail, self.GroupByF with F1 with F2 with F3 with F4 with F5 with F6 with F7] = new Subselect(selection, table, whereExpr, self.groupByExprs ++ expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7, havingExpr, orderByExprs, offset, limit) { diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 8327fa619..f5c30c2ae 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -41,22 +41,71 @@ object AggregatedProductSchema { .from(productTable) .groupBy(price) - val orderValue = - select(name ++ Sum(price)) + val hvng : Expr[Features.Source["price",productTable.TableType], productTable.TableType, Boolean] = (Sum(price) > 10).asInstanceOf + val hvng2 : Expr[Features.Source["amount",productTable.TableType], productTable.TableType, Boolean] = (amount > 10).asInstanceOf + + val e = Sum(price) > 10 + + def testF[F, A, B](value : Expr[F, A, B])(implicit in: Features.IsFullyAggregated[F]) = ??? + + def test2[F, A, B](value : Expr[F, A, B])(implicit i: Features.IsPartiallyAggregated[F]) : i.Unaggregated = ??? + + val q = test2(amount > 10) + val q1 = test2(Count(amount) > 10) + + val qw = amount > 10 + + testF(e) + testF(Expr.literal(true)) + + val orderValue = select(name ++ Sum(price)) .from(productTable) .groupBy(name, price) .having(Sum(price) > 10) - val orderValue2 = - select(Sum(price)) + select(Sum(price)) .from(productTable) .groupBy(name) .having(Sum(price) > 10) - val orderValue3 = - select(name ++ amount ++ price) + select(name ++ amount ++ price) .from(productTable) .groupBy(name, amount, price) .having(Sum(price) > 10) + select(amount) + .from(productTable) + .groupBy(amount) + .having(amount > 10) + + select(Sum(price)) + .from(productTable) + .groupBy(name) + .having(name > 10) + + select(price) + .from(productTable) + .groupBy(price) + .having(Count(price) > 10) + + // Following should not compile + // select(amount ++ price) + // .from(productTable) + // .groupBy(amount) + // .having(amount > 10) + + // select(price) + // .from(productTable) + // .groupBy(name) + // .having(name > 10) + + // select(price ++ name) + // .from(productTable) + // .groupBy(price) + // .having(Count(price) > 10) + + // select(price) + // .from(productTable) + // .having(Count(price) > 10) + } From 8df1939f43e47926d4e31b0be1a0d3142de4145e Mon Sep 17 00:00:00 2001 From: sviezypan Date: Wed, 23 Feb 2022 13:42:20 +0100 Subject: [PATCH 365/673] fixed formatting problem --- core/jvm/src/main/scala/zio/sql/Sql.scala | 3 +- core/jvm/src/main/scala/zio/sql/insert.scala | 484 +----------------- .../src/main/scala/zio/sql/insertutils.scala | 400 +++++++++++++++ core/jvm/src/main/scala/zio/sql/select.scala | 5 +- 4 files changed, 405 insertions(+), 487 deletions(-) create mode 100644 core/jvm/src/main/scala/zio/sql/insertutils.scala diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 4ae4d947d..4cc4dd01f 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -10,7 +10,8 @@ trait Sql with ExprModule with TableModule with InsertModule - with UtilsModule { + with UtilsModule + with InsertUtilsModule { self => /* diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 2ef2f95c0..f2ced0961 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -11,7 +11,7 @@ import zio.schema.Schema * insertInto(customers)(customerId +++ fName +++ lName +++ verified +++ dob) * .values(data) */ -trait InsertModule { self: ExprModule with TableModule with SelectModule => +trait InsertModule { self: ExprModule with TableModule with SelectModule with InsertUtilsModule => sealed case class InsertBuilder[F, Source, AllColumnIdentities, B <: SelectionSet[Source], ColsRepr]( table: Table.Source.Aux_[Source, AllColumnIdentities], @@ -32,486 +32,4 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule => sealed case class Insert[A, Z](table: Table.Source.Aux[A], sources: SelectionSet[A], values: Seq[Z])(implicit schemaN: Schema[Z] ) - - sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] - - // format: off - object SchemaValidity extends SchemaValidityCaseClasses { - implicit def tuple1[F, A1, ColsRepr, AllColumnIdentities, Source, Identity1](implicit - ev1: Schema[A1], - ev2: ColsRepr <:< (A1, Unit), - ev3: F <:< Features.Source[Identity1, Source], - //TODO find other way to check if selection set contains some set of columns from table - ev4: AllColumnIdentities =:= Identity1 - ): SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit - ev1: Schema[(A1, A2)], - ev2: ColsRepr <:< (A1, (A2, Unit)), - ev3: F <:< Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 - ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple3[F, A1, A2, A3, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3](implicit - ev1: Schema[(A1, A2, A3)], - ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), - ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 - ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple4[F, A1, A2, A3, A4, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4](implicit - ev1: Schema[(A1, A2, A3, A4)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 - ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple5[F, A1, A2, A3, A4, A5, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 - ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple6[F, A1, A2, A3, A4, A5, A6, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] {} - - implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] - (implicit - ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), - ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 - ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] {} - } - - trait SchemaValidityCaseClasses { - implicit def caseClass1[F, A, Z, ColsRepr, AllColumnIdentities, Source, Identity1](implicit - ccSchema: Schema.CaseClass1[A, Z], - ev: ColsRepr <:< (A, Unit), - ev2: F <:< Features.Source[Identity1, Source], - ev3: AllColumnIdentities =:= Identity1 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit - ccSchema: Schema.CaseClass2[A1, A2, Z], - ev: ColsRepr <:< (A1, (A2, Unit)), - ev2: F <:< :||:[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3](implicit - ccSchema: Schema.CaseClass3[A1, A2, A3, Z], - ev: ColsRepr <:< (A1, (A2, (A3, Unit))), - ev2: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4](implicit - ccSchema: Schema.CaseClass4[A1, A2, A3, A4, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5](implicit - ccSchema: Schema.CaseClass5[A1, A2, A3, A4, A5, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6](implicit - ccSchema: Schema.CaseClass6[A1, A2, A3, A4, A5, A6, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7](implicit - ccSchema: Schema.CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8](implicit - ccSchema: Schema.CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9](implicit - ccSchema: Schema.CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10](implicit - ccSchema: Schema.CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11](implicit - ccSchema: Schema.CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12](implicit - ccSchema: Schema.CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13](implicit - ccSchema: Schema.CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14](implicit - ccSchema: Schema.CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z], - ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15](implicit - ccSchema: Schema.CaseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z], - ev: ColsRepr <:< ( - A1, - (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit)))))))))))))) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16]( - implicit - ccSchema: Schema.CaseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z], - ev: ColsRepr <:< ( - A1, - (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit))))))))))))))) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17]( - implicit - ccSchema: Schema.CaseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z], - ev: ColsRepr <:< ( - A1, - (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit)))))))))))))))) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass18[ - F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18 - ](implicit - ccSchema: Schema.CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z], - ev: ColsRepr <:< ( - A1, - ( - A2, - (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))) - ) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass19[ - F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19 - ](implicit - ccSchema: Schema.CaseClass19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z], - ev: ColsRepr <:< ( - A1, - ( - A2, - ( - A3, - ( - A4, - (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))) - ) - ) - ) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass20[ - F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20 - ](implicit - ccSchema: Schema.CaseClass20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z], - ev: ColsRepr <:< ( - A1, - ( - A2, - ( - A3, - ( - A4, - ( - A5, - ( - A6, - (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))) - ) - ) - ) - ) - ) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21 - ](implicit - ccSchema: Schema.CaseClass21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z], - ev: ColsRepr <:< ( - A1, - ( - A2, - ( - A3, - ( - A4, - ( - A5, - ( - A6, - ( - A7, - (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit)))))))))))))) - ) - ) - ) - ) - ) - ) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - - implicit def caseClass22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22 - ](implicit - ccSchema: Schema.CaseClass22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z], - ev: ColsRepr <:< ( - A1, - ( - A2, - ( - A3, - ( - A4, - ( - A5, - ( - A6, - ( - A7, - ( - A8, - ( - A9, - (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit))))))))))))) - ) - ) - ) - ) - ) - ) - ) - ) - ), - ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 - ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = - new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} - } - // format: on } diff --git a/core/jvm/src/main/scala/zio/sql/insertutils.scala b/core/jvm/src/main/scala/zio/sql/insertutils.scala new file mode 100644 index 000000000..40f1e31fe --- /dev/null +++ b/core/jvm/src/main/scala/zio/sql/insertutils.scala @@ -0,0 +1,400 @@ +package zio.sql + +import zio.schema.Schema + +trait InsertUtilsModule { self: FeaturesModule => + + sealed trait SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] + + // format: off + object SchemaValidity extends SchemaValidityCaseClasses { + implicit def tuple1[F, A1, ColsRepr, AllColumnIdentities, Source, Identity1](implicit + ev1: Schema[A1], + ev2: ColsRepr <:< (A1, Unit), + ev3: F <:< Features.Source[Identity1, Source], + //TODO find other way to check if selection set contains some set of columns from table + ev4: AllColumnIdentities =:= Identity1 + ): SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit + ev1: Schema[(A1, A2)], + ev2: ColsRepr <:< (A1, (A2, Unit)), + ev3: F <:< Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 + ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple3[F, A1, A2, A3, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3](implicit + ev1: Schema[(A1, A2, A3)], + ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), + ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 + ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple4[F, A1, A2, A3, A4, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4](implicit + ev1: Schema[(A1, A2, A3, A4)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 + ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple5[F, A1, A2, A3, A4, A5, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple6[F, A1, A2, A3, A4, A5, A6, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] {} + + implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] + (implicit + ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)], + ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), + ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], + ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 + ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] {} + } + // format: on + + // format: off + trait SchemaValidityCaseClasses { + implicit def caseClass1[F, A, Z, ColsRepr, AllColumnIdentities, Source, Identity1](implicit + ccSchema: Schema.CaseClass1[A, Z], + ev: ColsRepr <:< (A, Unit), + ev2: F <:< Features.Source[Identity1, Source], + ev3: AllColumnIdentities =:= Identity1 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass2[F, A1, A2, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit + ccSchema: Schema.CaseClass2[A1, A2, Z], + ev: ColsRepr <:< (A1, (A2, Unit)), + ev2: F <:< :||:[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass3[F, A1, A2, A3, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3](implicit + ccSchema: Schema.CaseClass3[A1, A2, A3, Z], + ev: ColsRepr <:< (A1, (A2, (A3, Unit))), + ev2: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass4[F, A1, A2, A3, A4, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4](implicit + ccSchema: Schema.CaseClass4[A1, A2, A3, A4, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass5[F, A1, A2, A3, A4, A5, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5](implicit + ccSchema: Schema.CaseClass5[A1, A2, A3, A4, A5, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass6[F, A1, A2, A3, A4, A5, A6, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6](implicit + ccSchema: Schema.CaseClass6[A1, A2, A3, A4, A5, A6, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass7[F, A1, A2, A3, A4, A5, A6, A7, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7](implicit + ccSchema: Schema.CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass8[F, A1, A2, A3, A4, A5, A6, A7, A8, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8](implicit + ccSchema: Schema.CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9](implicit + ccSchema: Schema.CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10](implicit + ccSchema: Schema.CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11](implicit + ccSchema: Schema.CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12](implicit + ccSchema: Schema.CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13](implicit + ccSchema: Schema.CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14](implicit + ccSchema: Schema.CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15](implicit + ccSchema: Schema.CaseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16]( + implicit + ccSchema: Schema.CaseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17]( + implicit + ccSchema: Schema.CaseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass18[ + F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18 + ](implicit + ccSchema: Schema.CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], + ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + implicit def caseClass19[ + F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19 + ](implicit + ccSchema: Schema.CaseClass19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z], + ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), + ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], + ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 + ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + // TODO fix scalafmt error - it fails in caseClass22 and above because of - `Search state exploded` + // https://scalameta.org/scalafmt/docs/known-issues.html#deeply-nested-code + + // implicit def caseClass20[ + // F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20 + // ](implicit + // ccSchema: Schema.CaseClass20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z], + // ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), + // ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], + // ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 + // ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + // new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + // implicit def caseClass21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21 + // ](implicit + // ccSchema: Schema.CaseClass21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z], + // ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), + // ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], + // ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 + // ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + // new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + + // implicit def caseClass22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22 + // ](implicit + // ccSchema: Schema.CaseClass22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z], + // ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), + // ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], + // ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 + // ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = + // new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} + } + // format: on +} diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 238fde6da..73b82efd4 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -238,7 +238,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro implicit def havingWasGroupedBy[F, GroupByF, Remainder](implicit i: Features.IsPartiallyAggregated.WithRemainder[F, Remainder], ev: GroupByF <:< Remainder - ): HavingIsSound[F, GroupByF] = new HavingIsSound[F, GroupByF] {} + ): HavingIsSound[F, GroupByF] = new HavingIsSound[F, GroupByF] {} } type Select[F, Repr, Source, Head, Tail <: SelectionSet[Source]] = Subselect[F, Repr, Source, Source, Head, Tail] @@ -256,7 +256,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro type GroupByF <: Any - //TODO add F2: Features.IsNotAggregated constraint when https://github.com/zio/zio-sql/issues/583 is fixed + // TODO add F2: Features.IsNotAggregated constraint when https://github.com/zio/zio-sql/issues/583 is fixed def where[F2]( whereExpr2: Expr[F2, Source, Boolean] ): Subselect[F, Repr, Source, Subsource, Head, Tail] = @@ -272,7 +272,6 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro ): Subselect[F, Repr, Source, Subsource, Head, Tail] = copy(orderByExprs = self.orderByExprs ++ (o :: os.toList)) - def having[F2, Remainder]( havingExpr2: Expr[F2, Source, Boolean] )(implicit From cf38778004323582651bc868dcdad5c180e34217 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 02:32:00 +0000 Subject: [PATCH 366/673] Bump prismjs from 1.26.0 to 1.27.0 in /website Bumps [prismjs](https://github.com/PrismJS/prism) from 1.26.0 to 1.27.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](https://github.com/PrismJS/prism/compare/v1.26.0...v1.27.0) --- updated-dependencies: - dependency-name: prismjs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 95a866727..d5e982e97 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -9501,9 +9501,9 @@ } }, "node_modules/prismjs": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.26.0.tgz", - "integrity": "sha512-HUoH9C5Z3jKkl3UunCyiD5jwk0+Hz0fIgQ2nbwU2Oo/ceuTAQAg+pPVnfdt2TJWRVLcxKh9iuoYDUSc8clb5UQ==", + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", + "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", "dev": true, "engines": { "node": ">=6" @@ -20266,9 +20266,9 @@ "dev": true }, "prismjs": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.26.0.tgz", - "integrity": "sha512-HUoH9C5Z3jKkl3UunCyiD5jwk0+Hz0fIgQ2nbwU2Oo/ceuTAQAg+pPVnfdt2TJWRVLcxKh9iuoYDUSc8clb5UQ==", + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", + "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", "dev": true }, "process-nextick-args": { From e429ff03382e8aced277be4144b56d660100a0d6 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 26 Feb 2022 12:03:54 +0100 Subject: [PATCH 367/673] change as instance of to Option.empty --- .../src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 5494bed59..5aab6a91c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -635,7 +635,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { // TODO improve // https://github.com/zio/zio-sql/issues/585 val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Martin", "Harvey", None.asInstanceOf[Option[LocalDate]])) + .values((UUID.randomUUID(), "Martin", "Harvey", Option.empty[LocalDate])) val insertNone2 = insertInto(persons)(personId ++ fName ++ lName ++ dob) .values(personValue) From 76cf55fa87e8734e9a688a2e6568cc49c6ea148b Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 27 Feb 2022 11:06:57 +0100 Subject: [PATCH 368/673] deleted shop_schema.sql --- sqlserver/src/test/resources/shop_schema.sql | 193 ------------------- 1 file changed, 193 deletions(-) delete mode 100644 sqlserver/src/test/resources/shop_schema.sql diff --git a/sqlserver/src/test/resources/shop_schema.sql b/sqlserver/src/test/resources/shop_schema.sql deleted file mode 100644 index 9b567223d..000000000 --- a/sqlserver/src/test/resources/shop_schema.sql +++ /dev/null @@ -1,193 +0,0 @@ -create table customers -( - id uniqueidentifier not null primary key, - first_name varchar(32) not null, - last_name varchar(32) not null, - verified bit not null, - dob date not null, - created_timestamp_string varchar(32) not null, - created_timestamp datetime default CURRENT_TIMESTAMP -); - -create table orders -( - id uniqueidentifier not null primary key, - customer_id uniqueidentifier not null, - order_date date not null -); - -create table products -( - id uniqueidentifier not null primary key, - name varchar(32), - description varchar(128) not null, - image_url varchar(256) -); - -create table product_prices -( - product_id uniqueidentifier not null, - effective date not null, - price money not null -); - -create table order_details -( - order_id uniqueidentifier not null, - product_id uniqueidentifier not null, - quantity integer not null, - unit_price money not null -); - -insert into customers - (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) -values - ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 1, '1983-01-05', '2020-11-21T19:10:25', '2020-11-21 19:10:25'), - ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', 1, '1999-11-02', '2020-11-21T15:10:25', '2020-11-21 15:10:25'), - ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', 1, '1990-11-16', '2020-11-22T02:10:25', '2020-11-22 02:10:25'), - ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', 1, '1995-11-12', '2020-11-21T12:10:25', '2020-11-21 12:10:25'), - ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', 0, '1987-03-23', '2020-11-21T19:10:25', '2020-11-21 19:10:25'); - -insert into products - (id, name, description, image_url) -values - ('7368ABF4-AED2-421F-B426-1725DE756895', 'Thermometer', 'Make sure you don''t have a fever (could be covid!)', 'https://images.pexels.com/photos/3987152/pexels-photo-3987152.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), - ('4C770002-4C8F-455A-96FF-36A8186D5290', 'Slippers', 'Keep your feet warm this winter', 'https://images.pexels.com/photos/1989843/pexels-photo-1989843.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), - ('05182725-F5C8-4FD6-9C43-6671E179BF55', 'Mouse Pad', 'Who uses these anyway?', 'https://images.pexels.com/photos/3944396/pexels-photo-3944396.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), - ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', 'Pants', 'Avoid a lawsuit, wear pants to work today!', 'https://images.pexels.com/photos/52518/jeans-pants-blue-shop-52518.jpeg?cs=srgb&dl=blue-jeans-clothes-shopping-52518.jpg&fm=jpg'), - ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', 'Nail File', 'Keep those nails looking good', 'https://images.pexels.com/photos/3997373/pexels-photo-3997373.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'), - ('D5137D3A-894A-4109-9986-E982541B434F', 'Teddy Bear', 'Because sometimes you just need something to hug', 'https://images.pexels.com/photos/1019471/stuffed-bear-teddy-child-girl-1019471.jpeg?cs=srgb&dl=closeup-photography-of-brown-teddy-bear-1019471.jpg&fm=jpg'); - -insert into product_prices - (product_id, effective, price) -values - ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), - ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), - ('7368ABF4-AED2-421F-B426-1725DE756895', '2020-01-01', 12.00), - ('4C770002-4C8F-455A-96FF-36A8186D5290', '2018-01-01', 20.00), - ('4C770002-4C8F-455A-96FF-36A8186D5290', '2019-01-01', 22.00), - ('4C770002-4C8F-455A-96FF-36A8186D5290', '2020-01-01', 22.00), - ('05182725-F5C8-4FD6-9C43-6671E179BF55', '2018-01-01', 2.00), - ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2018-01-01', 70.00), - ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2019-01-01', 74.00), - ('105A2701-EF93-4E25-81AB-8952CC7D9DAA', '2020-01-01', 80.00), - ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2018-01-01', 5.00), - ('F35B0053-855B-4145-ABE1-DC62BC1FDB96', '2019-01-01', 6.00), - ('D5137D3A-894A-4109-9986-E982541B434F', '2018-01-01', 50.00), - ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00); - -insert into orders - (id, customer_id, order_date) -values - ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-03-25'), - ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-06-04'), - ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-08-19'), - ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-08-30'), - ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-03-07'), - ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', '2020-03-19'), - ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2020-05-11'), - ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-02-21'), - ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-05-06'), - ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-02-11'), - ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-10-12'), - ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-01-29'), - ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-02-10'), - ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-09-27'), - ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2018-11-13'), - ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2020-01-15'), - ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2018-07-10'), - ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-08-01'), - ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-12-08'), - ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-11-04'), - ('2c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2018-10-14'), - ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05'), - ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23'), - ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14'), - ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); - -insert into order_details - (order_id, product_id, quantity, unit_price) -values - ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), - ('38D66D44-3CFA-488A-AC77-30277751418F', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), - ('7B2627D5-0150-44DF-9171-3462E20797EE', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), - ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.90), - ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), - ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 9.09), - ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), - ('618AA21F-700B-4CA7-933C-67066CF4CD97', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 11.00), - ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), - ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 10.00), - ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), - ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 12.00), - ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), - ('876B6034-B33C-4497-81EE-B4E8742164C2', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), - ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 11.00), - ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.00), - ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 12.00), - ('5011D206-8EFF-42C4-868E-F1A625E1F186', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), - ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), - ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '7368ABF4-AED2-421F-B426-1725DE756895', 3, 12.00), - ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), - ('A243FA42-817A-44EC-8B67-22193D212D82', '4C770002-4C8F-455A-96FF-36A8186D5290', 5, 18.18), - ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), - ('38D66D44-3CFA-488A-AC77-30277751418F', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), - ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), - ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 18.18), - ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), - ('618AA21F-700B-4CA7-933C-67066CF4CD97', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), - ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 20.00), - ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), - ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), - ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), - ('876B6034-B33C-4497-81EE-B4E8742164C2', '4C770002-4C8F-455A-96FF-36A8186D5290', 2, 22.00), - ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), - ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 20.00), - ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), - ('5011D206-8EFF-42C4-868E-F1A625E1F186', '4C770002-4C8F-455A-96FF-36A8186D5290', 1, 22.00), - ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), - ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', '4C770002-4C8F-455A-96FF-36A8186D5290', 3, 22.00), - ('A243FA42-817A-44EC-8B67-22193D212D82', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), - ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 1.81), - ('D4E77298-D829-4E36-A6A0-902403F4B7D3', '05182725-F5C8-4FD6-9C43-6671E179BF55', 1, 2.00), - ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', '05182725-F5C8-4FD6-9C43-6671E179BF55', 3, 2.00), - ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), - ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 4, 74.00), - ('38D66D44-3CFA-488A-AC77-30277751418F', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), - ('7B2627D5-0150-44DF-9171-3462E20797EE', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 74.00), - ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 72.72), - ('9473A0BC-396A-4936-96B0-3EEA922AF36B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 80.00), - ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 67.27), - ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 67.27), - ('742D45A0-E81A-41CE-95AD-55B4CABBA258', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), - ('618AA21F-700B-4CA7-933C-67066CF4CD97', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), - ('606DA090-DD33-4A77-8746-6ED0E8443AB2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 67.27), - ('FD0FA8D4-E1A0-4369-BE07-945450DB5D36', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 80.00), - ('876B6034-B33C-4497-81EE-B4E8742164C2', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), - ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 5, 74.00), - ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 1, 70.00), - ('763A7C39-833F-4EE8-9939-E80DFDBFC0FC', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 3, 80.00), - ('5011D206-8EFF-42C4-868E-F1A625E1F186', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 6, 74.00), - ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', '105A2701-EF93-4E25-81AB-8952CC7D9DAA', 2, 74.00), - ('04912093-CC2E-46AC-B64C-1BD7BB7758C3', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), - ('A243FA42-817A-44EC-8B67-22193D212D82', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 4, 4.54), - ('9022DD0D-06D6-4A43-9121-2993FC7712A1', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), - ('38D66D44-3CFA-488A-AC77-30277751418F', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), - ('7B2627D5-0150-44DF-9171-3462E20797EE', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 6.00), - ('B8BAC18D-769F-48ED-809D-4B6C0E4D1795', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), - ('BEBBFE4D-4EC3-4389-BDC2-50E9EAC2B15B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), - ('742D45A0-E81A-41CE-95AD-55B4CABBA258', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), - ('606DA090-DD33-4A77-8746-6ED0E8443AB2', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), - ('4914028D-2E28-4033-A5F2-8F4FCDEE8206', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.45), - ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 5.00), - ('91CAA28A-A5FE-40D7-979C-BD6A128D0418', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), - ('401C7AB1-41CF-4756-8AF5-BE25CF2AE67B', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 2, 5.45), - ('5011D206-8EFF-42C4-868E-F1A625E1F186', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 1, 6.00), - ('0A48FFB0-EC61-4147-AF56-FC4DBCA8DE0A', 'F35B0053-855B-4145-ABE1-DC62BC1FDB96', 5, 6.00), - ('A243FA42-817A-44EC-8B67-22193D212D82', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), - ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', 'D5137D3A-894A-4109-9986-E982541B434F', 4, 50.00), - ('9473A0BC-396A-4936-96B0-3EEA922AF36B', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 55.00), - ('852E2DC9-4EC3-4225-A6F7-4F42F8FF728E', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 45.45), - ('D6D8DDDC-4B0B-4D74-8EDC-A54E9B7F35F7', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), - ('2C3FC180-D0DF-4D7B-A271-E6CCD2440393', 'D5137D3A-894A-4109-9986-E982541B434F', 2, 50.00), - ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00); From d5e76f2c5183c91d67db8bf6e8c1fd26e3a0e499 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 27 Feb 2022 11:11:44 +0100 Subject: [PATCH 369/673] fmt --- .../sql/sqlserver/SqlServerModuleSpec.scala | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 3f2a1f110..e3f730159 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -463,7 +463,7 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("handle isTrue to 1 bit type"){ + test("handle isTrue to 1 bit type") { import AggregationDef._ @@ -476,17 +476,17 @@ object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { assertM(result)(equalTo(4L)) }, - test("handle isNotTrue to 0 bit type"){ - import AggregationDef._ + test("handle isNotTrue to 0 bit type") { + import AggregationDef._ - val query = - select(Count(customerId)) - .from(customers) - .where(verified.isNotTrue) + val query = + select(Count(customerId)) + .from(customers) + .where(verified.isNotTrue) - val result = execute(query).runHead.some + val result = execute(query).runHead.some - assertM(result)(equalTo(1L)) + assertM(result)(equalTo(1L)) }, test("Can select from joined tables (inner join)") { val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) From 827ff9b080a7dfa5518bf6cd7fc5fb4380170bff Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 4 Mar 2022 18:18:16 +0100 Subject: [PATCH 370/673] cleanup group by examples --- .../scala/zio/sql/GroupByHavingSpec.scala | 96 +------------------ .../main/scala/zio/sql/GroupByExamples.scala | 77 +++++++++++++++ 2 files changed, 78 insertions(+), 95 deletions(-) create mode 100644 examples/src/main/scala/zio/sql/GroupByExamples.scala diff --git a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala index 059db8c2e..898d6edbd 100644 --- a/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/GroupByHavingSpec.scala @@ -2,107 +2,13 @@ package zio.sql import zio.test.Assertion.anything import zio.test.assert -import zio.schema.Schema import zio.test.ZIOSpecDefault object GroupByHavingSpec extends ZIOSpecDefault { - import AggregatedProductSchema._ - def spec = suite("groupBy")( test("works") { - assert(orderValue)(anything) + assert("")(anything) } ) } - -object AggregatedProductSchema { - val sqldsl = new Sql { self => - override def renderDelete(delete: self.Delete[_]): String = ??? - override def renderRead(read: self.Read[_]): String = ??? - override def renderUpdate(update: self.Update[_]): String = ??? - - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? - } - import sqldsl.ColumnSet._ - import sqldsl.AggregationDef._ - import sqldsl._ - - val productTable = ( - string("id") ++ - string("name") ++ - int("amount") ++ - double("price") - ).table("product") - - val (id, name, amount, price) = productTable.columns - - select(Count(price)) - .from(productTable) - .groupBy(price) - - val e = Sum(price) > 10 - - def testF[F, A, B](value: Expr[F, A, B])(implicit in: Features.IsFullyAggregated[F]) = ??? - - def test2[F, A, B](value: Expr[F, A, B])(implicit i: Features.IsPartiallyAggregated[F]): i.Unaggregated = ??? - - val q = test2(amount > 10) - val q1 = test2(Count(amount) > 10) - - val qw = amount > 10 - - testF(e) - testF(Expr.literal(true)) - - val orderValue = select(name ++ Sum(price)) - .from(productTable) - .groupBy(name, price) - .having(Sum(price) > 10) - - select(Sum(price)) - .from(productTable) - .groupBy(name) - .having(Sum(price) > 10) - - select(name ++ amount ++ price) - .from(productTable) - .groupBy(name, amount, price) - .having(Sum(price) > 10) - - select(amount) - .from(productTable) - .groupBy(amount) - .having(amount > 10) - - select(Sum(price)) - .from(productTable) - .groupBy(name) - .having(name > 10) - - select(price) - .from(productTable) - .groupBy(price) - .having(Count(price) > 10) - - // Following should not compile - // select(amount ++ price) - // .from(productTable) - // .groupBy(amount) - // .having(amount > 10) - - // select(price) - // .from(productTable) - // .groupBy(name) - // .having(name > 10) - - // select(price ++ name) - // .from(productTable) - // .groupBy(price) - // .having(Count(price) > 10) - - // select(price) - // .from(productTable) - // .having(Count(price) > 10) - -} diff --git a/examples/src/main/scala/zio/sql/GroupByExamples.scala b/examples/src/main/scala/zio/sql/GroupByExamples.scala new file mode 100644 index 000000000..2f9c92037 --- /dev/null +++ b/examples/src/main/scala/zio/sql/GroupByExamples.scala @@ -0,0 +1,77 @@ +package zio.sql + +import zio.sql.sqlserver.SqlServerModule + +object GroupByExamples extends App with ShopSchema with SqlServerModule { + import AggregationDef._ + import ColumnSet._ + + val productTable = ( + string("id") ++ + string("name") ++ + int("amount") ++ + double("price") + ).table("product") + + val (id, name, amount, price) = productTable.columns + + select(Count(price)) + .from(productTable) + .groupBy(price) + + val e = Sum(price) > 10 + + def testF[F, A, B](value: Expr[F, A, B])(implicit in: Features.IsFullyAggregated[F]) = ??? + + def test2[F, A, B](value: Expr[F, A, B])(implicit i: Features.IsPartiallyAggregated[F]): i.Unaggregated = ??? + + val orderValue = select(name ++ Sum(price)) + .from(productTable) + .groupBy(name, price) + .having(Sum(price) > 10) + + select(Sum(price)) + .from(productTable) + .groupBy(name) + .having(Sum(price) > 10) + + select(name ++ amount ++ price) + .from(productTable) + .groupBy(name, amount, price) + .having(Sum(price) > 10) + + select(amount) + .from(productTable) + .groupBy(amount) + .having(amount > 10) + + select(Sum(price)) + .from(productTable) + .groupBy(name) + .having(name > 10) + + select(price) + .from(productTable) + .groupBy(price) + .having(Count(price) > 10) + + // Following should not compile + // select(amount ++ price) + // .from(productTable) + // .groupBy(amount) + // .having(amount > 10) + + // select(price) + // .from(productTable) + // .groupBy(name) + // .having(name > 10) + + // select(price ++ name) + // .from(productTable) + // .groupBy(price) + // .having(Count(price) > 10) + + // select(price) + // .from(productTable) + // .having(Count(price) > 10) +} From 95d1ccae9b087fa93c1a531790790c61004fb7aa Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sat, 5 Mar 2022 17:14:46 +0100 Subject: [PATCH 371/673] Update README.md Add Sonatype Snapshot badge --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2cfb1d8a..f660a8ce5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ | Project Stage | CI | Discord | | --- | --- | --- | -| [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![badge-discord]][link-discord] | +| [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![Snapshot Artifacts][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots] | [![badge-discord]][link-discord] | ## Current status: pre-0.1 (no release yet) @@ -54,7 +54,9 @@ For the JDBC module: ZIO SQL does not offer Language Integrated Queries (LINQ) or similar functionality. It is intended only as a data model for representing SQL queries and an accompanying lightweight JDBC-based executor. [badge-ci]: https://github.com/zio/zio-sql/workflows/CI/badge.svg +[Badge-SonatypeSnapshots]: https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-sql_2.13.svg "Sonatype Snapshots" [badge-discord]: https://img.shields.io/discord/629491597070827530?logo=discord "chat on discord" +[Link-SonatypeSnapshots]: https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-sql_2.13/ "Sonatype Snapshots" [link-discord]: https://discord.gg/2ccFBr4 "Discord" [Stage]: https://img.shields.io/badge/Project%20Stage-Experimental-yellow.svg [Stage-Page]: https://github.com/zio/zio/wiki/Project-Stages From c231f7fc51e6505be59b446bdf24e16e4036ca25 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sat, 5 Mar 2022 17:15:58 +0100 Subject: [PATCH 372/673] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f660a8ce5..a59cecbe9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ZIO SQL -| Project Stage | CI | Discord | -| --- | --- | --- | +| Project Stage | CI | Snapshot | Discord | +| --- | --- | --- | --- | | [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![Snapshot Artifacts][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots] | [![badge-discord]][link-discord] | ## Current status: pre-0.1 (no release yet) From c126b0061e894050242b34a6bb4058e736733555 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sat, 5 Mar 2022 17:17:52 +0100 Subject: [PATCH 373/673] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a59cecbe9..01be4aca0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # ZIO SQL -| Project Stage | CI | Snapshot | Discord | -| --- | --- | --- | --- | -| [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![Snapshot Artifacts][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots] | [![badge-discord]][link-discord] | +| Project Stage | CI | Release | Snapshot | Discord | +| --- | --- | --- | --- | --- | +| [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![Release Artifacts][Badge-SonatypeReleases]][Link-SonatypeReleases] | [![Snapshot Artifacts][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots] | [![badge-discord]][link-discord] | ## Current status: pre-0.1 (no release yet) @@ -54,8 +54,10 @@ For the JDBC module: ZIO SQL does not offer Language Integrated Queries (LINQ) or similar functionality. It is intended only as a data model for representing SQL queries and an accompanying lightweight JDBC-based executor. [badge-ci]: https://github.com/zio/zio-sql/workflows/CI/badge.svg +[Badge-SonatypeReleases]: https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-sql_2.13.svg "Sonatype Releases" [Badge-SonatypeSnapshots]: https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-sql_2.13.svg "Sonatype Snapshots" [badge-discord]: https://img.shields.io/discord/629491597070827530?logo=discord "chat on discord" +[Link-SonatypeReleases]: https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-sql_2.13/ "Sonatype Releases" [Link-SonatypeSnapshots]: https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-sql_2.13/ "Sonatype Snapshots" [link-discord]: https://discord.gg/2ccFBr4 "Discord" [Stage]: https://img.shields.io/badge/Project%20Stage-Experimental-yellow.svg From cbf741da8f2ad03086196e17c6aa291495fc4744 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Tue, 8 Mar 2022 12:09:52 +0100 Subject: [PATCH 374/673] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 01be4aca0..661c48892 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ | --- | --- | --- | --- | --- | | [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![Release Artifacts][Badge-SonatypeReleases]][Link-SonatypeReleases] | [![Snapshot Artifacts][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots] | [![badge-discord]][link-discord] | -## Current status: pre-0.1 (no release yet) +## Current status: Non-production release ### Progress report towards 0.1 @@ -31,7 +31,7 @@ Feature | PostgreSQL | SQL Server | Oracle | MySQL Render Read | :white_check_mark: | :white_check_mark: | | :white_check_mark: | Render Delete | :white_check_mark: | :white_check_mark: | | :white_check_mark: | Render Update | :white_check_mark: | | | :white_check_mark: | -Render Insert | | | | +Render Insert | :white_check_mark: | | | Functions | :white_check_mark: | | | :white_check_mark: | Types | | | | Operators | | | | @@ -60,7 +60,7 @@ ZIO SQL does not offer Language Integrated Queries (LINQ) or similar functionali [Link-SonatypeReleases]: https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-sql_2.13/ "Sonatype Releases" [Link-SonatypeSnapshots]: https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-sql_2.13/ "Sonatype Snapshots" [link-discord]: https://discord.gg/2ccFBr4 "Discord" -[Stage]: https://img.shields.io/badge/Project%20Stage-Experimental-yellow.svg +[Stage]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg [Stage-Page]: https://github.com/zio/zio/wiki/Project-Stages ## Setup From edcae6042abb4ebe7ee8cd323572ac9c7cbf9b18 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Tue, 8 Mar 2022 12:11:50 +0100 Subject: [PATCH 375/673] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 661c48892..c91dd6841 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Feature | Progress :------------ | :------------- Type-safe schema | :heavy_check_mark: -Type-safe DSL | :white_check_mark: +Type-safe DSL | :heavy_check_mark: Running Reads | :heavy_check_mark: Running Deletes | :heavy_check_mark: Running Updates | :heavy_check_mark: From 3f747436b4a7b5498bd732b6efd0ce14059c2c66 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Wed, 9 Mar 2022 23:11:13 +0100 Subject: [PATCH 376/673] Add overloaded version of `execute` for updates --- jdbc/src/main/scala/zio/sql/jdbc.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 061690a86..7d2279d06 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -14,7 +14,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] - def insert[A: zio.schema.Schema](insert: Insert[_, A]): IO[Exception, Int] + def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] } object SqlDriver { val live: ZLayer[ConnectionPool, Nothing, SqlDriver] = @@ -33,5 +33,8 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi ZIO.serviceWithZIO(_.delete(delete)) def execute[A: Schema](insert: Insert[_, A]): ZIO[SqlDriver, Exception, Int] = - ZIO.serviceWithZIO[SqlDriver](_.insert(insert)) + ZIO.serviceWithZIO(_.insert(insert)) + + def execute(update: Update[_]): ZIO[SqlDriver, Exception, Int] = + ZIO.serviceWithZIO(_.update(update)) } From a93216a76ce71309ae7cf343585d4c55554a4259 Mon Sep 17 00:00:00 2001 From: Albert Peto Date: Tue, 15 Mar 2022 13:31:07 +0100 Subject: [PATCH 377/673] Ensure that connections are released after interrupt --- .../main/scala/zio/sql/ConnectionPool.scala | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index 54055c563..8d030d264 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -6,6 +6,8 @@ import java.sql._ import zio.stm._ import zio._ +import zio.sql.ConnectionPool.QueueItem + trait ConnectionPool { /** @@ -17,6 +19,9 @@ trait ConnectionPool { } object ConnectionPool { + case class QueueItem(promise: TPromise[Nothing, ResettableConnection], + interrupted: TRef[Boolean]) + /** * A live layer for `ConnectionPool` that creates a JDBC connection pool * from the specified connection pool settings. @@ -25,7 +30,7 @@ object ConnectionPool { (for { config <- ZManaged.service[ConnectionPoolConfig] clock <- ZManaged.service[Clock] - queue <- TQueue.bounded[TPromise[Nothing, ResettableConnection]](config.queueCapacity).commit.toManaged + queue <- TQueue.bounded[QueueItem](config.queueCapacity).commit.toManaged available <- TRef.make(List.empty[ResettableConnection]).commit.toManaged pool = ConnectionPoolLive(queue, available, config, clock) _ <- pool.initialize.toManaged @@ -43,7 +48,7 @@ object ConnectionPool { * take it away from them. */ final case class ConnectionPoolLive( - queue: TQueue[TPromise[Nothing, ResettableConnection]], + queue: TQueue[QueueItem], available: TRef[List[ResettableConnection]], config: ConnectionPoolConfig, clock: Clock @@ -96,14 +101,17 @@ final case class ConnectionPoolLive( def connection: Managed[Exception, Connection] = ZManaged .acquireReleaseWith(tryTake.commit.flatMap { - case Left(promise) => - ZIO.interruptible(promise.await.commit).onInterrupt { - promise.poll.flatMap { - case Some(Right(connection)) => - ZSTM.succeed(release(connection)) - - case _ => ZSTM.succeed(ZIO.unit) - }.commit.flatten + case Left(handle) => + ZIO.interruptible(handle.promise.await.commit).onInterrupt { + (for { + res <- handle.promise.poll + _ <- res match { + case Some(Right(connection)) => + ZSTM.succeed(release(connection)) + case _ => + handle.interrupted.set(true) + } + } yield ()).commit } case Right(connection) => @@ -126,29 +134,38 @@ final case class ConnectionPoolLive( private def release(connection: ResettableConnection): UIO[Any] = ZIO.uninterruptible { tryRelease(connection).commit.flatMap { - case Some(promise) => promise.succeed(connection).commit - case None => UIO.unit + case Some(handle) => + handle.interrupted.get.commit.flatMap { interrupted => + if (interrupted) { + release(connection) + } else { + handle.promise.succeed(connection).commit + } + } + case None => UIO.unit } } private def tryRelease( connection: ResettableConnection - ): STM[Nothing, Option[TPromise[Nothing, ResettableConnection]]] = + ): STM[Nothing, Option[QueueItem]] = for { empty <- queue.isEmpty result <- if (empty) available.update(connection :: _) *> STM.none else queue.take.map(Some(_)) } yield result - private val tryTake: STM[Nothing, Either[TPromise[Nothing, ResettableConnection], ResettableConnection]] = + private val tryTake: STM[Nothing, Either[QueueItem, ResettableConnection]] = for { headOption <- available.get.map(_.headOption) either <- headOption match { case None => for { promise <- TPromise.make[Nothing, ResettableConnection] - _ <- queue.offer(promise) - } yield Left(promise) + ref <- TRef.make[Boolean](false) + item = QueueItem(promise, ref) + _ <- queue.offer(item) + } yield Left(item) case Some(connection) => available.update(_.tail) *> ZSTM.succeed(Right(connection)) From 6bcc166d1aa5a079a5a0e8832a4284d869734103 Mon Sep 17 00:00:00 2001 From: Albert Peto Date: Tue, 15 Mar 2022 22:43:33 +0100 Subject: [PATCH 378/673] Check interruption status and set promise in the same STM transaction --- jdbc/src/main/scala/zio/sql/ConnectionPool.scala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index 8d030d264..380ec7397 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -135,12 +135,10 @@ final case class ConnectionPoolLive( ZIO.uninterruptible { tryRelease(connection).commit.flatMap { case Some(handle) => - handle.interrupted.get.commit.flatMap { interrupted => - if (interrupted) { - release(connection) - } else { - handle.promise.succeed(connection).commit - } + handle.interrupted.get.tap { interrupted => + ZSTM.when(!interrupted)(handle.promise.succeed(connection)) + }.commit.flatMap { interrupted => + ZIO.when(interrupted)(release(connection)) } case None => UIO.unit } From a6b786376da36ad61819c8b87e4744a45ad2ccb7 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 16 Mar 2022 02:55:52 +0100 Subject: [PATCH 379/673] Update testcontainers-scala-mssqlserver, ... to 0.40.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 097217855..e6e833518 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC2" val zioSchemaVersion = "0.1.8" val testcontainersVersion = "1.16.3" -val testcontainersScalaVersion = "0.40.2" +val testcontainersScalaVersion = "0.40.3" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From bfde14ca282adfeb9276837868aa879f249895f5 Mon Sep 17 00:00:00 2001 From: Albert Peto Date: Fri, 18 Mar 2022 15:04:46 +0100 Subject: [PATCH 380/673] Run sbt fmt on ConnectionPool.scala --- .../src/main/scala/zio/sql/ConnectionPool.scala | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index 380ec7397..9ebef9794 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -19,8 +19,7 @@ trait ConnectionPool { } object ConnectionPool { - case class QueueItem(promise: TPromise[Nothing, ResettableConnection], - interrupted: TRef[Boolean]) + case class QueueItem(promise: TPromise[Nothing, ResettableConnection], interrupted: TRef[Boolean]) /** * A live layer for `ConnectionPool` that creates a JDBC connection pool @@ -106,11 +105,11 @@ final case class ConnectionPoolLive( (for { res <- handle.promise.poll _ <- res match { - case Some(Right(connection)) => - ZSTM.succeed(release(connection)) - case _ => - handle.interrupted.set(true) - } + case Some(Right(connection)) => + ZSTM.succeed(release(connection)) + case _ => + handle.interrupted.set(true) + } } yield ()).commit } @@ -140,7 +139,7 @@ final case class ConnectionPoolLive( }.commit.flatMap { interrupted => ZIO.when(interrupted)(release(connection)) } - case None => UIO.unit + case None => UIO.unit } } @@ -161,7 +160,7 @@ final case class ConnectionPoolLive( for { promise <- TPromise.make[Nothing, ResettableConnection] ref <- TRef.make[Boolean](false) - item = QueueItem(promise, ref) + item = QueueItem(promise, ref) _ <- queue.offer(item) } yield Left(item) From 7a7bd7ef09fd69b782bad1994b9d8ea993791c1c Mon Sep 17 00:00:00 2001 From: Albert Peto Date: Fri, 18 Mar 2022 15:05:07 +0100 Subject: [PATCH 381/673] Rename handle to queueItem --- jdbc/src/main/scala/zio/sql/ConnectionPool.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index 9ebef9794..d63d9cf2a 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -100,15 +100,15 @@ final case class ConnectionPoolLive( def connection: Managed[Exception, Connection] = ZManaged .acquireReleaseWith(tryTake.commit.flatMap { - case Left(handle) => - ZIO.interruptible(handle.promise.await.commit).onInterrupt { + case Left(queueItem) => + ZIO.interruptible(queueItem.promise.await.commit).onInterrupt { (for { - res <- handle.promise.poll + res <- queueItem.promise.poll _ <- res match { case Some(Right(connection)) => ZSTM.succeed(release(connection)) case _ => - handle.interrupted.set(true) + queueItem.interrupted.set(true) } } yield ()).commit } From 94d54a68c38c6d2a2041e95fe809479593476ed2 Mon Sep 17 00:00:00 2001 From: Albert Peto Date: Fri, 18 Mar 2022 15:15:35 +0100 Subject: [PATCH 382/673] Create ConnectionPoolSpec --- build.sbt | 14 ++--- .../scala/zio/sql/ConnectionPoolSpec.scala | 53 +++++++++++++++++++ .../test/scala/zio/sql/TestContainer.scala | 30 +++++++++++ 3 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala create mode 100644 jdbc/src/test/scala/zio/sql/TestContainer.scala diff --git a/build.sbt b/build.sbt index 097217855..f3b8c4c18 100644 --- a/build.sbt +++ b/build.sbt @@ -147,12 +147,14 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test, + "org.postgresql" % "postgresql" % "42.3.3" % Test, + "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala new file mode 100644 index 000000000..865b2b7b8 --- /dev/null +++ b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala @@ -0,0 +1,53 @@ +package zio.sql + +import zio.{ durationInt, Clock, Promise, ZIO, ZLayer } +import zio.test.TestAspect.{ sequential, timeout } +import zio.test.{ TestEnvironment, _ } + +import java.util.Properties + +object ConnectionPoolSpec extends ZIOSpecDefault { + + val poolSize = 10 + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + TestContainer + .postgres() + .map(a => + ConnectionPoolConfig( + url = a.jdbcUrl, + properties = connProperties(a.username, a.password), + poolSize = poolSize + ) + ) + .toLayer + + override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + specLayered.provideCustomShared((poolConfigLayer >>> ConnectionPool.live).orDie) + + def specLayered: Spec[TestEnvironment with ConnectionPool, TestFailure[Object], TestSuccess] = + suite("Postgres module")( + test("Fibers waiting for connections can be interrupted") { + // We need to actually sleep here to make sure that the started fibers + // had started acquiring connections. + for { + cp <- ZIO.service[ConnectionPool] + promise <- Promise.make[Nothing, Unit] + _ <- ZIO.replicateZIO(poolSize)(cp.connection.useDiscard(promise.await).fork) + _ <- ZIO.sleep(1.second).provideLayer(Clock.live) + waiting <- ZIO.replicateZIO(poolSize)(cp.connection.useDiscard(ZIO.unit).fork) + _ <- ZIO.sleep(1.second).provideLayer(Clock.live) + _ <- ZIO.foreach(waiting)(_.interrupt) + _ <- promise.complete(ZIO.unit) + _ <- cp.connection.useDiscard(ZIO.unit) + } yield assert("")(Assertion.anything) + } @@ timeout(10.seconds) + ) @@ sequential +} diff --git a/jdbc/src/test/scala/zio/sql/TestContainer.scala b/jdbc/src/test/scala/zio/sql/TestContainer.scala new file mode 100644 index 000000000..d5300f80d --- /dev/null +++ b/jdbc/src/test/scala/zio/sql/TestContainer.scala @@ -0,0 +1,30 @@ +package zio.sql + +import com.dimafeng.testcontainers.{ PostgreSQLContainer, SingleContainer } +import org.testcontainers.utility.DockerImageName +import zio._ + +object TestContainer { + + def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer + + def postgres(imageName: String = "postgres:alpine"): ZManaged[Any, Throwable, PostgreSQLContainer] = + ZManaged.acquireReleaseWith { + ZIO.attemptBlocking { + val c = new PostgreSQLContainer( + dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) + ) + c.start() + c + } + } { container => + ZIO.attemptBlocking(container.stop()).orDie + } + +} From 71ce8cf090309d88dd9b57c6813efa67cabd864b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 20 Mar 2022 02:50:13 +0100 Subject: [PATCH 383/673] Update sbt-api-mappings to 3.0.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 76d078891..ddc6bb093 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -9,6 +9,6 @@ addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") -addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") +addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.22") From 99e7715749ec30a175a9d70e679efb887fc85ef6 Mon Sep 17 00:00:00 2001 From: Albert Peto Date: Sun, 20 Mar 2022 09:49:20 +0100 Subject: [PATCH 384/673] Remove cross_version usage of testcontainers-scala-oracle-xe --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a18afcd49..159269dcb 100644 --- a/build.sbt +++ b/build.sbt @@ -197,7 +197,7 @@ lazy val oracle = project "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, - "com.dimafeng" % "testcontainers-scala-oracle-xe_2.13" % testcontainersScalaVersion % Test + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From 3182449507f12ebe5007c60f213d9a8af8a19921 Mon Sep 17 00:00:00 2001 From: Albert Peto Date: Sun, 20 Mar 2022 16:43:31 +0100 Subject: [PATCH 385/673] Format build.sbt --- build.sbt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/build.sbt b/build.sbt index 159269dcb..7cda6070b 100644 --- a/build.sbt +++ b/build.sbt @@ -147,14 +147,14 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.3.3" % Test, - "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test, + "org.postgresql" % "postgresql" % "42.3.3" % Test, + "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -188,16 +188,16 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From 6b40dd6f3b6623da6b2b814bdbe35be0a8a59c1f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 22 Mar 2022 17:29:20 +0100 Subject: [PATCH 386/673] Update sbt-scalajs-crossproject to 1.2.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 76d078891..4f3459c4b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") From d91e07e51387a2a1792ccc703661954d00bc5a13 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 28 Mar 2022 17:23:59 +0200 Subject: [PATCH 387/673] fixed bug in insert module --- .../src/main/scala/zio/sql/insertutils.scala | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/insertutils.scala b/core/jvm/src/main/scala/zio/sql/insertutils.scala index 40f1e31fe..7b2ffd6c8 100644 --- a/core/jvm/src/main/scala/zio/sql/insertutils.scala +++ b/core/jvm/src/main/scala/zio/sql/insertutils.scala @@ -10,7 +10,7 @@ trait InsertUtilsModule { self: FeaturesModule => object SchemaValidity extends SchemaValidityCaseClasses { implicit def tuple1[F, A1, ColsRepr, AllColumnIdentities, Source, Identity1](implicit ev1: Schema[A1], - ev2: ColsRepr <:< (A1, Unit), + ev2: (A1, Unit) <:< ColsRepr, ev3: F <:< Features.Source[Identity1, Source], //TODO find other way to check if selection set contains some set of columns from table ev4: AllColumnIdentities =:= Identity1 @@ -19,7 +19,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit ev1: Schema[(A1, A2)], - ev2: ColsRepr <:< (A1, (A2, Unit)), + ev2: (A1, (A2, Unit)) <:< ColsRepr, ev3: F <:< Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] = @@ -27,7 +27,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple3[F, A1, A2, A3, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3](implicit ev1: Schema[(A1, A2, A3)], - ev2: ColsRepr <:< (A1, (A2, (A3, Unit))), + ev2: (A1, (A2, (A3, Unit))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] = @@ -35,7 +35,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple4[F, A1, A2, A3, A4, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4](implicit ev1: Schema[(A1, A2, A3, A4)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), + ev2: (A1, (A2, (A3, (A4, Unit)))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] = @@ -44,7 +44,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple5[F, A1, A2, A3, A4, A5, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5] (implicit ev1: Schema[(A1, A2, A3, A4, A5)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), + ev2: (A1, (A2, (A3, (A4, (A5, Unit))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] = @@ -53,7 +53,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple6[F, A1, A2, A3, A4, A5, A6, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] = @@ -62,7 +62,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple7[F, A1, A2, A3, A4, A5, A6, A7, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] = @@ -71,7 +71,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple8[F, A1, A2, A3, A4, A5, A6, A7, A8, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] = @@ -80,7 +80,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple9[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] = @@ -89,7 +89,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple10[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] = @@ -98,7 +98,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple11[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] = @@ -107,7 +107,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple12[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] = @@ -116,7 +116,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple13[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] = @@ -125,7 +125,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple14[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] = @@ -134,7 +134,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple15[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] = @@ -143,7 +143,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple16[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] = @@ -152,7 +152,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple17[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] = @@ -161,7 +161,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple18[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] = @@ -170,7 +170,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple19[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] = @@ -179,7 +179,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple20[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] = @@ -188,7 +188,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple21[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] = @@ -197,7 +197,7 @@ trait InsertUtilsModule { self: FeaturesModule => implicit def tuple22[F, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22] (implicit ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)], - ev2: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), + ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] = From 99e589df7b475c920f1c8e10b268f7bae79e5052 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 29 Mar 2022 17:10:32 +0200 Subject: [PATCH 388/673] Update testcontainers-scala-mssqlserver, ... to 0.40.4 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7cda6070b..5bd61074e 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC2" val zioSchemaVersion = "0.1.8" val testcontainersVersion = "1.16.3" -val testcontainersScalaVersion = "0.40.3" +val testcontainersScalaVersion = "0.40.4" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From fbeabd1f863033c03707ef1b7844eff20324360e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 31 Mar 2022 01:30:45 +0200 Subject: [PATCH 389/673] Update sbt-tpolecat to 0.2.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 76d078891..307825c81 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.22") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.2.2") From ffb582f8cc2fb9a9330b679851f20ef67df5f5cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 05:13:31 +0000 Subject: [PATCH 390/673] Bump minimist from 1.2.5 to 1.2.6 in /website Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 95a866727..5a0e3ce00 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -8021,9 +8021,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "node_modules/mixin-deep": { @@ -19061,9 +19061,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "mixin-deep": { From e4b0655874c58f8b68f4252600fa749168bdb6a9 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 2 Apr 2022 10:19:23 +0200 Subject: [PATCH 391/673] Update scalafmt-core to 3.5.0 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 091eddf67..f8c4e81eb 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.4.3" +version = "3.5.0" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From b3a3f2da3eb31aaf8f089a555625160a9b95b43d Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 2 Apr 2022 14:24:57 +0200 Subject: [PATCH 392/673] fixed #585 --- build.sbt | 38 ++----------------- core/jvm/src/main/scala/zio/sql/insert.scala | 17 ++++----- .../zio/sql/postgresql/PostgresModule.scala | 8 ++-- .../sql/postgresql/PostgresModuleSpec.scala | 16 +++----- 4 files changed, 19 insertions(+), 60 deletions(-) diff --git a/build.sbt b/build.sbt index e6e833518..5822526f9 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "2.0.0-RC2" -val zioSchemaVersion = "0.1.8" +val zioSchemaVersion = "0.1.9" val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.3" @@ -100,13 +100,7 @@ lazy val docs = project publish / skip := true, moduleName := "zio-sql-docs", scalacOptions -= "-Yno-imports", - scalacOptions -= "-Xfatal-warnings", - libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion - ) + scalacOptions -= "-Xfatal-warnings" ) .dependsOn(postgres) .enablePlugins(MdocPlugin, DocusaurusPlugin) @@ -116,13 +110,7 @@ lazy val examples = project .settings(stdSettings("examples")) .settings( publish / skip := true, - moduleName := "examples", - libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion - ) + moduleName := "examples" ) .dependsOn(sqlserver) @@ -147,10 +135,6 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test ) @@ -165,10 +149,6 @@ lazy val mysql = project .settings(buildInfoSettings("zio.sql.mysql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, @@ -186,10 +166,6 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, @@ -207,10 +183,6 @@ lazy val postgres = project .settings(buildInfoSettings("zio.sql.postgres")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, @@ -228,10 +200,6 @@ lazy val sqlserver = project .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index f2ced0961..12c4ff5b5 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -2,15 +2,6 @@ package zio.sql import zio.schema.Schema -/** - * val data = List( - * ('0511474d-8eed-4307-bdb0-e39a561205b6', 'Richard', 'Dent, true' 1999-11-02), - * .... - * ) - * - * insertInto(customers)(customerId +++ fName +++ lName +++ verified +++ dob) - * .values(data) - */ trait InsertModule { self: ExprModule with TableModule with SelectModule with InsertUtilsModule => sealed case class InsertBuilder[F, Source, AllColumnIdentities, B <: SelectionSet[Source], ColsRepr]( @@ -32,4 +23,12 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule with In sealed case class Insert[A, Z](table: Table.Source.Aux[A], sources: SelectionSet[A], values: Seq[Z])(implicit schemaN: Schema[Z] ) + + implicit def convertOptionToSome[A](implicit op: Schema[Option[A]]): Schema[Some[A]] = + op.transformOrFail[Some[A]]({ + case Some(a) => Right(Some(a)) + case None => Left("cannot encode Right") + }, + someA => Right(someA) + ) } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 3c8fd7a5c..e7a48282a 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -420,7 +420,7 @@ trait PostgresModule extends Jdbc { self => case StandardType.MonthType => render(s"'${value}'") case StandardType.LocalDateTimeType(formatter) => render(s"'${formatter.format(value.asInstanceOf[LocalDateTime])}'") - case UnitType => () // ??? + case UnitType => render("null") // None is encoded as Schema[Unit].transform(_ => None, _ => ()) case StandardType.YearMonthType => render(s"'${value}'") case DoubleType => render(value) case StandardType.YearType => render(s"'${value}'") @@ -445,18 +445,16 @@ trait PostgresModule extends Jdbc { self => case BoolType => render(value) case DayOfWeekType => render(s"'${value}'") case FloatType => render(value) - case StandardType.Duration(_) => render(s"'${value}'") + case StandardType.DurationType => render(s"'${value}'") } case None => () } - case DynamicValue.Transform(that) => renderDynamicValue(that) case DynamicValue.Tuple(left, right) => renderDynamicValue(left) render(", ") renderDynamicValue(right) case DynamicValue.SomeValue(value) => renderDynamicValue(value) - case DynamicValue.NoneValue => render(s"null") - // TODO what about other cases? + case DynamicValue.NoneValue => render("null") case _ => () } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 5aab6a91c..3530b806f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -522,12 +522,8 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { // TODO we need schema for scala.math.BigDecimal. Probably directly in zio-schema ? implicit val bigDecimalSchema: Schema[BigDecimal] = - Schema.Transform( - Schema.primitive[java.math.BigDecimal](zio.schema.StandardType.BigDecimalType), - (bigDec: java.math.BigDecimal) => Right(new BigDecimal(bigDec, java.math.MathContext.DECIMAL128)), - bigDec => Right(bigDec.bigDecimal), - Chunk.empty - ) + Schema[java.math.BigDecimal] + .transform(bigDec => new BigDecimal(bigDec, java.math.MathContext.DECIMAL128), _.bigDecimal) implicit val orderDetailsRowSchema = Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetailsRow]( Schema.Field("orderId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), @@ -630,12 +626,10 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val personValue = Person(UUID.randomUUID(), "Charles", "Harvey", None) val insertSome = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Charles", "Dent", Option(LocalDate.of(2022, 1, 31)))) + .values((UUID.randomUUID(), "Charles", "Dent", Some(LocalDate.of(2022, 1, 31)))) - // TODO improve - // https://github.com/zio/zio-sql/issues/585 - val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Martin", "Harvey", Option.empty[LocalDate])) + val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) + .values((UUID.randomUUID(), "Martin", "Harvey", None)) val insertNone2 = insertInto(persons)(personId ++ fName ++ lName ++ dob) .values(personValue) From 4dd3929b940ca9d7e67924196031ca3ce54ebc85 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sat, 2 Apr 2022 14:51:12 +0200 Subject: [PATCH 393/673] fixed 2.12 version and format --- build.sbt | 16 ++++++++-------- core/jvm/src/main/scala/zio/sql/insert.scala | 9 +++++---- .../zio/sql/postgresql/PostgresModuleSpec.scala | 6 +++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/build.sbt b/build.sbt index 810984ca3..a1ee621c9 100644 --- a/build.sbt +++ b/build.sbt @@ -135,8 +135,8 @@ lazy val jdbc = project .settings(buildInfoSettings("zio.sql.jdbc")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test, "org.postgresql" % "postgresql" % "42.3.3" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) @@ -168,12 +168,12 @@ lazy val oracle = project .settings(buildInfoSettings("zio.sql.oracle")) .settings( libraryDependencies ++= Seq( - "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, - "org.testcontainers" % "database-commons" % testcontainersVersion % Test, - "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, - "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, - "com.dimafeng" % "testcontainers-scala-oracle-xe_2.13" % testcontainersScalaVersion % Test + "org.testcontainers" % "testcontainers" % testcontainersVersion % Test, + "org.testcontainers" % "database-commons" % testcontainersVersion % Test, + "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, + "org.testcontainers" % "jdbc" % testcontainersVersion % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index 12c4ff5b5..ae8a7ef4c 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -25,10 +25,11 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule with In ) implicit def convertOptionToSome[A](implicit op: Schema[Option[A]]): Schema[Some[A]] = - op.transformOrFail[Some[A]]({ - case Some(a) => Right(Some(a)) - case None => Left("cannot encode Right") - }, + op.transformOrFail[Some[A]]( + { + case Some(a) => Right(Some(a)) + case None => Left("cannot encode Right") + }, someA => Right(someA) ) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 3530b806f..91b9ccee4 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -523,7 +523,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { // TODO we need schema for scala.math.BigDecimal. Probably directly in zio-schema ? implicit val bigDecimalSchema: Schema[BigDecimal] = Schema[java.math.BigDecimal] - .transform(bigDec => new BigDecimal(bigDec, java.math.MathContext.DECIMAL128), _.bigDecimal) + .transform(bigDec => new BigDecimal(bigDec, java.math.MathContext.DECIMAL128), _.bigDecimal) implicit val orderDetailsRowSchema = Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetailsRow]( Schema.Field("orderId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), @@ -628,8 +628,8 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val insertSome = insertInto(persons)(personId ++ fName ++ lName ++ dob) .values((UUID.randomUUID(), "Charles", "Dent", Some(LocalDate.of(2022, 1, 31)))) - val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) - .values((UUID.randomUUID(), "Martin", "Harvey", None)) + val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) + .values((UUID.randomUUID(), "Martin", "Harvey", None)) val insertNone2 = insertInto(persons)(personId ++ fName ++ lName ++ dob) .values(personValue) From fc229fffd4303ef7a4c5acafc9ffbe3d4b0f444e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 3 Apr 2022 20:58:48 +0200 Subject: [PATCH 394/673] Update testcontainers-scala-mssqlserver, ... to 0.40.5 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5bd61074e..b95dbd30d 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC2" val zioSchemaVersion = "0.1.8" val testcontainersVersion = "1.16.3" -val testcontainersScalaVersion = "0.40.4" +val testcontainersScalaVersion = "0.40.5" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From 716186fd8659b2ef8c660c7cd27628b5d5c0fa9b Mon Sep 17 00:00:00 2001 From: sviezypan Date: Sun, 3 Apr 2022 22:04:39 +0200 Subject: [PATCH 395/673] bumped ZIO2 version to RC4 --- build.sbt | 2 +- .../test/scala/zio-sql/HelloWorldSpec.scala | 2 +- .../main/scala/zio/sql/ConnectionPool.scala | 40 +++++++------- .../scala/zio/sql/SqlDriverLiveModule.scala | 36 ++++++++----- .../scala/zio/sql/TransactionModule.scala | 17 +++--- jdbc/src/main/scala/zio/sql/jdbc.scala | 8 +-- .../scala/zio/sql/ConnectionPoolSpec.scala | 54 ++++++------------- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 2 +- .../test/scala/zio/sql/TestContainer.scala | 51 ++++++++++-------- .../scala/zio/sql/MySqlTestContainer.scala | 33 ++++++++++++ .../test/scala/zio/sql/TestContainer.scala | 32 ----------- .../zio/sql/mysql/MysqlRunnableSpec.scala | 20 +------ .../scala/zio/sql/mysql/TransactionSpec.scala | 18 +++---- .../zio/sql/PostgresqlTestContainer.scala | 37 +++++++++++++ .../test/scala/zio/sql/TestContainer.scala | 34 ------------ .../zio/sql/postgresql/FunctionDefSpec.scala | 5 +- .../sql/postgresql/PostgresRunnableSpec.scala | 25 +-------- .../zio/sql/postgresql/TransactionSpec.scala | 20 ++++--- .../container-license-acceptance.txt | 2 +- .../zio/sql/SqlServerTestContainer.scala | 35 ++++++++++++ .../test/scala/zio/sql/TestContainer.scala | 36 ------------- .../sql/sqlserver/SqlServerModuleSpec.scala | 2 +- .../sql/sqlserver/SqlServerRunnableSpec.scala | 26 +-------- 23 files changed, 236 insertions(+), 301 deletions(-) create mode 100644 mysql/src/test/scala/zio/sql/MySqlTestContainer.scala delete mode 100644 mysql/src/test/scala/zio/sql/TestContainer.scala create mode 100644 postgres/src/test/scala/zio/sql/PostgresqlTestContainer.scala delete mode 100644 postgres/src/test/scala/zio/sql/TestContainer.scala create mode 100644 sqlserver/src/test/scala/zio/sql/SqlServerTestContainer.scala delete mode 100644 sqlserver/src/test/scala/zio/sql/TestContainer.scala diff --git a/build.sbt b/build.sbt index a1ee621c9..5e880b979 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-RC2" +val zioVersion = "2.0.0-RC4" val zioSchemaVersion = "0.1.9" val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.4" diff --git a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala index 1a58ea7ff..5a0d52c1b 100644 --- a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala +++ b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala @@ -9,7 +9,7 @@ import zio.test.ZIOSpecDefault object HelloWorld { - def sayHello: ZIO[Console, Throwable, Unit] = + def sayHello: IO[Throwable, Unit] = Console.printLine("Hello, World!") } diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index d63d9cf2a..36f671aaf 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -11,11 +11,11 @@ import zio.sql.ConnectionPool.QueueItem trait ConnectionPool { /** - * Retrieves a JDBC java.sql.Connection as a [[zio.Managed]] resource. + * Retrieves a JDBC java.sql.Connection as a [[ZIO[Scope, Exception, Connection]]] resource. * The managed resource will safely acquire and release the connection, and * may be interrupted or timed out if necessary. */ - def connection: Managed[Exception, Connection] + def connection: ZIO[Scope, Exception, Connection] } object ConnectionPool { @@ -25,16 +25,17 @@ object ConnectionPool { * A live layer for `ConnectionPool` that creates a JDBC connection pool * from the specified connection pool settings. */ - val live: ZLayer[ConnectionPoolConfig with Clock, IOException, ConnectionPool] = - (for { - config <- ZManaged.service[ConnectionPoolConfig] - clock <- ZManaged.service[Clock] - queue <- TQueue.bounded[QueueItem](config.queueCapacity).commit.toManaged - available <- TRef.make(List.empty[ResettableConnection]).commit.toManaged - pool = ConnectionPoolLive(queue, available, config, clock) - _ <- pool.initialize.toManaged - _ <- ZManaged.finalizer(pool.close.orDie) - } yield pool).toLayer + val live: ZLayer[ConnectionPoolConfig, IOException, ConnectionPool] = + ZLayer.scoped { + for { + config <- ZIO.service[ConnectionPoolConfig] + queue <- TQueue.bounded[QueueItem](config.queueCapacity).commit + available <- TRef.make(List.empty[ResettableConnection]).commit + pool = ConnectionPoolLive(queue, available, config) + _ <- pool.initialize + _ <- ZIO.addFinalizer(pool.close.orDie) + } yield pool + } } /** @@ -49,8 +50,7 @@ object ConnectionPool { final case class ConnectionPoolLive( queue: TQueue[QueueItem], available: TRef[List[ResettableConnection]], - config: ConnectionPoolConfig, - clock: Clock + config: ConnectionPoolConfig ) extends ConnectionPool { /** @@ -80,7 +80,7 @@ final case class ConnectionPoolLive( }.refineToOrDie[IOException] for { - connection <- makeConnection.retry(config.retryPolicy).provideEnvironment(ZEnvironment(clock)) + connection <- makeConnection.retry(config.retryPolicy) _ <- available.update(connection :: _).commit } yield connection } @@ -97,9 +97,9 @@ final case class ConnectionPoolLive( } } - def connection: Managed[Exception, Connection] = - ZManaged - .acquireReleaseWith(tryTake.commit.flatMap { + def connection: ZIO[Scope, Exception, Connection] = + ZIO + .acquireRelease(tryTake.commit.flatMap { case Left(queueItem) => ZIO.interruptible(queueItem.promise.await.commit).onInterrupt { (for { @@ -116,7 +116,7 @@ final case class ConnectionPoolLive( case Right(connection) => ZIO.succeed(connection) })(release(_)) - .flatMap(rc => rc.reset.toManaged.as(rc.connection)) + .flatMap(rc => rc.reset.as(rc.connection)) /** * Initializes the connection pool. @@ -171,5 +171,5 @@ final case class ConnectionPoolLive( } private[sql] final class ResettableConnection(val connection: Connection, resetter: Connection => Unit) { - def reset: UIO[Any] = UIO(resetter(connection)) + def reset: UIO[Any] = UIO.succeed(resetter(connection)) } diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 9af3bebc5..e78f70a40 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -18,9 +18,11 @@ trait SqlDriverLiveModule { self: Jdbc => def insertOn[A: Schema](insert: Insert[_, A], conn: Connection): IO[Exception, Int] } - sealed case class SqlDriverLive(pool: ConnectionPool) extends SqlDriver with SqlDriverCore { self => + sealed class SqlDriverLive(pool: ConnectionPool) extends SqlDriver with SqlDriverCore { self => def delete(delete: Delete[_]): IO[Exception, Int] = - pool.connection.use(deleteOn(delete, _)) + ZIO.scoped { + pool.connection.flatMap(deleteOn(delete, _)) + } def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = ZIO.attemptBlocking { @@ -30,7 +32,9 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] def update(update: Update[_]): IO[Exception, Int] = - pool.connection.use(updateOn(update, _)) + ZIO.scoped { + pool.connection.flatMap(updateOn(update, _)) + } def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] = ZIO.attemptBlocking { @@ -44,9 +48,9 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] def read[A](read: Read[A]): Stream[Exception, A] = - ZStream - .managed(pool.connection) - .flatMap(readOn(read, _)) + ZStream.scoped { + pool.connection + }.flatMap(readOn(read, _)) override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = Stream.unwrap { @@ -94,13 +98,17 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] override def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] = - pool.connection.use(insertOn(insert, _)) - - override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = - for { - connection <- pool.connection - _ <- ZIO.attemptBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception].toManaged - a <- tx.run(Txn(connection, self)) - } yield a + ZIO.scoped { + pool.connection.flatMap(insertOn(insert, _)) + } + + override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Throwable, A] = + ZIO.scoped[R] { + for { + connection <- pool.connection + _ <- ZIO.attemptBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception] + a <- tx.run(Txn(connection, self)) + } yield a + } } } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 827e3e68e..60585fd30 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -9,7 +9,7 @@ import zio.schema.Schema trait TransactionModule { self: Jdbc => private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) - sealed case class ZTransaction[-R: ZTag: IsNotIntersection, +E, +A](unwrap: ZManaged[(R, Txn), E, A]) { self => + sealed case class ZTransaction[-R: ZTag: IsNotIntersection, +E, +A](unwrap: ZIO[(R, Txn), E, A]) { self => def map[B](f: A => B): ZTransaction[R, E, B] = ZTransaction(self.unwrap.map(f)) @@ -20,23 +20,22 @@ trait TransactionModule { self: Jdbc => private[sql] def run(txn: Txn)(implicit ev: E <:< Exception - ): ZManaged[R, Exception, A] = + ): ZIO[R, Throwable, A] = for { - r <- ZManaged.environment[R] + r <- ZIO.environment[R] a <- self.unwrap .mapError(ev) .provideService((r.get, txn)) + .absorb .tapBoth( _ => ZIO .attemptBlocking(txn.connection.rollback()) - .refineToOrDie[Exception] - .toManaged, + .refineToOrDie[Exception], _ => ZIO .attemptBlocking(txn.connection.commit()) .refineToOrDie[Exception] - .toManaged ) } yield a @@ -106,11 +105,11 @@ trait TransactionModule { self: Jdbc => def fromEffect[R: ZTag: IsNotIntersection, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = ZTransaction(for { - tuple <- ZManaged.service[(R, Txn)] - a <- zio.provideService((tuple._1)).toManaged + tuple <- ZIO.service[(R, Txn)] + a <- zio.provideService((tuple._1)) } yield a) private val txn: ZTransaction[Any, Nothing, Txn] = - ZTransaction(ZManaged.service[(Any, Txn)].map(_._2)) + ZTransaction(ZIO.service[(Any, Txn)].map(_._2)) } } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 061690a86..698a8196a 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -12,19 +12,19 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def read[A](read: Read[A]): Stream[Exception, A] - def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] + def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Throwable, A] def insert[A: zio.schema.Schema](insert: Insert[_, A]): IO[Exception, Int] } object SqlDriver { val live: ZLayer[ConnectionPool, Nothing, SqlDriver] = - (SqlDriverLive(_)).toLayer + ZIO.service[ConnectionPool].map(new SqlDriverLive(_)).toLayer } def execute[R <: SqlDriver: ZTag: IsNotIntersection, A]( tx: ZTransaction[R, Exception, A] - ): ZManaged[R, Exception, A] = - ZManaged.serviceWithManaged(_.transact(tx)) + ): ZIO[R, Throwable, A] = + ZIO.serviceWithZIO(_.transact(tx)) def execute[A](read: Read[A]): ZStream[SqlDriver, Exception, A] = ZStream.serviceWithStream(_.read(read)) diff --git a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala index 865b2b7b8..9a027b528 100644 --- a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala +++ b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala @@ -1,33 +1,10 @@ package zio.sql -import zio.{ durationInt, Clock, Promise, ZIO, ZLayer } +import zio._ import zio.test.TestAspect.{ sequential, timeout } import zio.test.{ TestEnvironment, _ } -import java.util.Properties - -object ConnectionPoolSpec extends ZIOSpecDefault { - - val poolSize = 10 - - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = - TestContainer - .postgres() - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - poolSize = poolSize - ) - ) - .toLayer +object ConnectionPoolSpec extends ZIOSpecDefault with TestContainer { override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomShared((poolConfigLayer >>> ConnectionPool.live).orDie) @@ -35,19 +12,20 @@ object ConnectionPoolSpec extends ZIOSpecDefault { def specLayered: Spec[TestEnvironment with ConnectionPool, TestFailure[Object], TestSuccess] = suite("Postgres module")( test("Fibers waiting for connections can be interrupted") { - // We need to actually sleep here to make sure that the started fibers - // had started acquiring connections. - for { - cp <- ZIO.service[ConnectionPool] - promise <- Promise.make[Nothing, Unit] - _ <- ZIO.replicateZIO(poolSize)(cp.connection.useDiscard(promise.await).fork) - _ <- ZIO.sleep(1.second).provideLayer(Clock.live) - waiting <- ZIO.replicateZIO(poolSize)(cp.connection.useDiscard(ZIO.unit).fork) - _ <- ZIO.sleep(1.second).provideLayer(Clock.live) - _ <- ZIO.foreach(waiting)(_.interrupt) - _ <- promise.complete(ZIO.unit) - _ <- cp.connection.useDiscard(ZIO.unit) - } yield assert("")(Assertion.anything) + // We need to actually sleep here to make sure that the started fibers had started acquiring connections. + ZIO.scoped { + for { + cp <- ZIO.service[ConnectionPool] + promise <- Promise.make[Nothing, Unit] + _ <- ZIO.replicateZIO(poolSize)(cp.connection.flatMap(_ => promise.await).fork) + _ <- ZIO.sleep(1.second) + waiting <- ZIO.replicateZIO(poolSize)(cp.connection.fork) + _ <- ZIO.sleep(1.second) + _ <- ZIO.foreach(waiting)(_.interrupt) + _ <- promise.complete(ZIO.unit) + _ <- cp.connection + } yield assert("")(Assertion.anything) + } } @@ timeout(10.seconds) ) @@ sequential } diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index 45d3a7dd5..1738d45a4 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -12,7 +12,7 @@ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] final lazy val jdbcLayer: ZLayer[TestEnvironment, TestFailure[Any], SqlDriver] = - ZLayer.makeSome[TestEnvironment, SqlDriver]( + ZLayer.make[SqlDriver]( poolConfigLayer.orDie, ConnectionPool.live.orDie, SqlDriver.live diff --git a/jdbc/src/test/scala/zio/sql/TestContainer.scala b/jdbc/src/test/scala/zio/sql/TestContainer.scala index d5300f80d..d5672bc04 100644 --- a/jdbc/src/test/scala/zio/sql/TestContainer.scala +++ b/jdbc/src/test/scala/zio/sql/TestContainer.scala @@ -1,30 +1,39 @@ package zio.sql -import com.dimafeng.testcontainers.{ PostgreSQLContainer, SingleContainer } +import com.dimafeng.testcontainers.PostgreSQLContainer import org.testcontainers.utility.DockerImageName import zio._ -object TestContainer { +import java.util.Properties - def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer +trait TestContainer { self => - def postgres(imageName: String = "postgres:alpine"): ZManaged[Any, Throwable, PostgreSQLContainer] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - val c = new PostgreSQLContainer( - dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) - ) - c.start() - c - } - } { container => - ZIO.attemptBlocking(container.stop()).orDie - } + val poolSize = 10 + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + val c = new PostgreSQLContainer( + dockerImageNameOverride = Option("postgres:alpine").map(DockerImageName.parse) + ) + c.start() + c + } + } { container => + ZIO.attemptBlocking(container.stop()).orDie + }.map(c => + ConnectionPoolConfig( + url = c.jdbcUrl, + properties = connProperties(c.username, c.password), + poolSize = self.poolSize + )) + } } diff --git a/mysql/src/test/scala/zio/sql/MySqlTestContainer.scala b/mysql/src/test/scala/zio/sql/MySqlTestContainer.scala new file mode 100644 index 000000000..6c9d7acd5 --- /dev/null +++ b/mysql/src/test/scala/zio/sql/MySqlTestContainer.scala @@ -0,0 +1,33 @@ +package zio.sql + +import com.dimafeng.testcontainers.MySQLContainer +import org.testcontainers.utility.DockerImageName +import zio._ +import java.util.Properties + +trait MySqlTestContainer extends JdbcRunnableSpec { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + val c = new MySQLContainer( + mysqlImageVersion = Option({ "mysql" }).map(DockerImageName.parse) + ).configure { a => + a.withInitScript("shop_schema.sql") + () + } + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).orDie) + .map(c => ConnectionPoolConfig(c.jdbcUrl, connProperties(c.username, c.password))) + } +} diff --git a/mysql/src/test/scala/zio/sql/TestContainer.scala b/mysql/src/test/scala/zio/sql/TestContainer.scala deleted file mode 100644 index babc6c17a..000000000 --- a/mysql/src/test/scala/zio/sql/TestContainer.scala +++ /dev/null @@ -1,32 +0,0 @@ -package zio.sql - -import com.dimafeng.testcontainers.SingleContainer -import com.dimafeng.testcontainers.MySQLContainer -import org.testcontainers.utility.DockerImageName -import zio._ - -object TestContainer { - - def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer - - def mysql(imageName: String = "mysql"): ZManaged[Any, Throwable, MySQLContainer] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - val c = new MySQLContainer( - mysqlImageVersion = Option(imageName).map(DockerImageName.parse) - ).configure { a => - a.withInitScript("shop_schema.sql") - () - } - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie) - -} diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index b4cbd2de7..485e46b97 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -1,28 +1,12 @@ package zio.sql.mysql -import java.util.Properties - import zio.sql._ import zio.test._ -import zio.ZLayer - -trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = TestContainer - .mysql() - .map(a => ConnectionPoolConfig(a.jdbcUrl, connProperties(a.username, a.password))) - .toLayer +trait MysqlRunnableSpec extends MySqlTestContainer with MysqlModule { override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(jdbcLayer) def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] - -} +} \ No newline at end of file diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index 488e7f4bb..34eb141d4 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -17,7 +17,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val result = execute( ZTransaction(query) *> ZTransaction(query) - ).use(ZIO.succeed(_)) + ) val assertion = result @@ -32,7 +32,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val result = execute( ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage).use(ZIO.succeed(_)) + ).mapError(_.getMessage) assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -41,12 +41,12 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { - allCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged + allCustomersCount <- execute(query).map(identity[UUID](_)).runCount _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) - ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + ) + remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount + } yield (allCustomersCount, remainingCustomersCount)) assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -57,10 +57,10 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val tx = ZTransaction(deleteQuery) val result = (for { - allCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged + allCustomersCount <- execute(query).map(identity[UUID](_)).runCount _ <- execute(tx) - remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount + } yield (allCustomersCount, remainingCustomersCount)) assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) } diff --git a/postgres/src/test/scala/zio/sql/PostgresqlTestContainer.scala b/postgres/src/test/scala/zio/sql/PostgresqlTestContainer.scala new file mode 100644 index 000000000..abb39557c --- /dev/null +++ b/postgres/src/test/scala/zio/sql/PostgresqlTestContainer.scala @@ -0,0 +1,37 @@ +package zio.sql + +import com.dimafeng.testcontainers.PostgreSQLContainer +import org.testcontainers.utility.DockerImageName +import zio._ +import java.util.Properties + +trait PostgresqlTestContainer extends JdbcRunnableSpec { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + val c = new PostgreSQLContainer( + dockerImageNameOverride = Option("postgres:alpine").map(DockerImageName.parse) + ).configure { a => + a.withInitScript("db_schema.sql") + () + } + c.start() + c + } + } { container => + ZIO.attemptBlocking(container.stop()).orDie + }.map(c => ConnectionPoolConfig(c.jdbcUrl, connProperties(c.username, c.password))) + + } + + +} diff --git a/postgres/src/test/scala/zio/sql/TestContainer.scala b/postgres/src/test/scala/zio/sql/TestContainer.scala deleted file mode 100644 index ccfe227cd..000000000 --- a/postgres/src/test/scala/zio/sql/TestContainer.scala +++ /dev/null @@ -1,34 +0,0 @@ -package zio.sql - -import com.dimafeng.testcontainers.SingleContainer -import com.dimafeng.testcontainers.PostgreSQLContainer -import org.testcontainers.utility.DockerImageName -import zio._ - -object TestContainer { - - def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer - - def postgres(imageName: String = "postgres:alpine"): ZManaged[Any, Throwable, PostgreSQLContainer] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - val c = new PostgreSQLContainer( - dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) - ).configure { a => - a.withInitScript("db_schema.sql") - () - } - c.start() - c - } - } { container => - ZIO.attemptBlocking(container.stop()).orDie - } - -} diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 43d75b1a2..7e05747ce 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -4,7 +4,6 @@ import java.time._ import java.time.format.DateTimeFormatter import java.util.UUID import zio.{ Cause, Chunk } -import zio.{ Random => ZioRandom } import zio.stream.ZStream import zio.test.Assertion._ import zio.test._ @@ -632,10 +631,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { }, suite("parseIdent")( test("parseIdent removes quoting of individual identifiers") { - val someString: Gen[ZioRandom with Sized, String] = Gen.string + val someString: Gen[Sized, String] = Gen.string .filter(x => x.length < 50 && x.length > 1) // NOTE: I don't know if property based testing is worth doing here, I just wanted to try it - val genTestString: Gen[ZioRandom with Sized, String] = + val genTestString: Gen[Sized, String] = for { string1 <- someString string2 <- someString diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 7ca4eee8f..a5559979b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,30 +1,9 @@ package zio.sql.postgresql import zio.test._ -import java.util.Properties -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } +import zio.sql.PostgresqlTestContainer -trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { - - def autoCommit: Boolean = true - - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer = TestContainer - .postgres() - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - autoCommit = autoCommit - ) - ) - .toLayer +trait PostgresRunnableSpec extends PostgresqlTestContainer with PostgresModule { override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomShared(jdbcLayer) diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index a2a0125ce..81a24a978 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -7,8 +7,6 @@ import zio.test.TestAspect.sequential object TransactionSpec extends PostgresRunnableSpec with DbSchema { - override val autoCommit = false - import Customers._ override def specLayered = suite("Postgres module")( @@ -17,7 +15,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val result = execute( ZTransaction(query) *> ZTransaction(query) - ).use(ZIO.succeed(_)) + ) val assertion = assertM(result.flatMap(_.runCount))(equalTo(5L)).orDie @@ -28,7 +26,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val result = execute( ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage).use(ZIO.succeed(_)) + ).mapError(_.getMessage) assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -37,12 +35,12 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { - allCustomersCount <- execute(query).runCount.toManaged + allCustomersCount <- execute(query).runCount _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) - ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + ) + remainingCustomersCount <- execute(query).runCount + } yield (allCustomersCount, remainingCustomersCount)) assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -53,10 +51,10 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val tx = ZTransaction(deleteQuery) val result = (for { - allCustomersCount <- execute(query).runCount.toManaged + allCustomersCount <- execute(query).runCount _ <- execute(tx) - remainingCustomersCount <- execute(query).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + remainingCustomersCount <- execute(query).runCount + } yield (allCustomersCount, remainingCustomersCount)) assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) } diff --git a/sqlserver/src/test/resources/container-license-acceptance.txt b/sqlserver/src/test/resources/container-license-acceptance.txt index 4051ecdce..56ecd3737 100644 --- a/sqlserver/src/test/resources/container-license-acceptance.txt +++ b/sqlserver/src/test/resources/container-license-acceptance.txt @@ -1 +1 @@ -mcr.microsoft.com/mssql/server:2017-latest \ No newline at end of file +mcr.microsoft.com/mssql/server:2019-latest \ No newline at end of file diff --git a/sqlserver/src/test/scala/zio/sql/SqlServerTestContainer.scala b/sqlserver/src/test/scala/zio/sql/SqlServerTestContainer.scala new file mode 100644 index 000000000..703bd0fd8 --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/SqlServerTestContainer.scala @@ -0,0 +1,35 @@ +package zio.sql + +import com.dimafeng.testcontainers.MSSQLServerContainer +import org.testcontainers.utility.DockerImageName +import zio._ +import java.util.Properties + +trait SqlServerTestContainer extends JdbcRunnableSpec { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + override val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + val c = new MSSQLServerContainer( + dockerImageName = DockerImageName.parse("mcr.microsoft.com/mssql/server:2019-latest") + ).configure { a => + a.withInitScript("db_schema.sql") + () + } + c.start() + c + } + } { container => + ZIO.attemptBlocking(container.stop()).orDie + }.map(c => ConnectionPoolConfig(c.jdbcUrl, connProperties(c.username, c.password))) + } + +} diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/TestContainer.scala deleted file mode 100644 index 9c31e789d..000000000 --- a/sqlserver/src/test/scala/zio/sql/TestContainer.scala +++ /dev/null @@ -1,36 +0,0 @@ -package zio.sql - -import com.dimafeng.testcontainers.SingleContainer -import com.dimafeng.testcontainers.MSSQLServerContainer -import org.testcontainers.utility.DockerImageName -import zio._ - -object TestContainer { - - def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer - - def postgres( - imageName: String = "mcr.microsoft.com/mssql/server:2017-latest" - ): ZManaged[Any, Throwable, MSSQLServerContainer] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - val c = new MSSQLServerContainer( - dockerImageName = DockerImageName.parse(imageName) - ).configure { a => - a.withInitScript("db_schema.sql") - () - } - c.start() - c - } - } { container => - ZIO.attemptBlocking(container.stop()).orDie - } - -} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index e3f730159..88e439249 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -9,7 +9,7 @@ import java.time._ import java.util.UUID import scala.language.postfixOps -object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { +object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { import AggregationDef._ import DbSchema._ diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index abcc4a023..4a22bef89 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -1,31 +1,9 @@ package zio.sql.sqlserver import zio.test._ -import java.util.Properties -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } - -trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { - - def autoCommit: Boolean = true - - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer = TestContainer - .postgres() - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - autoCommit = autoCommit - ) - ) - .toLayer +import zio.sql.SqlServerTestContainer +trait SqlServerRunnableSpec extends SqlServerTestContainer with SqlServerModule { override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(jdbcLayer) From 5cd2a5d5ec4a8eb0c12e87904cba5232f7cab51f Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Mon, 4 Apr 2022 09:15:24 -0700 Subject: [PATCH 396/673] upgrade zio version --- build.sbt | 2 +- .../test/scala/zio-sql/HelloWorldSpec.scala | 2 +- .../main/scala/zio/sql/ConnectionPool.scala | 38 ++++++++-------- .../scala/zio/sql/SqlDriverLiveModule.scala | 12 ++--- .../scala/zio/sql/TransactionModule.scala | 18 ++++---- jdbc/src/main/scala/zio/sql/jdbc.scala | 10 ++--- .../scala/zio/sql/ConnectionPoolSpec.scala | 35 ++++++++------- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 4 +- .../test/scala/zio/sql/TestContainer.scala | 18 ++++---- .../test/scala/zio/sql/TestContainer.scala | 18 ++++---- .../zio/sql/mysql/MysqlRunnableSpec.scala | 10 +++-- .../scala/zio/sql/mysql/TransactionSpec.scala | 44 +++++++++++-------- .../test/scala/zio/sql/TestContainer.scala | 18 ++++---- .../zio/sql/postgresql/FunctionDefSpec.scala | 5 +-- .../sql/postgresql/PostgresRunnableSpec.scala | 20 +++++---- .../zio/sql/postgresql/TransactionSpec.scala | 44 +++++++++++-------- .../test/scala/zio/sql/TestContainer.scala | 18 ++++---- .../sql/sqlserver/SqlServerRunnableSpec.scala | 20 +++++---- 18 files changed, 182 insertions(+), 154 deletions(-) diff --git a/build.sbt b/build.sbt index b95dbd30d..0e9fd82d3 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-RC2" +val zioVersion = "2.0.0-RC4" val zioSchemaVersion = "0.1.8" val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.5" diff --git a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala index 1a58ea7ff..3673fdd8f 100644 --- a/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala +++ b/core/shared/src/test/scala/zio-sql/HelloWorldSpec.scala @@ -9,7 +9,7 @@ import zio.test.ZIOSpecDefault object HelloWorld { - def sayHello: ZIO[Console, Throwable, Unit] = + def sayHello: ZIO[Any, Throwable, Unit] = Console.printLine("Hello, World!") } diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index d63d9cf2a..ad95ed2b3 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -15,7 +15,7 @@ trait ConnectionPool { * The managed resource will safely acquire and release the connection, and * may be interrupted or timed out if necessary. */ - def connection: Managed[Exception, Connection] + def connection: ZIO[Scope, Exception, Connection] } object ConnectionPool { @@ -25,16 +25,17 @@ object ConnectionPool { * A live layer for `ConnectionPool` that creates a JDBC connection pool * from the specified connection pool settings. */ - val live: ZLayer[ConnectionPoolConfig with Clock, IOException, ConnectionPool] = - (for { - config <- ZManaged.service[ConnectionPoolConfig] - clock <- ZManaged.service[Clock] - queue <- TQueue.bounded[QueueItem](config.queueCapacity).commit.toManaged - available <- TRef.make(List.empty[ResettableConnection]).commit.toManaged - pool = ConnectionPoolLive(queue, available, config, clock) - _ <- pool.initialize.toManaged - _ <- ZManaged.finalizer(pool.close.orDie) - } yield pool).toLayer + val live: ZLayer[ConnectionPoolConfig, IOException, ConnectionPool] = + ZLayer.scoped { + for { + config <- ZIO.service[ConnectionPoolConfig] + queue <- TQueue.bounded[QueueItem](config.queueCapacity).commit + available <- TRef.make(List.empty[ResettableConnection]).commit + pool = ConnectionPoolLive(queue, available, config) + _ <- pool.initialize + _ <- ZIO.addFinalizer(pool.close.orDie) + } yield pool + } } /** @@ -49,8 +50,7 @@ object ConnectionPool { final case class ConnectionPoolLive( queue: TQueue[QueueItem], available: TRef[List[ResettableConnection]], - config: ConnectionPoolConfig, - clock: Clock + config: ConnectionPoolConfig ) extends ConnectionPool { /** @@ -80,7 +80,7 @@ final case class ConnectionPoolLive( }.refineToOrDie[IOException] for { - connection <- makeConnection.retry(config.retryPolicy).provideEnvironment(ZEnvironment(clock)) + connection <- makeConnection.retry(config.retryPolicy) _ <- available.update(connection :: _).commit } yield connection } @@ -97,9 +97,9 @@ final case class ConnectionPoolLive( } } - def connection: Managed[Exception, Connection] = - ZManaged - .acquireReleaseWith(tryTake.commit.flatMap { + def connection: ZIO[Scope, Exception, Connection] = + ZIO + .acquireRelease(tryTake.commit.flatMap { case Left(queueItem) => ZIO.interruptible(queueItem.promise.await.commit).onInterrupt { (for { @@ -116,7 +116,7 @@ final case class ConnectionPoolLive( case Right(connection) => ZIO.succeed(connection) })(release(_)) - .flatMap(rc => rc.reset.toManaged.as(rc.connection)) + .flatMap(rc => rc.reset.as(rc.connection)) /** * Initializes the connection pool. @@ -171,5 +171,5 @@ final case class ConnectionPoolLive( } private[sql] final class ResettableConnection(val connection: Connection, resetter: Connection => Unit) { - def reset: UIO[Any] = UIO(resetter(connection)) + def reset: UIO[Any] = ZIO.succeed(resetter(connection)) } diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 9af3bebc5..be1e23a25 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -20,7 +20,7 @@ trait SqlDriverLiveModule { self: Jdbc => sealed case class SqlDriverLive(pool: ConnectionPool) extends SqlDriver with SqlDriverCore { self => def delete(delete: Delete[_]): IO[Exception, Int] = - pool.connection.use(deleteOn(delete, _)) + ZIO.scoped(pool.connection.flatMap(deleteOn(delete, _))) def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = ZIO.attemptBlocking { @@ -30,7 +30,7 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] def update(update: Update[_]): IO[Exception, Int] = - pool.connection.use(updateOn(update, _)) + ZIO.scoped(pool.connection.flatMap(updateOn(update, _))) def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] = ZIO.attemptBlocking { @@ -45,7 +45,7 @@ trait SqlDriverLiveModule { self: Jdbc => def read[A](read: Read[A]): Stream[Exception, A] = ZStream - .managed(pool.connection) + .scoped(pool.connection) .flatMap(readOn(read, _)) override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = @@ -94,12 +94,12 @@ trait SqlDriverLiveModule { self: Jdbc => }.refineToOrDie[Exception] override def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] = - pool.connection.use(insertOn(insert, _)) + ZIO.scoped(pool.connection.flatMap(insertOn(insert, _))) - override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] = + override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R with Scope, Exception, A] = for { connection <- pool.connection - _ <- ZIO.attemptBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception].toManaged + _ <- ZIO.attemptBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception] a <- tx.run(Txn(connection, self)) } yield a } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 827e3e68e..7e830462d 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -9,7 +9,7 @@ import zio.schema.Schema trait TransactionModule { self: Jdbc => private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) - sealed case class ZTransaction[-R: ZTag: IsNotIntersection, +E, +A](unwrap: ZManaged[(R, Txn), E, A]) { self => + sealed case class ZTransaction[-R: ZTag, +E, +A](unwrap: ZIO[(R, Txn) with Scope, E, A]) { self => def map[B](f: A => B): ZTransaction[R, E, B] = ZTransaction(self.unwrap.map(f)) @@ -20,23 +20,21 @@ trait TransactionModule { self: Jdbc => private[sql] def run(txn: Txn)(implicit ev: E <:< Exception - ): ZManaged[R, Exception, A] = + ): ZIO[R with Scope, Exception, A] = for { - r <- ZManaged.environment[R] + r <- ZIO.environment[R] a <- self.unwrap .mapError(ev) - .provideService((r.get, txn)) + .provideSomeEnvironment[Scope](_.add((r.get, txn))) .tapBoth( _ => ZIO .attemptBlocking(txn.connection.rollback()) - .refineToOrDie[Exception] - .toManaged, + .refineToOrDie[Exception], _ => ZIO .attemptBlocking(txn.connection.commit()) .refineToOrDie[Exception] - .toManaged ) } yield a @@ -106,11 +104,11 @@ trait TransactionModule { self: Jdbc => def fromEffect[R: ZTag: IsNotIntersection, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = ZTransaction(for { - tuple <- ZManaged.service[(R, Txn)] - a <- zio.provideService((tuple._1)).toManaged + tuple <- ZIO.service[(R, Txn)] + a <- zio.provideService((tuple._1)) } yield a) private val txn: ZTransaction[Any, Nothing, Txn] = - ZTransaction(ZManaged.service[(Any, Txn)].map(_._2)) + ZTransaction(ZIO.service[(Any, Txn)].map(_._2)) } } diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index 061690a86..cebb144b3 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -12,19 +12,19 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def read[A](read: Read[A]): Stream[Exception, A] - def transact[R, A](tx: ZTransaction[R, Exception, A]): ZManaged[R, Exception, A] + def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R with Scope, Exception, A] def insert[A: zio.schema.Schema](insert: Insert[_, A]): IO[Exception, Int] } object SqlDriver { val live: ZLayer[ConnectionPool, Nothing, SqlDriver] = - (SqlDriverLive(_)).toLayer + ZLayer(ZIO.serviceWith[ConnectionPool](SqlDriverLive(_))) } - def execute[R <: SqlDriver: ZTag: IsNotIntersection, A]( + def execute[R <: SqlDriver: ZTag, A]( tx: ZTransaction[R, Exception, A] - ): ZManaged[R, Exception, A] = - ZManaged.serviceWithManaged(_.transact(tx)) + ): ZIO[R with Scope, Exception, A] = + ZIO.serviceWithZIO[R](_.transact(tx)) def execute[A](read: Read[A]): ZStream[SqlDriver, Exception, A] = ZStream.serviceWithStream(_.read(read)) diff --git a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala index 865b2b7b8..ac2944311 100644 --- a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala +++ b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala @@ -1,7 +1,7 @@ package zio.sql -import zio.{ durationInt, Clock, Promise, ZIO, ZLayer } -import zio.test.TestAspect.{ sequential, timeout } +import zio.{ durationInt, Promise, ZIO, ZLayer } +import zio.test.TestAspect.{ sequential, timeout, withLiveClock } import zio.test.{ TestEnvironment, _ } import java.util.Properties @@ -18,16 +18,17 @@ object ConnectionPoolSpec extends ZIOSpecDefault { } val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = - TestContainer - .postgres() - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - poolSize = poolSize + ZLayer.scoped { + TestContainer + .postgres() + .map(a => + ConnectionPoolConfig( + url = a.jdbcUrl, + properties = connProperties(a.username, a.password), + poolSize = poolSize + ) ) - ) - .toLayer + } override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomShared((poolConfigLayer >>> ConnectionPool.live).orDie) @@ -40,14 +41,14 @@ object ConnectionPoolSpec extends ZIOSpecDefault { for { cp <- ZIO.service[ConnectionPool] promise <- Promise.make[Nothing, Unit] - _ <- ZIO.replicateZIO(poolSize)(cp.connection.useDiscard(promise.await).fork) - _ <- ZIO.sleep(1.second).provideLayer(Clock.live) - waiting <- ZIO.replicateZIO(poolSize)(cp.connection.useDiscard(ZIO.unit).fork) - _ <- ZIO.sleep(1.second).provideLayer(Clock.live) + _ <- ZIO.replicateZIO(poolSize)(ZIO.scoped(cp.connection *> promise.await).fork) + _ <- ZIO.sleep(1.second) + waiting <- ZIO.replicateZIO(poolSize)(ZIO.scoped(cp.connection).fork) + _ <- ZIO.sleep(1.second) _ <- ZIO.foreach(waiting)(_.interrupt) _ <- promise.complete(ZIO.unit) - _ <- cp.connection.useDiscard(ZIO.unit) + _ <- ZIO.scoped(cp.connection) } yield assert("")(Assertion.anything) - } @@ timeout(10.seconds) + } @@ timeout(10.seconds) @@ withLiveClock ) @@ sequential } diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index 45d3a7dd5..a40e4b8d4 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -11,8 +11,8 @@ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] - final lazy val jdbcLayer: ZLayer[TestEnvironment, TestFailure[Any], SqlDriver] = - ZLayer.makeSome[TestEnvironment, SqlDriver]( + final lazy val jdbcLayer: ZLayer[Any, TestFailure[Any], SqlDriver] = + ZLayer.make[SqlDriver]( poolConfigLayer.orDie, ConnectionPool.live.orDie, SqlDriver.live diff --git a/jdbc/src/test/scala/zio/sql/TestContainer.scala b/jdbc/src/test/scala/zio/sql/TestContainer.scala index d5300f80d..55cf16325 100644 --- a/jdbc/src/test/scala/zio/sql/TestContainer.scala +++ b/jdbc/src/test/scala/zio/sql/TestContainer.scala @@ -7,15 +7,17 @@ import zio._ object TestContainer { def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).orDie) + } - def postgres(imageName: String = "postgres:alpine"): ZManaged[Any, Throwable, PostgreSQLContainer] = - ZManaged.acquireReleaseWith { + def postgres(imageName: String = "postgres:alpine"): ZIO[Scope, Throwable, PostgreSQLContainer] = + ZIO.acquireRelease { ZIO.attemptBlocking { val c = new PostgreSQLContainer( dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) diff --git a/mysql/src/test/scala/zio/sql/TestContainer.scala b/mysql/src/test/scala/zio/sql/TestContainer.scala index babc6c17a..589d68763 100644 --- a/mysql/src/test/scala/zio/sql/TestContainer.scala +++ b/mysql/src/test/scala/zio/sql/TestContainer.scala @@ -8,15 +8,17 @@ import zio._ object TestContainer { def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).refineToOrDie) + } - def mysql(imageName: String = "mysql"): ZManaged[Any, Throwable, MySQLContainer] = - ZManaged.acquireReleaseWith { + def mysql(imageName: String = "mysql"): ZIO[Scope, Throwable, MySQLContainer] = + ZIO.acquireRelease { ZIO.attemptBlocking { val c = new MySQLContainer( mysqlImageVersion = Option(imageName).map(DockerImageName.parse) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index b4cbd2de7..1ae22abb8 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -15,10 +15,12 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { props } - val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = TestContainer - .mysql() - .map(a => ConnectionPoolConfig(a.jdbcUrl, connProperties(a.username, a.password))) - .toLayer + val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + ZLayer.scoped { + TestContainer + .mysql() + .map(a => ConnectionPoolConfig(a.jdbcUrl, connProperties(a.username, a.password))) + } override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(jdbcLayer) diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index 488e7f4bb..214aa9fb7 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -15,9 +15,11 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { test("Transaction is returning the last value") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction(query) - ).use(ZIO.succeed(_)) + val result = ZIO.scoped { + execute( + ZTransaction(query) *> ZTransaction(query) + ) + } val assertion = result @@ -30,9 +32,11 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { test("Transaction is failing") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage).use(ZIO.succeed(_)) + val result = ZIO.scoped { + execute( + ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) + ).mapError(_.getMessage) + } assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -40,13 +44,15 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) - val result = (for { - allCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged - _ <- execute( - ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) - ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + val result = ZIO.scoped { + for { + allCustomersCount <- execute(query).map(identity[UUID](_)).runCount + _ <- execute( + ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) + ).catchAllCause(_ => ZIO.succeed("continue")) + remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount + } yield (allCustomersCount, remainingCustomersCount) + } assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -56,11 +62,13 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val tx = ZTransaction(deleteQuery) - val result = (for { - allCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged - _ <- execute(tx) - remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + val result = ZIO.scoped { + for { + allCustomersCount <- execute(query).map(identity[UUID](_)).runCount + _ <- execute(tx) + remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount + } yield (allCustomersCount, remainingCustomersCount) + } assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) } diff --git a/postgres/src/test/scala/zio/sql/TestContainer.scala b/postgres/src/test/scala/zio/sql/TestContainer.scala index ccfe227cd..504d780c3 100644 --- a/postgres/src/test/scala/zio/sql/TestContainer.scala +++ b/postgres/src/test/scala/zio/sql/TestContainer.scala @@ -8,15 +8,17 @@ import zio._ object TestContainer { def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).orDie) + } - def postgres(imageName: String = "postgres:alpine"): ZManaged[Any, Throwable, PostgreSQLContainer] = - ZManaged.acquireReleaseWith { + def postgres(imageName: String = "postgres:alpine"): ZIO[Scope, Throwable, PostgreSQLContainer] = + ZIO.acquireRelease { ZIO.attemptBlocking { val c = new PostgreSQLContainer( dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 43d75b1a2..7e05747ce 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -4,7 +4,6 @@ import java.time._ import java.time.format.DateTimeFormatter import java.util.UUID import zio.{ Cause, Chunk } -import zio.{ Random => ZioRandom } import zio.stream.ZStream import zio.test.Assertion._ import zio.test._ @@ -632,10 +631,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { }, suite("parseIdent")( test("parseIdent removes quoting of individual identifiers") { - val someString: Gen[ZioRandom with Sized, String] = Gen.string + val someString: Gen[Sized, String] = Gen.string .filter(x => x.length < 50 && x.length > 1) // NOTE: I don't know if property based testing is worth doing here, I just wanted to try it - val genTestString: Gen[ZioRandom with Sized, String] = + val genTestString: Gen[Sized, String] = for { string1 <- someString string2 <- someString diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 7ca4eee8f..798e092ad 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,5 +1,6 @@ package zio.sql.postgresql +import zio._ import zio.test._ import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } @@ -15,16 +16,17 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { props } - val poolConfigLayer = TestContainer - .postgres() - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - autoCommit = autoCommit + val poolConfigLayer = ZLayer.scoped { + TestContainer + .postgres() + .map(a => + ConnectionPoolConfig( + url = a.jdbcUrl, + properties = connProperties(a.username, a.password), + autoCommit = autoCommit + ) ) - ) - .toLayer + } override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomShared(jdbcLayer) diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index a2a0125ce..aff67958b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -15,9 +15,11 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { test("Transaction is returning the last value") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction(query) - ).use(ZIO.succeed(_)) + val result = ZIO.scoped { + execute( + ZTransaction(query) *> ZTransaction(query) + ) + } val assertion = assertM(result.flatMap(_.runCount))(equalTo(5L)).orDie @@ -26,9 +28,11 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { test("Transaction is failing") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage).use(ZIO.succeed(_)) + val result = ZIO.scoped { + execute( + ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) + ).mapError(_.getMessage) + } assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -36,13 +40,15 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) - val result = (for { - allCustomersCount <- execute(query).runCount.toManaged - _ <- execute( - ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) - ).catchAllCause(_ => ZManaged.succeed("continue")) - remainingCustomersCount <- execute(query).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + val result = ZIO.scoped { + for { + allCustomersCount <- execute(query).runCount + _ <- execute( + ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) + ).catchAllCause(_ => ZIO.succeed("continue")) + remainingCustomersCount <- execute(query).runCount + } yield (allCustomersCount, remainingCustomersCount) + } assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -52,11 +58,13 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val tx = ZTransaction(deleteQuery) - val result = (for { - allCustomersCount <- execute(query).runCount.toManaged - _ <- execute(tx) - remainingCustomersCount <- execute(query).runCount.toManaged - } yield (allCustomersCount, remainingCustomersCount)).use(ZIO.succeed(_)) + val result = ZIO.scoped { + for { + allCustomersCount <- execute(query).runCount + _ <- execute(tx) + remainingCustomersCount <- execute(query).runCount + } yield (allCustomersCount, remainingCustomersCount) + } assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) } diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/TestContainer.scala index 9c31e789d..5a4cc4359 100644 --- a/sqlserver/src/test/scala/zio/sql/TestContainer.scala +++ b/sqlserver/src/test/scala/zio/sql/TestContainer.scala @@ -8,17 +8,19 @@ import zio._ object TestContainer { def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Any, Throwable, C] = - ZManaged.acquireReleaseWith { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie).toLayer + ZLayer.scoped { + ZIO.acquireRelease { + ZIO.attemptBlocking { + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).refineToOrDie) + } def postgres( imageName: String = "mcr.microsoft.com/mssql/server:2017-latest" - ): ZManaged[Any, Throwable, MSSQLServerContainer] = - ZManaged.acquireReleaseWith { + ): ZIO[Scope, Throwable, MSSQLServerContainer] = + ZIO.acquireRelease { ZIO.attemptBlocking { val c = new MSSQLServerContainer( dockerImageName = DockerImageName.parse(imageName) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index abcc4a023..a4f215604 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -1,5 +1,6 @@ package zio.sql.sqlserver +import zio._ import zio.test._ import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } @@ -15,16 +16,17 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { props } - val poolConfigLayer = TestContainer - .postgres() - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - autoCommit = autoCommit + val poolConfigLayer = ZLayer.scoped { + TestContainer + .postgres() + .map(a => + ConnectionPoolConfig( + url = a.jdbcUrl, + properties = connProperties(a.username, a.password), + autoCommit = autoCommit + ) ) - ) - .toLayer + } override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = specLayered.provideCustomLayerShared(jdbcLayer) From 24789dc6b4aece3dcfffd7a35b75391ec371a22f Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Tue, 5 Apr 2022 00:30:41 +0200 Subject: [PATCH 397/673] Fix rendering of the Update statement --- .../scala/zio/sql/postgresql/PostgresModule.scala | 14 ++++++++++++-- .../zio/sql/postgresql/PostgresModuleSpec.scala | 7 +++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 3c8fd7a5c..ad765256c 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -500,12 +500,12 @@ trait PostgresModule extends Jdbc { self => def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = set match { case head :: tail => - renderExpr(head.lhs) + renderSetLhs(head.lhs) render(" = ") renderExpr(head.rhs) tail.foreach { setEq => render(", ") - renderExpr(setEq.lhs) + renderSetLhs(setEq.lhs) render(" = ") renderExpr(setEq.rhs) } @@ -550,6 +550,16 @@ trait PostgresModule extends Jdbc { self => } } + private[zio] def renderSetLhs[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = + expr match { + case Expr.Source(_, column) => + column.name match { + case Some(columnName) => render(columnName) + case _ => () + } + case _ => () + } + private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Subselect(subselect) => render(" (") diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 5aab6a91c..1f52104e4 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -695,6 +695,13 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { ) assertM(result)(equalTo(expected)) + }, + test("update rows") { + import Persons._ + + val query = update(persons).set(fName, "Charlie").where(fName === "Charles") + + assertM(execute(query))(equalTo(2)) } ) @@ sequential } From 3faa213279ee7531a392beeef8e8ffdd52b57b36 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Tue, 5 Apr 2022 23:27:52 +0200 Subject: [PATCH 398/673] Add MySQL test for updating rows --- .../{MysqlModuleTest.scala => MysqlModuleSpec.scala} | 8 +++++++- .../main/scala/zio/sql/postgresql/PostgresModule.scala | 4 ++++ .../scala/zio/sql/sqlserver/SqlServerModuleSpec.scala | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) rename mysql/src/test/scala/zio/sql/mysql/{MysqlModuleTest.scala => MysqlModuleSpec.scala} (94%) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala similarity index 94% rename from mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala rename to mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index dbc2d1dc8..13c406735 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleTest.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -8,7 +8,7 @@ import zio.test._ import zio.test.Assertion._ import scala.language.postfixOps -object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { +object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { import this.Customers._ import this.Orders._ @@ -160,6 +160,12 @@ object MysqlModuleTest extends MysqlRunnableSpec with ShopSchema { } yield assert(r)(hasSameElementsDistinct(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can update rows") { + val query = update(customers).set(fName, "Roland").where(fName === "Ronald") + + println(renderUpdate(query)) + assertM(execute(query))(equalTo(1)) } ) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index ad765256c..af9e04cbc 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -550,6 +550,10 @@ trait PostgresModule extends Jdbc { self => } } + /* + * PostgreSQL doesn't allow for `tableName.columnName = value` format in update statement, + * instead requires `columnName = value`. + */ private[zio] def renderSetLhs[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Source(_, column) => diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index e3f730159..88e439249 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -9,7 +9,7 @@ import java.time._ import java.util.UUID import scala.language.postfixOps -object PostgresModuleSpec extends SqlServerRunnableSpec with DbSchema { +object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { import AggregationDef._ import DbSchema._ From c64b789d1f39dc1c2375b8a30c1f5a07ab4b2852 Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Wed, 6 Apr 2022 08:51:55 -0700 Subject: [PATCH 399/673] use snapshot --- build.sbt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 0e9fd82d3..5be2b6d78 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-RC4" +val zioVersion = "2.0.0-RC4+28-9c41a0f4-SNAPSHOT" val zioSchemaVersion = "0.1.8" val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.5" @@ -85,7 +85,9 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test - ) + ), + dependencyOverrides += "dev.zio" %% "zio" % zioVersion, + resolvers += Resolver.sonatypeRepo("snapshots") ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From 68dd67043f7644006a9890d7b2fd29206a328ecb Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Wed, 6 Apr 2022 09:18:33 -0700 Subject: [PATCH 400/673] use snapshot --- build.sbt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5be2b6d78..b93a133ca 100644 --- a/build.sbt +++ b/build.sbt @@ -139,7 +139,9 @@ lazy val driver = project "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test - ) + ), + dependencyOverrides += "dev.zio" %% "zio" % zioVersion, + resolvers += Resolver.sonatypeRepo("snapshots") ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) From f6b58e8b29d846a9e3a5a2062681e46b675ff2b9 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 7 Apr 2022 22:15:31 +0200 Subject: [PATCH 401/673] repaired test, moved around some test containers --- jdbc/src/main/scala/zio/sql/TransactionModule.scala | 6 +++--- .../scala/zio/sql/mysql/MysqlRunnableSpec.scala | 3 +-- .../scala/zio/sql/{ => mysql}/TestContainer.scala | 8 +++----- .../test/scala/zio/sql/mysql/TransactionSpec.scala | 2 +- .../zio/sql/postgresql/PostgresRunnableSpec.scala | 2 +- .../zio/sql/{ => postgresql}/TestContainer.scala | 7 +++---- .../scala/zio/sql/postgresql/TransactionSpec.scala | 2 +- .../test/resources/container-license-acceptance.txt | 2 +- .../zio/sql/sqlserver/SqlServerRunnableSpec.scala | 4 ++-- .../zio/sql/{ => sqlserver}/TestContainer.scala | 13 ++++++------- 10 files changed, 22 insertions(+), 27 deletions(-) rename mysql/src/test/scala/zio/sql/{ => mysql}/TestContainer.scala (84%) rename postgres/src/test/scala/zio/sql/{ => postgresql}/TestContainer.scala (84%) rename sqlserver/src/test/scala/zio/sql/{ => sqlserver}/TestContainer.scala (67%) diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 60585fd30..3aa3fdbeb 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -19,7 +19,7 @@ trait TransactionModule { self: Jdbc => ZTransaction(self.unwrap.flatMap(a => f(a).unwrap)) private[sql] def run(txn: Txn)(implicit - ev: E <:< Exception + ev: E <:< Throwable ): ZIO[R, Throwable, A] = for { r <- ZIO.environment[R] @@ -31,11 +31,11 @@ trait TransactionModule { self: Jdbc => _ => ZIO .attemptBlocking(txn.connection.rollback()) - .refineToOrDie[Exception], + .refineToOrDie[Throwable], _ => ZIO .attemptBlocking(txn.connection.commit()) - .refineToOrDie[Exception] + .refineToOrDie[Throwable] ) } yield a diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 1ae22abb8..9effb9375 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -1,8 +1,7 @@ package zio.sql.mysql import java.util.Properties - -import zio.sql._ +import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } import zio.test._ import zio.ZLayer diff --git a/mysql/src/test/scala/zio/sql/TestContainer.scala b/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala similarity index 84% rename from mysql/src/test/scala/zio/sql/TestContainer.scala rename to mysql/src/test/scala/zio/sql/mysql/TestContainer.scala index 589d68763..48679f7bc 100644 --- a/mysql/src/test/scala/zio/sql/TestContainer.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala @@ -1,9 +1,8 @@ -package zio.sql +package zio.sql.mysql -import com.dimafeng.testcontainers.SingleContainer -import com.dimafeng.testcontainers.MySQLContainer +import com.dimafeng.testcontainers.{ MySQLContainer, SingleContainer } import org.testcontainers.utility.DockerImageName -import zio._ +import zio.{ IsNotIntersection, Scope, Tag, ZIO, ZLayer } object TestContainer { @@ -30,5 +29,4 @@ object TestContainer { c } }(container => ZIO.attemptBlocking(container.stop()).orDie) - } diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index 34eb141d4..fd1b6d898 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -44,7 +44,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { allCustomersCount <- execute(query).map(identity[UUID](_)).runCount _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) - ) + ).catchAllCause(_ => ZIO.unit) remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount } yield (allCustomersCount, remainingCustomersCount)) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 798e092ad..17ad0616e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -3,7 +3,7 @@ package zio.sql.postgresql import zio._ import zio.test._ import java.util.Properties -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } +import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { diff --git a/postgres/src/test/scala/zio/sql/TestContainer.scala b/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala similarity index 84% rename from postgres/src/test/scala/zio/sql/TestContainer.scala rename to postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala index 504d780c3..ad0954f10 100644 --- a/postgres/src/test/scala/zio/sql/TestContainer.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala @@ -1,9 +1,8 @@ -package zio.sql +package zio.sql.postgresql -import com.dimafeng.testcontainers.SingleContainer -import com.dimafeng.testcontainers.PostgreSQLContainer +import com.dimafeng.testcontainers.{ PostgreSQLContainer, SingleContainer } import org.testcontainers.utility.DockerImageName -import zio._ +import zio.{ IsNotIntersection, Scope, Tag, ZIO, ZLayer } object TestContainer { diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index 8c9e55855..2aa9c3322 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -40,7 +40,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { allCustomersCount <- execute(query).runCount _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) - ) + ).catchAllCause(_ => ZIO.unit) remainingCustomersCount <- execute(query).runCount } yield (allCustomersCount, remainingCustomersCount)) diff --git a/sqlserver/src/test/resources/container-license-acceptance.txt b/sqlserver/src/test/resources/container-license-acceptance.txt index 56ecd3737..33fb7ac8e 100644 --- a/sqlserver/src/test/resources/container-license-acceptance.txt +++ b/sqlserver/src/test/resources/container-license-acceptance.txt @@ -1 +1 @@ -mcr.microsoft.com/mssql/server:2019-latest \ No newline at end of file +mcr.microsoft.com/azure-sql-edge:latest \ No newline at end of file diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index a4f215604..87c28a1ca 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -3,7 +3,7 @@ package zio.sql.sqlserver import zio._ import zio.test._ import java.util.Properties -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec, TestContainer } +import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { @@ -18,7 +18,7 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { val poolConfigLayer = ZLayer.scoped { TestContainer - .postgres() + .sqlServer() .map(a => ConnectionPoolConfig( url = a.jdbcUrl, diff --git a/sqlserver/src/test/scala/zio/sql/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala similarity index 67% rename from sqlserver/src/test/scala/zio/sql/TestContainer.scala rename to sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala index 735344bed..1ff045d7d 100644 --- a/sqlserver/src/test/scala/zio/sql/TestContainer.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala @@ -1,9 +1,8 @@ -package zio.sql +package zio.sql.sqlserver -import com.dimafeng.testcontainers.SingleContainer -import com.dimafeng.testcontainers.MSSQLServerContainer +import com.dimafeng.testcontainers.{ MSSQLServerContainer, SingleContainer } import org.testcontainers.utility.DockerImageName -import zio._ +import zio.{ Scope, Tag, ZIO, ZLayer } object TestContainer { @@ -17,13 +16,13 @@ object TestContainer { }(container => ZIO.attemptBlocking(container.stop()).refineToOrDie) } - def postgres( - imageName: String = "mcr.microsoft.com/mssql/server:2019-latest" + def sqlServer( + imageName: String = "mcr.microsoft.com/azure-sql-edge:latest" ): ZIO[Scope, Throwable, MSSQLServerContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { val c = new MSSQLServerContainer( - dockerImageName = DockerImageName.parse(imageName) + dockerImageName = DockerImageName.parse(imageName).asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") ).configure { a => a.withInitScript("db_schema.sql") () From f78585abcd47b588af504d66c0cf667e824c9f8e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Apr 2022 23:07:00 +0200 Subject: [PATCH 402/673] Update sbt-scalafix to 0.10.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c691176b2..20489ccbc 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,5 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.2.2") From bd287f6979c663c62e91345a4cc523a768714752 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 8 Apr 2022 15:44:44 +0200 Subject: [PATCH 403/673] added comment, removed redundant code --- .../test/scala/zio/sql/TestContainer.scala | 12 +--------- .../scala/zio/sql/mysql/TestContainer.scala | 14 ++--------- .../zio/sql/postgresql/TestContainer.scala | 14 ++--------- .../sql/sqlserver/SqlServerRunnableSpec.scala | 2 +- .../zio/sql/sqlserver/TestContainer.scala | 23 ++++++------------- 5 files changed, 13 insertions(+), 52 deletions(-) diff --git a/jdbc/src/test/scala/zio/sql/TestContainer.scala b/jdbc/src/test/scala/zio/sql/TestContainer.scala index 55cf16325..4cabff0b4 100644 --- a/jdbc/src/test/scala/zio/sql/TestContainer.scala +++ b/jdbc/src/test/scala/zio/sql/TestContainer.scala @@ -1,21 +1,11 @@ package zio.sql -import com.dimafeng.testcontainers.{ PostgreSQLContainer, SingleContainer } +import com.dimafeng.testcontainers.PostgreSQLContainer import org.testcontainers.utility.DockerImageName import zio._ object TestContainer { - def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZLayer.scoped { - ZIO.acquireRelease { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie) - } - def postgres(imageName: String = "postgres:alpine"): ZIO[Scope, Throwable, PostgreSQLContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { diff --git a/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala b/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala index 48679f7bc..67d778806 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala @@ -1,21 +1,11 @@ package zio.sql.mysql -import com.dimafeng.testcontainers.{ MySQLContainer, SingleContainer } +import com.dimafeng.testcontainers.MySQLContainer import org.testcontainers.utility.DockerImageName -import zio.{ IsNotIntersection, Scope, Tag, ZIO, ZLayer } +import zio._ object TestContainer { - def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZLayer.scoped { - ZIO.acquireRelease { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).refineToOrDie) - } - def mysql(imageName: String = "mysql"): ZIO[Scope, Throwable, MySQLContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { diff --git a/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala b/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala index ad0954f10..42704c031 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala @@ -1,21 +1,11 @@ package zio.sql.postgresql -import com.dimafeng.testcontainers.{ PostgreSQLContainer, SingleContainer } +import com.dimafeng.testcontainers.PostgreSQLContainer import org.testcontainers.utility.DockerImageName -import zio.{ IsNotIntersection, Scope, Tag, ZIO, ZLayer } +import zio._ object TestContainer { - def container[C <: SingleContainer[_]: Tag: IsNotIntersection](c: C): ZLayer[Any, Throwable, C] = - ZLayer.scoped { - ZIO.acquireRelease { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie) - } - def postgres(imageName: String = "postgres:alpine"): ZIO[Scope, Throwable, PostgreSQLContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index 87c28a1ca..79b1bf459 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -18,7 +18,7 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { val poolConfigLayer = ZLayer.scoped { TestContainer - .sqlServer() + .sqlServer .map(a => ConnectionPoolConfig( url = a.jdbcUrl, diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala index 1ff045d7d..e109054ea 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala @@ -1,28 +1,19 @@ package zio.sql.sqlserver -import com.dimafeng.testcontainers.{ MSSQLServerContainer, SingleContainer } +import com.dimafeng.testcontainers.MSSQLServerContainer import org.testcontainers.utility.DockerImageName -import zio.{ Scope, Tag, ZIO, ZLayer } +import zio._ object TestContainer { - def container[C <: SingleContainer[_]: Tag](c: C): ZLayer[Any, Throwable, C] = - ZLayer.scoped { - ZIO.acquireRelease { - ZIO.attemptBlocking { - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).refineToOrDie) - } - - def sqlServer( - imageName: String = "mcr.microsoft.com/azure-sql-edge:latest" - ): ZIO[Scope, Throwable, MSSQLServerContainer] = + /** + * We are using Azure sql edge because MS Sql Server image won't run on ARM. + */ + val sqlServer: ZIO[Scope, Throwable, MSSQLServerContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { val c = new MSSQLServerContainer( - dockerImageName = DockerImageName.parse(imageName).asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") + dockerImageName = DockerImageName.parse("mcr.microsoft.com/azure-sql-edge:latest").asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") ).configure { a => a.withInitScript("db_schema.sql") () From 2d7d91df9b0c0a0d210125c353448018206fca01 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Fri, 8 Apr 2022 15:57:18 +0200 Subject: [PATCH 404/673] format --- .../scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala | 3 +-- .../src/test/scala/zio/sql/sqlserver/TestContainer.scala | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index 79b1bf459..0a08a3619 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -17,8 +17,7 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { } val poolConfigLayer = ZLayer.scoped { - TestContainer - .sqlServer + TestContainer.sqlServer .map(a => ConnectionPoolConfig( url = a.jdbcUrl, diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala index e109054ea..8834755dd 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala @@ -1,6 +1,6 @@ package zio.sql.sqlserver -import com.dimafeng.testcontainers.MSSQLServerContainer +import com.dimafeng.testcontainers.MSSQLServerContainer import org.testcontainers.utility.DockerImageName import zio._ @@ -13,7 +13,9 @@ object TestContainer { ZIO.acquireRelease { ZIO.attemptBlocking { val c = new MSSQLServerContainer( - dockerImageName = DockerImageName.parse("mcr.microsoft.com/azure-sql-edge:latest").asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") + dockerImageName = DockerImageName + .parse("mcr.microsoft.com/azure-sql-edge:latest") + .asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") ).configure { a => a.withInitScript("db_schema.sql") () From cc1602bf9a1e7ce2b05b967a99115fb122278bcd Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 9 Apr 2022 08:56:42 +0200 Subject: [PATCH 405/673] Update zio, zio-streams, zio-test, ... to 2.0.0-RC5 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b93a133ca..093693f01 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-RC4+28-9c41a0f4-SNAPSHOT" +val zioVersion = "2.0.0-RC5" val zioSchemaVersion = "0.1.8" val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.5" From 56c7b0716db4e890fc99f48ef16cd64b5fd12bc6 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 9 Apr 2022 15:07:51 +0200 Subject: [PATCH 406/673] Suppres Scaladoc link errors --- build.sbt | 5 + website/yarn.lock | 7189 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 7194 insertions(+) create mode 100644 website/yarn.lock diff --git a/build.sbt b/build.sbt index 9ff3d123a..bd25d8ce5 100644 --- a/build.sbt +++ b/build.sbt @@ -145,6 +145,11 @@ lazy val jdbc = project "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) + .settings(Seq( + Compile / doc / scalacOptions ++= Seq( + "-no-link-warnings" // Suppresses problems with Scaladoc links + ) + )) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) .dependsOn(core.jvm) diff --git a/website/yarn.lock b/website/yarn.lock new file mode 100644 index 000000000..5ea3470d3 --- /dev/null +++ b/website/yarn.lock @@ -0,0 +1,7189 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.1.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.2.tgz#4edca94973ded9630d20101cd8559cedb8d8bd34" + integrity sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg== + dependencies: + "@jridgewell/trace-mapping" "^0.3.0" + +"@babel/code-frame@7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" + integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.16.7", "@babel/code-frame@^7.5.5": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" + integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== + dependencies: + "@babel/highlight" "^7.16.7" + +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.16.8", "@babel/compat-data@^7.17.0", "@babel/compat-data@^7.17.7": + version "7.17.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2" + integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ== + +"@babel/core@^7.12.3": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe" + integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.9" + "@babel/helper-compilation-targets" "^7.17.7" + "@babel/helper-module-transforms" "^7.17.7" + "@babel/helpers" "^7.17.9" + "@babel/parser" "^7.17.9" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.9" + "@babel/types" "^7.17.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + +"@babel/generator@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc" + integrity sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ== + dependencies: + "@babel/types" "^7.17.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" + integrity sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz#38d138561ea207f0f69eb1626a418e4f7e6a580b" + integrity sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.16.7" + "@babel/types" "^7.16.7" + +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.7": + version "7.17.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz#a3c2924f5e5f0379b356d4cfb313d1414dc30e46" + integrity sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w== + dependencies: + "@babel/compat-data" "^7.17.7" + "@babel/helper-validator-option" "^7.16.7" + browserslist "^4.17.5" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7", "@babel/helper-create-class-features-plugin@^7.17.6": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz#71835d7fb9f38bd9f1378e40a4c0902fdc2ea49d" + integrity sha512-kUjip3gruz6AJKOq5i3nC6CoCEEF/oHH3cp6tOZhB+IyyyPyW0g1Gfsxn3mkk6S08pIA2y8GQh609v9G/5sHVQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-member-expression-to-functions" "^7.17.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + +"@babel/helper-create-regexp-features-plugin@^7.16.7": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz#1dcc7d40ba0c6b6b25618997c5dbfd310f186fe1" + integrity sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + regexpu-core "^5.0.1" + +"@babel/helper-define-polyfill-provider@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz#52411b445bdb2e676869e5a74960d2d3826d2665" + integrity sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA== + dependencies: + "@babel/helper-compilation-targets" "^7.13.0" + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/traverse" "^7.13.0" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + semver "^6.1.2" + +"@babel/helper-environment-visitor@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz#ff484094a839bde9d89cd63cba017d7aae80ecd7" + integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-explode-assignable-expression@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz#12a6d8522fdd834f194e868af6354e8650242b7a" + integrity sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" + integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== + dependencies: + "@babel/template" "^7.16.7" + "@babel/types" "^7.17.0" + +"@babel/helper-hoist-variables@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" + integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7": + version "7.17.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz#a34013b57d8542a8c4ff8ba3f747c02452a4d8c4" + integrity sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw== + dependencies: + "@babel/types" "^7.17.0" + +"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" + integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-module-transforms@^7.16.7", "@babel/helper-module-transforms@^7.17.7": + version "7.17.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz#3943c7f777139e7954a5355c815263741a9c1cbd" + integrity sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw== + dependencies: + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-simple-access" "^7.17.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.3" + "@babel/types" "^7.17.0" + +"@babel/helper-optimise-call-expression@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" + integrity sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" + integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== + +"@babel/helper-remap-async-to-generator@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz#29ffaade68a367e2ed09c90901986918d25e57e3" + integrity sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-wrap-function" "^7.16.8" + "@babel/types" "^7.16.8" + +"@babel/helper-replace-supers@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz#e9f5f5f32ac90429c1a4bdec0f231ef0c2838ab1" + integrity sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw== + dependencies: + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-member-expression-to-functions" "^7.16.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" + +"@babel/helper-simple-access@^7.17.7": + version "7.17.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz#aaa473de92b7987c6dfa7ce9a7d9674724823367" + integrity sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA== + dependencies: + "@babel/types" "^7.17.0" + +"@babel/helper-skip-transparent-expression-wrappers@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09" + integrity sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw== + dependencies: + "@babel/types" "^7.16.0" + +"@babel/helper-split-export-declaration@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" + integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-validator-identifier@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" + integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== + +"@babel/helper-validator-option@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" + integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== + +"@babel/helper-wrap-function@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz#58afda087c4cd235de92f7ceedebca2c41274200" + integrity sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw== + dependencies: + "@babel/helper-function-name" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.8" + "@babel/types" "^7.16.8" + +"@babel/helpers@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" + integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== + dependencies: + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.9" + "@babel/types" "^7.17.0" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.9.tgz#61b2ee7f32ea0454612def4fccdae0de232b73e3" + integrity sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.16.7", "@babel/parser@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" + integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" + integrity sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz#cc001234dfc139ac45f6bcf801866198c8c72ff9" + integrity sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + "@babel/plugin-proposal-optional-chaining" "^7.16.7" + +"@babel/plugin-proposal-async-generator-functions@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz#3bdd1ebbe620804ea9416706cd67d60787504bc8" + integrity sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-remap-async-to-generator" "^7.16.8" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz#925cad7b3b1a2fcea7e59ecc8eb5954f961f91b0" + integrity sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-proposal-class-static-block@^7.16.7": + version "7.17.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz#164e8fd25f0d80fa48c5a4d1438a6629325ad83c" + integrity sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.17.6" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + +"@babel/plugin-proposal-dynamic-import@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz#c19c897eaa46b27634a00fee9fb7d829158704b2" + integrity sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + +"@babel/plugin-proposal-export-namespace-from@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz#09de09df18445a5786a305681423ae63507a6163" + integrity sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + +"@babel/plugin-proposal-json-strings@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz#9732cb1d17d9a2626a08c5be25186c195b6fa6e8" + integrity sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-json-strings" "^7.8.3" + +"@babel/plugin-proposal-logical-assignment-operators@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz#be23c0ba74deec1922e639832904be0bea73cdea" + integrity sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz#141fc20b6857e59459d430c850a0011e36561d99" + integrity sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-numeric-separator@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz#d6b69f4af63fb38b6ca2558442a7fb191236eba9" + integrity sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-proposal-object-rest-spread@^7.12.1", "@babel/plugin-proposal-object-rest-spread@^7.16.7": + version "7.17.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz#d9eb649a54628a51701aef7e0ea3d17e2b9dd390" + integrity sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw== + dependencies: + "@babel/compat-data" "^7.17.0" + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.16.7" + +"@babel/plugin-proposal-optional-catch-binding@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz#c623a430674ffc4ab732fd0a0ae7722b67cb74cf" + integrity sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + +"@babel/plugin-proposal-optional-chaining@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz#7cd629564724816c0e8a969535551f943c64c39a" + integrity sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-private-methods@^7.16.11": + version "7.16.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz#e8df108288555ff259f4527dbe84813aac3a1c50" + integrity sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.10" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-proposal-private-property-in-object@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz#b0b8cef543c2c3d57e59e2c611994861d46a3fce" + integrity sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + +"@babel/plugin-proposal-unicode-property-regex@^7.16.7", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz#635d18eb10c6214210ffc5ff4932552de08188a2" + integrity sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz#50b6571d13f764266a113d77c82b4a6508bbe665" + integrity sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-arrow-functions@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" + integrity sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-async-to-generator@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz#b83dff4b970cf41f1b819f8b49cc0cfbaa53a808" + integrity sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg== + dependencies: + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-remap-async-to-generator" "^7.16.8" + +"@babel/plugin-transform-block-scoped-functions@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz#4d0d57d9632ef6062cdf354bb717102ee042a620" + integrity sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-block-scoping@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz#f50664ab99ddeaee5bc681b8f3a6ea9d72ab4f87" + integrity sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-classes@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz#8f4b9562850cd973de3b498f1218796eb181ce00" + integrity sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz#66dee12e46f61d2aae7a73710f591eb3df616470" + integrity sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-destructuring@^7.16.7": + version "7.17.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz#49dc2675a7afa9a5e4c6bdee636061136c3408d1" + integrity sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-dotall-regex@^7.16.7", "@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz#6b2d67686fab15fb6a7fd4bd895d5982cfc81241" + integrity sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-duplicate-keys@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz#2207e9ca8f82a0d36a5a67b6536e7ef8b08823c9" + integrity sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-exponentiation-operator@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz#efa9862ef97e9e9e5f653f6ddc7b665e8536fe9b" + integrity sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-for-of@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz#649d639d4617dff502a9a158c479b3b556728d8c" + integrity sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-function-name@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz#5ab34375c64d61d083d7d2f05c38d90b97ec65cf" + integrity sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA== + dependencies: + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz#254c9618c5ff749e87cb0c0cef1a0a050c0bdab1" + integrity sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-member-expression-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz#6e5dcf906ef8a098e630149d14c867dd28f92384" + integrity sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-modules-amd@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz#b28d323016a7daaae8609781d1f8c9da42b13186" + integrity sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g== + dependencies: + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-commonjs@^7.16.8": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.9.tgz#274be1a2087beec0254d4abd4d86e52442e1e5b6" + integrity sha512-2TBFd/r2I6VlYn0YRTz2JdazS+FoUuQ2rIFHoAxtyP/0G3D82SBLaRq9rnUkpqlLg03Byfl/+M32mpxjO6KaPw== + dependencies: + "@babel/helper-module-transforms" "^7.17.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-simple-access" "^7.17.7" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-systemjs@^7.16.7": + version "7.17.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz#81fd834024fae14ea78fbe34168b042f38703859" + integrity sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw== + dependencies: + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-module-transforms" "^7.17.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-umd@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz#23dad479fa585283dbd22215bff12719171e7618" + integrity sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ== + dependencies: + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz#7f860e0e40d844a02c9dcf9d84965e7dfd666252" + integrity sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + +"@babel/plugin-transform-new-target@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz#9967d89a5c243818e0800fdad89db22c5f514244" + integrity sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-object-super@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz#ac359cf8d32cf4354d27a46867999490b6c32a94" + integrity sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + +"@babel/plugin-transform-parameters@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz#a1721f55b99b736511cb7e0152f61f17688f331f" + integrity sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-property-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz#2dadac85155436f22c696c4827730e0fe1057a55" + integrity sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-react-display-name@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz#7b6d40d232f4c0f550ea348593db3b21e2404340" + integrity sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-react-jsx-development@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz#43a00724a3ed2557ed3f276a01a929e6686ac7b8" + integrity sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.16.7" + +"@babel/plugin-transform-react-jsx@^7.16.7": + version "7.17.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz#eac1565da176ccb1a715dae0b4609858808008c1" + integrity sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-jsx" "^7.16.7" + "@babel/types" "^7.17.0" + +"@babel/plugin-transform-react-pure-annotations@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz#232bfd2f12eb551d6d7d01d13fe3f86b45eb9c67" + integrity sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-regenerator@^7.16.7": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.17.9.tgz#0a33c3a61cf47f45ed3232903683a0afd2d3460c" + integrity sha512-Lc2TfbxR1HOyn/c6b4Y/b6NHoTb67n/IoWLxTu4kC7h4KQnWlhCq2S8Tx0t2SVvv5Uu87Hs+6JEJ5kt2tYGylQ== + dependencies: + regenerator-transform "^0.15.0" + +"@babel/plugin-transform-reserved-words@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz#1d798e078f7c5958eec952059c460b220a63f586" + integrity sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-shorthand-properties@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz#e8549ae4afcf8382f711794c0c7b6b934c5fbd2a" + integrity sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-spread@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz#a303e2122f9f12e0105daeedd0f30fb197d8ff44" + integrity sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + +"@babel/plugin-transform-sticky-regex@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz#c84741d4f4a38072b9a1e2e3fd56d359552e8660" + integrity sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-template-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz#f3d1c45d28967c8e80f53666fc9c3e50618217ab" + integrity sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-typeof-symbol@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz#9cdbe622582c21368bd482b660ba87d5545d4f7e" + integrity sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-unicode-escapes@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz#da8717de7b3287a2c6d659750c964f302b31ece3" + integrity sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-unicode-regex@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz#0f7aa4a501198976e25e82702574c34cfebe9ef2" + integrity sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/polyfill@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" + integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.4" + +"@babel/preset-env@^7.12.1": + version "7.16.11" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.16.11.tgz#5dd88fd885fae36f88fd7c8342475c9f0abe2982" + integrity sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g== + dependencies: + "@babel/compat-data" "^7.16.8" + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-validator-option" "^7.16.7" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.16.7" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.16.7" + "@babel/plugin-proposal-async-generator-functions" "^7.16.8" + "@babel/plugin-proposal-class-properties" "^7.16.7" + "@babel/plugin-proposal-class-static-block" "^7.16.7" + "@babel/plugin-proposal-dynamic-import" "^7.16.7" + "@babel/plugin-proposal-export-namespace-from" "^7.16.7" + "@babel/plugin-proposal-json-strings" "^7.16.7" + "@babel/plugin-proposal-logical-assignment-operators" "^7.16.7" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.16.7" + "@babel/plugin-proposal-numeric-separator" "^7.16.7" + "@babel/plugin-proposal-object-rest-spread" "^7.16.7" + "@babel/plugin-proposal-optional-catch-binding" "^7.16.7" + "@babel/plugin-proposal-optional-chaining" "^7.16.7" + "@babel/plugin-proposal-private-methods" "^7.16.11" + "@babel/plugin-proposal-private-property-in-object" "^7.16.7" + "@babel/plugin-proposal-unicode-property-regex" "^7.16.7" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-transform-arrow-functions" "^7.16.7" + "@babel/plugin-transform-async-to-generator" "^7.16.8" + "@babel/plugin-transform-block-scoped-functions" "^7.16.7" + "@babel/plugin-transform-block-scoping" "^7.16.7" + "@babel/plugin-transform-classes" "^7.16.7" + "@babel/plugin-transform-computed-properties" "^7.16.7" + "@babel/plugin-transform-destructuring" "^7.16.7" + "@babel/plugin-transform-dotall-regex" "^7.16.7" + "@babel/plugin-transform-duplicate-keys" "^7.16.7" + "@babel/plugin-transform-exponentiation-operator" "^7.16.7" + "@babel/plugin-transform-for-of" "^7.16.7" + "@babel/plugin-transform-function-name" "^7.16.7" + "@babel/plugin-transform-literals" "^7.16.7" + "@babel/plugin-transform-member-expression-literals" "^7.16.7" + "@babel/plugin-transform-modules-amd" "^7.16.7" + "@babel/plugin-transform-modules-commonjs" "^7.16.8" + "@babel/plugin-transform-modules-systemjs" "^7.16.7" + "@babel/plugin-transform-modules-umd" "^7.16.7" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.16.8" + "@babel/plugin-transform-new-target" "^7.16.7" + "@babel/plugin-transform-object-super" "^7.16.7" + "@babel/plugin-transform-parameters" "^7.16.7" + "@babel/plugin-transform-property-literals" "^7.16.7" + "@babel/plugin-transform-regenerator" "^7.16.7" + "@babel/plugin-transform-reserved-words" "^7.16.7" + "@babel/plugin-transform-shorthand-properties" "^7.16.7" + "@babel/plugin-transform-spread" "^7.16.7" + "@babel/plugin-transform-sticky-regex" "^7.16.7" + "@babel/plugin-transform-template-literals" "^7.16.7" + "@babel/plugin-transform-typeof-symbol" "^7.16.7" + "@babel/plugin-transform-unicode-escapes" "^7.16.7" + "@babel/plugin-transform-unicode-regex" "^7.16.7" + "@babel/preset-modules" "^0.1.5" + "@babel/types" "^7.16.8" + babel-plugin-polyfill-corejs2 "^0.3.0" + babel-plugin-polyfill-corejs3 "^0.5.0" + babel-plugin-polyfill-regenerator "^0.3.0" + core-js-compat "^3.20.2" + semver "^6.3.0" + +"@babel/preset-modules@^0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" + integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/preset-react@^7.12.5": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.16.7.tgz#4c18150491edc69c183ff818f9f2aecbe5d93852" + integrity sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-validator-option" "^7.16.7" + "@babel/plugin-transform-react-display-name" "^7.16.7" + "@babel/plugin-transform-react-jsx" "^7.16.7" + "@babel/plugin-transform-react-jsx-development" "^7.16.7" + "@babel/plugin-transform-react-pure-annotations" "^7.16.7" + +"@babel/register@^7.12.1": + version "7.17.7" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.17.7.tgz#5eef3e0f4afc07e25e847720e7b987ae33f08d0b" + integrity sha512-fg56SwvXRifootQEDQAu1mKdjh5uthPzdO0N6t358FktfL4XjAVXuH58ULoiW8mesxiOgNIrxiImqEwv0+hRRA== + dependencies: + clone-deep "^4.0.1" + find-cache-dir "^2.0.0" + make-dir "^2.1.0" + pirates "^4.0.5" + source-map-support "^0.5.16" + +"@babel/runtime@^7.8.4": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" + integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" + integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/parser" "^7.16.7" + "@babel/types" "^7.16.7" + +"@babel/traverse@^7.12.5", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.9.tgz#1f9b207435d9ae4a8ed6998b2b82300d83c37a0d" + integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.9" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.17.9" + "@babel/types" "^7.17.0" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.12.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.4.4": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" + integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c" + integrity sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.11" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec" + integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== + +"@jridgewell/trace-mapping@^0.3.0": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3" + integrity sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@sindresorhus/is@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" + integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== + +"@types/cheerio@^0.22.8": + version "0.22.31" + resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.31.tgz#b8538100653d6bb1b08a1e46dec75b4f2a5d5eb6" + integrity sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw== + dependencies: + "@types/node" "*" + +"@types/node@*": + version "17.0.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.23.tgz#3b41a6e643589ac6442bdbd7a4a3ded62f33f7da" + integrity sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw== + +"@types/q@^1.5.1": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" + integrity sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ== + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +address@1.1.2, address@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + +airbnb-prop-types@^2.16.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz#b96274cefa1abb14f623f804173ee97c13971dc2" + integrity sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg== + dependencies: + array.prototype.find "^2.1.1" + function.prototype.name "^1.1.2" + is-regex "^1.1.0" + object-is "^1.1.2" + object.assign "^4.1.0" + object.entries "^1.1.2" + prop-types "^15.7.2" + prop-types-exact "^1.2.0" + react-is "^16.13.1" + +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +alphanum-sort@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= + +ansi-red@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" + integrity sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= + dependencies: + ansi-wrap "0.1.0" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-wrap@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= + +arch@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" + integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== + +archive-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-4.0.0.tgz#f92e72233056dfc6969472749c267bdb046b1d70" + integrity sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA= + dependencies: + file-type "^4.2.0" + +argparse@^1.0.10, argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +array.prototype.filter@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz#20688792acdb97a09488eaaee9eebbf3966aae21" + integrity sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + es-array-method-boxes-properly "^1.0.0" + is-string "^1.0.7" + +array.prototype.find@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.1.2.tgz#6abbd0c2573925d8094f7d23112306af8c16d534" + integrity sha512-00S1O4ewO95OmmJW7EesWfQlrCrLEL8kZ40w3+GkLX2yTt0m2ggcePPa2uHPJ9KUmJvwRq+lCV9bD8Yim23x/Q== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + +array.prototype.flat@^1.2.3: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" + integrity sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +autolinker@^3.11.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-3.15.0.tgz#03956088648f236642a5783612f9ca16adbbed38" + integrity sha512-N/5Dk5AZnqL9k6kkHdFIGLm/0/rRuSnJwqYYhLCJjU7ZtiaJwCBzNTvjzy1zzJADngv/wvtHYcrPHytPnASeFA== + dependencies: + tslib "^2.3.0" + +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha1-BlK0kYgYefB3XazgzcoyM5QqTkc= + dependencies: + gulp-header "^1.7.1" + +autoprefixer@^9.7.5: + version "9.8.8" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.8.tgz#fd4bd4595385fa6f06599de749a4d5f7a474957a" + integrity sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA== + dependencies: + browserslist "^4.12.0" + caniuse-lite "^1.0.30001109" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + picocolors "^0.2.1" + postcss "^7.0.32" + postcss-value-parser "^4.1.0" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + dependencies: + object.assign "^4.1.0" + +babel-plugin-polyfill-corejs2@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz#440f1b70ccfaabc6b676d196239b138f8a2cfba5" + integrity sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w== + dependencies: + "@babel/compat-data" "^7.13.11" + "@babel/helper-define-polyfill-provider" "^0.3.1" + semver "^6.1.1" + +babel-plugin-polyfill-corejs3@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz#aabe4b2fa04a6e038b688c5e55d44e78cd3a5f72" + integrity sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.3.1" + core-js-compat "^3.21.0" + +babel-plugin-polyfill-regenerator@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz#2c0678ea47c75c8cc2fbb1852278d8fb68233990" + integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.3.1" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +big-integer@^1.6.17: + version "1.6.51" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +bin-build@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" + integrity sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA== + dependencies: + decompress "^4.0.0" + download "^6.2.2" + execa "^0.7.0" + p-map-series "^1.0.0" + tempfile "^2.0.0" + +bin-check@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-4.1.0.tgz#fc495970bdc88bb1d5a35fc17e65c4a149fc4a49" + integrity sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA== + dependencies: + execa "^0.7.0" + executable "^4.1.0" + +bin-version-check@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-4.0.0.tgz#7d819c62496991f80d893e6e02a3032361608f71" + integrity sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ== + dependencies: + bin-version "^3.0.0" + semver "^5.6.0" + semver-truncate "^1.1.2" + +bin-version@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-3.1.0.tgz#5b09eb280752b1bd28f0c9db3f96f2f43b6c0839" + integrity sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ== + dependencies: + execa "^1.0.0" + find-versions "^3.0.0" + +bin-wrapper@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-4.1.0.tgz#99348f2cf85031e3ef7efce7e5300aeaae960605" + integrity sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q== + dependencies: + bin-check "^4.1.0" + bin-version-check "^4.0.0" + download "^7.1.0" + import-lazy "^3.1.0" + os-filter-obj "^2.0.0" + pify "^4.0.1" + +binary@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79" + integrity sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk= + dependencies: + buffers "~0.1.1" + chainsaw "~0.1.0" + +bl@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" + integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +bluebird@~3.4.1: + version "3.4.7" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" + integrity sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM= + +body-parser@1.19.2: + version "1.19.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.2.tgz#4714ccd9c157d44797b8b5607d72c0b89952f26e" + integrity sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.8.1" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.9.7" + raw-body "2.4.3" + type-is "~1.6.18" + +body@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/body/-/body-5.1.0.tgz#e4ba0ce410a46936323367609ecb4e6553125069" + integrity sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk= + dependencies: + continuable-cache "^0.3.1" + error "^7.0.0" + raw-body "~1.1.0" + safe-json-parse "~1.0.1" + +boolbase@^1.0.0, boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browserslist@4.14.2: + version "4.14.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.2.tgz#1b3cec458a1ba87588cc5e9be62f19b6d48813ce" + integrity sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw== + dependencies: + caniuse-lite "^1.0.30001125" + electron-to-chromium "^1.3.564" + escalade "^3.0.2" + node-releases "^1.1.61" + +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.17.5, browserslist@^4.19.1: + version "4.20.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88" + integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA== + dependencies: + caniuse-lite "^1.0.30001317" + electron-to-chromium "^1.4.84" + escalade "^3.1.1" + node-releases "^2.0.2" + picocolors "^1.0.0" + +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== + +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-indexof-polyfill@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz#d2732135c5999c64b277fcf9b1abe3498254729c" + integrity sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A== + +buffer@^5.2.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +buffers@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb" + integrity sha1-skV5w77U1tOWru5tmorn9Ugqt7s= + +bytes@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8" + integrity sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g= + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +cacheable-request@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" + integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= + dependencies: + clone-response "1.0.2" + get-stream "3.0.0" + http-cache-semantics "3.8.1" + keyv "3.0.0" + lowercase-keys "1.0.0" + normalize-url "2.0.1" + responselike "1.0.2" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + +caniuse-api@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" + integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== + dependencies: + browserslist "^4.0.0" + caniuse-lite "^1.0.0" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001317: + version "1.0.30001327" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001327.tgz#c1546d7d7bb66506f0ccdad6a7d07fc6d668c858" + integrity sha512-1/Cg4jlD9qjZzhbzkzEaAC2JHsP0WrOc8Rd/3a3LuajGzGWR/hD7TVyvq99VqmTy99eVh8Zkmdq213OgvgXx7w== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +caw@^2.0.0, caw@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" + integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== + dependencies: + get-proxy "^2.0.0" + isurl "^1.0.0-alpha5" + tunnel-agent "^0.6.0" + url-to-options "^1.0.1" + +chainsaw@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98" + integrity sha1-XqtQsor+WAdNDVgpE4iCi15fvJg= + dependencies: + traverse ">=0.3.0 <0.4" + +chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +cheerio-select@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.6.0.tgz#489f36604112c722afa147dedd0d4609c09e1696" + integrity sha512-eq0GdBvxVFbqWgmCm7M3XGs1I8oLy/nExUnh6oLqmBditPO9AqQJrkslDpMun/hZ0yyTs8L0m85OHp4ho6Qm9g== + dependencies: + css-select "^4.3.0" + css-what "^6.0.1" + domelementtype "^2.2.0" + domhandler "^4.3.1" + domutils "^2.8.0" + +cheerio@0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" + integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash.assignin "^4.0.9" + lodash.bind "^4.1.4" + lodash.defaults "^4.0.1" + lodash.filter "^4.4.0" + lodash.flatten "^4.2.0" + lodash.foreach "^4.3.0" + lodash.map "^4.4.0" + lodash.merge "^4.4.0" + lodash.pick "^4.2.1" + lodash.reduce "^4.4.0" + lodash.reject "^4.4.0" + lodash.some "^4.4.0" + +cheerio@^1.0.0-rc.3: + version "1.0.0-rc.10" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.10.tgz#2ba3dcdfcc26e7956fc1f440e61d51c643379f3e" + integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw== + dependencies: + cheerio-select "^1.5.0" + dom-serializer "^1.3.2" + domhandler "^4.2.0" + htmlparser2 "^6.1.0" + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter "^6.0.1" + tslib "^2.2.0" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +classnames@^2.2.6: + version "2.3.1" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e" + integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +clone-response@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +coa@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" + integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== + dependencies: + "@types/q" "^1.5.1" + chalk "^2.4.1" + q "^1.1.2" + +coffee-script@^1.12.4: + version "1.12.7" + resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" + integrity sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0, color-convert@^1.9.3: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^1.6.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.0.tgz#63b6ebd1bec11999d1df3a79a7569451ac2be8aa" + integrity sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" + integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA== + dependencies: + color-convert "^1.9.3" + color-string "^1.6.0" + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.19.0, commander@^2.8.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + +commander@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + +config-chain@^1.1.11: + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + +console-stream@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" + integrity sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ= + +content-disposition@0.5.4, content-disposition@^0.5.2: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +continuable-cache@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" + integrity sha1-vXJ6f67XfnH/OYWskzUakSczrQ8= + +convert-source-map@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js-compat@^3.20.2, core-js-compat@^3.21.0: + version "3.21.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.21.1.tgz#cac369f67c8d134ff8f9bd1623e3bc2c42068c82" + integrity sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g== + dependencies: + browserslist "^4.19.1" + semver "7.0.0" + +core-js@^2.6.5: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cosmiconfig@^5.0.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + +cross-spawn@7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +crowdin-cli@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/crowdin-cli/-/crowdin-cli-0.3.0.tgz#eac9989a6fe7feaaf33090397afc187c67b46191" + integrity sha1-6smYmm/n/qrzMJA5evwYfGe0YZE= + dependencies: + request "^2.53.0" + yamljs "^0.2.1" + yargs "^2.3.0" + +css-color-names@0.0.4, css-color-names@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= + +css-declaration-sorter@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" + integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== + dependencies: + postcss "^7.0.1" + timsort "^0.3.0" + +css-select-base-adapter@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" + integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== + +css-select@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" + integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== + dependencies: + boolbase "^1.0.0" + css-what "^3.2.1" + domutils "^1.7.0" + nth-check "^1.0.2" + +css-select@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" + integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== + dependencies: + boolbase "^1.0.0" + css-what "^6.0.1" + domhandler "^4.3.1" + domutils "^2.8.0" + nth-check "^2.0.1" + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-tree@1.0.0-alpha.37: + version "1.0.0-alpha.37" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" + integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== + dependencies: + mdn-data "2.0.4" + source-map "^0.6.1" + +css-tree@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" + integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== + dependencies: + mdn-data "2.0.14" + source-map "^0.6.1" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + +css-what@^3.2.1: + version "3.4.2" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" + integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== + +css-what@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +cssnano-preset-default@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz#920622b1fc1e95a34e8838203f1397a504f2d3ff" + integrity sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ== + dependencies: + css-declaration-sorter "^4.0.1" + cssnano-util-raw-cache "^4.0.1" + postcss "^7.0.0" + postcss-calc "^7.0.1" + postcss-colormin "^4.0.3" + postcss-convert-values "^4.0.1" + postcss-discard-comments "^4.0.2" + postcss-discard-duplicates "^4.0.2" + postcss-discard-empty "^4.0.1" + postcss-discard-overridden "^4.0.1" + postcss-merge-longhand "^4.0.11" + postcss-merge-rules "^4.0.3" + postcss-minify-font-values "^4.0.2" + postcss-minify-gradients "^4.0.2" + postcss-minify-params "^4.0.2" + postcss-minify-selectors "^4.0.2" + postcss-normalize-charset "^4.0.1" + postcss-normalize-display-values "^4.0.2" + postcss-normalize-positions "^4.0.2" + postcss-normalize-repeat-style "^4.0.2" + postcss-normalize-string "^4.0.2" + postcss-normalize-timing-functions "^4.0.2" + postcss-normalize-unicode "^4.0.1" + postcss-normalize-url "^4.0.1" + postcss-normalize-whitespace "^4.0.2" + postcss-ordered-values "^4.1.2" + postcss-reduce-initial "^4.0.3" + postcss-reduce-transforms "^4.0.2" + postcss-svgo "^4.0.3" + postcss-unique-selectors "^4.0.1" + +cssnano-util-get-arguments@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" + integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= + +cssnano-util-get-match@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" + integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= + +cssnano-util-raw-cache@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" + integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== + dependencies: + postcss "^7.0.0" + +cssnano-util-same-parent@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" + integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== + +cssnano@^4.1.10: + version "4.1.11" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.11.tgz#c7b5f5b81da269cb1fd982cb960c1200910c9a99" + integrity sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g== + dependencies: + cosmiconfig "^5.0.0" + cssnano-preset-default "^4.0.8" + is-resolvable "^1.0.0" + postcss "^7.0.0" + +csso@^4.0.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" + integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== + dependencies: + css-tree "^1.1.2" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +debug@^3.1.0, debug@^3.1.1: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.0, debug@^4.1.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" + integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== + dependencies: + file-type "^5.2.0" + is-stream "^1.1.0" + tar-stream "^1.5.2" + +decompress-tarbz2@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" + integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== + dependencies: + decompress-tar "^4.1.0" + file-type "^6.1.0" + is-stream "^1.1.0" + seek-bzip "^1.0.5" + unbzip2-stream "^1.0.9" + +decompress-targz@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" + integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== + dependencies: + decompress-tar "^4.1.1" + file-type "^5.2.0" + is-stream "^1.1.0" + +decompress-unzip@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" + integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= + dependencies: + file-type "^3.8.0" + get-stream "^2.2.0" + pify "^2.3.0" + yauzl "^2.4.2" + +decompress@^4.0.0, decompress@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" + integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== + dependencies: + decompress-tar "^4.0.0" + decompress-tarbz2 "^4.0.0" + decompress-targz "^4.0.0" + decompress-unzip "^4.0.1" + graceful-fs "^4.1.10" + make-dir "^1.0.0" + pify "^2.3.0" + strip-dirs "^2.0.0" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-port-alt@1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" + integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== + dependencies: + address "^1.0.1" + debug "^2.6.0" + +diacritics-map@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/diacritics-map/-/diacritics-map-0.1.0.tgz#6dfc0ff9d01000a2edf2865371cac316e94977af" + integrity sha1-bfwP+dAQAKLt8oZTccrDFulJd68= + +dir-glob@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +discontinuous-range@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" + integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= + +docusaurus@^1.12.0: + version "1.14.7" + resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.14.7.tgz#f51858ab643b29ec52264d6dd85e0d629e5b3a4a" + integrity sha512-UWqar4ZX0lEcpLc5Tg+MwZ2jhF/1n1toCQRSeoxDON/D+E9ToLr+vTRFVMP/Tk84NXSVjZFRlrjWwM2pXzvLsQ== + dependencies: + "@babel/core" "^7.12.3" + "@babel/plugin-proposal-class-properties" "^7.12.1" + "@babel/plugin-proposal-object-rest-spread" "^7.12.1" + "@babel/polyfill" "^7.12.1" + "@babel/preset-env" "^7.12.1" + "@babel/preset-react" "^7.12.5" + "@babel/register" "^7.12.1" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.6" + autoprefixer "^9.7.5" + babylon "^6.18.0" + chalk "^3.0.0" + classnames "^2.2.6" + commander "^4.0.1" + crowdin-cli "^0.3.0" + cssnano "^4.1.10" + enzyme "^3.10.0" + enzyme-adapter-react-16 "^1.15.1" + escape-string-regexp "^2.0.0" + express "^4.17.1" + feed "^4.2.1" + fs-extra "^9.0.1" + gaze "^1.1.3" + github-slugger "^1.3.0" + glob "^7.1.6" + highlight.js "^9.16.2" + imagemin "^6.0.0" + imagemin-gifsicle "^6.0.1" + imagemin-jpegtran "^6.0.0" + imagemin-optipng "^6.0.0" + imagemin-svgo "^7.0.0" + lodash "^4.17.20" + markdown-toc "^1.2.0" + mkdirp "^0.5.1" + portfinder "^1.0.28" + postcss "^7.0.23" + prismjs "^1.22.0" + react "^16.8.4" + react-dev-utils "^11.0.1" + react-dom "^16.8.4" + remarkable "^2.0.0" + request "^2.88.0" + shelljs "^0.8.4" + sitemap "^3.2.2" + tcp-port-used "^1.0.1" + tiny-lr "^1.1.1" + tree-node-cli "^1.2.5" + truncate-html "^1.0.3" + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-serializer@^1.0.1, dom-serializer@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + +dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" + integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== + dependencies: + domelementtype "^2.2.0" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1, domutils@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^2.5.2, domutils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + +dot-prop@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== + dependencies: + is-obj "^2.0.0" + +download@^6.2.2: + version "6.2.5" + resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" + integrity sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA== + dependencies: + caw "^2.0.0" + content-disposition "^0.5.2" + decompress "^4.0.0" + ext-name "^5.0.0" + file-type "5.2.0" + filenamify "^2.0.0" + get-stream "^3.0.0" + got "^7.0.0" + make-dir "^1.0.0" + p-event "^1.0.0" + pify "^3.0.0" + +download@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/download/-/download-7.1.0.tgz#9059aa9d70b503ee76a132897be6dec8e5587233" + integrity sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ== + dependencies: + archive-type "^4.0.0" + caw "^2.0.1" + content-disposition "^0.5.2" + decompress "^4.2.0" + ext-name "^5.0.0" + file-type "^8.1.0" + filenamify "^2.0.0" + get-stream "^3.0.0" + got "^8.3.1" + make-dir "^1.2.0" + p-event "^2.1.0" + pify "^3.0.0" + +duplexer2@~0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME= + dependencies: + readable-stream "^2.0.2" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +duplexer@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.564, electron-to-chromium@^1.4.84: + version "1.4.106" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.106.tgz#e7a3bfa9d745dd9b9e597616cb17283cc349781a" + integrity sha512-ZYfpVLULm67K7CaaGP7DmjyeMY4naxsbTy+syVVxT6QHI1Ww8XbJjmr9fDckrhq44WzCrcC5kH3zGpdusxwwqg== + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +enzyme-adapter-react-16@^1.15.1: + version "1.15.6" + resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz#fd677a658d62661ac5afd7f7f541f141f8085901" + integrity sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g== + dependencies: + enzyme-adapter-utils "^1.14.0" + enzyme-shallow-equal "^1.0.4" + has "^1.0.3" + object.assign "^4.1.2" + object.values "^1.1.2" + prop-types "^15.7.2" + react-is "^16.13.1" + react-test-renderer "^16.0.0-0" + semver "^5.7.0" + +enzyme-adapter-utils@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz#afbb0485e8033aa50c744efb5f5711e64fbf1ad0" + integrity sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg== + dependencies: + airbnb-prop-types "^2.16.0" + function.prototype.name "^1.1.3" + has "^1.0.3" + object.assign "^4.1.2" + object.fromentries "^2.0.3" + prop-types "^15.7.2" + semver "^5.7.1" + +enzyme-shallow-equal@^1.0.1, enzyme-shallow-equal@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz#b9256cb25a5f430f9bfe073a84808c1d74fced2e" + integrity sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q== + dependencies: + has "^1.0.3" + object-is "^1.1.2" + +enzyme@^3.10.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.11.0.tgz#71d680c580fe9349f6f5ac6c775bc3e6b7a79c28" + integrity sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw== + dependencies: + array.prototype.flat "^1.2.3" + cheerio "^1.0.0-rc.3" + enzyme-shallow-equal "^1.0.1" + function.prototype.name "^1.1.2" + has "^1.0.3" + html-element-map "^1.2.0" + is-boolean-object "^1.0.1" + is-callable "^1.1.5" + is-number-object "^1.0.4" + is-regex "^1.0.5" + is-string "^1.0.5" + is-subset "^0.1.1" + lodash.escape "^4.0.1" + lodash.isequal "^4.5.0" + object-inspect "^1.7.0" + object-is "^1.0.2" + object.assign "^4.1.0" + object.entries "^1.1.1" + object.values "^1.1.1" + raf "^3.4.1" + rst-selector-parser "^2.2.3" + string.prototype.trim "^1.2.1" + +error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +error@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" + integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== + dependencies: + string-template "~0.2.1" + +es-abstract@^1.17.2, es-abstract@^1.19.0, es-abstract@^1.19.1: + version "1.19.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.2.tgz#8f7b696d8f15b167ae3640b4060670f3d054143f" + integrity sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escalade@^3.0.2, escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +exec-buffer@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b" + integrity sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA== + dependencies: + execa "^0.7.0" + p-finally "^1.0.0" + pify "^3.0.0" + rimraf "^2.5.4" + tempfile "^2.0.0" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +executable@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" + integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== + dependencies: + pify "^2.2.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + +express@^4.17.1: + version "4.17.3" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.3.tgz#f6c7302194a4fb54271b73a1fe7a06478c8f85a1" + integrity sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.19.2" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.4.2" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.9.7" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.17.2" + serve-static "1.14.2" + setprototypeof "1.2.0" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext-list@^2.0.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" + integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== + dependencies: + mime-db "^1.28.0" + +ext-name@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" + integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== + dependencies: + ext-list "^2.0.0" + sort-keys-length "^1.0.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-folder-size@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/fast-folder-size/-/fast-folder-size-1.6.1.tgz#1dc1674842854032cf07a387ba77c66546c547eb" + integrity sha512-F3tRpfkAzb7TT2JNKaJUglyuRjRa+jelQD94s9OSqkfEeytLmupCqQiD+H2KoIXGtp4pB5m4zNmv5m2Ktcr+LA== + dependencies: + unzipper "^0.10.11" + +fast-glob@^2.0.2: + version "2.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" + integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + +fast-glob@^3.1.1: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-xml-parser@^3.19.0: + version "3.21.1" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz#152a1d51d445380f7046b304672dd55d15c9e736" + integrity sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg== + dependencies: + strnum "^1.0.4" + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +faye-websocket@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ= + dependencies: + websocket-driver ">=0.5.1" + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + +feed@^4.2.1: + version "4.2.2" + resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.2.tgz#865783ef6ed12579e2c44bbef3c9113bc4956a7e" + integrity sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ== + dependencies: + xml-js "^1.6.11" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-type@5.2.0, file-type@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" + integrity sha1-LdvqfHP/42No365J3DOMBYwritY= + +file-type@^10.4.0, file-type@^10.7.0: + version "10.11.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.11.0.tgz#2961d09e4675b9fb9a3ee6b69e9cd23f43fd1890" + integrity sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw== + +file-type@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= + +file-type@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5" + integrity sha1-G2AOX8ofvcboDApwxxyNul95BsU= + +file-type@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" + integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== + +file-type@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-8.1.0.tgz#244f3b7ef641bbe0cca196c7276e4b332399f68c" + integrity sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ== + +filename-reserved-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" + integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik= + +filenamify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" + integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== + dependencies: + filename-reserved-regex "^2.0.0" + strip-outer "^1.0.0" + trim-repeated "^1.0.0" + +filesize@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.1.0.tgz#e81bdaa780e2451d714d71c0d7a4f3238d37ad00" + integrity sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg== + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-versions@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" + integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== + dependencies: + semver-regex "^2.0.0" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +fork-ts-checker-webpack-plugin@4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz#5055c703febcf37fa06405d400c122b905167fc5" + integrity sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw== + dependencies: + "@babel/code-frame" "^7.5.5" + chalk "^2.4.1" + micromatch "^3.1.10" + minimatch "^3.0.4" + semver "^5.6.0" + tapable "^1.0.0" + worker-rpc "^0.1.0" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +from2@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-extra@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fstream@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" + integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +function.prototype.name@^1.1.2, function.prototype.name@^1.1.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functions-have-names@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.2.tgz#98d93991c39da9361f8e50b337c4f6e41f120e21" + integrity sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA== + +gaze@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" + integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== + dependencies: + globule "^1.0.0" + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-proxy@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" + integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== + dependencies: + npm-conf "^1.1.0" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= + +get-stream@3.0.0, get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +gifsicle@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-4.0.1.tgz#30e1e61e3ee4884ef702641b2e98a15c2127b2e2" + integrity sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg== + dependencies: + bin-build "^3.0.0" + bin-wrapper "^4.0.0" + execa "^1.0.0" + logalot "^2.0.0" + +github-slugger@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.4.0.tgz#206eb96cdb22ee56fdc53a28d5a302338463444e" + integrity sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ== + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + +glob@^7.0.0, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~7.1.1: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globby@11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" + integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + +globby@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" + integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== + dependencies: + array-union "^1.0.1" + dir-glob "2.0.0" + fast-glob "^2.0.2" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + +globule@^1.0.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.3.tgz#811919eeac1ab7344e905f2e3be80a13447973c2" + integrity sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg== + dependencies: + glob "~7.1.1" + lodash "~4.17.10" + minimatch "~3.0.2" + +got@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + +got@^8.3.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" + integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== + dependencies: + "@sindresorhus/is" "^0.7.0" + cacheable-request "^2.1.1" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + into-stream "^3.1.0" + is-retry-allowed "^1.1.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + mimic-response "^1.0.0" + p-cancelable "^0.4.0" + p-timeout "^2.0.1" + pify "^3.0.0" + safe-buffer "^5.1.1" + timed-out "^4.0.1" + url-parse-lax "^3.0.0" + url-to-options "^1.0.1" + +graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +gray-matter@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-2.1.1.tgz#3042d9adec2a1ded6a7707a9ed2380f8a17a430e" + integrity sha1-MELZrewqHe1qdwep7SOA+KF6Qw4= + dependencies: + ansi-red "^0.1.1" + coffee-script "^1.12.4" + extend-shallow "^2.0.1" + js-yaml "^3.8.1" + toml "^2.3.2" + +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +gzip-size@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== + dependencies: + duplexer "^0.1.1" + pify "^4.0.1" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + +has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.0, has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hex-color-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" + integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== + +highlight.js@^9.16.2: + version "9.18.5" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" + integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +hsl-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" + integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= + +hsla-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" + integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= + +html-element-map@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/html-element-map/-/html-element-map-1.3.1.tgz#44b2cbcfa7be7aa4ff59779e47e51012e1c73c08" + integrity sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg== + dependencies: + array.prototype.filter "^1.0.0" + call-bind "^1.0.2" + +htmlparser2@^3.9.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +htmlparser2@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + +http-cache-semantics@3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== + +http-errors@1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" + integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.1" + +http-parser-js@>=0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.6.tgz#2e02406ab2df8af8a7abfba62e0da01c62b95afd" + integrity sha512-vDlkRPDJn93swjcjqMSaGSPABbIarsr1TLAui/gLDXzV5VsJNdXNzMYDyNBLQkjWQCJ1uizu8T2oDMhmGt0PRA== + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^3.3.5: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + +ignore@^5.1.4: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +imagemin-gifsicle@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz#6abad4e95566d52e5a104aba1c24b4f3b48581b3" + integrity sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng== + dependencies: + exec-buffer "^3.0.0" + gifsicle "^4.0.0" + is-gif "^3.0.0" + +imagemin-jpegtran@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz#c8d3bcfb6ec9c561c20a987142854be70d90b04f" + integrity sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g== + dependencies: + exec-buffer "^3.0.0" + is-jpg "^2.0.0" + jpegtran-bin "^4.0.0" + +imagemin-optipng@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz#a6bfc7b542fc08fc687e83dfb131249179a51a68" + integrity sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A== + dependencies: + exec-buffer "^3.0.0" + is-png "^1.0.0" + optipng-bin "^5.0.0" + +imagemin-svgo@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz#528a42fd3d55eff5d4af8fd1113f25fb61ad6d9a" + integrity sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg== + dependencies: + is-svg "^4.2.1" + svgo "^1.3.2" + +imagemin@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-6.1.0.tgz#62508b465728fea36c03cdc07d915fe2d8cf9e13" + integrity sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A== + dependencies: + file-type "^10.7.0" + globby "^8.0.1" + make-dir "^1.0.0" + p-pipe "^1.1.0" + pify "^4.0.1" + replace-ext "^1.0.0" + +immer@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" + integrity sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-lazy@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-3.1.0.tgz#891279202c8a2280fdbd6674dbd8da1a1dfc67cc" + integrity sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ== + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= + dependencies: + repeating "^2.0.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.3.4, ini@^1.3.5: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +into-stream@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" + integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= + dependencies: + from2 "^2.1.1" + p-is-promise "^1.1.0" + +ip-regex@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" + integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.0.1, is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-color-stop@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" + integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= + dependencies: + css-color-names "^0.0.4" + hex-color-regex "^1.1.0" + hsl-regex "^1.0.0" + hsla-regex "^1.0.0" + rgb-regex "^1.0.1" + rgba-regex "^1.0.0" + +is-core-module@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + +is-gif@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-3.0.0.tgz#c4be60b26a301d695bb833b20d9b5d66c6cf83b1" + integrity sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw== + dependencies: + file-type "^10.4.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-jpg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-2.0.0.tgz#2e1997fa6e9166eaac0242daae443403e4ef1d97" + integrity sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc= + +is-natural-number@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" + integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= + +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== + +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + +is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-png@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce" + integrity sha1-1XSxK/J1wDUEVVcLDltXqwYgd84= + +is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== + +is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-root@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" + integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== + +is-shared-array-buffer@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-stream@^1.0.0, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + integrity sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= + +is-svg@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.3.2.tgz#a119e9932e1af53f6be1969d1790d6cc5fd947d3" + integrity sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw== + dependencies: + fast-xml-parser "^3.19.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-url@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +is2@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.7.tgz#d084e10cab3bd45d6c9dfde7a48599fcbb93fcac" + integrity sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA== + dependencies: + deep-is "^0.1.3" + ip-regex "^4.1.0" + is-url "^1.2.4" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + +jpegtran-bin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz#d00aed809fba7aa6f30817e59eee4ddf198f8f10" + integrity sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ== + dependencies: + bin-build "^3.0.0" + bin-wrapper "^4.0.0" + logalot "^2.0.0" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1, js-yaml@^3.8.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^2.1.2, json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsprim@^1.2.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + +keyv@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" + integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== + dependencies: + json-buffer "3.0.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +lazy-cache@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + integrity sha1-uRkKT5EzVGlIQIWfio9whNiCImQ= + dependencies: + set-getter "^0.1.0" + +list-item@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/list-item/-/list-item-1.1.1.tgz#0c65d00e287cb663ccb3cb3849a77e89ec268a56" + integrity sha1-DGXQDih8tmPMs8s4Sad+iewmilY= + dependencies: + expand-range "^1.8.1" + extend-shallow "^2.0.1" + is-number "^2.1.0" + repeat-string "^1.5.2" + +listenercount@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" + integrity sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc= + +livereload-js@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" + integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +loader-utils@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" + integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + +lodash.assignin@^4.0.9: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= + +lodash.bind@^4.1.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" + integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= + +lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + integrity sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw= + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= + +lodash.defaults@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= + +lodash.escape@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" + integrity sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg= + +lodash.filter@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" + integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= + +lodash.flatten@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + +lodash.flattendeep@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= + +lodash.foreach@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + +lodash.map@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" + integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + +lodash.merge@^4.4.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.padstart@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" + integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= + +lodash.reduce@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" + integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= + +lodash.reject@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" + integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= + +lodash.some@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + +lodash@^4.17.14, lodash@^4.17.20, lodash@~4.17.10: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +logalot@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" + integrity sha1-X46MkNME7fElMJUaVVSruMXj9VI= + dependencies: + figures "^1.3.5" + squeak "^1.0.0" + +longest@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= + +loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lowercase-keys@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" + integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= + +lowercase-keys@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lpad-align@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e" + integrity sha1-IfYArBwwlcPG5JfuZyce4ISB/p4= + dependencies: + get-stdin "^4.0.1" + indent-string "^2.1.0" + longest "^1.0.0" + meow "^3.3.0" + +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +make-dir@^1.0.0, make-dir@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +markdown-link@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/markdown-link/-/markdown-link-0.1.1.tgz#32c5c65199a6457316322d1e4229d13407c8c7cf" + integrity sha1-MsXGUZmmRXMWMi0eQinRNAfIx88= + +markdown-toc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/markdown-toc/-/markdown-toc-1.2.0.tgz#44a15606844490314afc0444483f9e7b1122c339" + integrity sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg== + dependencies: + concat-stream "^1.5.2" + diacritics-map "^0.1.0" + gray-matter "^2.1.0" + lazy-cache "^2.0.2" + list-item "^1.1.1" + markdown-link "^0.1.1" + minimist "^1.2.0" + mixin-deep "^1.1.3" + object.pick "^1.2.0" + remarkable "^1.7.1" + repeat-string "^1.6.1" + strip-color "^0.1.0" + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + +mdn-data@2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" + integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== + +mdn-data@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" + integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +meow@^3.3.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +microevent.ts@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" + integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== + +micromatch@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0, mime-db@^1.28.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-response@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +minimatch@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@~3.0.2: + version "3.0.8" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" + integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +mixin-deep@^1.1.3, mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +moo@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4" + integrity sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +nearley@^2.7.10: + version "2.20.1" + resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.20.1.tgz#246cd33eff0d012faf197ff6774d7ac78acdd474" + integrity sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ== + dependencies: + commander "^2.19.0" + moo "^0.5.0" + railroad-diagrams "^1.0.0" + randexp "0.4.6" + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-releases@^1.1.61: + version "1.1.77" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" + integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== + +node-releases@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" + integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= + +normalize-url@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" + integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== + dependencies: + prepend-http "^2.0.0" + query-string "^5.0.1" + sort-keys "^2.0.0" + +normalize-url@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== + +npm-conf@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" + integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== + dependencies: + config-chain "^1.1.11" + pify "^3.0.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +nth-check@^1.0.2, nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +nth-check@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" + integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== + dependencies: + boolbase "^1.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.12.0, object-inspect@^1.7.0, object-inspect@^1.9.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" + integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== + +object-is@^1.0.2, object-is@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0, object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.entries@^1.1.1, object.entries@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" + integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.fromentries@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" + integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.getownpropertydescriptors@^2.1.0: + version "2.1.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz#b223cf38e17fefb97a63c10c91df72ccb386df9e" + integrity sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.pick@^1.2.0, object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +object.values@^1.1.0, object.values@^1.1.1, object.values@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +open@^7.0.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + +optipng-bin@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-5.1.0.tgz#a7c7ab600a3ab5a177dae2f94c2d800aa386b5a9" + integrity sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA== + dependencies: + bin-build "^3.0.0" + bin-wrapper "^4.0.0" + logalot "^2.0.0" + +os-filter-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-2.0.0.tgz#1c0b62d5f3a2442749a2d139e6dddee6e81d8d16" + integrity sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg== + dependencies: + arch "^2.1.0" + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + +p-cancelable@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" + integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== + +p-event@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-1.3.0.tgz#8e6b4f4f65c72bc5b6fe28b75eda874f96a4a085" + integrity sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU= + dependencies: + p-timeout "^1.1.1" + +p-event@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-2.3.1.tgz#596279ef169ab2c3e0cae88c1cfbb08079993ef6" + integrity sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA== + dependencies: + p-timeout "^2.0.1" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" + integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-map-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" + integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= + dependencies: + p-reduce "^1.0.0" + +p-pipe@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" + integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= + +p-reduce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= + +p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + +p-timeout@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" + integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== + dependencies: + p-finally "^1.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse5-htmlparser2-tree-adapter@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picocolors@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" + integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pirates@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-up@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== + dependencies: + find-up "^3.0.0" + +portfinder@^1.0.28: + version "1.0.28" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" + integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== + dependencies: + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.5" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss-calc@^7.0.1: + version "7.0.5" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" + integrity sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== + dependencies: + postcss "^7.0.27" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.0.2" + +postcss-colormin@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" + integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== + dependencies: + browserslist "^4.0.0" + color "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-convert-values@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" + integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-discard-comments@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" + integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== + dependencies: + postcss "^7.0.0" + +postcss-discard-duplicates@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" + integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== + dependencies: + postcss "^7.0.0" + +postcss-discard-empty@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" + integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== + dependencies: + postcss "^7.0.0" + +postcss-discard-overridden@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" + integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== + dependencies: + postcss "^7.0.0" + +postcss-merge-longhand@^4.0.11: + version "4.0.11" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" + integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== + dependencies: + css-color-names "0.0.4" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + stylehacks "^4.0.0" + +postcss-merge-rules@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" + integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + cssnano-util-same-parent "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + vendors "^1.0.0" + +postcss-minify-font-values@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" + integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-gradients@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" + integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== + dependencies: + cssnano-util-get-arguments "^4.0.0" + is-color-stop "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-params@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" + integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== + dependencies: + alphanum-sort "^1.0.0" + browserslist "^4.0.0" + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + uniqs "^2.0.0" + +postcss-minify-selectors@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" + integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== + dependencies: + alphanum-sort "^1.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + +postcss-normalize-charset@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" + integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== + dependencies: + postcss "^7.0.0" + +postcss-normalize-display-values@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" + integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-positions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" + integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== + dependencies: + cssnano-util-get-arguments "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-repeat-style@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" + integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== + dependencies: + cssnano-util-get-arguments "^4.0.0" + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-string@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" + integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== + dependencies: + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-timing-functions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" + integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-unicode@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" + integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-url@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" + integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^3.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-whitespace@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" + integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-ordered-values@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" + integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== + dependencies: + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-reduce-initial@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" + integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + +postcss-reduce-transforms@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" + integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== + dependencies: + cssnano-util-get-match "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-selector-parser@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" + integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== + dependencies: + dot-prop "^5.2.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-selector-parser@^6.0.2: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-svgo@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e" + integrity sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw== + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + svgo "^1.0.0" + +postcss-unique-selectors@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" + integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== + dependencies: + alphanum-sort "^1.0.0" + postcss "^7.0.0" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + +postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== + +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.23, postcss@^7.0.27, postcss@^7.0.32: + version "7.0.39" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" + integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== + dependencies: + picocolors "^0.2.1" + source-map "^0.6.1" + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +pretty-bytes@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" + integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== + +prismjs@^1.22.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" + integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +prompts@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7" + integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +prop-types-exact@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/prop-types-exact/-/prop-types-exact-1.2.0.tgz#825d6be46094663848237e3925a98c6e944e9869" + integrity sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA== + dependencies: + has "^1.0.3" + object.assign "^4.1.0" + reflect.ownkeys "^0.2.0" + +prop-types@^15.6.2, prop-types@^15.7.2: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +q@^1.1.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= + +qs@6.9.7: + version "6.9.7" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" + integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== + +qs@^6.4.0: + version "6.10.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" + +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +raf@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" + integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== + dependencies: + performance-now "^2.1.0" + +railroad-diagrams@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" + integrity sha1-635iZ1SN3t+4mcG5Dlc3RVnN234= + +randexp@0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" + integrity sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ== + dependencies: + discontinuous-range "1.0.0" + ret "~0.1.10" + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.3.tgz#8f80305d11c2a0a545c2d9d89d7a0286fcead43c" + integrity sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g== + dependencies: + bytes "3.1.2" + http-errors "1.8.1" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-body@~1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-1.1.7.tgz#1d027c2bfa116acc6623bca8f00016572a87d425" + integrity sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU= + dependencies: + bytes "1" + string_decoder "0.10" + +react-dev-utils@^11.0.1: + version "11.0.4" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-11.0.4.tgz#a7ccb60257a1ca2e0efe7a83e38e6700d17aa37a" + integrity sha512-dx0LvIGHcOPtKbeiSUM4jqpBl3TcY7CDjZdfOIcKeznE7BWr9dg0iPG90G5yfVQ+p/rGNMXdbfStvzQZEVEi4A== + dependencies: + "@babel/code-frame" "7.10.4" + address "1.1.2" + browserslist "4.14.2" + chalk "2.4.2" + cross-spawn "7.0.3" + detect-port-alt "1.1.6" + escape-string-regexp "2.0.0" + filesize "6.1.0" + find-up "4.1.0" + fork-ts-checker-webpack-plugin "4.1.6" + global-modules "2.0.0" + globby "11.0.1" + gzip-size "5.1.1" + immer "8.0.1" + is-root "2.1.0" + loader-utils "2.0.0" + open "^7.0.2" + pkg-up "3.1.0" + prompts "2.4.0" + react-error-overlay "^6.0.9" + recursive-readdir "2.2.2" + shell-quote "1.7.2" + strip-ansi "6.0.0" + text-table "0.2.0" + +react-dom@^16.8.4: + version "16.14.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89" + integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.19.1" + +react-error-overlay@^6.0.9: + version "6.0.10" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6" + integrity sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA== + +react-is@^16.13.1, react-is@^16.8.6: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-sidecar@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/react-sidecar/-/react-sidecar-0.1.1.tgz#e4970bc95e495f1688d2727f948efc257555884e" + integrity sha1-5JcLyV5JXxaI0nJ/lI78JXVViE4= + +react-test-renderer@^16.0.0-0: + version "16.14.0" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.14.0.tgz#e98360087348e260c56d4fe2315e970480c228ae" + integrity sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg== + dependencies: + object-assign "^4.1.1" + prop-types "^15.6.2" + react-is "^16.8.6" + scheduler "^0.19.1" + +react@^16.8.4: + version "16.14.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" + integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.1.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + +recursive-readdir@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== + dependencies: + minimatch "3.0.4" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +reflect.ownkeys@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" + integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA= + +regenerate-unicode-properties@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56" + integrity sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw== + dependencies: + regenerate "^1.4.2" + +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== + +regenerator-transform@^0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.0.tgz#cbd9ead5d77fae1a48d957cf889ad0586adb6537" + integrity sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg== + dependencies: + "@babel/runtime" "^7.8.4" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.0.1.tgz#c531122a7840de743dcf9c83e923b5560323ced3" + integrity sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw== + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^10.0.1" + regjsgen "^0.6.0" + regjsparser "^0.8.2" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + +regjsgen@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.6.0.tgz#83414c5354afd7d6627b16af5f10f41c4e71808d" + integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA== + +regjsparser@^0.8.2: + version "0.8.4" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.8.4.tgz#8a14285ffcc5de78c5b95d62bbf413b6bc132d5f" + integrity sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA== + dependencies: + jsesc "~0.5.0" + +remarkable@^1.7.1: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + +remarkable@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-2.0.1.tgz#280ae6627384dfb13d98ee3995627ca550a12f31" + integrity sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA== + dependencies: + argparse "^1.0.10" + autolinker "^3.11.0" + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +replace-ext@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" + integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== + +request@^2.53.0, request@^2.88.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +responselike@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rgb-regex@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" + integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= + +rgba-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" + integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= + +rimraf@2, rimraf@^2.5.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rst-selector-parser@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" + integrity sha1-gbIw6i/MYGbInjRy3nlChdmwPZE= + dependencies: + lodash.flattendeep "^4.4.0" + nearley "^2.7.10" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-json-parse@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" + integrity sha1-PnZyPjjf3aE8mx0poeB//uSzC1c= + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4, sax@~1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +scheduler@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" + integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +seek-bzip@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" + integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== + dependencies: + commander "^2.8.1" + +semver-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" + integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== + +semver-truncate@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" + integrity sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g= + dependencies: + semver "^5.3.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + +semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +send@0.17.2: + version "0.17.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" + integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "1.8.1" + mime "1.6.0" + ms "2.1.3" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-static@1.14.2: + version "1.14.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.2.tgz#722d6294b1d62626d41b43a013ece4598d292bfa" + integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.2" + +set-getter@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.1.tgz#a3110e1b461d31a9cfc8c5c9ee2e9737ad447102" + integrity sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw== + dependencies: + to-object-path "^0.3.0" + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@~1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shell-quote@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== + +shelljs@^0.8.4: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +sitemap@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.2.2.tgz#3f77c358fa97b555c879e457098e39910095c62b" + integrity sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg== + dependencies: + lodash.chunk "^4.2.0" + lodash.padstart "^4.6.1" + whatwg-url "^7.0.0" + xmlbuilder "^13.0.0" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +sort-keys-length@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" + integrity sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg= + dependencies: + sort-keys "^1.0.0" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0= + dependencies: + is-plain-obj "^1.0.0" + +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= + dependencies: + is-plain-obj "^1.0.0" + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.16: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.11" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" + integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +squeak@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3" + integrity sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM= + dependencies: + chalk "^1.0.0" + console-stream "^0.1.1" + lpad-align "^1.0.1" + +sshpk@^1.7.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +stable@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +string-template@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" + integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= + +string.prototype.trim@^1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz#a587bcc8bfad8cb9829a577f5de30dd170c1682c" + integrity sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string_decoder@0.10: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-color@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/strip-color/-/strip-color-0.1.0.tgz#106f65d3d3e6a2d9401cac0eb0ce8b8a702b4f7b" + integrity sha1-EG9l09PmotlAHKwOsM6LinArT3s= + +strip-dirs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" + integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== + dependencies: + is-natural-number "^4.0.1" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= + dependencies: + get-stdin "^4.0.1" + +strip-outer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" + integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== + dependencies: + escape-string-regexp "^1.0.2" + +strnum@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" + integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== + +stylehacks@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" + integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +svgo@^1.0.0, svgo@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" + integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== + dependencies: + chalk "^2.4.1" + coa "^2.0.2" + css-select "^2.0.0" + css-select-base-adapter "^0.1.1" + css-tree "1.0.0-alpha.37" + csso "^4.0.2" + js-yaml "^3.13.1" + mkdirp "~0.5.1" + object.values "^1.1.0" + sax "~1.2.4" + stable "^0.1.8" + unquote "~1.1.1" + util.promisify "~1.0.0" + +tapable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + +tar-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" + integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== + dependencies: + bl "^1.0.0" + buffer-alloc "^1.2.0" + end-of-stream "^1.0.0" + fs-constants "^1.0.0" + readable-stream "^2.3.0" + to-buffer "^1.1.1" + xtend "^4.0.0" + +tcp-port-used@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.2.tgz#9652b7436eb1f4cfae111c79b558a25769f6faea" + integrity sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA== + dependencies: + debug "4.3.1" + is2 "^2.0.6" + +temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= + +tempfile@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265" + integrity sha1-awRGhWqbERTRhW/8vlCczLCXcmU= + dependencies: + temp-dir "^1.0.0" + uuid "^3.0.1" + +text-table@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +timsort@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + +tiny-lr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-1.1.1.tgz#9fa547412f238fedb068ee295af8b682c98b2aab" + integrity sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA== + dependencies: + body "^5.1.0" + debug "^3.1.0" + faye-websocket "~0.10.0" + livereload-js "^2.3.0" + object-assign "^4.1.0" + qs "^6.4.0" + +to-buffer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +toml@^2.3.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.6.tgz#25b0866483a9722474895559088b436fd11f861b" + integrity sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ== + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + +"traverse@>=0.3.0 <0.4": + version "0.3.9" + resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" + integrity sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk= + +tree-node-cli@^1.2.5: + version "1.5.2" + resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.5.2.tgz#c684fb9e7c2b9b29aa023eebaa9a095b6f93bf93" + integrity sha512-lBUNLk3NpRDkdsneWxa6mj5zfV/RZ5TWUniGuGprgmhijatHPcSMxyCs7bKpAqCLfPLZq7moQYLIiuVaWG/FOQ== + dependencies: + commander "^5.0.0" + fast-folder-size "^1.6.1" + pretty-bytes "^5.6.0" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= + +trim-repeated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" + integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE= + dependencies: + escape-string-regexp "^1.0.2" + +truncate-html@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.4.tgz#268de7ba2650d697d748f1692a78197a88886e9d" + integrity sha512-FpDAlPzpJ3jlZiNEahRs584FS3jOSQafgj4cC9DmAYPct6uMZDLY625+eErRd43G35vGDrNq3i7b4aYUQ/Bxqw== + dependencies: + "@types/cheerio" "^0.22.8" + cheerio "0.22.0" + +tslib@^2.2.0, tslib@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +unbzip2-stream@^1.0.9: + version "1.4.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== + +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + +unicode-match-property-value-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== + +unicode-property-aliases-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" + integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unquote@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +unzipper@^0.10.11: + version "0.10.11" + resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.11.tgz#0b4991446472cbdb92ee7403909f26c2419c782e" + integrity sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw== + dependencies: + big-integer "^1.6.17" + binary "~0.3.0" + bluebird "~3.4.1" + buffer-indexof-polyfill "~1.0.0" + duplexer2 "~0.1.4" + fstream "^1.0.12" + graceful-fs "^4.2.2" + listenercount "~1.0.1" + readable-stream "~2.3.6" + setimmediate "~1.0.4" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" + integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.2" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.0" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.0.1, uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +vendors@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" + integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +websocket-driver@>=0.5.1: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= + +worker-rpc@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5" + integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg== + dependencies: + microevent.ts "~0.1.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xml-js@^1.6.11: + version "1.6.11" + resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" + integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g== + dependencies: + sax "^1.2.4" + +xmlbuilder@^13.0.0: + version "13.0.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" + integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yamljs@^0.2.1: + version "0.2.10" + resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.2.10.tgz#481cc7c25ca73af59f591f0c96e3ce56c757a40f" + integrity sha1-SBzHwlynOvWfWR8MluPOVsdXpA8= + dependencies: + argparse "^1.0.7" + glob "^7.0.5" + +yargs@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-2.3.0.tgz#e900c87250ec5cd080db6009fe3dd63156f1d7fb" + integrity sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s= + dependencies: + wordwrap "0.0.2" + +yauzl@^2.4.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" From eb794f1ff251400f8c765e86205e3ecad6f50cd2 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 9 Apr 2022 15:09:03 +0200 Subject: [PATCH 407/673] Update sbt to 1.6.2 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index bb3a9b7dc..c8fcab543 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.6 +sbt.version=1.6.2 From e80f591cb6718f5565944e5719170dbae49b8f72 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 9 Apr 2022 15:12:25 +0200 Subject: [PATCH 408/673] Fix formatting --- build.sbt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index bd25d8ce5..041ea187f 100644 --- a/build.sbt +++ b/build.sbt @@ -145,11 +145,13 @@ lazy val jdbc = project "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) - .settings(Seq( - Compile / doc / scalacOptions ++= Seq( - "-no-link-warnings" // Suppresses problems with Scaladoc links + .settings( + Seq( + Compile / doc / scalacOptions ++= Seq( + "-no-link-warnings" // Suppresses problems with Scaladoc links + ) ) - )) + ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) .dependsOn(core.jvm) From 0e4c00d01df35375896c3374f2262394b4c322d8 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 13 Apr 2022 18:59:06 +0200 Subject: [PATCH 409/673] Update database-commons, jdbc, mssqlserver, ... to 1.17.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 041ea187f..7e40ec85e 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC5" val zioSchemaVersion = "0.1.9" -val testcontainersVersion = "1.16.3" +val testcontainersVersion = "1.17.1" val testcontainersScalaVersion = "0.40.5" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 91e06d2309f11e1066207172844aca8a5a21da51 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 14 Apr 2022 03:08:03 +0200 Subject: [PATCH 410/673] Update sbt-tpolecat to 0.2.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 001c841d0..2eead5101 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.2.2") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.2.3") From 737c20a476c50d6e7b4e67a318e2f056866119a3 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 14 Apr 2022 12:09:56 +0200 Subject: [PATCH 411/673] added comma syntax select(name, age, dob).from(customer) --- core/jvm/src/main/scala/zio/sql/Sql.scala | 15 +- .../src/main/scala/zio/sql/selectutils.scala | 428 ++++++++++++++++++ .../test/scala/zio/sql/ProductSchema.scala | 2 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 8 +- examples/src/main/scala/Example1.scala | 13 +- .../src/main/scala/zio/sql/Examples.scala | 18 +- .../main/scala/zio/sql/GroupByExamples.scala | 4 +- .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 8 +- .../zio/sql/postgresql/PostgresModule.scala | 24 + .../scala/zio/sql/postgresql/DbSchema.scala | 2 +- .../zio/sql/postgresql/FunctionDefSpec.scala | 10 +- .../sql/postgresql/PostgresModuleSpec.scala | 38 +- .../scala/zio/sql/sqlserver/DbSchema.scala | 2 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 24 +- 14 files changed, 519 insertions(+), 77 deletions(-) create mode 100644 core/jvm/src/main/scala/zio/sql/selectutils.scala diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 4cc4dd01f..11b34ec89 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -11,6 +11,7 @@ trait Sql with TableModule with InsertModule with UtilsModule + with SelectUtilsModule with InsertUtilsModule { self => @@ -26,11 +27,10 @@ trait Sql * * SELECT ARBITRARY(age), COUNT(*) FROM person GROUP BY age */ - def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit - i: Features.IsPartiallyAggregated[F] - ): Selector[F, A, B, i.Unaggregated] = - Selector[F, A, B, i.Unaggregated](selection) + val select: SelectByCommaBuilder = SelectByCommaBuilder() + + // TODO comma syntax for subselect def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] def subselectFrom[ParentTable, F, Source, B <: SelectionSet[Source]]( @@ -46,12 +46,9 @@ trait Sql def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) - def insertInto[F, Source, AllColumnIdentities, B <: SelectionSet[Source]]( + def insertInto[Source, AllColumnIdentities]( table: Table.Source.Aux_[Source, AllColumnIdentities] - )( - sources: Selection[F, Source, B] - ) = - InsertBuilder[F, Source, AllColumnIdentities, B, sources.ColsRepr](table, sources) + ): InsertIntoBuilder[Source, AllColumnIdentities] = InsertIntoBuilder(table) def renderDelete(delete: self.Delete[_]): String diff --git a/core/jvm/src/main/scala/zio/sql/selectutils.scala b/core/jvm/src/main/scala/zio/sql/selectutils.scala new file mode 100644 index 000000000..2e8d9df7f --- /dev/null +++ b/core/jvm/src/main/scala/zio/sql/selectutils.scala @@ -0,0 +1,428 @@ +package zio.sql + +/** + * Generated with https://github.com/kitlangton/boilerplate + * + val insertInto = + bp""" + def apply[${bp"F${num(1)}".rep(", ")}, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")}) = { + val selection = ${bp"expr${num(1)}".rep(" ++ ")} + + type B = ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"} + + InsertBuilder[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + """ + + val selectSyntax = + bp""" + def apply[${bp"F${num(1)}".rep(", ")}, Source, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")})(implicit + i: Features.IsPartiallyAggregated[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}]] + ): Selector[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, i.Unaggregated] = { + val selection = ${bp"expr${num(1)}".rep(" ++ ")} + Selector[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}, Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, i.Unaggregated](selection) + }""" + */ +trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule with SelectModule => + + // format: off + sealed case class InsertIntoBuilder[Source, AllColumnIdentities]( + table: Table.Source.Aux_[Source, AllColumnIdentities] + ) { + def apply[F1, B1](expr1: Expr[F1, Source, B1]) = { + type B = SelectionSet.Cons[Source, B1, SelectionSet.Empty] + + val selection: Selection[F1, Source, B] = expr1 + + InsertBuilder[F1, Source, AllColumnIdentities, B, selection.ColsRepr](table, selection) + } + + def apply[F1, F2, B1, B2](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2]) = { + val selection = expr1 ++ expr2 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]] + + InsertBuilder[Features.Union[F1, F2], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, B1, B2, B3](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3]) = { + val selection = expr1 ++ expr2 ++ expr3 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Empty]]] + + InsertBuilder[Features.Union[Features.Union[F1, F2], F3], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, B1, B2, B3, B4](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Empty]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, B1, B2, B3, B4, B5](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Empty]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, B1, B2, B3, B4, B5, B6](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Empty]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, B1, B2, B3, B4, B5, B6, B7](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Empty]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, B1, B2, B3, B4, B5, B6, B7, B8](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Empty]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, B1, B2, B3, B4, B5, B6, B7, B8, B9](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Empty]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Empty]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Empty]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Empty]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Empty]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Empty]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Empty]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Empty]]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Empty]]]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Empty]]]]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21], expr22: Expr[F22, Source, B22]) = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22 + + type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]] + + InsertBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, AllColumnIdentities, B, selection.ColsRepr]( + table, + selection + ) + } + } + + sealed case class SelectByCommaBuilder() { + def apply[F1, Source, B1](expr1: Expr[F1, Source, B1])(implicit i: Features.IsPartiallyAggregated[F1]) = { + Selector[F1, Source, SelectionSet.Cons[Source, B1, SelectionSet.Empty], i.Unaggregated](expr1) + } + + def apply[F1, F2, Source, B1, B2](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2])(implicit + i: Features.IsPartiallyAggregated[Features.Union[F1, F2]] + ): Selector[Features.Union[F1, F2], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]], i.Unaggregated] = { + val selection = expr1 ++ expr2 + Selector[Features.Union[F1, F2], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, Source, B1, B2, B3](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[F1, F2], F3]] + ): Selector[Features.Union[Features.Union[F1, F2], F3], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Empty]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 + Selector[Features.Union[Features.Union[F1, F2], F3], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Empty]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, Source, B1, B2, B3, B4](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4]] + ): Selector[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Empty]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 + Selector[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Empty]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, Source, B1, B2, B3, B4, B5](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Empty]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Empty]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, Source, B1, B2, B3, B4, B5, B6](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Empty]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Empty]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, Source, B1, B2, B3, B4, B5, B6, B7](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Empty]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Empty]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, Source, B1, B2, B3, B4, B5, B6, B7, B8](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Empty]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Empty]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Empty]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Empty]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Empty]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Empty]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Empty]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Empty]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Empty]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Empty]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Empty]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Empty]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Empty]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Empty]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Empty]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Empty]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Empty]]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Empty]]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Empty]]]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Empty]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Empty]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Empty]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21], expr22: Expr[F22, Source, B22])(implicit + i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22]] + ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22 + Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + } + // format: on + } +} \ No newline at end of file diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 0058e8410..8e9cad428 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -24,5 +24,5 @@ object ProductSchema { val (id, lastUpdated, name, baseAmount, finalAmount, deleted) = productTable.columns - val selectAll = select(id ++ lastUpdated ++ baseAmount ++ deleted) from productTable + val selectAll = select(id, lastUpdated, baseAmount, deleted) from productTable } diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 4031c56bf..117d72062 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -20,12 +20,12 @@ object TestBasicSelect { val (userId, dob, fName, lName) = userTable.columns // todo this should compile using column names defined in the table - val basicSelect = select(fName ++ lName) from userTable + val basicSelect = select(fName, lName) from userTable // fName and lName already have column names, shouldn't have to do this - val basicSelectWithAliases = (select { - (fName as "first_name") ++ (lName as "last_name") - } from userTable) + val basicSelectWithAliases = (select( + (fName as "first_name"), (lName as "last_name") + ) from userTable) } } diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 2cc4fadc7..3ca70d4b6 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -26,7 +26,7 @@ object Example1 extends Sql { import AggregationDef._ val queried = - select(((age + 2) as "age") ++ (name as "name") ++ (Abs(3.0) as "dummy")) + select(((age + 2) as "age"), (name as "name"), (Abs(3.0) as "dummy")) .from(table) .limit(200) .offset(1000) @@ -35,11 +35,11 @@ object Example1 extends Sql { val tt = ((age + 2) as "age") val joined = - select((age as "age") ++ (age2 as "age2")) + select((age as "age"), (age2 as "age2")) .from(table.join(table2).on(name === name2)) val aggregated = - select((age as "age") ++ (Count(1) as "count")) + select((age as "age"), (Count(1) as "count")) .from(table) .groupBy(age) @@ -54,11 +54,4 @@ object Example1 extends Sql { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") val (orderId, fkCustomerId, orderDate) = orders.columns - - val query = select(fkCustomerId ++ Count(orderId)) - .from(orders) - .groupBy(fkCustomerId, orderDate) - - val e = select(Count(orderId) ++ Count(orderId)) - .from(orders) } diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 23b28ceca..6eacc7a7c 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -11,17 +11,17 @@ object Examples extends App with ShopSchema with SqlServerModule { // select first_name, last_name from users val basicSelect = - select(fName ++ lName).from(users) + select(fName, lName).from(users) println(renderRead(basicSelect)) // select first_name as first, last_name as last from users val basicSelectWithAliases = - select((fName as "first") ++ (lName as "last")).from(users) + select((fName as "first"), (lName as "last")).from(users) println(renderRead(basicSelectWithAliases)) // select top 2 first_name, last_name from users order by last_name, first_name desc val selectWithRefinements = - select(fName ++ lName) + select(fName, lName) .from(users) .orderBy(lName, fName.desc) .limit(2) @@ -44,7 +44,7 @@ object Examples extends App with ShopSchema with SqlServerModule { // select first_name, last_name, order_date from users left join orders on users.usr_id = orders.usr_id val basicJoin = - select(fName ++ lName ++ orderDate).from(users.leftOuter(orders).on(fkUserId === userId)) + select(fName, lName, orderDate).from(users.leftOuter(orders).on(fkUserId === userId)) println(renderRead(basicJoin)) /* select users.usr_id, first_name, last_name, sum(quantity * unit_price) as "total_spend" @@ -55,10 +55,10 @@ object Examples extends App with ShopSchema with SqlServerModule { val orderValues = select( - userId ++ - fName ++ - lName ++ - (Sum(quantity * unitPrice) as "total_spend") ++ + userId, + fName, + lName, + (Sum(quantity * unitPrice) as "total_spend"), Sum(Abs(quantity)) ) .from( @@ -76,6 +76,6 @@ object Examples extends App with ShopSchema with SqlServerModule { /* * select users.first_name, users.last_name from users where true and users.first_name is not null */ - val withPropertyOp = select(fName ++ lName).from(users).where(fName isNotNull) + val withPropertyOp = select(fName, lName).from(users).where(fName isNotNull) println(renderRead(withPropertyOp)) } diff --git a/examples/src/main/scala/zio/sql/GroupByExamples.scala b/examples/src/main/scala/zio/sql/GroupByExamples.scala index 2f9c92037..18496a80b 100644 --- a/examples/src/main/scala/zio/sql/GroupByExamples.scala +++ b/examples/src/main/scala/zio/sql/GroupByExamples.scala @@ -25,7 +25,7 @@ object GroupByExamples extends App with ShopSchema with SqlServerModule { def test2[F, A, B](value: Expr[F, A, B])(implicit i: Features.IsPartiallyAggregated[F]): i.Unaggregated = ??? - val orderValue = select(name ++ Sum(price)) + val orderValue = select(name, Sum(price)) .from(productTable) .groupBy(name, price) .having(Sum(price) > 10) @@ -35,7 +35,7 @@ object GroupByExamples extends App with ShopSchema with SqlServerModule { .groupBy(name) .having(Sum(price) > 10) - select(name ++ amount ++ price) + select(name, amount, price) .from(productTable) .groupBy(name, amount, price) .having(Sum(price) > 10) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index 13c406735..a8b609c11 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -17,7 +17,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { test("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob) from customers + val query = select(customerId, fName, lName, dob) from customers println(renderRead(query)) @@ -68,7 +68,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { test("Can select with property operator") { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ verified ++ dob) from customers where (verified isNotTrue) + val query = select(customerId, fName, lName, verified, dob) from customers where (verified isNotTrue) println(renderRead(query)) @@ -96,7 +96,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = (select(customerId ++ fName ++ lName ++ dob) from customers).limit(1).offset(1).orderBy(fName) + val query = (select(customerId, fName, lName, dob) from customers).limit(1).offset(1).orderBy(fName) println(renderRead(query)) @@ -136,7 +136,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { // } yield assert(r.head)(equalTo(expected)) // }, test("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate) from (customers join orders).on( + val query = select(fName, lName, orderDate) from (customers join orders).on( fkCustomerId === customerId ) where (verified isNotTrue) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 5b90b15df..dbc8d7727 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -28,6 +28,30 @@ import zio.schema.StandardType.FloatType trait PostgresModule extends Jdbc { self => import TypeTag._ + object Example { + + import ColumnSet._ + //import AggregationDef._ + + val personTable = (string("name") ++ int("age")).table("person") + + val (name, age) = personTable.columns + + + val insertQuery = insertInto(personTable)(name, age).values(("Jaro", 30)) + + //execute(insertQuery) + + val selectQuery2 = select(name, age).from(personTable) + + // val selectQuery = + // select(name ++ age ++ Count(age)) + // .from(personTable) + // .groupBy(name) + + + } + override type TypeTagExtension[+A] = PostgresSpecific.PostgresTypeTag[A] override type TableExtension[A] = PostgresSpecific.PostgresSpecificTable[A] diff --git a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala index c78b85b7f..74f02060d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala @@ -61,7 +61,7 @@ trait DbSchema extends Jdbc { self => import Orders._ val orderDetailsDerived = - select(orderDetailsOrderId ++ orderDetailsProductId ++ unitPrice).from(orderDetails).asTable("derived") + select(orderDetailsOrderId, orderDetailsProductId, unitPrice).from(orderDetails).asTable("derived") val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns val orderDateDerivedTable = customers diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 7e05747ce..b74c48440 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -439,7 +439,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("ceil") { - val query = select(Ceil(53.7) ++ Ceil(-53.7)) + val query = select(Ceil(53.7), Ceil(-53.7)) val expected = (54.0, -53.0) @@ -939,7 +939,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = - (select(customerId ++ fName ++ lName ++ verified ++ dob) from customers).where(StartsWith(fName, "R")) + (select(customerId, fName, lName, verified, dob) from customers).where(StartsWith(fName, "R")) val expected = Seq( @@ -1143,7 +1143,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("setseed") { - val query = select(SetSeed(0.12) ++ Random() ++ Random()) from customers + val query = select(SetSeed(0.12), Random(), Random()) from customers val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) val testResult = execute(query).map { case (_, b, c) => (b, c) } @@ -1189,7 +1189,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val expectedRoundTripTimestamp = ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId)) val roundTripQuery = - select(createdString ++ createdTimestamp) from customers + select(createdString, createdTimestamp) from customers val roundTripResults = execute(roundTripQuery).map { case row => (row._1, ZonedDateTime.parse(row._1), row._2) } @@ -1212,7 +1212,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" - val query = select(lastNameReplaced ++ computedReplace) from customers + val query = select(lastNameReplaced, computedReplace) from customers val expected = ("Russe_", "special ::__::") diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 3b0eb9af9..2f081fd82 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -23,7 +23,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = - select(customerId ++ fName ++ lName ++ verified ++ dob).from(customers).where(condition) + select(customerId, fName, lName, verified, dob).from(customers).where(condition) val expected = Seq( @@ -51,7 +51,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { test("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob).from(customers) + val query = select(customerId, fName, lName, dob).from(customers) val expected = Seq( @@ -156,7 +156,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob).from(customers).limit(1).offset(1).orderBy(fName) + val query = select(customerId, fName, lName, dob).from(customers).limit(1).offset(1).orderBy(fName) val expected = Seq( @@ -188,7 +188,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { } yield assert(r.head)(equalTo(expected)) }, test("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) + val query = select(fName, lName, orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) case class Row(firstName: String, lastName: String, orderDate: LocalDate) @@ -259,7 +259,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { import DerivedTables._ val query = - select(customerId ++ fName ++ lName ++ orderDateDerived) + select(customerId, fName, lName, orderDateDerived) .from(customers.lateral(orderDateDerivedTable)) .orderBy(Ordering.Desc(orderDateDerived)) @@ -294,7 +294,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val subquery = customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) - val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) + val query = select(fName, lName, (subquery as "Count")).from(customers) val result = execute(query).map { case row => Row(row._1, row._2, row._3) @@ -309,7 +309,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { test("Can select using like") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob).from(customers).where(fName like "Jo%") + val query = select(customerId, fName, lName, dob).from(customers).where(fName like "Jo%") val expected = Seq( Customer( @@ -391,7 +391,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val expected = List(6, 5, 5, 5, 4) - val query = select(fkCustomerId ++ Count(orderId)) + val query = select(fkCustomerId, Count(orderId)) .from(orders) .groupBy(fkCustomerId) .orderBy(Ordering.Desc(Count(orderId))) @@ -453,7 +453,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created) val query = insertInto(customers)( - customerId ++ fName ++ lName ++ verified ++ dob ++ createdString ++ createdTimestamp + customerId, fName, lName, verified, dob, createdString, createdTimestamp ).values(data) assertM(execute(query))(equalTo(1)) @@ -499,7 +499,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { InputOrders(UUID.randomUUID(), UUID.randomUUID(), LocalDate.now()) ) - val query = insertInto(orders)(orderId ++ fkCustomerId ++ orderDate) + val query = insertInto(orders)(orderId, fkCustomerId, orderDate) .values(data) assertM(execute(query))(equalTo(10)) @@ -544,7 +544,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { OrderDetailsRow(UUID.randomUUID(), UUID.randomUUID(), 2, BigDecimal.valueOf(10.50)) ) - val query = insertInto(orderDetails)(orderDetailsOrderId ++ orderDetailsProductId ++ quantity ++ unitPrice) + val query = insertInto(orderDetails)(orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) .values(rows) assertM(execute(query))(equalTo(4)) @@ -560,7 +560,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { import OrderDetails._ - val query = insertInto(orderDetails)(orderDetailsOrderId ++ orderDetailsProductId ++ quantity ++ unitPrice) + val query = insertInto(orderDetails)(orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) .values((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00))) assertM(execute(query))(equalTo(1)) @@ -580,7 +580,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { ((UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created)) val query = insertInto(customers)( - customerId ++ fName ++ lName ++ verified ++ dob ++ createdString ++ createdTimestamp + customerId, fName, lName, verified, dob, createdString, createdTimestamp ).values(row) assertM(execute(query))(equalTo(1)) @@ -595,14 +595,14 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { (UUID.randomUUID(), "product 4", "product desription", "image url") ) - val query = insertInto(products)(productId ++ productName ++ description ++ imageURL).values(tupleData) + val query = insertInto(products)(productId, productName, description, imageURL).values(tupleData) assertM(execute(query))(equalTo(4)) }, test("insert and query nullable field") { import Persons._ - val query = select(fName ++ lName ++ dob) + val query = select(fName, lName, dob) .from(persons) final case class Person(id: UUID, firstName: String, lastName: String, dateOfBirth: Option[LocalDate]) @@ -625,13 +625,13 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val personValue = Person(UUID.randomUUID(), "Charles", "Harvey", None) - val insertSome = insertInto(persons)(personId ++ fName ++ lName ++ dob) + val insertSome = insertInto(persons)(personId, fName, lName, dob) .values((UUID.randomUUID(), "Charles", "Dent", Some(LocalDate.of(2022, 1, 31)))) - val insertNone = insertInto(persons)(personId ++ fName ++ lName ++ dob) + val insertNone = insertInto(persons)(personId, fName, lName, dob) .values((UUID.randomUUID(), "Martin", "Harvey", None)) - val insertNone2 = insertInto(persons)(personId ++ fName ++ lName ++ dob) + val insertNone2 = insertInto(persons)(personId, fName, lName, dob) .values(personValue) val result = for { @@ -668,7 +668,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { */ val lineCount = (Count(metroLineId) as "line_count") - val complexQuery = select(metroSystemName ++ cityName ++ lineCount) + val complexQuery = select(metroSystemName, cityName, lineCount) .from( metroLine .join(metroSystem) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 8797132a5..8edf6525a 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -28,7 +28,7 @@ trait DbSchema extends Jdbc { self => val (orderDetailsId, productId, quantity, unitPrice) = orderDetails.columns - val orderDetailsDerived = select(orderDetailsId ++ productId ++ unitPrice).from(orderDetails).asTable("derived") + val orderDetailsDerived = select(orderDetailsId, productId, unitPrice).from(orderDetails).asTable("derived") val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 88e439249..a3f2df9a9 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -20,7 +20,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = - select(customerId ++ fName ++ lName ++ verified ++ dob).from(customers).where(condition) + select(customerId, fName, lName, verified, dob).from(customers).where(condition) val expected = Seq( @@ -48,7 +48,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { test("Can select from single table") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob).from(customers) + val query = select(customerId, fName, lName, dob).from(customers) val expected = Seq( @@ -121,7 +121,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) - val query = select(customerId ++ fName ++ lName ++ dob).from(customers).limit(1).offset(1).orderBy(fName) + val query = select(customerId, fName, lName, dob).from(customers).limit(1).offset(1).orderBy(fName) val expected = Seq( @@ -177,7 +177,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val subquery = customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) - val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) + val query = select(fName, lName, (subquery as "Count")).from(customers) val result = execute(query).map { case row => Row(row._1, row._2, row._3) @@ -198,7 +198,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { * from product_prices ) */ - val query = select(orderDetailsId ++ productId ++ unitPrice) + val query = select(orderDetailsId, productId, unitPrice) .from(orderDetails) .where( unitPrice > select(Avg(price)).from(productPrices) @@ -257,7 +257,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { * where derived.unit_price > (select avg(order_details.unit_price) from order_details where derived.product_id = order_details.product_id) */ - val query = select(derivedOrderId ++ derivedProductId ++ derivedUnitPrice) + val query = select(derivedOrderId, derivedProductId, derivedUnitPrice) .from(orderDetailsDerived) .where( derivedUnitPrice > subselect[orderDetailsDerived.TableType](Avg(unitPrice)) @@ -363,7 +363,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { import SqlServerSpecific.SqlServerTable._ val query = - select(customerId ++ fName ++ lName ++ orderDateDerived) + select(customerId, fName, lName, orderDateDerived) .from(customers.crossApply(orderDateDerivedTable)) .orderBy(Ordering.Desc(orderDateDerived)) @@ -394,7 +394,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val orderDateDerived = subquery.columns - val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) + val query = select(fName, lName, orderDateDerived).from(customers.crossApply(subquery)) val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) @@ -413,7 +413,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val orderDateDerived = subquery.columns - val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) + val query = select(fName, lName, orderDateDerived).from(customers.crossApply(subquery)) val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) @@ -432,7 +432,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val orderDateDerived = subquery.columns - val query = select(fName ++ lName ++ orderDateDerived).from(customers.crossApply(subquery)) + val query = select(fName, lName, orderDateDerived).from(customers.crossApply(subquery)) val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) @@ -451,7 +451,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val orderDateDerived = subquery.columns - val query = select(fName ++ lName ++ orderDateDerived).from(customers.outerApply(subquery)) + val query = select(fName, lName, orderDateDerived).from(customers.outerApply(subquery)) val result = execute(query).map { case row => CustomerAndDateRow(row._1, row._2, row._3) @@ -489,7 +489,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { assertM(result)(equalTo(1L)) }, test("Can select from joined tables (inner join)") { - val query = select(fName ++ lName ++ orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) + val query = select(fName, lName, orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) case class Row(firstName: String, lastName: String, orderDate: LocalDate) From 3d6a25302641ac6401ffc86ad851a91b6c970151 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 14 Apr 2022 12:11:15 +0200 Subject: [PATCH 412/673] typos --- .../zio/sql/postgresql/PostgresModule.scala | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index dbc8d7727..5b90b15df 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -28,30 +28,6 @@ import zio.schema.StandardType.FloatType trait PostgresModule extends Jdbc { self => import TypeTag._ - object Example { - - import ColumnSet._ - //import AggregationDef._ - - val personTable = (string("name") ++ int("age")).table("person") - - val (name, age) = personTable.columns - - - val insertQuery = insertInto(personTable)(name, age).values(("Jaro", 30)) - - //execute(insertQuery) - - val selectQuery2 = select(name, age).from(personTable) - - // val selectQuery = - // select(name ++ age ++ Count(age)) - // .from(personTable) - // .groupBy(name) - - - } - override type TypeTagExtension[+A] = PostgresSpecific.PostgresTypeTag[A] override type TableExtension[A] = PostgresSpecific.PostgresSpecificTable[A] From 27edce0d57d5e55adc7c6d9f7ca563aab7c21109 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Thu, 14 Apr 2022 16:24:25 +0200 Subject: [PATCH 413/673] generated suselect comma syntax --- core/jvm/src/main/scala/zio/sql/Sql.scala | 11 -- core/jvm/src/main/scala/zio/sql/select.scala | 5 - .../src/main/scala/zio/sql/selectutils.scala | 119 +++++++++++++++++- core/jvm/src/main/scala/zio/sql/table.scala | 2 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 23 +--- 5 files changed, 121 insertions(+), 39 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index 11b34ec89..ec7f12fab 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -27,21 +27,10 @@ trait Sql * * SELECT ARBITRARY(age), COUNT(*) FROM person GROUP BY age */ - val select: SelectByCommaBuilder = SelectByCommaBuilder() - // TODO comma syntax for subselect def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] - def subselectFrom[ParentTable, F, Source, B <: SelectionSet[Source]]( - parentTable: Table.Aux[ParentTable] - )(selection: Selection[F, Source, B]) = { - // parentTable value is here to infer parent table type parameter when doing subqueries - // e.g. subselectFrom(customers)(orderDate).from(orders).where(customers.id == orders.id)) - val _ = parentTable - SubselectBuilder[F, Source, B, ParentTable](selection) - } - def deleteFrom[T <: Table](table: T): Delete[table.TableType] = Delete(table, true) def update[A](table: Table.Aux[A]): UpdateBuilder[A] = UpdateBuilder(table) diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 73b82efd4..14556e276 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -110,11 +110,6 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro } } - final class SubselectPartiallyApplied[ParentTable] { - def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = - SubselectBuilder(selection) - } - sealed case class SubselectBuilder[F, Source, B <: SelectionSet[Source], ParentTable]( selection: Selection[F, Source, B] ) { diff --git a/core/jvm/src/main/scala/zio/sql/selectutils.scala b/core/jvm/src/main/scala/zio/sql/selectutils.scala index 2e8d9df7f..0096f9118 100644 --- a/core/jvm/src/main/scala/zio/sql/selectutils.scala +++ b/core/jvm/src/main/scala/zio/sql/selectutils.scala @@ -25,6 +25,13 @@ package zio.sql val selection = ${bp"expr${num(1)}".rep(" ++ ")} Selector[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}, Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, i.Unaggregated](selection) }""" + + val subselectSyntax = + bp""" + def apply[${bp"F${num(1)}".rep(", ")}, Source, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")}): SubselectBuilder[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, ParentTable] = { + val selection = ${bp"expr${num(1)}".rep(" ++ ")} + SubselectBuilder(selection) + }""" */ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule with SelectModule => @@ -423,6 +430,116 @@ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule wi val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22 Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) } - // format: on } + + final class SubselectPartiallyApplied[ParentTable] { + def apply[F1, Source, B1](expr: Expr[F1, Source, B1]): SubselectBuilder[F1, Source, SelectionSet.Cons[Source, B1, SelectionSet.Empty], ParentTable] = + SubselectBuilder(expr) + + def apply[F1, F2, Source, B1, B2](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2]): SubselectBuilder[Features.Union[F1, F2], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]], ParentTable] = { + val selection = expr1 ++ expr2 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, Source, B1, B2, B3](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3]): SubselectBuilder[Features.Union[Features.Union[F1, F2], F3], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Empty]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, Source, B1, B2, B3, B4](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4]): SubselectBuilder[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Empty]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, Source, B1, B2, B3, B4, B5](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Empty]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, Source, B1, B2, B3, B4, B5, B6](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Empty]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, Source, B1, B2, B3, B4, B5, B6, B7](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Empty]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, Source, B1, B2, B3, B4, B5, B6, B7, B8](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Empty]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Empty]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Empty]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Empty]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Empty]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Empty]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Empty]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Empty]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Empty]]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Empty]]]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Empty]]]]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 + SubselectBuilder(selection) + } + + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21], expr22: Expr[F22, Source, B22]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], ParentTable] = { + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22 + SubselectBuilder(selection) + } + } + // format: on } \ No newline at end of file diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 6358e0015..2459ed2fc 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -5,7 +5,7 @@ import zio.Chunk import java.time._ import java.util.UUID -trait TableModule { self: ExprModule with SelectModule with UtilsModule => +trait TableModule { self: ExprModule with SelectModule with UtilsModule with SelectUtilsModule => sealed trait Singleton0[A] { type SingletonIdentity diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index a3f2df9a9..290af79c3 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -390,9 +390,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { */ import SqlServerSpecific.SqlServerTable._ val subquery = - subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") + subselect[customers.TableType](orderDate, orderId).from(orders).where(customerId === fkCustomerId).asTable("ooo") - val orderDateDerived = subquery.columns + val (orderDateDerived, _ ) = subquery.columns val query = select(fName, lName, orderDateDerived).from(customers.crossApply(subquery)) @@ -425,25 +425,6 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("cross apply with subselect from") { - import SqlServerSpecific.SqlServerTable._ - val subquery = - subselectFrom(customers)(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") - - val orderDateDerived = subquery.columns - - val query = select(fName, lName, orderDateDerived).from(customers.crossApply(subquery)) - - val result = execute(query).map { case row => - CustomerAndDateRow(row._1, row._2, row._3) - } - - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, test("outer apply") { import SqlServerSpecific.SqlServerTable._ val subquery = From 41f0da6212ac7d25fcc36cef83e10bff31f60584 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 15 Apr 2022 23:00:23 +0200 Subject: [PATCH 414/673] Update postgresql to 42.3.4 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 041ea187f..b6fe267cd 100644 --- a/build.sbt +++ b/build.sbt @@ -141,7 +141,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.3.3" % Test, + "org.postgresql" % "postgresql" % "42.3.4" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -200,7 +200,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.3.3" % Compile, + "org.postgresql" % "postgresql" % "42.3.4" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 5649b25ef9af59d4561f85df94ac0fef64d62cc6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 16 Apr 2022 10:51:19 +0200 Subject: [PATCH 415/673] Update scalafmt-core to 3.5.1 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index f8c4e81eb..8fe600982 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.5.0" +version = "3.5.1" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From 9b844232c6842950689ad2c2b682ddcd13d7cf38 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 19 Apr 2022 19:51:06 +0200 Subject: [PATCH 416/673] let alternativelly user use ++ in case of bigger than 22 columns table --- core/jvm/src/main/scala/zio/sql/Sql.scala | 5 +++++ .../jvm/src/main/scala/zio/sql/selectutils.scala | 8 ++++++-- docs/overview/deep.md | 16 ++++++++-------- docs/overview/index.md | 14 +++++++------- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index ec7f12fab..18d0c18c9 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -29,6 +29,11 @@ trait Sql */ val select: SelectByCommaBuilder = SelectByCommaBuilder() + def select[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit + i: Features.IsPartiallyAggregated[F] + ): Selector[F, A, B, i.Unaggregated] = + Selector[F, A, B, i.Unaggregated](selection) + def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] def deleteFrom[T <: Table](table: T): Delete[table.TableType] = Delete(table, true) diff --git a/core/jvm/src/main/scala/zio/sql/selectutils.scala b/core/jvm/src/main/scala/zio/sql/selectutils.scala index 0096f9118..1fb35020d 100644 --- a/core/jvm/src/main/scala/zio/sql/selectutils.scala +++ b/core/jvm/src/main/scala/zio/sql/selectutils.scala @@ -39,6 +39,10 @@ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule wi sealed case class InsertIntoBuilder[Source, AllColumnIdentities]( table: Table.Source.Aux_[Source, AllColumnIdentities] ) { + + def apply[F, B <: SelectionSet[Source]](sources: Selection[F, Source, B]) = + InsertBuilder[F, Source, AllColumnIdentities, B, sources.ColsRepr](table, sources) + def apply[F1, B1](expr1: Expr[F1, Source, B1]) = { type B = SelectionSet.Cons[Source, B1, SelectionSet.Empty] @@ -433,8 +437,8 @@ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule wi } final class SubselectPartiallyApplied[ParentTable] { - def apply[F1, Source, B1](expr: Expr[F1, Source, B1]): SubselectBuilder[F1, Source, SelectionSet.Cons[Source, B1, SelectionSet.Empty], ParentTable] = - SubselectBuilder(expr) + def apply[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B]): SubselectBuilder[F, A, B, ParentTable] = + SubselectBuilder(selection) def apply[F1, F2, Source, B1, B2](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2]): SubselectBuilder[Features.Union[F1, F2], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]], ParentTable] = { val selection = expr1 ++ expr2 diff --git a/docs/overview/deep.md b/docs/overview/deep.md index ea3bf122c..14ab10530 100644 --- a/docs/overview/deep.md +++ b/docs/overview/deep.md @@ -45,7 +45,7 @@ values zio-sql gives us nice typesafe DSL that feels similar to writing SQL: ```scala insertInto(customers) - (customerId ++ dob ++ fName ++ lName ++ verified ++ created) + (customerId, dob, fName, lName, verified, created) .values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) ``` Compiler verifies your inserts and your query fails with compile-time error at any of the following situations: @@ -66,7 +66,7 @@ val data = ) val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + customerId, dob, fName, lName, verified, createdString, createdTimestamp ).values(data) ``` @@ -101,7 +101,7 @@ Then your insert looks almost the same as before: val data: Customer = Customer(UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russel", true, ZonedDateTime.now()) val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + customerId, dob, fName, lName, verified, createdString, createdTimestamp ).values(data) ``` Or you can insert multiple rows at once. Just define data as a `List` or any collection of your choice. @@ -115,7 +115,7 @@ val data : List[Customer] = ??? In case you want to see the exact query that zio-sql generated, you can use `renderInsert` method inside repo that has PostgresModule (or TableModel from above example) mixed in. ```scala val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + customerId, dob, fName, lName, verified, createdString, createdTimestamp ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) val sqlString: String = renderInsert(query) @@ -126,7 +126,7 @@ val sqlString: String = renderInsert(query) In order to execute a query, we use `execute` method inside repo that has PostgresModule (or TableModel from the above example) mixed in. ```scala val query = insertInto(customers)( - customerId ++ dob ++ fName ++ lName ++ verified ++ createdString ++ createdTimestamp + customerId, dob, fName, lName, verified, createdString, createdTimestamp ).values((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Ronald", "Russell", true, ZonedDateTime.now())) val executed : ZIO[Has[SqlDriver], Exception, Int] = execute(query) @@ -172,7 +172,7 @@ val orderDetailsId :*: productId :*: unitPrice :*: _ = orderDetails.columns ``` We can create query very easily. In fact, just type it like a regular sql query and let your IDE auto completion guide you! ```scala -val query = select(orderDetailsId ++ productId ++ unitPrice) +val query = select(orderDetailsId, productId, unitPrice) .from(orderDetails) .where( unitPrice > select(Avg(price)).from(productPrices) @@ -215,7 +215,7 @@ ZIO SQL query: val subquery = customers.subselect(Count(orderId)).from(orders).where(fkCustomerId === customerId) -val query = select(fName ++ lName ++ (subquery as "Count")).from(customers) +val query = select(fName, lName, (subquery as "Count")).from(customers) ``` All of these examples and more can be found and run in zio-sql tests. @@ -256,7 +256,7 @@ Finally, we have all the ingredients we need to describe our query with zio-sql. import PostgresSpecific.PostgresSpecificTable._ val query = - select(customerId ++ fName ++ lName ++ orderDateDerived) + select(customerId, fName, lName, orderDateDerived) .from(customers.lateral(derivedTable)) .orderBy(Ordering.Desc(orderDateDerived)) ``` \ No newline at end of file diff --git a/docs/overview/index.md b/docs/overview/index.md index ff4a4cef6..fb88ab8d8 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -85,42 +85,42 @@ TODO Simple select. ```scala -val allProducts = select(productId ++ name ++ price).from(products) +val allProducts = select(productId, name, price).from(products) ``` Using `where` clause. ```scala def productById(id: UUID) = - select(productId ++ name ++ price).from(products).where(productId === id) + select(productId, name, price).from(products).where(productId === id) ``` Inner join. ```scala val ordersWithProductNames = - select(orderId ++ name).from(products.join(orders).on(productId === fkProductId)) + select(orderId, name).from(products.join(orders).on(productId === fkProductId)) ``` Left outer join. ```scala val leftOuter = - select(orderId ++ name).from(products.leftOuter(orders).on(productId === fkProductId)) + select(orderId, name).from(products.leftOuter(orders).on(productId === fkProductId)) ``` Right outer join. ```scala val rightOuter = - select(orderId ++ name).from(products.rightOuter(orders).on(productId === fkProductId)) + select(orderId, name).from(products.rightOuter(orders).on(productId === fkProductId)) ``` Using `limit` and `offset` ```scala val limitedResults = - select(orderId ++ name) + select(orderId, name) .from(products.join(orders) .on(productId === fkProductId)) .limit(5) @@ -131,7 +131,7 @@ val limitedResults = ```scala insertInto(products) - (productId ++ name ++ price) + (productId, name, price) .values((UUID.randomUUID(), "Zionomicon", 10.5)) ``` From 9933321bad721fa599be48ecdb3869825398d912 Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 19 Apr 2022 21:33:11 +0200 Subject: [PATCH 417/673] formatting --- .../jvm/src/main/scala/zio/sql/selectutils.scala | 6 +++--- .../test/scala/zio/sql/TestBasicSelectSpec.scala | 5 +++-- examples/src/main/scala/zio/sql/Examples.scala | 8 ++++---- .../zio/sql/postgresql/PostgresModuleSpec.scala | 16 ++++++++++++++-- .../zio/sql/sqlserver/SqlServerModuleSpec.scala | 7 +++++-- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/selectutils.scala b/core/jvm/src/main/scala/zio/sql/selectutils.scala index 1fb35020d..102b1099f 100644 --- a/core/jvm/src/main/scala/zio/sql/selectutils.scala +++ b/core/jvm/src/main/scala/zio/sql/selectutils.scala @@ -33,9 +33,9 @@ package zio.sql SubselectBuilder(selection) }""" */ +// format: off trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule with SelectModule => - // format: off sealed case class InsertIntoBuilder[Source, AllColumnIdentities]( table: Table.Source.Aux_[Source, AllColumnIdentities] ) { @@ -545,5 +545,5 @@ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule wi SubselectBuilder(selection) } } - // format: on -} \ No newline at end of file +} +// format: on diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 117d72062..837ba0243 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -24,8 +24,9 @@ object TestBasicSelect { // fName and lName already have column names, shouldn't have to do this val basicSelectWithAliases = (select( - (fName as "first_name"), (lName as "last_name") - ) from userTable) + (fName as "first_name"), + (lName as "last_name") + ) from userTable) } } diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 6eacc7a7c..5736f64d5 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -56,10 +56,10 @@ object Examples extends App with ShopSchema with SqlServerModule { val orderValues = select( userId, - fName, - lName, - (Sum(quantity * unitPrice) as "total_spend"), - Sum(Abs(quantity)) + fName, + lName, + (Sum(quantity * unitPrice) as "total_spend"), + Sum(Abs(quantity)) ) .from( users diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 2f081fd82..72a9ea11b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -453,7 +453,13 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created) val query = insertInto(customers)( - customerId, fName, lName, verified, dob, createdString, createdTimestamp + customerId, + fName, + lName, + verified, + dob, + createdString, + createdTimestamp ).values(data) assertM(execute(query))(equalTo(1)) @@ -580,7 +586,13 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { ((UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created)) val query = insertInto(customers)( - customerId, fName, lName, verified, dob, createdString, createdTimestamp + customerId, + fName, + lName, + verified, + dob, + createdString, + createdTimestamp ).values(row) assertM(execute(query))(equalTo(1)) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 290af79c3..caf233bb1 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -390,9 +390,12 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { */ import SqlServerSpecific.SqlServerTable._ val subquery = - subselect[customers.TableType](orderDate, orderId).from(orders).where(customerId === fkCustomerId).asTable("ooo") + subselect[customers.TableType](orderDate, orderId) + .from(orders) + .where(customerId === fkCustomerId) + .asTable("ooo") - val (orderDateDerived, _ ) = subquery.columns + val (orderDateDerived, _) = subquery.columns val query = select(fName, lName, orderDateDerived).from(customers.crossApply(subquery)) From bda6d408306b420a16fba6634335543b2dc2419b Mon Sep 17 00:00:00 2001 From: sviezypan Date: Tue, 19 Apr 2022 22:06:44 +0200 Subject: [PATCH 418/673] formatting --- .../src/main/scala/zio/sql/selectutils.scala | 60 +++++++++++++------ 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/selectutils.scala b/core/jvm/src/main/scala/zio/sql/selectutils.scala index 102b1099f..734332ced 100644 --- a/core/jvm/src/main/scala/zio/sql/selectutils.scala +++ b/core/jvm/src/main/scala/zio/sql/selectutils.scala @@ -409,30 +409,38 @@ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule wi def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19])(implicit i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19]] - ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + ) = { + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 - Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + Selector[F, Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) } def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20])(implicit i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20]] - ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + ) = { + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 - Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + Selector[F, Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) } def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21])(implicit i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21]] - ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + ) = { + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 - Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + Selector[F, Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) } def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21], expr22: Expr[F22, Source, B22])(implicit i: Features.IsPartiallyAggregated[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22]] - ): Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], i.Unaggregated] = { + ) = { + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22 - Selector[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) + Selector[F, Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], i.Unaggregated](selection) } } @@ -520,29 +528,45 @@ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule wi SubselectBuilder(selection) } - def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Empty]]]]]]]]]]]]]]]]]], ParentTable] = { + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18]) = { + type S = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Empty]]]]]]]]]]]]]]]]]] + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 - SubselectBuilder(selection) + + SubselectBuilder[F, Source, S, ParentTable](selection) } - def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]], ParentTable] = { + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19]) = { + type S = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Empty]]]]]]]]]]]]]]]]]]] + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 - SubselectBuilder(selection) + SubselectBuilder[F, Source, S, ParentTable](selection) } - def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]], ParentTable] = { + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20]) = { + type S = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]] + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 - SubselectBuilder(selection) + SubselectBuilder[F, Source, S, ParentTable](selection) } - def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]], ParentTable] = { + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21]) = { + type S = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]] + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 - SubselectBuilder(selection) + SubselectBuilder[F, Source, S, ParentTable](selection) } - def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21], expr22: Expr[F22, Source, B22]): SubselectBuilder[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22], Source, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]], ParentTable] = { + def apply[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, Source, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2], expr3: Expr[F3, Source, B3], expr4: Expr[F4, Source, B4], expr5: Expr[F5, Source, B5], expr6: Expr[F6, Source, B6], expr7: Expr[F7, Source, B7], expr8: Expr[F8, Source, B8], expr9: Expr[F9, Source, B9], expr10: Expr[F10, Source, B10], expr11: Expr[F11, Source, B11], expr12: Expr[F12, Source, B12], expr13: Expr[F13, Source, B13], expr14: Expr[F14, Source, B14], expr15: Expr[F15, Source, B15], expr16: Expr[F16, Source, B16], expr17: Expr[F17, Source, B17], expr18: Expr[F18, Source, B18], expr19: Expr[F19, Source, B19], expr20: Expr[F20, Source, B20], expr21: Expr[F21, Source, B21], expr22: Expr[F22, Source, B22]) = { + type S = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Cons[Source, B3, SelectionSet.Cons[Source, B4, SelectionSet.Cons[Source, B5, SelectionSet.Cons[Source, B6, SelectionSet.Cons[Source, B7, SelectionSet.Cons[Source, B8, SelectionSet.Cons[Source, B9, SelectionSet.Cons[Source, B10, SelectionSet.Cons[Source, B11, SelectionSet.Cons[Source, B12, SelectionSet.Cons[Source, B13, SelectionSet.Cons[Source, B14, SelectionSet.Cons[Source, B15, SelectionSet.Cons[Source, B16, SelectionSet.Cons[Source, B17, SelectionSet.Cons[Source, B18, SelectionSet.Cons[Source, B19, SelectionSet.Cons[Source, B20, SelectionSet.Cons[Source, B21, SelectionSet.Cons[Source, B22, SelectionSet.Empty]]]]]]]]]]]]]]]]]]]]]] + type F = Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[F1, F2], F3], F4], F5], F6], F7], F8], F9], F10], F11], F12], F13], F14], F15], F16], F17], F18], F19], F20], F21], F22] + val selection = expr1 ++ expr2 ++ expr3 ++ expr4 ++ expr5 ++ expr6 ++ expr7 ++ expr8 ++ expr9 ++ expr10 ++ expr11 ++ expr12 ++ expr13 ++ expr14 ++ expr15 ++ expr16 ++ expr17 ++ expr18 ++ expr19 ++ expr20 ++ expr21 ++ expr22 - SubselectBuilder(selection) + SubselectBuilder[F, Source, S, ParentTable](selection) } } } From fa77b4af73bd0f9f750990e24091fc845858065d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 22 Apr 2022 12:59:33 +0200 Subject: [PATCH 419/673] Update sbt-bloop to 1.5.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 001c841d0..07a325a6c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.13") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.0") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From e5ad15beb6df4b3ef092d92c538578ddf31d1a2e Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 24 Apr 2022 17:00:02 +0200 Subject: [PATCH 420/673] Render quoted table names and column names for PostgreSQL --- .../zio/sql/postgresql/PostgresModule.scala | 10 ++++++---- postgres/src/test/resources/db_schema.sql | 20 +++++++++---------- .../scala/zio/sql/postgresql/DbSchema.scala | 8 ++++---- .../sql/postgresql/PostgresModuleSpec.scala | 4 +--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 5b90b15df..4ba61f60a 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -463,7 +463,7 @@ trait PostgresModule extends Jdbc { self => case SelectionSet.Empty => () // table is a collection of at least ONE column case SelectionSet.Cons(columnSelection, tail) => val _ = columnSelection.name.map { name => - render(name) + render(quoted(name)) } tail.asInstanceOf[SelectionSet[_]] match { case SelectionSet.Empty => () @@ -556,12 +556,14 @@ trait PostgresModule extends Jdbc { self => expr match { case Expr.Source(_, column) => column.name match { - case Some(columnName) => render(columnName) + case Some(columnName) => render(quoted(columnName)) case _ => () } case _ => () } + private[zio] def quoted(name: String): String = "\"" + name + "\"" + private[zio] def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Subselect(subselect) => render(" (") @@ -570,7 +572,7 @@ trait PostgresModule extends Jdbc { self => case Expr.Source(table, column) => (table, column.name) match { case (tableName: TableName, Some(columnName)) => - render(tableName, ".", columnName) + render(quoted(tableName), ".", quoted(columnName)) case _ => () } case Expr.Unary(base, op) => @@ -832,7 +834,7 @@ trait PostgresModule extends Jdbc { self => renderTable(derivedTable) } // The outer reference in this type test cannot be checked at run time?! - case sourceTable: self.Table.Source => render(sourceTable.name) + case sourceTable: self.Table.Source => render(quoted(sourceTable.name)) case Table.DerivedTable(read, name) => render(" ( ") render(renderRead(read.asInstanceOf[Read[_]])) diff --git a/postgres/src/test/resources/db_schema.sql b/postgres/src/test/resources/db_schema.sql index 9f324157d..85aad89a0 100644 --- a/postgres/src/test/resources/db_schema.sql +++ b/postgres/src/test/resources/db_schema.sql @@ -1,12 +1,12 @@ -create table customers +create table "Customers" ( - id uuid not null primary key, - first_name varchar not null, - last_name varchar not null, - verified boolean not null, - dob date not null, - created_timestamp_string varchar not null, - created_timestamp timestamp with time zone default now() + "Id" uuid not null primary key, + "First_name" varchar not null, + "Last_name" varchar not null, + "Verified" boolean not null, + "Dob" date not null, + "Created_timestamp_string" varchar not null, + "Created_timestamp" timestamp with time zone default now() ); create table orders @@ -78,8 +78,8 @@ ALTER TABLE metro_line ADD CONSTRAINT metro_line_id PRIMARY KEY(id); ALTER TABLE metro_line ADD CONSTRAINT metro_line_system_fk FOREIGN KEY(system_id) REFERENCES metro_system(id) ON DELETE CASCADE ON UPDATE CASCADE; -insert into customers - (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) +insert into "Customers" + ("Id", "First_name", "Last_name", "Verified", "Dob", "Created_timestamp_string", "Created_timestamp") values ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'), ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', true, '1999-11-02', '2020-11-21T15:10:25-04:00', '2020-11-21 15:10:25-04'), diff --git a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala index c78b85b7f..e4ecdcbce 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala @@ -19,10 +19,10 @@ trait DbSchema extends Jdbc { self => object Customers { // https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string val customers = - (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( - "verified" - ) ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) - .table("customers") + (uuid("Id") ++ localDate("Dob") ++ string("First_name") ++ string("Last_name") ++ boolean( + "Verified" + ) ++ string("Created_timestamp_string") ++ zonedDateTime("Created_timestamp")) + .table("Customers") val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = customers.columns diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 3b0eb9af9..c8cd3fe5b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -691,9 +691,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { assertM(result)(equalTo(expected)) }, test("update rows") { - import Persons._ - - val query = update(persons).set(fName, "Charlie").where(fName === "Charles") + val query = update(customers).set(fName, "Jaroslav").where(fName === "Jaro") assertM(execute(query))(equalTo(2)) } From 5f2771282dfef8eaf9b21ce84de5c24f3dabce78 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 24 Apr 2022 21:58:57 +0200 Subject: [PATCH 421/673] Update testcontainers-scala-mssqlserver, ... to 0.40.6 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 041ea187f..d3f852ad1 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC5" val zioSchemaVersion = "0.1.9" val testcontainersVersion = "1.16.3" -val testcontainersScalaVersion = "0.40.5" +val testcontainersScalaVersion = "0.40.6" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From 8253778cbfb060a592fb1f14c6be0bc77832ec26 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 25 Apr 2022 14:44:35 +0200 Subject: [PATCH 422/673] Revert commit(s) 0e4c00d --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7e40ec85e..041ea187f 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC5" val zioSchemaVersion = "0.1.9" -val testcontainersVersion = "1.17.1" +val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.5" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 0c65f29bf095cae0f0fd2cd5c1a4931c5cab17a8 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 25 Apr 2022 14:44:41 +0200 Subject: [PATCH 423/673] Update database-commons, jdbc, mssqlserver, ... to 1.17.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d3f852ad1..ac5f35eb8 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC5" val zioSchemaVersion = "0.1.9" -val testcontainersVersion = "1.16.3" +val testcontainersVersion = "1.17.1" val testcontainersScalaVersion = "0.40.6" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From 644cfa95bbdc73dab41370154aa1dd4f86a92a60 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 25 Apr 2022 17:38:58 +0200 Subject: [PATCH 424/673] Update mysql-connector-java to 8.0.29 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d3f852ad1..7121fbfd9 100644 --- a/build.sbt +++ b/build.sbt @@ -166,7 +166,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.28" % Test, + "mysql" % "mysql-connector-java" % "8.0.29" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) From 13d3c90af2a360f5903c88fb8e22848e85bc6e24 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 25 Apr 2022 22:35:39 +0200 Subject: [PATCH 425/673] Update sbt-tpolecat to 0.3.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index fa0ff69f0..52aabf67c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.2.3") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") From afdc862c7a77fef3f813feb158ae22109d6dfb40 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 27 Apr 2022 19:23:40 +0200 Subject: [PATCH 426/673] Update testcontainers-scala-mssqlserver, ... to 0.40.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 8cbf944e6..08ef6ffdb 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC5" val zioSchemaVersion = "0.1.9" val testcontainersVersion = "1.17.1" -val testcontainersScalaVersion = "0.40.6" +val testcontainersScalaVersion = "0.40.7" lazy val startPostgres = taskKey[Unit]("Start up Postgres") startPostgres := startService(Database.Postgres, streams.value) From f3c544eb04d083421410d21b395990750faf3a95 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Thu, 28 Apr 2022 00:52:44 +0200 Subject: [PATCH 427/673] Split db-specific Module traits into more specialized traits for Sql, Renderer and Jdbc --- build.sbt | 4 + .../main/scala/zio/sql/driver}/Renderer.scala | 2 +- .../src/main/scala/zio/sql/Examples.scala | 4 +- .../main/scala/zio/sql/GroupByExamples.scala | 4 +- .../scala/zio/sql/mysql/MysqlJdbcModule.scala | 5 + ...qlModule.scala => MysqlRenderModule.scala} | 43 +-- .../scala/zio/sql/mysql/MysqlSqlModule.scala | 38 ++ .../zio/sql/mysql/MysqlRunnableSpec.scala | 2 +- .../zio/sql/oracle/OracleJdbcModule.scala | 5 + ...eModule.scala => OracleRenderModule.scala} | 41 +-- .../zio/sql/oracle/OracleSqlModule.scala | 11 + .../sql/postgresql/PostgresJdbcModule.scala | 5 + ...odule.scala => PostgresRenderModule.scala} | 337 +----------------- .../sql/postgresql/PostgresSqlModule.scala | 313 ++++++++++++++++ .../sql/postgresql/PostgresRunnableSpec.scala | 2 +- .../sql/sqlserver/SqlServerJdbcModule.scala | 5 + ...dule.scala => SqlServerRenderModule.scala} | 99 +---- .../sql/sqlserver/SqlServerSqlModule.scala | 92 +++++ .../sql/sqlserver/SqlServerRunnableSpec.scala | 2 +- 19 files changed, 528 insertions(+), 486 deletions(-) rename {jdbc/src/main/scala/zio/sql => driver/src/main/scala/zio/sql/driver}/Renderer.scala (96%) create mode 100644 mysql/src/main/scala/zio/sql/mysql/MysqlJdbcModule.scala rename mysql/src/main/scala/zio/sql/mysql/{MysqlModule.scala => MysqlRenderModule.scala} (91%) create mode 100644 mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala create mode 100644 oracle/src/main/scala/zio/sql/oracle/OracleJdbcModule.scala rename oracle/src/main/scala/zio/sql/oracle/{OracleModule.scala => OracleRenderModule.scala} (93%) create mode 100644 oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala create mode 100644 postgres/src/main/scala/zio/sql/postgresql/PostgresJdbcModule.scala rename postgres/src/main/scala/zio/sql/postgresql/{PostgresModule.scala => PostgresRenderModule.scala} (59%) create mode 100644 postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala create mode 100644 sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerJdbcModule.scala rename sqlserver/src/main/scala/zio/sql/sqlserver/{SqlServerModule.scala => SqlServerRenderModule.scala} (80%) create mode 100644 sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala diff --git a/build.sbt b/build.sbt index 9ff3d123a..b1ed5c119 100644 --- a/build.sbt +++ b/build.sbt @@ -151,6 +151,7 @@ lazy val jdbc = project lazy val mysql = project .in(file("mysql")) .dependsOn(jdbc % "compile->compile;test->test") + .dependsOn(driver) .settings(stdSettings("zio-sql-mysql")) .settings(buildInfoSettings("zio.sql.mysql")) .settings( @@ -168,6 +169,7 @@ lazy val mysql = project lazy val oracle = project .in(file("oracle")) .dependsOn(jdbc % "compile->compile;test->test") + .dependsOn(driver) .settings(stdSettings("zio-sql-oracle")) .settings(buildInfoSettings("zio.sql.oracle")) .settings( @@ -185,6 +187,7 @@ lazy val oracle = project lazy val postgres = project .in(file("postgres")) .dependsOn(jdbc % "compile->compile;test->test") + .dependsOn(driver) .settings(stdSettings("zio-sql-postgres")) .settings(buildInfoSettings("zio.sql.postgres")) .settings( @@ -202,6 +205,7 @@ lazy val postgres = project lazy val sqlserver = project .in(file("sqlserver")) .dependsOn(jdbc % "compile->compile;test->test") + .dependsOn(driver) .settings(stdSettings("zio-sql-sqlserver")) .settings(buildInfoSettings("zio.sql.sqlserver")) .settings( diff --git a/jdbc/src/main/scala/zio/sql/Renderer.scala b/driver/src/main/scala/zio/sql/driver/Renderer.scala similarity index 96% rename from jdbc/src/main/scala/zio/sql/Renderer.scala rename to driver/src/main/scala/zio/sql/driver/Renderer.scala index 35123d7d2..5203c8c13 100644 --- a/jdbc/src/main/scala/zio/sql/Renderer.scala +++ b/driver/src/main/scala/zio/sql/driver/Renderer.scala @@ -1,4 +1,4 @@ -package zio.sql +package zio.sql.driver private[sql] class Renderer(val builder: StringBuilder) extends AnyVal { // not using vararg to avoid allocating `Seq`s diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 23b28ceca..8f11d8cbb 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -1,8 +1,8 @@ package zio.sql -import zio.sql.sqlserver.SqlServerModule +import zio.sql.sqlserver.SqlServerJdbcModule -object Examples extends App with ShopSchema with SqlServerModule { +object Examples extends App with ShopSchema with SqlServerJdbcModule { import this.AggregationDef._ import this.FunctionDef._ import this.OrderDetails._ diff --git a/examples/src/main/scala/zio/sql/GroupByExamples.scala b/examples/src/main/scala/zio/sql/GroupByExamples.scala index 2f9c92037..ff725f910 100644 --- a/examples/src/main/scala/zio/sql/GroupByExamples.scala +++ b/examples/src/main/scala/zio/sql/GroupByExamples.scala @@ -1,8 +1,8 @@ package zio.sql -import zio.sql.sqlserver.SqlServerModule +import zio.sql.sqlserver.SqlServerJdbcModule -object GroupByExamples extends App with ShopSchema with SqlServerModule { +object GroupByExamples extends App with ShopSchema with SqlServerJdbcModule { import AggregationDef._ import ColumnSet._ diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlJdbcModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlJdbcModule.scala new file mode 100644 index 000000000..73de71523 --- /dev/null +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlJdbcModule.scala @@ -0,0 +1,5 @@ +package zio.sql.mysql + +import zio.sql.Jdbc + +trait MysqlJdbcModule extends MysqlRenderModule with Jdbc diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala similarity index 91% rename from mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala rename to mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala index 6224c51c9..5864d9f86 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala @@ -1,45 +1,14 @@ package zio.sql.mysql import zio.Chunk -import zio.sql.{ Jdbc, Renderer } - -import java.sql.ResultSet -import java.time.Year import zio.schema.Schema +import zio.sql.driver.Renderer -trait MysqlModule extends Jdbc { self => - - override type TypeTagExtension[+A] = MysqlSpecific.MysqlTypeTag[A] - - object MysqlSpecific { - trait MysqlTypeTag[+A] extends Tag[A] with Decodable[A] - - object MysqlTypeTag { - implicit case object TYear extends MysqlTypeTag[Year] { - override def decode(column: Int, resultSet: ResultSet): Either[DecodingError, Year] = - scala.util - .Try(Year.of(resultSet.getByte(column).toInt)) - .fold( - _ => Left(DecodingError.UnexpectedNull(column)), - r => Right(r) - ) - } - - } - } - - object MysqlFunctionDef { - val Crc32 = FunctionDef[String, Long](FunctionName("crc32")) - val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) - val Log2 = FunctionDef[Double, Double](FunctionName("log2")) - val Log10 = FunctionDef[Double, Double](FunctionName("log10")) - val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) - val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) - } +trait MysqlRenderModule extends MysqlSqlModule { self => override def renderRead(read: self.Read[_]): String = { implicit val render: Renderer = Renderer() - MysqlRenderModule.renderReadImpl(read) + MysqlRenderer.renderReadImpl(read) render.toString } @@ -47,17 +16,17 @@ trait MysqlModule extends Jdbc { self => override def renderDelete(delete: self.Delete[_]): String = { implicit val render: Renderer = Renderer() - MysqlRenderModule.renderDeleteImpl(delete) + MysqlRenderer.renderDeleteImpl(delete) render.toString } override def renderUpdate(update: self.Update[_]): String = { implicit val render: Renderer = Renderer() - MysqlRenderModule.renderUpdateImpl(update) + MysqlRenderer.renderUpdateImpl(update) render.toString } - object MysqlRenderModule { + object MysqlRenderer { def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") renderTable(delete.table) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala new file mode 100644 index 000000000..7d027ef3e --- /dev/null +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -0,0 +1,38 @@ +package zio.sql.mysql + +import java.sql.ResultSet +import java.time.Year + +import zio.sql.Sql + +trait MysqlSqlModule extends Sql { self => + + override type TypeTagExtension[+A] = MysqlSpecific.MysqlTypeTag[A] + + object MysqlSpecific { + trait MysqlTypeTag[+A] extends Tag[A] with Decodable[A] + + object MysqlTypeTag { + implicit case object TYear extends MysqlTypeTag[Year] { + override def decode(column: Int, resultSet: ResultSet): Either[DecodingError, Year] = + scala.util + .Try(Year.of(resultSet.getByte(column).toInt)) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + r => Right(r) + ) + } + + } + } + + object MysqlFunctionDef { + val Crc32 = FunctionDef[String, Long](FunctionName("crc32")) + val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) + val Log2 = FunctionDef[Double, Double](FunctionName("log2")) + val Log10 = FunctionDef[Double, Double](FunctionName("log10")) + val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) + val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + } + +} diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 9effb9375..2580cd301 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -5,7 +5,7 @@ import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } import zio.test._ import zio.ZLayer -trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { +trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlJdbcModule { private def connProperties(user: String, password: String): Properties = { val props = new Properties diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleJdbcModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleJdbcModule.scala new file mode 100644 index 000000000..c5c6c319f --- /dev/null +++ b/oracle/src/main/scala/zio/sql/oracle/OracleJdbcModule.scala @@ -0,0 +1,5 @@ +package zio.sql.oracle + +import zio.sql.Jdbc + +trait OracleJdbcModule extends OracleRenderModule with Jdbc diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala similarity index 93% rename from oracle/src/main/scala/zio/sql/oracle/OracleModule.scala rename to oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index 3f5bafce6..d58fb4305 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -1,15 +1,22 @@ package zio.sql.oracle -import zio.sql.Jdbc import zio.schema.Schema -trait OracleModule extends Jdbc { self => +trait OracleRenderModule extends OracleSqlModule { self => - object OracleFunctionDef { - val Sind = FunctionDef[Double, Double](FunctionName("sind")) + override def renderDelete(delete: self.Delete[_]): String = ??? + + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? + + override def renderRead(read: self.Read[_]): String = { + val builder = new StringBuilder + buildReadString(read, builder) + builder.toString() } - def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { + override def renderUpdate(update: self.Update[_]): String = ??? + + private def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { case Expr.Subselect(subselect) => builder.append(" (") builder.append(renderRead(subselect)) @@ -129,7 +136,7 @@ trait OracleModule extends Jdbc { self => val _ = builder.append(")") } - def buildReadString(read: self.Read[_], builder: StringBuilder): Unit = + private def buildReadString(read: self.Read[_], builder: StringBuilder): Unit = read match { case Read.Mapped(read, _) => buildReadString(read, builder) @@ -199,7 +206,7 @@ trait OracleModule extends Jdbc { self => val _ = builder.append(" (").append(values.mkString(",")).append(") ") // todo fix needs escaping } - def buildExprList(expr: Read.ExprSet[_], builder: StringBuilder): Unit = + private def buildExprList(expr: Read.ExprSet[_], builder: StringBuilder): Unit = expr match { case Read.ExprSet.ExprCons(head, tail) => buildExpr(head, builder) @@ -211,7 +218,7 @@ trait OracleModule extends Jdbc { self => } case Read.ExprSet.NoExpr => () } - def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]], builder: StringBuilder): Unit = + private def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]], builder: StringBuilder): Unit = expr match { case head :: tail => head match { @@ -229,7 +236,7 @@ trait OracleModule extends Jdbc { self => case Nil => () } - def buildSelection[A](selectionSet: SelectionSet[A], builder: StringBuilder): Unit = + private def buildSelection[A](selectionSet: SelectionSet[A], builder: StringBuilder): Unit = selectionSet match { case cons0 @ SelectionSet.Cons(_, _) => object Dummy { @@ -247,7 +254,7 @@ trait OracleModule extends Jdbc { self => case SelectionSet.Empty => () } - def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B], builder: StringBuilder): Unit = + private def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B], builder: StringBuilder): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => builder.append(value.toString()) // todo fix escaping @@ -268,7 +275,7 @@ trait OracleModule extends Jdbc { self => case _ => () // todo what do we do if we don't have a name? } } - def buildTable(table: Table, builder: StringBuilder): Unit = + private def buildTable(table: Table, builder: StringBuilder): Unit = table match { case Table.DialectSpecificTable(_) => ??? // The outer reference in this type test cannot be checked at run time?! @@ -292,16 +299,4 @@ trait OracleModule extends Jdbc { self => buildExpr(on, builder) val _ = builder.append(" ") } - - override def renderRead(read: self.Read[_]): String = { - val builder = new StringBuilder - buildReadString(read, builder) - builder.toString() - } - - override def renderDelete(delete: self.Delete[_]): String = ??? - - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? - - override def renderUpdate(update: self.Update[_]): String = ??? } diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala new file mode 100644 index 000000000..64d7b5ccb --- /dev/null +++ b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala @@ -0,0 +1,11 @@ +package zio.sql.oracle + +import zio.sql.Sql + +trait OracleSqlModule extends Sql { self => + + object OracleFunctionDef { + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + } + +} diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresJdbcModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresJdbcModule.scala new file mode 100644 index 000000000..5f81193eb --- /dev/null +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresJdbcModule.scala @@ -0,0 +1,5 @@ +package zio.sql.postgresql + +import zio.sql.Jdbc + +trait PostgresJdbcModule extends PostgresRenderModule with Jdbc diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala similarity index 59% rename from postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala rename to postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala index 5b90b15df..908c96fe0 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala @@ -1,355 +1,40 @@ package zio.sql.postgresql -import org.postgresql.util.PGInterval -import zio.Chunk -import zio.sql.{ Jdbc, Renderer } - -import java.sql.ResultSet -import java.text.DecimalFormat import java.time._ import java.time.format.DateTimeFormatter -import java.util.Calendar -import zio.schema._ -import zio.schema.StandardType.BigDecimalType -import zio.schema.StandardType.CharType -import zio.schema.StandardType.IntType -import zio.schema.StandardType.BinaryType -import zio.schema.StandardType.UnitType -import zio.schema.StandardType.DoubleType -import zio.schema.StandardType.BigIntegerType -import zio.schema.StandardType.UUIDType -import zio.schema.StandardType.ShortType -import zio.schema.StandardType.LongType -import zio.schema.StandardType.StringType -import zio.schema.StandardType.BoolType -import zio.schema.StandardType.DayOfWeekType -import zio.schema.StandardType.FloatType - -trait PostgresModule extends Jdbc { self => - import TypeTag._ - - override type TypeTagExtension[+A] = PostgresSpecific.PostgresTypeTag[A] - - override type TableExtension[A] = PostgresSpecific.PostgresSpecificTable[A] - - object PostgresSpecific { - sealed trait PostgresSpecificTable[A] extends Table.TableEx[A] - - object PostgresSpecificTable { - import scala.language.implicitConversions - - private[PostgresModule] sealed case class LateraLTable[A, B](left: Table.Aux[A], right: Table.Aux[B]) - extends PostgresSpecificTable[A with B] { self => - - override type ColumnHead = left.ColumnHead - - override type HeadIdentity0 = left.HeadIdentity0 - override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] - - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = - left.columnSet ++ right.columnSet - - override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = - if (left.columnSet.contains(column)) - left.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - else - right.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - } - } - - implicit def tableSourceToSelectedBuilder[A]( - table: Table.Aux[A] - ): LateralTableBuilder[A] = - new LateralTableBuilder(table) - - sealed case class LateralTableBuilder[A](left: Table.Aux[A]) { - self => - - final def lateral[Out]( - right: Table.DerivedTable[Out, Read[Out]] - ): Table.DialectSpecificTable[A with right.TableType] = { - - val tableExtension = LateraLTable[A, right.TableType]( - left, - right - ) - - new Table.DialectSpecificTable(tableExtension) - } - } - } - - trait PostgresTypeTag[+A] extends Tag[A] with Decodable[A] - object PostgresTypeTag { - implicit case object TVoid extends PostgresTypeTag[Unit] { - override def decode(column: Int, resultSet: ResultSet): Either[DecodingError, Unit] = - scala.util - .Try(resultSet.getObject(column)) - .fold( - _ => Left(DecodingError.UnexpectedNull(column)), - _ => Right(()) - ) - } - implicit case object TInterval extends PostgresTypeTag[Interval] { - override def decode( - column: Int, - resultSet: ResultSet - ): Either[DecodingError, Interval] = - scala.util - .Try(Interval.fromPgInterval(new PGInterval(resultSet.getString(column)))) - .fold( - _ => Left(DecodingError.UnexpectedNull(column)), - r => Right(r) - ) - } - implicit case object TTimestampz extends PostgresTypeTag[Timestampz] { - override def decode( - column: Int, - resultSet: ResultSet - ): Either[DecodingError, Timestampz] = - scala.util - .Try( - Timestampz.fromZonedDateTime( - ZonedDateTime - .ofInstant( - resultSet.getTimestamp(column).toInstant, - ZoneId.of(ZoneOffset.UTC.getId) - ) - ) - ) - .fold( - _ => Left(DecodingError.UnexpectedNull(column)), - r => Right(r) - ) - } - } - sealed case class Timestampz( - year: Int = 0, - month: Int = 0, - day: Int = 0, - hour: Int = 0, - minute: Int = 0, - second: BigDecimal = 0.0, - timeZone: String = "+00" - ) { - override def toString = - s"""$year, $month, $day, $hour, $minute, $second, '$timeZone'""" - } - - // Based upon https://github.com/tminglei/slick-pg/blob/master/src/main/scala/com/github/tminglei/slickpg/PgDateSupport.scala - sealed case class Interval( - years: Int = 0, - months: Int = 0, - days: Int = 0, - hours: Int = 0, - minutes: Int = 0, - seconds: BigDecimal = 0.0 - ) { self => - private val secondsFormat = { - val format = new DecimalFormat("0.00####") - val dfs = format.getDecimalFormatSymbols() - dfs.setDecimalSeparator('.') - format.setDecimalFormatSymbols(dfs) - format - } - def milliseconds: Int = (microseconds + (if (microseconds < 0) -500 else 500)) / 1000 - def microseconds: Int = (seconds * 1000000.0).asInstanceOf[Int] - - def +:(cal: Calendar): Calendar = { - cal.add(Calendar.MILLISECOND, milliseconds) - cal.add(Calendar.MINUTE, minutes) - cal.add(Calendar.HOUR, hours) - cal.add(Calendar.DAY_OF_MONTH, days) - cal.add(Calendar.MONTH, months) - cal.add(Calendar.YEAR, years) - cal - } - - def +:(date: java.util.Date): java.util.Date = { - val cal = Calendar.getInstance - cal.setTime(date) - date.setTime((cal +: self).getTime.getTime) - date - } - - def +(other: Interval): Interval = - new Interval( - years + other.years, - months + other.months, - days + other.days, - hours + other.hours, - minutes + other.minutes, - seconds + other.seconds - ) - - def *(factor: Int): Interval = - new Interval( - years * factor, - months * factor, - days * factor, - hours * factor, - minutes * factor, - seconds * factor - ) - - override def toString = { - val secs = secondsFormat.format(seconds) - s"""years => ${years}, months => ${months}, weeks => 0, days => ${days}, hours => ${hours}, mins => ${minutes}, secs => ${secs}""" - } - - def fromPgInterval(interval: PGInterval): Interval = - Interval( - interval.getYears, - interval.getMonths, - interval.getDays, - interval.getHours, - interval.getMinutes, - interval.getSeconds - ) - } - - object Interval { - def apply(interval: String): Interval = fromPgInterval(new PGInterval(interval)) - def fromPgInterval(interval: PGInterval): Interval = - new Interval( - interval.getYears, - interval.getMonths, - interval.getDays, - interval.getHours, - interval.getMinutes, - interval.getSeconds - ) - - def toPgInterval(interval: Interval): PGInterval = - new PGInterval( - interval.years, - interval.months, - interval.days, - interval.hours, - interval.minutes, - interval.seconds.toDouble - ) - } - - object Timestampz { - def fromZonedDateTime(zdt: ZonedDateTime): Timestampz = - Timestampz( - zdt.getYear, - zdt.getMonthValue, - zdt.getDayOfMonth, - zdt.getHour, - zdt.getMinute, - zdt.getSecond, - zdt.getZone.getId - ) - } - } +import zio.Chunk +import zio.schema._ +import zio.schema.StandardType._ +import zio.sql.driver.Renderer - implicit val localDateSchema = - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) - - implicit val zonedDateTimeShema = - Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME)) - - object PostgresFunctionDef { - import PostgresSpecific._ - - val SplitPart = FunctionDef[(String, String, Int), String](FunctionName("split_part")) - val IsFinite = FunctionDef[Instant, Boolean](FunctionName("isfinite")) - val TimeOfDay = FunctionDef[Any, String](FunctionName("timeofday")) - val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) - val CharLength = FunctionDef[String, Int](FunctionName("character_length")) - val Localtime = Expr.ParenlessFunctionCall0[LocalTime](FunctionName("localtime")) - val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) - val Localtimestamp = Expr.ParenlessFunctionCall0[Instant](FunctionName("localtimestamp")) - val LocaltimestampWithPrecision = FunctionDef[Int, Instant](FunctionName("localtimestamp")) - val Md5 = FunctionDef[String, String](FunctionName("md5")) - val ParseIdent = FunctionDef[String, String](FunctionName("parse_ident")) - val Chr = FunctionDef[Int, String](FunctionName("chr")) - val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) - val Initcap = FunctionDef[String, String](FunctionName("initcap")) - val Repeat = FunctionDef[(String, Int), String](FunctionName("repeat")) - val Reverse = FunctionDef[String, String](FunctionName("reverse")) - val TrimScale = FunctionDef[Double, Double](FunctionName("trim_scale")) - val Hex = FunctionDef[Int, String](FunctionName("to_hex")) - val Left = FunctionDef[(String, Int), String](FunctionName("left")) - val Length = FunctionDef[String, Int](FunctionName("length")) - val MinScale = FunctionDef[Double, Int](FunctionName("min_scale")) - val Radians = FunctionDef[Double, Double](FunctionName("radians")) - val Right = FunctionDef[(String, Int), String](FunctionName("right")) - val StartsWith = FunctionDef[(String, String), Boolean](FunctionName("starts_with")) - val Translate = FunctionDef[(String, String, String), String](FunctionName("translate")) - val Trunc = FunctionDef[Double, Double](FunctionName("trunc")) - val Sind = FunctionDef[Double, Double](FunctionName("sind")) - val GCD = FunctionDef[(Double, Double), Double](FunctionName("gcd")) - val LCM = FunctionDef[(Double, Double), Double](FunctionName("lcm")) - val CBRT = FunctionDef[Double, Double](FunctionName("cbrt")) - val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) - val Div = FunctionDef[(Double, Double), Double](FunctionName("div")) - val Factorial = FunctionDef[Int, Int](FunctionName("factorial")) - val Random = FunctionDef[Any, Double](FunctionName("random")) - val LPad = FunctionDef[(String, Int, String), String](FunctionName("lpad")) - val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) - val ToTimestamp = FunctionDef[Long, ZonedDateTime](FunctionName("to_timestamp")) - val PgClientEncoding = FunctionDef[Any, String](FunctionName("pg_client_encoding")) - val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) - val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) - val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) - val MakeDate = FunctionDef[(Int, Int, Int), LocalDate](FunctionName("make_date")) - val MakeInterval = FunctionDef[Interval, Interval](FunctionName("make_interval")) - val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("make_time")) - val MakeTimestamp = - FunctionDef[(Int, Int, Int, Int, Int, Double), LocalDateTime]( - FunctionName("make_timestamp") - ) - val MakeTimestampz = - FunctionDef[Timestampz, Timestampz](FunctionName("make_timestamptz")) - val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) - val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) - val Format0 = FunctionDef[String, String](FunctionName("format")) // TODO: varargs - val Format1 = FunctionDef[(String, Any), String](FunctionName("format")) - val Format2 = FunctionDef[(String, Any, Any), String](FunctionName("format")) - val Format3 = FunctionDef[(String, Any, Any, Any), String](FunctionName("format")) - val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) - val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) - val SetSeed = FunctionDef[Double, Unit](FunctionName("setseed")) - val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) - val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) - } +trait PostgresRenderModule extends PostgresSqlModule { self => override def renderRead(read: self.Read[_]): String = { implicit val render: Renderer = Renderer() - PostgresRenderModule.renderReadImpl(read) + PostgresRenderer.renderReadImpl(read) render.toString } - def renderUpdate(update: Update[_]): String = { + override def renderUpdate(update: Update[_]): String = { implicit val render: Renderer = Renderer() - PostgresRenderModule.renderUpdateImpl(update) + PostgresRenderer.renderUpdateImpl(update) render.toString } override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = { implicit val render: Renderer = Renderer() - PostgresRenderModule.renderInsertImpl(insert) + PostgresRenderer.renderInsertImpl(insert) render.toString } override def renderDelete(delete: Delete[_]): String = { implicit val render: Renderer = Renderer() - PostgresRenderModule.renderDeleteImpl(delete) + PostgresRenderer.renderDeleteImpl(delete) render.toString } - object PostgresRenderModule { - // todo split out to separate module + object PostgresRenderer { def renderInsertImpl[A](insert: Insert[_, A])(implicit render: Renderer, schema: Schema[A]) = { render("INSERT INTO ") diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala new file mode 100644 index 000000000..fd85d27b7 --- /dev/null +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala @@ -0,0 +1,313 @@ +package zio.sql.postgresql + +import java.sql.ResultSet +import java.text.DecimalFormat +import java.time._ +import java.time.format.DateTimeFormatter +import java.util.Calendar + +import org.postgresql.util.PGInterval +import zio.Chunk +import zio.sql.Sql +import zio.schema._ + +trait PostgresSqlModule extends Sql { self => + import TypeTag._ + + override type TypeTagExtension[+A] = PostgresSpecific.PostgresTypeTag[A] + + override type TableExtension[A] = PostgresSpecific.PostgresSpecificTable[A] + + object PostgresSpecific { + sealed trait PostgresSpecificTable[A] extends Table.TableEx[A] + + object PostgresSpecificTable { + import scala.language.implicitConversions + + sealed case class LateraLTable[A, B](left: Table.Aux[A], right: Table.Aux[B]) + extends PostgresSpecificTable[A with B] { self => + + override type ColumnHead = left.ColumnHead + + override type HeadIdentity0 = left.HeadIdentity0 + override type ColumnTail = + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = + left.columnSet ++ right.columnSet + + override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = + if (left.columnSet.contains(column)) + left.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + else + right.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + } + } + + implicit def tableSourceToSelectedBuilder[A]( + table: Table.Aux[A] + ): LateralTableBuilder[A] = + new LateralTableBuilder(table) + + sealed case class LateralTableBuilder[A](left: Table.Aux[A]) { + self => + + final def lateral[Out]( + right: Table.DerivedTable[Out, Read[Out]] + ): Table.DialectSpecificTable[A with right.TableType] = { + + val tableExtension = LateraLTable[A, right.TableType]( + left, + right + ) + + new Table.DialectSpecificTable(tableExtension) + } + } + } + + trait PostgresTypeTag[+A] extends Tag[A] with Decodable[A] + object PostgresTypeTag { + implicit case object TVoid extends PostgresTypeTag[Unit] { + override def decode(column: Int, resultSet: ResultSet): Either[DecodingError, Unit] = + scala.util + .Try(resultSet.getObject(column)) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + _ => Right(()) + ) + } + implicit case object TInterval extends PostgresTypeTag[Interval] { + override def decode( + column: Int, + resultSet: ResultSet + ): Either[DecodingError, Interval] = + scala.util + .Try(Interval.fromPgInterval(new PGInterval(resultSet.getString(column)))) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + r => Right(r) + ) + } + implicit case object TTimestampz extends PostgresTypeTag[Timestampz] { + override def decode( + column: Int, + resultSet: ResultSet + ): Either[DecodingError, Timestampz] = + scala.util + .Try( + Timestampz.fromZonedDateTime( + ZonedDateTime + .ofInstant( + resultSet.getTimestamp(column).toInstant, + ZoneId.of(ZoneOffset.UTC.getId) + ) + ) + ) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + r => Right(r) + ) + } + } + + sealed case class Timestampz( + year: Int = 0, + month: Int = 0, + day: Int = 0, + hour: Int = 0, + minute: Int = 0, + second: BigDecimal = 0.0, + timeZone: String = "+00" + ) { + override def toString = + s"""$year, $month, $day, $hour, $minute, $second, '$timeZone'""" + } + + // Based upon https://github.com/tminglei/slick-pg/blob/master/src/main/scala/com/github/tminglei/slickpg/PgDateSupport.scala + sealed case class Interval( + years: Int = 0, + months: Int = 0, + days: Int = 0, + hours: Int = 0, + minutes: Int = 0, + seconds: BigDecimal = 0.0 + ) { self => + private val secondsFormat = { + val format = new DecimalFormat("0.00####") + val dfs = format.getDecimalFormatSymbols() + dfs.setDecimalSeparator('.') + format.setDecimalFormatSymbols(dfs) + format + } + def milliseconds: Int = (microseconds + (if (microseconds < 0) -500 else 500)) / 1000 + def microseconds: Int = (seconds * 1000000.0).asInstanceOf[Int] + + def +:(cal: Calendar): Calendar = { + cal.add(Calendar.MILLISECOND, milliseconds) + cal.add(Calendar.MINUTE, minutes) + cal.add(Calendar.HOUR, hours) + cal.add(Calendar.DAY_OF_MONTH, days) + cal.add(Calendar.MONTH, months) + cal.add(Calendar.YEAR, years) + cal + } + + def +:(date: java.util.Date): java.util.Date = { + val cal = Calendar.getInstance + cal.setTime(date) + date.setTime((cal +: self).getTime.getTime) + date + } + + def +(other: Interval): Interval = + new Interval( + years + other.years, + months + other.months, + days + other.days, + hours + other.hours, + minutes + other.minutes, + seconds + other.seconds + ) + + def *(factor: Int): Interval = + new Interval( + years * factor, + months * factor, + days * factor, + hours * factor, + minutes * factor, + seconds * factor + ) + + override def toString = { + val secs = secondsFormat.format(seconds) + s"""years => ${years}, months => ${months}, weeks => 0, days => ${days}, hours => ${hours}, mins => ${minutes}, secs => ${secs}""" + } + + def fromPgInterval(interval: PGInterval): Interval = + Interval( + interval.getYears, + interval.getMonths, + interval.getDays, + interval.getHours, + interval.getMinutes, + interval.getSeconds + ) + } + + object Interval { + def apply(interval: String): Interval = fromPgInterval(new PGInterval(interval)) + def fromPgInterval(interval: PGInterval): Interval = + new Interval( + interval.getYears, + interval.getMonths, + interval.getDays, + interval.getHours, + interval.getMinutes, + interval.getSeconds + ) + + def toPgInterval(interval: Interval): PGInterval = + new PGInterval( + interval.years, + interval.months, + interval.days, + interval.hours, + interval.minutes, + interval.seconds.toDouble + ) + } + + object Timestampz { + def fromZonedDateTime(zdt: ZonedDateTime): Timestampz = + Timestampz( + zdt.getYear, + zdt.getMonthValue, + zdt.getDayOfMonth, + zdt.getHour, + zdt.getMinute, + zdt.getSecond, + zdt.getZone.getId + ) + } + } + + implicit val localDateSchema = + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) + + implicit val zonedDateTimeShema = + Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME)) + + object PostgresFunctionDef { + import PostgresSpecific._ + + val SplitPart = FunctionDef[(String, String, Int), String](FunctionName("split_part")) + val IsFinite = FunctionDef[Instant, Boolean](FunctionName("isfinite")) + val TimeOfDay = FunctionDef[Any, String](FunctionName("timeofday")) + val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) + val CharLength = FunctionDef[String, Int](FunctionName("character_length")) + val Localtime = Expr.ParenlessFunctionCall0[LocalTime](FunctionName("localtime")) + val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) + val Localtimestamp = Expr.ParenlessFunctionCall0[Instant](FunctionName("localtimestamp")) + val LocaltimestampWithPrecision = FunctionDef[Int, Instant](FunctionName("localtimestamp")) + val Md5 = FunctionDef[String, String](FunctionName("md5")) + val ParseIdent = FunctionDef[String, String](FunctionName("parse_ident")) + val Chr = FunctionDef[Int, String](FunctionName("chr")) + val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) + val Initcap = FunctionDef[String, String](FunctionName("initcap")) + val Repeat = FunctionDef[(String, Int), String](FunctionName("repeat")) + val Reverse = FunctionDef[String, String](FunctionName("reverse")) + val TrimScale = FunctionDef[Double, Double](FunctionName("trim_scale")) + val Hex = FunctionDef[Int, String](FunctionName("to_hex")) + val Left = FunctionDef[(String, Int), String](FunctionName("left")) + val Length = FunctionDef[String, Int](FunctionName("length")) + val MinScale = FunctionDef[Double, Int](FunctionName("min_scale")) + val Radians = FunctionDef[Double, Double](FunctionName("radians")) + val Right = FunctionDef[(String, Int), String](FunctionName("right")) + val StartsWith = FunctionDef[(String, String), Boolean](FunctionName("starts_with")) + val Translate = FunctionDef[(String, String, String), String](FunctionName("translate")) + val Trunc = FunctionDef[Double, Double](FunctionName("trunc")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val GCD = FunctionDef[(Double, Double), Double](FunctionName("gcd")) + val LCM = FunctionDef[(Double, Double), Double](FunctionName("lcm")) + val CBRT = FunctionDef[Double, Double](FunctionName("cbrt")) + val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) + val Div = FunctionDef[(Double, Double), Double](FunctionName("div")) + val Factorial = FunctionDef[Int, Int](FunctionName("factorial")) + val Random = FunctionDef[Any, Double](FunctionName("random")) + val LPad = FunctionDef[(String, Int, String), String](FunctionName("lpad")) + val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) + val ToTimestamp = FunctionDef[Long, ZonedDateTime](FunctionName("to_timestamp")) + val PgClientEncoding = FunctionDef[Any, String](FunctionName("pg_client_encoding")) + val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) + val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) + val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) + val MakeDate = FunctionDef[(Int, Int, Int), LocalDate](FunctionName("make_date")) + val MakeInterval = FunctionDef[Interval, Interval](FunctionName("make_interval")) + val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("make_time")) + val MakeTimestamp = + FunctionDef[(Int, Int, Int, Int, Int, Double), LocalDateTime]( + FunctionName("make_timestamp") + ) + val MakeTimestampz = + FunctionDef[Timestampz, Timestampz](FunctionName("make_timestamptz")) + val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) + val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) + val Format0 = FunctionDef[String, String](FunctionName("format")) // TODO: varargs + val Format1 = FunctionDef[(String, Any), String](FunctionName("format")) + val Format2 = FunctionDef[(String, Any, Any), String](FunctionName("format")) + val Format3 = FunctionDef[(String, Any, Any, Any), String](FunctionName("format")) + val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) + val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) + val SetSeed = FunctionDef[Double, Unit](FunctionName("setseed")) + val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) + } + +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 17ad0616e..4ca331e24 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -5,7 +5,7 @@ import zio.test._ import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } -trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { +trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresJdbcModule { def autoCommit: Boolean = true diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerJdbcModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerJdbcModule.scala new file mode 100644 index 000000000..d9108dfc7 --- /dev/null +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerJdbcModule.scala @@ -0,0 +1,5 @@ +package zio.sql.sqlserver + +import zio.sql.Jdbc + +trait SqlServerJdbcModule extends SqlServerRenderModule with Jdbc diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala similarity index 80% rename from sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala rename to sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index bf241a524..30cccdd67 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -1,120 +1,35 @@ package zio.sql.sqlserver -import zio.sql.{ Jdbc, Renderer } import zio.schema.Schema +import zio.sql.driver.Renderer -trait SqlServerModule extends Jdbc { self => - - override type TableExtension[A] = SqlServerSpecific.SqlServerTable[A] - - object SqlServerSpecific { - - sealed trait SqlServerTable[A] extends Table.TableEx[A] - - object SqlServerTable { - - import scala.language.implicitConversions - - sealed trait CrossType - object CrossType { - case object CrossApply extends CrossType - case object OuterApply extends CrossType - } - - private[SqlServerModule] sealed case class CrossOuterApplyTable[A, B]( - crossType: CrossType, - left: Table.Aux[A], - right: Table.Aux[B] - ) extends SqlServerTable[A with B] { self => - - override type ColumnHead = left.ColumnHead - - override type HeadIdentity0 = left.HeadIdentity0 - override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] - - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = - left.columnSet ++ right.columnSet - - override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = - if (left.columnSet.contains(column)) - left.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - else - right.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - } - } - - implicit def tableSourceToSelectedBuilder[A]( - table: Table.Aux[A] - ): CrossOuterApplyTableBuilder[A] = - new CrossOuterApplyTableBuilder(table) - - sealed case class CrossOuterApplyTableBuilder[A](left: Table.Aux[A]) { - self => - - final def crossApply[Out]( - right: Table.DerivedTable[Out, Read[Out]] - ): Table.DialectSpecificTable[A with right.TableType] = { - - val tableExtension = CrossOuterApplyTable[A, right.TableType]( - CrossType.CrossApply, - left, - right - ) - - new Table.DialectSpecificTable(tableExtension) - } - - final def outerApply[Out]( - right: Table.DerivedTable[Out, Read[Out]] - ): Table.DialectSpecificTable[A with right.TableType] = { - - val tableExtension = CrossOuterApplyTable[A, right.TableType]( - CrossType.OuterApply, - left, - right - ) - - new Table.DialectSpecificTable(tableExtension) - } - } - } - - object SqlServerFunctionDef { - val Avg = AggregationDef[BigDecimal, Int](FunctionName("avg")) - } - } +trait SqlServerRenderModule extends SqlServerSqlModule { self => override def renderRead(read: self.Read[_]): String = { implicit val render: Renderer = Renderer() - SqlServerRenderModule.renderReadImpl(read) + SqlServerRenderer.renderReadImpl(read) render.toString } override def renderUpdate(update: Update[_]): String = { implicit val render: Renderer = Renderer() - SqlServerRenderModule.renderUpdateImpl(update) + SqlServerRenderer.renderUpdateImpl(update) render.toString } override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = { implicit val render: Renderer = Renderer() - SqlServerRenderModule.renderInsertImpl(insert) + SqlServerRenderer.renderInsertImpl(insert) render.toString } override def renderDelete(delete: Delete[_]): String = { implicit val render: Renderer = Renderer() - SqlServerRenderModule.renderDeleteImpl(delete) + SqlServerRenderer.renderDeleteImpl(delete) render.toString } - object SqlServerRenderModule { + object SqlServerRenderer { private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala new file mode 100644 index 000000000..6f013be41 --- /dev/null +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala @@ -0,0 +1,92 @@ +package zio.sql.sqlserver + +import zio.sql.Sql + +trait SqlServerSqlModule extends Sql { self => + + override type TableExtension[A] = SqlServerSpecific.SqlServerTable[A] + + object SqlServerSpecific { + + sealed trait SqlServerTable[A] extends Table.TableEx[A] + + object SqlServerTable { + + import scala.language.implicitConversions + + sealed trait CrossType + object CrossType { + case object CrossApply extends CrossType + case object OuterApply extends CrossType + } + + case class CrossOuterApplyTable[A, B]( + crossType: CrossType, + left: Table.Aux[A], + right: Table.Aux[B] + ) extends SqlServerTable[A with B] { self => + + override type ColumnHead = left.ColumnHead + + override type HeadIdentity0 = left.HeadIdentity0 + override type ColumnTail = + left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] + + override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = + left.columnSet ++ right.columnSet + + override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { + def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = + if (left.columnSet.contains(column)) + left.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + else + right.columnToExpr + .toExpr(column) + .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] + } + } + + implicit def tableSourceToSelectedBuilder[A]( + table: Table.Aux[A] + ): CrossOuterApplyTableBuilder[A] = + new CrossOuterApplyTableBuilder(table) + + sealed case class CrossOuterApplyTableBuilder[A](left: Table.Aux[A]) { + self => + + final def crossApply[Out]( + right: Table.DerivedTable[Out, Read[Out]] + ): Table.DialectSpecificTable[A with right.TableType] = { + + val tableExtension = CrossOuterApplyTable[A, right.TableType]( + CrossType.CrossApply, + left, + right + ) + + new Table.DialectSpecificTable(tableExtension) + } + + final def outerApply[Out]( + right: Table.DerivedTable[Out, Read[Out]] + ): Table.DialectSpecificTable[A with right.TableType] = { + + val tableExtension = CrossOuterApplyTable[A, right.TableType]( + CrossType.OuterApply, + left, + right + ) + + new Table.DialectSpecificTable(tableExtension) + } + } + } + + object SqlServerFunctionDef { + val Avg = AggregationDef[BigDecimal, Int](FunctionName("avg")) + } + } + +} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index 0a08a3619..afb7898c7 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -5,7 +5,7 @@ import zio.test._ import java.util.Properties import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } -trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { +trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerJdbcModule { def autoCommit: Boolean = true From e2b27094ed870fc57e85ee02c725c197a83cace6 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Thu, 28 Apr 2022 21:44:29 +0200 Subject: [PATCH 428/673] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c91dd6841..e7cbabf1a 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,12 @@ Connection pool | :white_check_mark: Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------| :-------------| :------------- -Render Read | :white_check_mark: | :white_check_mark: | | :white_check_mark: | +Render Read | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Render Delete | :white_check_mark: | :white_check_mark: | | :white_check_mark: | Render Update | :white_check_mark: | | | :white_check_mark: | -Render Insert | :white_check_mark: | | | -Functions | :white_check_mark: | | | :white_check_mark: | -Types | | | | +Render Insert | :white_check_mark: | :white_check_mark: | | +Functions | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +Types | :white_check_mark: | | | :white_check_mark: | Operators | | | | ## What is ZIO SQL? From 9a8e31d3b0b0bd399fa11184617e2e20558e6b53 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Thu, 28 Apr 2022 21:46:46 +0200 Subject: [PATCH 429/673] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7cbabf1a..d65c777ab 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------| :-------------| :------------- Render Read | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Render Delete | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -Render Update | :white_check_mark: | | | :white_check_mark: | +Render Update | :white_check_mark: | :white_check_mark: | | :white_check_mark: | Render Insert | :white_check_mark: | :white_check_mark: | | Functions | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Types | :white_check_mark: | | | :white_check_mark: | From 8071f551d6d3250e6d25ce4241d61aeb2d2ff008 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Thu, 28 Apr 2022 21:53:37 +0200 Subject: [PATCH 430/673] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d65c777ab..432f9cf12 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ Connection pool | :white_check_mark: Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------| :-------------| :------------- -Render Read | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -Render Delete | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -Render Update | :white_check_mark: | :white_check_mark: | | :white_check_mark: | -Render Insert | :white_check_mark: | :white_check_mark: | | -Functions | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +Render Delete | :heavy_check_mark: | :heavy_check_mark: | | :white_check_mark: | +Render Update | :heavy_check_mark: | :heavy_check_mark: | | :white_check_mark: | +Render Insert | :heavy_check_mark: | :heavy_check_mark: | | +Functions | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Types | :white_check_mark: | | | :white_check_mark: | Operators | | | | From 10cbb876ecd3e954db1dade3fafa8af45e5f2d7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Apr 2022 17:02:32 +0000 Subject: [PATCH 431/673] Bump async from 2.6.3 to 2.6.4 in /website Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/package-lock.json | 12 ++++++------ website/yarn.lock | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index ddde265e8..87e7643ef 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -2181,9 +2181,9 @@ } }, "node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "dependencies": { "lodash": "^4.17.14" @@ -14414,9 +14414,9 @@ "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" diff --git a/website/yarn.lock b/website/yarn.lock index 5ea3470d3..3f3c36649 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1241,9 +1241,9 @@ assign-symbols@^1.0.0: integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= async@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" From 1a5d0f70eff246682e132ab2ff317ba9c290ee52 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 30 Apr 2022 12:51:31 +0200 Subject: [PATCH 432/673] Update scalafmt-core to 3.5.2 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 8fe600982..03b12bc62 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.5.1" +version = "3.5.2" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From 0f2b4558e3209c20427ab7f1157ae9230e1df53a Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Tue, 3 May 2022 17:03:01 +0200 Subject: [PATCH 433/673] Update zio to 2.0.0-RC6 --- build.sbt | 2 +- .../main/scala/zio/sql/ConnectionPool.scala | 2 +- .../scala/zio/sql/SqlDriverLiveModule.scala | 2 +- .../scala/zio/sql/TransactionModule.scala | 26 ++++++++-------- jdbc/src/main/scala/zio/sql/jdbc.scala | 2 +- .../scala/zio/sql/ConnectionPoolSpec.scala | 4 +-- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 3 +- .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 2 +- .../zio/sql/mysql/MysqlRunnableSpec.scala | 4 +-- .../scala/zio/sql/mysql/TransactionSpec.scala | 8 ++--- .../zio/sql/postgresql/FunctionDefSpec.scala | 30 +++++++++---------- .../sql/postgresql/PostgresModuleSpec.scala | 22 +++++++------- .../sql/postgresql/PostgresRunnableSpec.scala | 4 +-- .../zio/sql/postgresql/TransactionSpec.scala | 8 ++--- .../sql/sqlserver/SqlServerModuleSpec.scala | 6 ++-- .../sql/sqlserver/SqlServerRunnableSpec.scala | 4 +-- 16 files changed, 64 insertions(+), 65 deletions(-) diff --git a/build.sbt b/build.sbt index 11c129ec3..da1251f09 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-RC5" +val zioVersion = "2.0.0-RC6" val zioSchemaVersion = "0.1.9" val testcontainersVersion = "1.17.1" val testcontainersScalaVersion = "0.40.6" diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index 1dfd56c41..e26d82cd3 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -139,7 +139,7 @@ final case class ConnectionPoolLive( }.commit.flatMap { interrupted => ZIO.when(interrupted)(release(connection)) } - case None => UIO.unit + case None => ZIO.unit } } diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 1f36acb83..1b47c5af7 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -49,7 +49,7 @@ trait SqlDriverLiveModule { self: Jdbc => .flatMap(readOn(read, _)) override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = - Stream.unwrap { + ZStream.unwrap { ZIO.attemptBlocking { val schema = getColumns(read).zipWithIndex.map { case (value, index) => (value, index + 1) diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 3aa3fdbeb..e4c0876d7 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -9,11 +9,11 @@ import zio.schema.Schema trait TransactionModule { self: Jdbc => private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) - sealed case class ZTransaction[-R: ZTag: IsNotIntersection, +E, +A](unwrap: ZIO[(R, Txn), E, A]) { self => + sealed case class ZTransaction[-R: ZTag, +E, +A](unwrap: ZIO[(R, Txn), E, A]) { self => def map[B](f: A => B): ZTransaction[R, E, B] = ZTransaction(self.unwrap.map(f)) - def flatMap[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B]( + def flatMap[R1 <: R: ZTag, E1 >: E, B]( f: A => ZTransaction[R1, E1, B] ): ZTransaction[R1, E1, B] = ZTransaction(self.unwrap.flatMap(a => f(a).unwrap)) @@ -25,7 +25,7 @@ trait TransactionModule { self: Jdbc => r <- ZIO.environment[R] a <- self.unwrap .mapError(ev) - .provideService((r.get, txn)) + .provideLayer(ZLayer.succeed((r.get, txn))) .absorb .tapBoth( _ => @@ -39,10 +39,10 @@ trait TransactionModule { self: Jdbc => ) } yield a - def zip[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = + def zip[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = zipWith[R1, E1, B, (A, B)](tx)((_, _)) - def zipWith[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B, C]( + def zipWith[R1 <: R: ZTag, E1 >: E, B, C]( tx: ZTransaction[R1, E1, B] )(f: (A, B) => C): ZTransaction[R1, E1, C] = for { @@ -50,21 +50,21 @@ trait TransactionModule { self: Jdbc => b <- tx } yield f(a, b) - def *>[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def *>[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self.flatMap(_ => tx) // named alias for *> - def zipRight[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def zipRight[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self *> tx - def <*[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + def <*[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self.flatMap(a => tx.map(_ => a)) // named alias for <* - def zipLeft[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + def zipLeft[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self <* tx - def catchAllCause[R1 <: R: ZTag: IsNotIntersection, E1 >: E, A1 >: A]( + def catchAllCause[R1 <: R: ZTag, E1 >: E, A1 >: A]( f: Cause[E1] => ZTransaction[R1, E1, A1] ): ZTransaction[R1, E1, A1] = ZTransaction(self.unwrap.catchAllCause(cause => f(cause).unwrap)) @@ -79,7 +79,7 @@ trait TransactionModule { self: Jdbc => val stream = coreDriver.readOn[A](read, connection) - ZTransaction.fromEffect(stream.runCollect.map(Stream.fromIterable(_))) + ZTransaction.fromEffect(stream.runCollect.map(ZStream.fromIterable(_))) } def apply(update: self.Update[_]): ZTransaction[Any, Exception, Int] = @@ -103,10 +103,10 @@ trait TransactionModule { self: Jdbc => def halt[E](e: => Cause[E]): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.failCause(e)) - def fromEffect[R: ZTag: IsNotIntersection, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = + def fromEffect[R: ZTag, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = ZTransaction(for { tuple <- ZIO.service[(R, Txn)] - a <- zio.provideService((tuple._1)) + a <- zio.provideLayer(ZLayer.succeed((tuple._1))) } yield a) private val txn: ZTransaction[Any, Nothing, Txn] = diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index c3b9b6cc9..e1a314506 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -21,7 +21,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi ZLayer(ZIO.serviceWith[ConnectionPool](new SqlDriverLive(_))) } - def execute[R <: SqlDriver: ZTag: IsNotIntersection, A]( + def execute[R <: SqlDriver: ZTag, A]( tx: ZTransaction[R, Exception, A] ): ZIO[R, Throwable, A] = ZIO.serviceWithZIO(_.transact(tx)) diff --git a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala index ac2944311..7a6b4ee98 100644 --- a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala +++ b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala @@ -30,10 +30,10 @@ object ConnectionPoolSpec extends ZIOSpecDefault { ) } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomShared((poolConfigLayer >>> ConnectionPool.live).orDie) - def specLayered: Spec[TestEnvironment with ConnectionPool, TestFailure[Object], TestSuccess] = + def specLayered: Spec[TestEnvironment with ConnectionPool, Object] = suite("Postgres module")( test("Fibers waiting for connections can be interrupted") { // We need to actually sleep here to make sure that the started fibers diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index a40e4b8d4..59116b1c4 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -3,7 +3,6 @@ package zio.sql import zio.test.TestEnvironment import zio.ZLayer import zio.test.ZIOSpecDefault -import zio.test.TestFailure trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { @@ -11,7 +10,7 @@ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] - final lazy val jdbcLayer: ZLayer[Any, TestFailure[Any], SqlDriver] = + final lazy val jdbcLayer: ZLayer[Any, Any, SqlDriver] = ZLayer.make[SqlDriver]( poolConfigLayer.orDie, ConnectionPool.live.orDie, diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index a8b609c11..767d575f0 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -165,7 +165,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { val query = update(customers).set(fName, "Roland").where(fName === "Ronald") println(renderUpdate(query)) - assertM(execute(query))(equalTo(1)) + assertZIO(execute(query))(equalTo(1)) } ) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 2580cd301..3878172b5 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -21,9 +21,9 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlJdbcModule { .map(a => ConnectionPoolConfig(a.jdbcUrl, connProperties(a.username, a.password))) } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomLayerShared(jdbcLayer) - def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, Object] } diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index fd1b6d898..77ca17f6c 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -11,7 +11,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ - override def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] = suite("MySQL module")( + override def specLayered = suite("MySQL module")( test("Transaction is returning the last value") { val query = select(customerId) from customers @@ -34,7 +34,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) ).mapError(_.getMessage) - assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Transaction failed and didn't deleted rows") { val query = select(customerId) from customers @@ -48,7 +48,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount } yield (allCustomersCount, remainingCustomersCount)) - assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Transaction succeeded and deleted rows") { val query = select(customerId) from customers @@ -62,7 +62,7 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount } yield (allCustomersCount, remainingCustomersCount)) - assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential } diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index b74c48440..8ebcf8e5c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1237,9 +1237,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("xyxhi")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + t1 <- assertZIO(runTest("hi", "xy"))(equalTo("xyxhi")) + t2 <- assertZIO(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertZIO(runTest("hello world", "xy"))(equalTo("hello")) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("rpad") { @@ -1252,9 +1252,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("hixyx")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + t1 <- assertZIO(runTest("hi", "xy"))(equalTo("hixyx")) + t2 <- assertZIO(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertZIO(runTest("hello world", "xy"))(equalTo("hello")) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("pg_client_encoding") { @@ -1293,9 +1293,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } (for { - t1 <- assertM(runTest(Interval()))(equalTo(Interval())) - t2 <- assertM(runTest(Interval(days = 10)))(equalTo(Interval(days = 10))) - t3 <- assertM( + t1 <- assertZIO(runTest(Interval()))(equalTo(Interval())) + t2 <- assertZIO(runTest(Interval(days = 10)))(equalTo(Interval(days = 10))) + t3 <- assertZIO( runTest(Interval(years = 10, months = 2, days = 5, hours = 6, minutes = 20, seconds = 15)) )( equalTo(Interval(years = 10, months = 2, days = 5, hours = 6, minutes = 20, seconds = 15)) @@ -1335,15 +1335,15 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val expectedRoundTripTimestamp = Timestampz.fromZonedDateTime(ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId))) (for { - t1 <- assertM(runTest(Timestampz(2013, 7, 15, 8, 15, 23.5)))( + t1 <- assertZIO(runTest(Timestampz(2013, 7, 15, 8, 15, 23.5)))( equalTo(Timestampz.fromZonedDateTime(ZonedDateTime.parse("2013-07-15T08:15:23.5+00:00"))) ) - t2 <- assertM(runTest(Timestampz(2020, 11, 21, 19, 10, 25, "+00:00")))( + t2 <- assertZIO(runTest(Timestampz(2020, 11, 21, 19, 10, 25, "+00:00")))( equalTo(expectedRoundTripTimestamp) ) - t3 <- assertM(runTest(Timestampz(2020, 11, 21, 15, 10, 25, "-04:00")))(equalTo(expectedRoundTripTimestamp)) - t4 <- assertM(runTest(Timestampz(2020, 11, 22, 2, 10, 25, "+07:00")))(equalTo(expectedRoundTripTimestamp)) - t5 <- assertM(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) + t3 <- assertZIO(runTest(Timestampz(2020, 11, 21, 15, 10, 25, "-04:00")))(equalTo(expectedRoundTripTimestamp)) + t4 <- assertZIO(runTest(Timestampz(2020, 11, 22, 2, 10, 25, "+07:00")))(equalTo(expectedRoundTripTimestamp)) + t5 <- assertZIO(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) } yield t1 && t2 && t3 && t4 && t5).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("cannot compile a select without from clause if a table source is required") { @@ -1357,7 +1357,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val dummyUsage = zio.ZIO.succeed((Left(()), Right(()))) val result = typeCheck("execute((select(CharLength(Customers.fName))).to[Int, Int](identity))") - assertM(dummyUsage *> result)(isLeft) + assertZIO(dummyUsage *> result)(isLeft) } ) @@ timeout(5.minutes) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index cfcca1188..2e6e46842 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -376,7 +376,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val actual = execute(query).map(_.toString()).runCollect.map(_.toList) - assertM(actual)(equalTo(expected)) + assertZIO(actual)(equalTo(expected)) }, test("group by have to be called on column from selection") { @@ -398,7 +398,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val actual = execute(query).map(arg => arg._2.toInt).runCollect.map(_.toList) - assertM(actual)(equalTo(expected)) + assertZIO(actual)(equalTo(expected)) }, test("insert - 1 rows into customers") { @@ -462,7 +462,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { createdTimestamp ).values(data) - assertM(execute(query))(equalTo(1)) + assertZIO(execute(query))(equalTo(1)) }, test("insert - insert 10 rows into orders") { @@ -508,7 +508,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val query = insertInto(orders)(orderId, fkCustomerId, orderDate) .values(data) - assertM(execute(query))(equalTo(10)) + assertZIO(execute(query))(equalTo(10)) }, test("insert - 4 rows into orderDetails") { @@ -553,7 +553,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val query = insertInto(orderDetails)(orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) .values(rows) - assertM(execute(query))(equalTo(4)) + assertZIO(execute(query))(equalTo(4)) }, test("insert into orderDetails with tuples") { @@ -569,7 +569,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val query = insertInto(orderDetails)(orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) .values((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00))) - assertM(execute(query))(equalTo(1)) + assertZIO(execute(query))(equalTo(1)) }, test("insert into customers with tuples") { @@ -595,7 +595,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { createdTimestamp ).values(row) - assertM(execute(query))(equalTo(1)) + assertZIO(execute(query))(equalTo(1)) }, test("insert into products") { import Products._ @@ -609,7 +609,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val query = insertInto(products)(productId, productName, description, imageURL).values(tupleData) - assertM(execute(query))(equalTo(4)) + assertZIO(execute(query))(equalTo(4)) }, test("insert and query nullable field") { import Persons._ @@ -664,7 +664,7 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { ("Charles", "Harvey", None) ) - assertM(result)(equalTo(expected)) + assertZIO(result)(equalTo(expected)) }, test("in joined tables, columns of the same name from different table are treated as different columns") { import Cities._ @@ -700,12 +700,12 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { ("Metro Warszawskie", "Warszawa", 2L) ) - assertM(result)(equalTo(expected)) + assertZIO(result)(equalTo(expected)) }, test("update rows") { val query = update(customers).set(fName, "Jaroslav").where(fName === "Jaro") - assertM(execute(query))(equalTo(2)) + assertZIO(execute(query))(equalTo(2)) } ) @@ sequential } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 4ca331e24..f4a26efae 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -28,9 +28,9 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresJdbcModule { ) } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomShared(jdbcLayer) - def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, Object] } diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index 2aa9c3322..afdc90583 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -19,7 +19,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { ZTransaction(query) *> ZTransaction(query) ) - val assertion = assertM(result.flatMap(_.runCount))(equalTo(5L)).orDie + val assertion = assertZIO(result.flatMap(_.runCount))(equalTo(5L)).orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -30,7 +30,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) ).mapError(_.getMessage) - assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Transaction failed and didn't deleted rows") { val query = select(customerId) from customers @@ -44,7 +44,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { remainingCustomersCount <- execute(query).runCount } yield (allCustomersCount, remainingCustomersCount)) - assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Transaction succeeded and deleted rows") { val query = select(customerId) from customers @@ -58,7 +58,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { remainingCustomersCount <- execute(query).runCount } yield (allCustomersCount, remainingCustomersCount)) - assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ sequential } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index caf233bb1..8f357568e 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -458,7 +458,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute(query).runHead.some - assertM(result)(equalTo(4L)) + assertZIO(result)(equalTo(4L)) }, test("handle isNotTrue to 0 bit type") { import AggregationDef._ @@ -470,7 +470,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute(query).runHead.some - assertM(result)(equalTo(1L)) + assertZIO(result)(equalTo(1L)) }, test("Can select from joined tables (inner join)") { val query = select(fName, lName, orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) @@ -520,7 +520,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute(query) - assertM(result)(equalTo(1)) + assertZIO(result)(equalTo(1)) } ) @@ sequential diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index afb7898c7..d415d6487 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -27,8 +27,8 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerJdbcModule { ) } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomLayerShared(jdbcLayer) - def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, Object] } From c797eaa223f0e1e1fee3c7b7b1a87c4f3619a34f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 4 May 2022 20:51:45 +0200 Subject: [PATCH 434/673] Update postgresql to 42.3.5 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 11c129ec3..2cf6fe045 100644 --- a/build.sbt +++ b/build.sbt @@ -141,7 +141,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.3.4" % Test, + "org.postgresql" % "postgresql" % "42.3.5" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -203,7 +203,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.3.4" % Compile, + "org.postgresql" % "postgresql" % "42.3.5" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From bf3b198386fc9978616b998376387dd86bef2889 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Mon, 23 May 2022 21:48:13 +0200 Subject: [PATCH 435/673] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 432f9cf12..1e22d8be3 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------| :-------------| :------------- Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Render Delete | :heavy_check_mark: | :heavy_check_mark: | | :white_check_mark: | -Render Update | :heavy_check_mark: | :heavy_check_mark: | | :white_check_mark: | -Render Insert | :heavy_check_mark: | :heavy_check_mark: | | +Render Update | :heavy_check_mark: | | | :white_check_mark: | +Render Insert | :heavy_check_mark: | | | Functions | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Types | :white_check_mark: | | | :white_check_mark: | Operators | | | | From b42f3320173a4c4a5375e558aee339655d243d33 Mon Sep 17 00:00:00 2001 From: Sheng-Loong Su Date: Thu, 26 May 2022 19:27:33 +0800 Subject: [PATCH 436/673] Clean up examples --- build.sbt | 2 +- examples/src/main/scala/Example1.scala | 57 ------------------- .../src/main/scala/zio/sql/Examples.scala | 51 ++++++++++------- .../main/scala/zio/sql/GroupByExamples.scala | 4 +- .../main/scala/{ => zio/sql}/ShopSchema.scala | 5 +- 5 files changed, 37 insertions(+), 82 deletions(-) delete mode 100644 examples/src/main/scala/Example1.scala rename examples/src/main/scala/{ => zio/sql}/ShopSchema.scala (85%) diff --git a/build.sbt b/build.sbt index a401e3348..f9232aa81 100644 --- a/build.sbt +++ b/build.sbt @@ -114,7 +114,7 @@ lazy val examples = project publish / skip := true, moduleName := "examples" ) - .dependsOn(sqlserver) + .dependsOn(postgres) lazy val driver = project .in(file("driver")) diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala deleted file mode 100644 index 3ca70d4b6..000000000 --- a/examples/src/main/scala/Example1.scala +++ /dev/null @@ -1,57 +0,0 @@ -import zio.sql.Sql -import zio.schema.Schema - -object Example1 extends Sql { - import ColumnSet._ - - def renderRead(read: this.Read[_]): String = ??? - - def renderDelete(delete: this.Delete[_]): String = ??? - - override def renderInsert[A: Schema](insert: Insert[_, A]): String = ??? - - def renderUpdate(update: Example1.Update[_]): String = ??? - - val columnSet = int("age") ++ string("name") - - val table = columnSet.table("person") - - val table2 = columnSet.table("person2") - - val (age, name) = table.columns - - val (age2, name2) = table2.columns - - import FunctionDef._ - import AggregationDef._ - - val queried = - select(((age + 2) as "age"), (name as "name"), (Abs(3.0) as "dummy")) - .from(table) - .limit(200) - .offset(1000) - .orderBy(age.descending) - - val tt = ((age + 2) as "age") - - val joined = - select((age as "age"), (age2 as "age2")) - .from(table.join(table2).on(name === name2)) - - val aggregated = - select((age as "age"), (Count(1) as "count")) - .from(table) - .groupBy(age) - - val deleted = deleteFrom(table).where(age === 3) - - val updated = - update(table) - .set(age, age + 2) - .set(name, "foo") - .where(age > 100) - - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val (orderId, fkCustomerId, orderDate) = orders.columns -} diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index c8b40d549..ebe854be0 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -1,25 +1,29 @@ package zio.sql -import zio.sql.sqlserver.SqlServerJdbcModule +import zio.sql.postgresql.PostgresJdbcModule -object Examples extends App with ShopSchema with SqlServerJdbcModule { +object Examples extends App with ShopSchema with PostgresJdbcModule { import this.AggregationDef._ import this.FunctionDef._ import this.OrderDetails._ import this.Orders._ import this.Users._ - // select first_name, last_name from users + // SELECT "users"."first_name", "users"."last_name" FROM "users" val basicSelect = select(fName, lName).from(users) println(renderRead(basicSelect)) - // select first_name as first, last_name as last from users - val basicSelectWithAliases = - select((fName as "first"), (lName as "last")).from(users) - println(renderRead(basicSelectWithAliases)) + // SELECT "users"."age" + 2, concat_ws("users"."first_name",' ',"users"."last_name"), abs(-42.0) FROM "users" ORDER BY "users"."age" DESC LIMIT 10 OFFSET 20 + val selectWithFunctions = + select(age + 2, ConcatWs3(fName, " ", lName), Abs(-42.0)) + .from(users) + .limit(10) + .offset(20) + .orderBy(age.descending) + println(renderRead(selectWithFunctions)) - // select top 2 first_name, last_name from users order by last_name, first_name desc + // SELECT "users"."first_name", "users"."last_name" FROM "users" ORDER BY "users"."last_name", "users"."first_name" DESC LIMIT 2 val selectWithRefinements = select(fName, lName) .from(users) @@ -32,7 +36,7 @@ object Examples extends App with ShopSchema with SqlServerJdbcModule { // execute(selectWithRefinements).to(Person) // execute(selectWithRefinements).to((_, _)) - // delete from users where first_name = 'Terrence' + // DELETE FROM "users" WHERE "users"."first_name" = 'Terrence' val basicDelete = deleteFrom(users).where(fName === "Terrence") println(renderDelete(basicDelete)) @@ -42,23 +46,32 @@ object Examples extends App with ShopSchema with SqlServerJdbcModule { select(userId as "id") from users where (fName === "Fred") //todo fix issue #36 }) */ - // select first_name, last_name, order_date from users left join orders on users.usr_id = orders.usr_id + // SELECT "users"."first_name", "users"."last_name", "orders"."order_date" FROM "users" LEFT JOIN "orders" ON "orders"."usr_id" = "users"."id" val basicJoin = select(fName, lName, orderDate).from(users.leftOuter(orders).on(fkUserId === userId)) println(renderRead(basicJoin)) - /* - select users.usr_id, first_name, last_name, sum(quantity * unit_price) as "total_spend" - from users - left join orders on users.usr_id = orders.usr_id - left join order_details on orders.order_id = order_details.order_id - group by users.usr_id, first_name, last_name */ + // UPDATE "users" SET "first_name" = 'foo', "last_name" = 'bar', "age" = "users"."age" + 1 WHERE true and "users"."age" > 100 + val basicUpdate = + update(users) + .set(fName, "foo") + .set(lName, "bar") + .set(age, age + 1) + .where(age > 100) + println(renderUpdate(basicUpdate)) + + /* + SELECT "users"."id", "users"."first_name", "users"."last_name", sum("order_details"."quantity" * "order_details"."unit_price"), sum(abs("order_details"."quantity")) + FROM "users" + INNER JOIN "orders" ON "users"."id" = "orders"."usr_id" + LEFT JOIN "order_details" ON "orders"."id" = "order_details"."order_id" + GROUP BY "users"."id", "users"."first_name", "users"."last_name" */ val orderValues = select( userId, fName, lName, - (Sum(quantity * unitPrice) as "total_spend"), + Sum(quantity * unitPrice), Sum(Abs(quantity)) ) .from( @@ -73,9 +86,7 @@ object Examples extends App with ShopSchema with SqlServerJdbcModule { import scala.language.postfixOps - /* - * select users.first_name, users.last_name from users where true and users.first_name is not null - */ + // SELECT "users"."first_name", "users"."last_name" FROM "users" WHERE true and "users"."first_name" is not null val withPropertyOp = select(fName, lName).from(users).where(fName isNotNull) println(renderRead(withPropertyOp)) } diff --git a/examples/src/main/scala/zio/sql/GroupByExamples.scala b/examples/src/main/scala/zio/sql/GroupByExamples.scala index 13b9c3e0a..546218663 100644 --- a/examples/src/main/scala/zio/sql/GroupByExamples.scala +++ b/examples/src/main/scala/zio/sql/GroupByExamples.scala @@ -1,8 +1,8 @@ package zio.sql -import zio.sql.sqlserver.SqlServerJdbcModule +import zio.sql.postgresql.PostgresJdbcModule -object GroupByExamples extends App with ShopSchema with SqlServerJdbcModule { +object GroupByExamples extends App with ShopSchema with PostgresJdbcModule { import AggregationDef._ import ColumnSet._ diff --git a/examples/src/main/scala/ShopSchema.scala b/examples/src/main/scala/zio/sql/ShopSchema.scala similarity index 85% rename from examples/src/main/scala/ShopSchema.scala rename to examples/src/main/scala/zio/sql/ShopSchema.scala index db25702fa..8ba8ab4c4 100644 --- a/examples/src/main/scala/ShopSchema.scala +++ b/examples/src/main/scala/zio/sql/ShopSchema.scala @@ -4,9 +4,10 @@ trait ShopSchema extends Jdbc { self => import self.ColumnSet._ object Users { - val users = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") + val users = + (uuid("id") ++ int("age") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") - val (userId, dob, fName, lName) = users.columns + val (userId, age, dob, fName, lName) = users.columns } object Orders { val orders = (uuid("id") ++ uuid("usr_id") ++ localDate("order_date")).table("orders") From 91ac6173e68d11a484e53101085b3e25c43c9f10 Mon Sep 17 00:00:00 2001 From: Peixun Zhang Date: Thu, 26 May 2022 13:10:16 +0100 Subject: [PATCH 437/673] Add makedate function to MysqlSqlModule #655 --- .../main/scala/zio/sql/mysql/MysqlSqlModule.scala | 2 ++ .../test/scala/zio/sql/mysql/FunctionDefSpec.scala | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 7d027ef3e..497807961 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -4,6 +4,7 @@ import java.sql.ResultSet import java.time.Year import zio.sql.Sql +import java.time.LocalDate trait MysqlSqlModule extends Sql { self => @@ -33,6 +34,7 @@ trait MysqlSqlModule extends Sql { self => val Log10 = FunctionDef[Double, Double](FunctionName("log10")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + val MakeDate = FunctionDef[(Int, Int), LocalDate](FunctionName("makedate")) } } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index dc77769df..4191221d1 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -3,6 +3,7 @@ package zio.sql.mysql import zio.Cause import zio.test._ import zio.test.Assertion._ +import java.time.LocalDate object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { @@ -142,6 +143,19 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { r <- testResult.runCollect } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("makedate") { + val query = select(MakeDate(2022, 31)) from customers + + val expected = LocalDate.of(2022, 1, 31) + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) From adc7a58ec054e900b366d7d836de9312612caaa8 Mon Sep 17 00:00:00 2001 From: Aditya Vetukuri <57276142+AdityaVetukuri@users.noreply.github.com> Date: Thu, 26 May 2022 09:24:51 -0400 Subject: [PATCH 438/673] Add Current Date Function to MySql module * Add Current Date Function * Add FunctionDef * Add Test for Current Date * Adding imports * Adding back imports * Remove Parameter for CurrentDate function * Rearrange functions to alphabetical order --- mysql/project/build.properties | 1 + .../main/scala/zio/sql/mysql/MysqlSqlModule.scala | 15 ++++++++------- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 mysql/project/build.properties diff --git a/mysql/project/build.properties b/mysql/project/build.properties new file mode 100644 index 000000000..c8fcab543 --- /dev/null +++ b/mysql/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.6.2 diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 7d027ef3e..bb7624c32 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -1,7 +1,7 @@ package zio.sql.mysql import java.sql.ResultSet -import java.time.Year +import java.time.{ LocalDate, Year } import zio.sql.Sql @@ -27,12 +27,13 @@ trait MysqlSqlModule extends Sql { self => } object MysqlFunctionDef { - val Crc32 = FunctionDef[String, Long](FunctionName("crc32")) - val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) - val Log2 = FunctionDef[Double, Double](FunctionName("log2")) - val Log10 = FunctionDef[Double, Double](FunctionName("log10")) - val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) - val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) + val Crc32 = FunctionDef[String, Long](FunctionName("crc32")) + val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) + val Log2 = FunctionDef[Double, Double](FunctionName("log2")) + val Log10 = FunctionDef[Double, Double](FunctionName("log10")) + val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) } } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index dc77769df..ff54082f1 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -3,6 +3,7 @@ package zio.sql.mysql import zio.Cause import zio.test._ import zio.test.Assertion._ +import java.time.LocalDate object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { @@ -131,6 +132,19 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("current_date") { + val query = select(CurrentDate) + + val expected = LocalDate.now() + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, test("pi") { val query = select(Pi) from customers From 29b5c6ae0e980e9ac813deade3e9d1fcf20d4fb3 Mon Sep 17 00:00:00 2001 From: Boris Burdiliak Date: Thu, 26 May 2022 15:36:54 +0200 Subject: [PATCH 439/673] support for gen_random_uuid function of PostgreSQL --- .../scala/zio/sql/postgresql/PostgresSqlModule.scala | 4 ++-- .../scala/zio/sql/postgresql/FunctionDefSpec.scala | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala index fd85d27b7..c437291e5 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala @@ -4,8 +4,7 @@ import java.sql.ResultSet import java.text.DecimalFormat import java.time._ import java.time.format.DateTimeFormatter -import java.util.Calendar - +import java.util.{Calendar, UUID} import org.postgresql.util.PGInterval import zio.Chunk import zio.sql.Sql @@ -308,6 +307,7 @@ trait PostgresSqlModule extends Sql { self => val SetSeed = FunctionDef[Double, Unit](FunctionName("setseed")) val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) + val GenRandomUuid = Expr.FunctionCall0[UUID](FunctionDef[Any, UUID](FunctionName("gen_random_uuid"))) } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 8ebcf8e5c..bf988701d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -177,6 +177,17 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("gen_random_uuid") { + val query = select(GenRandomUuid) + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(!isNull) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, suite("format function")( test("format0") { import Expr._ From eac3323660f53b35ff979f4166b15be0259ac1f3 Mon Sep 17 00:00:00 2001 From: Boris Burdiliak Date: Thu, 26 May 2022 16:27:10 +0200 Subject: [PATCH 440/673] formatting --- .../src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala index c437291e5..817aa17e4 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala @@ -4,7 +4,7 @@ import java.sql.ResultSet import java.text.DecimalFormat import java.time._ import java.time.format.DateTimeFormatter -import java.util.{Calendar, UUID} +import java.util.{ Calendar, UUID } import org.postgresql.util.PGInterval import zio.Chunk import zio.sql.Sql From c03e8ef21a61311d18cca0d38462d9e0d90d1c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Sza=C5=82omski?= Date: Thu, 26 May 2022 16:55:54 +0200 Subject: [PATCH 441/673] #654 Add Now function to MySQL Module (#680) * #654: Add now function to MysqlSqlModule * #654: Adjust the precision of NOW() in test * #654: fix formatter after conflicts resolving --- .../scala/zio/sql/mysql/MysqlSqlModule.scala | 3 ++- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index bb7624c32..33d1b27c1 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -1,7 +1,7 @@ package zio.sql.mysql import java.sql.ResultSet -import java.time.{ LocalDate, Year } +import java.time.{ LocalDate, Year, ZonedDateTime } import zio.sql.Sql @@ -33,6 +33,7 @@ trait MysqlSqlModule extends Sql { self => val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Log2 = FunctionDef[Double, Double](FunctionName("log2")) val Log10 = FunctionDef[Double, Double](FunctionName("log10")) + val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index ff54082f1..31d5cfe5b 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -5,6 +5,9 @@ import zio.test._ import zio.test.Assertion._ import java.time.LocalDate +import java.time.ZoneId +import java.time.format.DateTimeFormatter + object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ @@ -119,6 +122,23 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("now") { + val timestampFormatter = + DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss").withZone(ZoneId.of("UTC")) + + val query = select(Now()) + + val testResult = execute(query) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}") + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, test("bit_length") { val query = select(BitLength("hello")) From a5f5c406ae23973352335915d657c9c53b2d97bd Mon Sep 17 00:00:00 2001 From: Sarah O'Toole Date: Thu, 26 May 2022 16:04:51 +0100 Subject: [PATCH 442/673] #656 Add maketime function to MysqlSqlModule (#675) * #656 Add maketime function to MysqlSqlModule * 656 formatting * #656 alphabetical order Co-authored-by: Jakub Czuchnowski --- .../main/scala/zio/sql/mysql/MysqlSqlModule.scala | 3 ++- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 33d1b27c1..5bdb849ab 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -1,7 +1,7 @@ package zio.sql.mysql +import java.time.{ LocalDate, LocalTime, Year, ZonedDateTime } import java.sql.ResultSet -import java.time.{ LocalDate, Year, ZonedDateTime } import zio.sql.Sql @@ -33,6 +33,7 @@ trait MysqlSqlModule extends Sql { self => val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Log2 = FunctionDef[Double, Double](FunctionName("log2")) val Log10 = FunctionDef[Double, Double](FunctionName("log10")) + val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("maketime")) val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 31d5cfe5b..629c3f947 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -5,7 +5,7 @@ import zio.test._ import zio.test.Assertion._ import java.time.LocalDate -import java.time.ZoneId +import java.time.{ LocalTime, ZoneId } import java.time.format.DateTimeFormatter object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { @@ -165,6 +165,19 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("maketime") { + val query = select(MakeTime(12, 15, 30.5)) from customers + + val expected = LocalTime.parse("12:15:30.5") + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, test("pi") { val query = select(Pi) from customers From 220e7ff33ab49c9b93dd0b76ade2fd17d9d967d1 Mon Sep 17 00:00:00 2001 From: Mirlan Ipasov Date: Thu, 26 May 2022 21:15:46 +0600 Subject: [PATCH 443/673] rand function for MySql added --- .../main/scala/zio/sql/mysql/MysqlSqlModule.scala | 2 ++ .../test/scala/zio/sql/mysql/FunctionDefSpec.scala | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 5bdb849ab..b3191d695 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -4,6 +4,7 @@ import java.time.{ LocalDate, LocalTime, Year, ZonedDateTime } import java.sql.ResultSet import zio.sql.Sql +import java.util.Random trait MysqlSqlModule extends Sql { self => @@ -36,6 +37,7 @@ trait MysqlSqlModule extends Sql { self => val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("maketime")) val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) + val Random = Function[Int, Double](FunctionName("rand")) } } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 629c3f947..bad23a32a 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -190,6 +190,17 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } + }, + test("rand") { + val query = select(Rand()) + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, ) } From f6b143e548b9b0133b6cb34b8aebf60ef35ca501 Mon Sep 17 00:00:00 2001 From: Mirlan Ipasov Date: Thu, 26 May 2022 21:29:45 +0600 Subject: [PATCH 444/673] fix the typo, remove unused import --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 3 +-- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index b3191d695..7ea84d2f0 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -4,7 +4,6 @@ import java.time.{ LocalDate, LocalTime, Year, ZonedDateTime } import java.sql.ResultSet import zio.sql.Sql -import java.util.Random trait MysqlSqlModule extends Sql { self => @@ -37,7 +36,7 @@ trait MysqlSqlModule extends Sql { self => val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("maketime")) val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) - val Random = Function[Int, Double](FunctionName("rand")) + val Rand = FunctionDef[Int, Double](FunctionName("rand")) } } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index bad23a32a..7d43ee982 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -191,7 +191,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("rand") { + test("rand") { val query = select(Rand()) val testResult = execute(query) @@ -201,6 +201,6 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, + } ) } From 4fa42fb46bf28c724860a60891822a7913b6d9e5 Mon Sep 17 00:00:00 2001 From: Sheng-Loong Su Date: Thu, 26 May 2022 23:35:32 +0800 Subject: [PATCH 445/673] Implement renderInsert for MySQL --- .../zio/sql/mysql/MysqlRenderModule.scala | 133 +++++++++++++++++- .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 45 ++++++ 2 files changed, 176 insertions(+), 2 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala index 5864d9f86..504ecd92e 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala @@ -1,7 +1,11 @@ package zio.sql.mysql +import java.time._ +import java.time.format.DateTimeFormatter + import zio.Chunk -import zio.schema.Schema +import zio.schema._ +import zio.schema.StandardType._ import zio.sql.driver.Renderer trait MysqlRenderModule extends MysqlSqlModule { self => @@ -12,7 +16,11 @@ trait MysqlRenderModule extends MysqlSqlModule { self => render.toString } - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = { + implicit val render: Renderer = Renderer() + MysqlRenderer.renderInsertImpl(insert) + render.toString + } override def renderDelete(delete: self.Delete[_]): String = { implicit val render: Renderer = Renderer() @@ -27,6 +35,17 @@ trait MysqlRenderModule extends MysqlSqlModule { self => } object MysqlRenderer { + def renderInsertImpl[A](insert: Insert[_, A])(implicit render: Renderer, schema: Schema[A]) = { + render("INSERT INTO ") + renderTable(insert.table) + + render(" (") + renderColumnNames(insert.sources) + render(") VALUES ") + + renderInsertValues(insert.values) + } + def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") renderTable(delete.table) @@ -114,6 +133,114 @@ trait MysqlRenderModule extends MysqlSqlModule { self => render(" (", values.mkString(","), ") ") // todo fix needs escaping } + private def renderInsertValues[A](col: Seq[A])(implicit render: Renderer, schema: Schema[A]): Unit = + col.toList match { + case head :: Nil => + render("(") + renderInsertValue(head) + render(");") + case head :: next => + render("(") + renderInsertValue(head)(render, schema) + render(" ),") + renderInsertValues(next) + case Nil => () + } + + private def renderInsertValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = + schema.toDynamic(z) match { + case DynamicValue.Record(listMap) => + listMap.values.toList match { + case head :: Nil => renderDynamicValue(head) + case head :: next => + renderDynamicValue(head) + render(", ") + renderDynamicValues(next) + case Nil => () + } + case value => renderDynamicValue(value) + } + + private def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = + dynValues match { + case head :: Nil => renderDynamicValue(head) + case head :: tail => + renderDynamicValue(head) + render(", ") + renderDynamicValues(tail) + case Nil => () + } + + def renderDynamicValue(dynValue: DynamicValue)(implicit render: Renderer): Unit = + dynValue match { + case DynamicValue.Primitive(value, typeTag) => + StandardType.fromString(typeTag.tag) match { + case Some(v) => + v match { + case BigDecimalType => + render(value) + case StandardType.InstantType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[Instant])}'") + case CharType => render(s"'${value}'") + case IntType => render(value) + case StandardType.MonthDayType => render(s"'${value}'") + case BinaryType => render(s"'${value}'") + case StandardType.MonthType => render(s"'${value}'") + case StandardType.LocalDateTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalDateTime])}'") + case UnitType => render("null") // None is encoded as Schema[Unit].transform(_ => None, _ => ()) + case StandardType.YearMonthType => render(s"'${value}'") + case DoubleType => render(value) + case StandardType.YearType => render(s"'${value}'") + case StandardType.OffsetDateTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[OffsetDateTime])}'") + case StandardType.ZonedDateTimeType(_) => + render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") + case BigIntegerType => render(s"'${value}'") + case UUIDType => render(s"'${value}'") + case StandardType.ZoneOffsetType => render(s"'${value}'") + case ShortType => render(value) + case StandardType.LocalTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalTime])}'") + case StandardType.OffsetTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[OffsetTime])}'") + case LongType => render(value) + case StringType => render(s"'${value}'") + case StandardType.PeriodType => render(s"'${value}'") + case StandardType.ZoneIdType => render(s"'${value}'") + case StandardType.LocalDateType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalDate])}'") + case BoolType => render(value) + case DayOfWeekType => render(s"'${value}'") + case FloatType => render(value) + case StandardType.DurationType => render(s"'${value}'") + } + case None => () + } + case DynamicValue.Tuple(left, right) => + renderDynamicValue(left) + render(", ") + renderDynamicValue(right) + case DynamicValue.SomeValue(value) => renderDynamicValue(value) + case DynamicValue.NoneValue => render("null") + case _ => () + } + + private def renderColumnNames(sources: SelectionSet[_])(implicit render: Renderer): Unit = + sources match { + case SelectionSet.Empty => () + case SelectionSet.Cons(columnSelection, tail) => + val _ = columnSelection.name.map { name => + render(name) + } + tail.asInstanceOf[SelectionSet[_]] match { + case SelectionSet.Empty => () + case next @ SelectionSet.Cons(_, _) => + render(", ") + renderColumnNames(next.asInstanceOf[SelectionSet[_]])(render) + } + } + private def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = set match { case head :: tail => @@ -154,6 +281,8 @@ trait MysqlRenderModule extends MysqlSqlModule { self => render(" ") } + private[zio] def quoted(name: String): String = "\"" + name + "\"" + private def renderExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Subselect(subselect) => render(" (") diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index 767d575f0..3fef292f1 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -1,9 +1,11 @@ package zio.sql.mysql import java.time.LocalDate +import java.time.format.DateTimeFormatter import java.util.UUID import zio.Cause +import zio.schema._ import zio.test._ import zio.test.Assertion._ import scala.language.postfixOps @@ -161,6 +163,49 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("Can insert rows") { + final case class CustomerRow( + id: UUID, + dateOfBirth: LocalDate, + firstName: String, + lastName: String, + verified: Boolean + ) + implicit val customerRowSchema = + Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, CustomerRow]( + Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field( + "dateOfBirth", + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) + ), + Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), + CustomerRow.apply, + _.id, + _.dateOfBirth, + _.firstName, + _.lastName, + _.verified + ) + + val rows = List( + CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", true), + CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", false) + ) + + val command = insertInto(customers)( + customerId, + dob, + fName, + lName, + verified + ).values(rows) + + println(renderInsert(command)) + + assertZIO(execute(command))(equalTo(2)) + }, test("Can update rows") { val query = update(customers).set(fName, "Roland").where(fName === "Ronald") From f5a07c01d07c786a7963cc60333a2c0aae96f95f Mon Sep 17 00:00:00 2001 From: Mirlan Ipasov Date: Thu, 26 May 2022 21:45:21 +0600 Subject: [PATCH 446/673] fix seed input --- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 7d43ee982..4f06b7d50 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -192,7 +192,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("rand") { - val query = select(Rand()) + val query = select(Rand(5)) val testResult = execute(query) From 223ada335527f34e9bbeaaa732d9a7b225c739bd Mon Sep 17 00:00:00 2001 From: Amr Kamel <3amr.kaml@gmail.com> Date: Thu, 26 May 2022 18:50:14 +0200 Subject: [PATCH 447/673] Add current_time function to MysqlSqlModule (#681) * Add current_time function to MysqlSqlModule * fix merge mistake --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 6 +++--- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 5bdb849ab..6b9d2034d 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -1,8 +1,7 @@ package zio.sql.mysql -import java.time.{ LocalDate, LocalTime, Year, ZonedDateTime } import java.sql.ResultSet - +import java.time.{ LocalDate, LocalTime, OffsetTime, Year, ZonedDateTime } import zio.sql.Sql trait MysqlSqlModule extends Sql { self => @@ -28,8 +27,9 @@ trait MysqlSqlModule extends Sql { self => object MysqlFunctionDef { val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) - val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) val Crc32 = FunctionDef[String, Long](FunctionName("crc32")) + val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) + val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Log2 = FunctionDef[Double, Double](FunctionName("log2")) val Log10 = FunctionDef[Double, Double](FunctionName("log10")) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 629c3f947..671ac0cc7 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -190,6 +190,12 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("current_time") { + assertZIO( + execute(select(CurrentTime)).runHead.some + .map(t => DateTimeFormatter.ofPattern("HH:mm:ss").format(t)) + )(matchesRegex("(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]")) } ) } From 7aa0ea82dc8d298cfe60cc1c0e26a9b8c900ddcc Mon Sep 17 00:00:00 2001 From: Ujali Date: Thu, 26 May 2022 18:57:45 +0200 Subject: [PATCH 448/673] Add hex function to MySql module (#676) * Added hex function #659 * lint * 659 updated argument to Long --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 1 + mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 6b9d2034d..162c73574 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -31,6 +31,7 @@ trait MysqlSqlModule extends Sql { self => val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) + val Hex = FunctionDef[Long, String](FunctionName("hex")) val Log2 = FunctionDef[Double, Double](FunctionName("log2")) val Log10 = FunctionDef[Double, Double](FunctionName("log10")) val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("maketime")) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 671ac0cc7..0d76ed157 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -96,6 +96,13 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("hex") { + val query = select(Hex(255L)) from customers + val expected = "FF" + val queryResult = execute(query) + + assertZIO(queryResult.runHead.some)(equalTo(expected)) + }, test("log2") { val query = select(Log2(8d)) from customers From 61dc2e878df53a11cd2d91a38eceef6d5240e67f Mon Sep 17 00:00:00 2001 From: Amr Kamel <3amr.kaml@gmail.com> Date: Thu, 26 May 2022 19:08:03 +0200 Subject: [PATCH 449/673] Add the 'rpad' function to the MysqlSqlModule (#682) * Add the 'rpad' function to the MysqlSqlModule * fix merge mistake --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 1 + mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 162c73574..cc8db34e4 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -37,6 +37,7 @@ trait MysqlSqlModule extends Sql { self => val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("maketime")) val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) + val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) } } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 0d76ed157..4da50d13d 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -198,6 +198,12 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("rpad") { + val cases = Seq(("hi", 5, "?", "hi???"), ("hi", 1, "?", "h")) + check(Gen.fromIterable(cases)) { case (str, len, pad, exp) => + assertZIO(execute(select(RPad(str, len, pad))).runHead.some)(equalTo(exp)) + } + }, test("current_time") { assertZIO( execute(select(CurrentTime)).runHead.some From be1f30a91aeae5535507c24f075420cae9add7a6 Mon Sep 17 00:00:00 2001 From: Sarah O'Toole Date: Thu, 26 May 2022 18:50:17 +0100 Subject: [PATCH 450/673] #679 Clean up FunctionDefSpec (#687) --- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 82 ++++--------------- 1 file changed, 16 insertions(+), 66 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 4da50d13d..6bcc24e5c 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -1,11 +1,9 @@ package zio.sql.mysql -import zio.Cause import zio.test._ import zio.test.Assertion._ -import java.time.LocalDate -import java.time.{ LocalTime, ZoneId } +import java.time.{ LocalDate, LocalTime, ZoneId } import java.time.format.DateTimeFormatter object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { @@ -22,11 +20,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, // FIXME: lower with string literal should not refer to a column name // See: https://www.w3schools.com/sql/trymysql.asp?filename=trysql_func_mysql_lower @@ -51,11 +45,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("abs") { val query = select(Abs(-32.0)) @@ -64,11 +54,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("crc32") { val query = select(Crc32("MySQL")) from customers @@ -77,11 +63,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("degrees") { val query = select(Degrees(Math.PI)) from customers @@ -90,11 +72,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("hex") { val query = select(Hex(255L)) from customers @@ -110,11 +88,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("log10") { val query = select(Log10(1000000d)) from customers @@ -123,11 +97,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("now") { val timestampFormatter = @@ -137,14 +107,10 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}") - ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO( + testResult.runHead.some + .map(t => timestampFormatter.format(t)) + )(matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}")) }, test("bit_length") { val query = select(BitLength("hello")) @@ -153,11 +119,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("current_date") { val query = select(CurrentDate) @@ -166,11 +128,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("maketime") { val query = select(MakeTime(12, 15, 30.5)) from customers @@ -179,11 +137,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("pi") { val query = select(Pi) from customers @@ -192,11 +146,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("rpad") { val cases = Seq(("hi", 5, "?", "hi???"), ("hi", 1, "?", "h")) From ff1f3d6758bd09b58cd66ea557bfd5441be0df9c Mon Sep 17 00:00:00 2001 From: Jaro Regec Date: Thu, 26 May 2022 19:51:49 +0200 Subject: [PATCH 451/673] Update FunctionDefSpec.scala --- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 6d727c853..c3a0ddd08 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -208,6 +208,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, test("rpad") { val cases = Seq(("hi", 5, "?", "hi???"), ("hi", 1, "?", "h")) check(Gen.fromIterable(cases)) { case (str, len, pad, exp) => From 261d51a599d7e18d4b8dd22d1385037d78548bc8 Mon Sep 17 00:00:00 2001 From: Mirlan Ipasov Date: Fri, 27 May 2022 00:07:10 +0600 Subject: [PATCH 452/673] applied shortened assertions --- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 954b4e49c..8e515eef7 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -153,11 +153,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(isGreaterThanEqualTo(0d) && isLessThanEqualTo(1d)) }, test("rpad") { val cases = Seq(("hi", 5, "?", "hi???"), ("hi", 1, "?", "h")) From a15889ed67f3fe455f9f76b3907fe8ba4f99b98e Mon Sep 17 00:00:00 2001 From: vidyasankarv Date: Thu, 26 May 2022 18:13:35 +0100 Subject: [PATCH 453/673] #657 - Add uuid() function to MySqlModule --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 4 ++-- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index cc8db34e4..158f6d284 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -2,6 +2,7 @@ package zio.sql.mysql import java.sql.ResultSet import java.time.{ LocalDate, LocalTime, OffsetTime, Year, ZonedDateTime } +import java.util.UUID import zio.sql.Sql trait MysqlSqlModule extends Sql { self => @@ -21,7 +22,6 @@ trait MysqlSqlModule extends Sql { self => r => Right(r) ) } - } } @@ -38,6 +38,6 @@ trait MysqlSqlModule extends Sql { self => val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) + val Uuid = Expr.FunctionCall0[UUID](FunctionDef[Any, UUID](FunctionName("uuid"))) } - } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 6bcc24e5c..d01eef2ce 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -148,6 +148,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertZIO(testResult.runHead.some)(equalTo(expected)) }, + test("uuid") { + assertZIO(execute(select(Uuid)).runHead.some)(!isNull) + }, test("rpad") { val cases = Seq(("hi", 5, "?", "hi???"), ("hi", 1, "?", "h")) check(Gen.fromIterable(cases)) { case (str, len, pad, exp) => From a8b84e91cfa2c94d8e07d72c92f34b31e815f92b Mon Sep 17 00:00:00 2001 From: walesho <92475279+walesho@users.noreply.github.com> Date: Thu, 26 May 2022 20:07:12 +0100 Subject: [PATCH 454/673] Added Radians Function to MySQL module (#689) --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 1 + mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index c562b3164..5ec2a9168 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -40,5 +40,6 @@ trait MysqlSqlModule extends Sql { self => val Rand = FunctionDef[Int, Double](FunctionName("rand")) val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) val Uuid = Expr.FunctionCall0[UUID](FunctionDef[Any, UUID](FunctionName("uuid"))) + val Radians = FunctionDef[Double, Double](FunctionName("radians")) } } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 1de247e39..d0e55cb58 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -169,6 +169,15 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { execute(select(CurrentTime)).runHead.some .map(t => DateTimeFormatter.ofPattern("HH:mm:ss").format(t)) )(matchesRegex("(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]")) + }, + test("Radians") { + val query = select(Radians(40d)) + + val expected = Math.toRadians(40d) + + val testResult = execute(query) + + assertZIO(testResult.runHead.some)(equalTo(expected)) } ) } From d14a5febfd7b6e2c2028e3e733e38d0200b8bfcd Mon Sep 17 00:00:00 2001 From: Jaro Regec Date: Thu, 26 May 2022 21:16:21 +0200 Subject: [PATCH 455/673] Removed comment from select utils sbt publishLocal was failing --- .../src/main/scala/zio/sql/selectutils.scala | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/selectutils.scala b/core/jvm/src/main/scala/zio/sql/selectutils.scala index 734332ced..624411dbf 100644 --- a/core/jvm/src/main/scala/zio/sql/selectutils.scala +++ b/core/jvm/src/main/scala/zio/sql/selectutils.scala @@ -1,38 +1,5 @@ package zio.sql -/** - * Generated with https://github.com/kitlangton/boilerplate - * - val insertInto = - bp""" - def apply[${bp"F${num(1)}".rep(", ")}, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")}) = { - val selection = ${bp"expr${num(1)}".rep(" ++ ")} - - type B = ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"} - - InsertBuilder[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, AllColumnIdentities, B, selection.ColsRepr]( - table, - selection - ) - } - """ - - val selectSyntax = - bp""" - def apply[${bp"F${num(1)}".rep(", ")}, Source, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")})(implicit - i: Features.IsPartiallyAggregated[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}]] - ): Selector[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, i.Unaggregated] = { - val selection = ${bp"expr${num(1)}".rep(" ++ ")} - Selector[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}, Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, i.Unaggregated](selection) - }""" - - val subselectSyntax = - bp""" - def apply[${bp"F${num(1)}".rep(", ")}, Source, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")}): SubselectBuilder[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, ParentTable] = { - val selection = ${bp"expr${num(1)}".rep(" ++ ")} - SubselectBuilder(selection) - }""" - */ // format: off trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule with SelectModule => From c953efe11cfe405556055998d3e174049ddf40a6 Mon Sep 17 00:00:00 2001 From: Peixun Zhang Date: Fri, 27 May 2022 09:16:48 +0100 Subject: [PATCH 456/673] suggestion --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 2 +- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 5c21d7beb..3a3d81fff 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -34,7 +34,7 @@ trait MysqlSqlModule extends Sql { self => val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Log2 = FunctionDef[Double, Double](FunctionName("log2")) val Log10 = FunctionDef[Double, Double](FunctionName("log10")) - val MakeDate = FunctionDef[(Int, Int), LocalDate](FunctionName("makedate")) + val MakeDate = FunctionDef[(Int, Int), LocalDate](FunctionName("makedate")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index cd7f1a0c0..e298be4d9 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -165,11 +165,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) } ) } From cfcc15e13115e10c8f81a6bd6e303a36e27d5970 Mon Sep 17 00:00:00 2001 From: Peixun Zhang Date: Fri, 27 May 2022 09:22:42 +0100 Subject: [PATCH 457/673] import --- mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index 3a3d81fff..95a4d2f81 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -4,7 +4,6 @@ import java.sql.ResultSet import java.time.{ LocalDate, Year } import zio.sql.Sql -import java.time.LocalDate trait MysqlSqlModule extends Sql { self => From 10ac9e9fa5f3d8ecfc7fadb5d7c8265603a235f3 Mon Sep 17 00:00:00 2001 From: vidyasankarv Date: Thu, 26 May 2022 19:59:46 +0100 Subject: [PATCH 458/673] #679 - cleanup postgres FunctionDefSpec --- .../zio/sql/postgresql/FunctionDefSpec.scala | 433 ++++-------------- 1 file changed, 77 insertions(+), 356 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index bf988701d..ab3ce1eb4 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1,14 +1,14 @@ package zio.sql.postgresql -import java.time._ -import java.time.format.DateTimeFormatter -import java.util.UUID -import zio.{ Cause, Chunk } import zio.stream.ZStream import zio.test.Assertion._ -import zio.test._ import zio.test.TestAspect.{ ignore, timeout } -import zio.durationInt +import zio.test._ +import zio.{ durationInt, Cause, Chunk } + +import java.time._ +import java.time.format.DateTimeFormatter +import java.util.UUID object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { @@ -20,13 +20,8 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { private def collectAndCompare[R, E]( expected: Seq[String], testResult: ZStream[R, E, String] - ) = { - val assertion = for { - r <- testResult.runCollect - } yield assert(r.toList)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } + ) = + assertZIO(testResult.runCollect)(equalTo(expected)) private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) @@ -49,7 +44,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { collectAndCompare(expected, testResult) }, test("concat_ws #2 - combine columns") { - import Expr._ // note: you can't use customerId here as it is a UUID, hence not a string in our book val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers @@ -100,93 +94,31 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { collectAndCompare(expected, testResult) }, test("isfinite") { - val query = select(IsFinite(Instant.now)) - + val query = select(IsFinite(Instant.now)) val expected: Boolean = true - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(query).runHead.some)(equalTo(expected)) }, suite("String functions")( test("CharLength") { - val query = select(Length("hello")) - val expected = 5 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Length("hello"))).runHead.some)(equalTo(5)) + }, + test("CharLength") { + assertZIO(execute(select(Length("hello"))).runHead.some)(equalTo(5)) }, test("ltrim") { - val query = select(Ltrim(" hello ")) - - val expected = "hello " - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Ltrim(" hello "))).runHead.some)(equalTo("hello ")) }, test("rtrim") { - val query = select(Rtrim(" hello ")) - - val expected = " hello" - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Rtrim(" hello "))).runHead.some)(equalTo(" hello")) }, test("bit_length") { - val query = select(BitLength("hello")) - - val expected = 40 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(BitLength("hello"))).runHead.some)(equalTo(40)) }, test("pi") { - val query = select(Pi) - - val expected = 3.141592653589793 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Pi)).runHead.some)(equalTo(3.141592653589793)) }, test("gen_random_uuid") { - val query = select(GenRandomUuid) - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(!isNull) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(GenRandomUuid)).runHead.some)(!isNull) }, suite("format function")( test("format0") { @@ -307,325 +239,115 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { ) ), test("abs") { - val query = select(Abs(-3.14159)) - - val expected = 3.14159 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) }, test("log") { - val query = select(Log(2.0, 32.0)) - - val expected: Double = 5 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Log(2.0, 32.0))).runHead.some)(equalTo(5.0)) }, test("acos") { - val query = select(Acos(-1.0)) - - val expected = 3.141592653589793 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) }, test("repeat") { - val query = select(Repeat("Zio", 3)) - - val expected = "ZioZioZio" - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Repeat("Zio", 3))).runHead.some)(equalTo("ZioZioZio")) + }, + test("reverse") { + assertZIO(execute(select(Reverse("abcd"))).runHead.some)(equalTo("dcba")) }, test("asin") { - val query = select(Asin(0.5)) - - val expected = 0.5235987755982989 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) }, test("ln") { - val query = select(Ln(3.0)) - - val expected = 1.0986122886681097 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) }, test("atan") { - val query = select(Atan(10.0)) - - val expected = 1.4711276743037347 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("reverse") { - val query = select(Reverse("abcd")) - - val expected = "dcba" - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) }, test("cos") { - val query = select(Cos(3.141592653589793)) - - val expected = -1.0 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Cos(3.141592653589793))).runHead.some)(equalTo(-1.0)) }, test("exp") { - val query = select(Exp(1.0)) - - val expected = 2.718281828459045 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Exp(1.0))).runHead.some)(equalTo(2.718281828459045)) }, test("floor") { - val query = select(Floor(-3.14159)) - - val expected = -4.0 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) }, test("ceil") { - val query = select(Ceil(53.7), Ceil(-53.7)) - - val expected = (54.0, -53.0) - - val testResult = execute(query).map(value => (value._1, value._2)) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) }, test("sin") { - val query = select(Sin(1.0)) - - val expected = 0.8414709848078965 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) }, test("sind") { - val query = select(Sind(30.0)) - - val expected = 0.5 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Sind(30.0))).runHead.some)(equalTo(0.5)) }, test("split_part") { - val query = select(SplitPart("abc~@~def~@~ghi", "~@~", 2)) - - val expected = "def" - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(SplitPart("abc~@~def~@~ghi", "~@~", 2))).runHead.some)(equalTo("def")) }, test("timeofday") { - val query = select(TimeOfDay()) - - val testResult = execute(query) - - val assertion = - for { - r <- testResult.runCollect - } yield assert(r.head)( - matchesRegex( - "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3,4}" - ) + assertZIO(execute(select(TimeOfDay())).runHead.some)( + matchesRegex( + "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3,4}" ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("localtime") { - val query = select(Localtime) - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{6}")) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(Localtime)).runHead.some.map(_.toString))( + matchesRegex( + "([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{6}" + ) + ) }, test("localtime with precision") { val precision = 0 - val query = select(LocaltimeWithPrecision(precision)) - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head.toString)(Assertion.matchesRegex(s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}")) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(execute(select(LocaltimeWithPrecision(precision))).runHead.some.map(_.toString))( + matchesRegex( + s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}" + ) + ) }, test("localtimestamp") { - val query = select(Localtimestamp) - - val testResult = execute(query) - - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + assertZIO(execute(select(Localtimestamp)).runHead.some.map(timestampFormatter.format _))( + matchesRegex( + "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}" ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("localtimestamp with precision") { - val precision = 2 - - val query = select(LocaltimestampWithPrecision(precision)) - - val testResult = execute(query) - - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") + assertZIO(execute(select(LocaltimestampWithPrecision(2))).runHead.some.map(timestampFormatter.format _))( + matchesRegex( + "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00" ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("now") { - val query = select(Now()) - - val testResult = execute(query) - - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + assertZIO(execute(select(Now())).runHead.some.map(timestampFormatter.format _))( + matchesRegex( + "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}" ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("statement_timestamp") { - val query = select(StatementTimestamp()) - - val testResult = execute(query) - - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + assertZIO(execute(select(StatementTimestamp())).runHead.some.map(timestampFormatter.format _))( + matchesRegex( + "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}" ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("transaction_timestamp") { - val query = select(TransactionTimestamp()) - - val testResult = execute(query) - - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + assertZIO(execute(select(TransactionTimestamp())).runHead.some.map(timestampFormatter.format _))( + matchesRegex( + "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}" ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("current_time") { - val query = select(CurrentTime) - - val testResult = execute(query) - - val assertion = - for { - r <- testResult.runCollect - } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( - matchesRegex( - "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" - ) + assertZIO( + execute(select(TransactionTimestamp())).runHead.some.map(DateTimeFormatter.ofPattern("HH:mm:ss").format(_)) + )( + matchesRegex( + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("md5") { val query = select(Md5("hello, world!")) @@ -1363,8 +1085,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { // imports for Left and Right are necessary to make the typeCheck macro expansion compile // TODO: clean this up when https://github.com/zio/zio/issues/4927 is resolved - import scala.util.Right - import scala.util.Left + import scala.util.{ Left, Right } val dummyUsage = zio.ZIO.succeed((Left(()), Right(()))) val result = typeCheck("execute((select(CharLength(Customers.fName))).to[Int, Int](identity))") From 495039b1e61efc7a8f36606200f946ad98e545a4 Mon Sep 17 00:00:00 2001 From: Peixun Zhang Date: Fri, 27 May 2022 09:37:15 +0100 Subject: [PATCH 459/673] fix error --- mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 32c9400d1..030f42a25 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -177,7 +177,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("makedate") { val query = select(MakeDate(2022, 31)) from customers From 6e41e0540cf5cbd05bb78134eec3c7b3dc91fd86 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 27 May 2022 12:36:13 +0200 Subject: [PATCH 460/673] Update scalafmt-core to 3.5.3 (#646) Co-authored-by: Jakub Czuchnowski --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 03b12bc62..9db89de66 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.5.2" +version = "3.5.3" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From 3f4b3a3c51f89d7b6cd721a47541a94180cd50e7 Mon Sep 17 00:00:00 2001 From: Mirlan Ipasov Date: Fri, 27 May 2022 18:30:22 +0600 Subject: [PATCH 461/673] insert examples for tuple and case class with scema derive --- .../src/main/scala/zio/sql/Examples.scala | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index ebe854be0..24789e67e 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -1,6 +1,9 @@ package zio.sql +import java.util.UUID +import java.time._ import zio.sql.postgresql.PostgresJdbcModule +import zio.schema.DeriveSchema object Examples extends App with ShopSchema with PostgresJdbcModule { import this.AggregationDef._ @@ -89,4 +92,54 @@ object Examples extends App with ShopSchema with PostgresJdbcModule { // SELECT "users"."first_name", "users"."last_name" FROM "users" WHERE true and "users"."first_name" is not null val withPropertyOp = select(fName, lName).from(users).where(fName isNotNull) println(renderRead(withPropertyOp)) + + /* + insert tuples + INSERT INTO + users(uuid, age, date_of_birth, first_name, last_name) + VALUES + ('60b01fc9-c902-4468-8d49-3c0f989def37', ‘1983-01-05’, 22, 'Ronald', 'Russell') + */ + + val data = + List( + (UUID.randomUUID(), 22, LocalDate.ofYearDay(1990, 1), "Ronald1", "Russel1"), + (UUID.randomUUID(), 32, LocalDate.ofYearDay(1980, 1), "Ronald2", "Russel2"), + (UUID.randomUUID(), 42, LocalDate.ofYearDay(1970, 1), "Ronald3", "Russel3") + ) + val insertTuples = insertInto(users)(userId, age, dob, fName, lName) + .values(data) + + val insertedTupleRows = execute(insertTuples) + println(s"$insertedTupleRows rows are inserted!") + + /* + insert as case class with schema + INSERT INTO + users(uuid, age, date_of_birth, first_name, last_name) + VALUES + ('60b01fc9-c902-4468-8d49-3c0f989def37', ‘1983-01-05’, 22, 'Ronald', 'Russell') + */ + + final case class User( + userId: UUID, + age: Int, + dateOfBirth: LocalDate, + firstName: String, + lastName: String + ) + implicit val userSchema = DeriveSchema.gen[User] + + val dataSchema: User = User(UUID.randomUUID(), 22, LocalDate.ofYearDay(1990, 1), "Ronald", "Russel") + + val insertSchema = insertInto(users)( + userId, + age, + dob, + fName, + lName + ).values(dataSchema) + + val insertedSchemaRows = execute(insertSchema) + println(s"$insertedSchemaRows rows are inserted!") } From 0644872778a985038a778c54479de6fca724b84d Mon Sep 17 00:00:00 2001 From: Boris Burdiliak Date: Fri, 27 May 2022 16:17:51 +0200 Subject: [PATCH 462/673] Render delete for Oracle (#694) * WIP: render delete for Oracle * deal with boolean as smallints in Oracle Co-authored-by: Jaro Regec --- .../test/scala/zio/sql/mysql/ShopSchema.scala | 2 +- .../zio/sql/oracle/OracleRenderModule.scala | 29 ++++++++++++- .../zio/sql/oracle/OracleModuleSpec.scala | 33 +++++++++++++++ .../zio/sql/oracle/OracleRunnableSpec.scala | 34 +++++++++++++++ .../scala/zio/sql/oracle/ShopSchema.scala | 42 +++++++++++++++++++ .../scala/zio/sql/oracle/TestContainer.scala | 22 ++++++++++ 6 files changed, 159 insertions(+), 3 deletions(-) create mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/TestContainer.scala diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala index 9124cd3e6..d1082c6a9 100644 --- a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala +++ b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala @@ -21,7 +21,7 @@ trait ShopSchema extends Jdbc { self => val products = (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - val (productId, producttName, description, imageURL) = products.columns + val (productId, productName, description, imageURL) = products.columns } object ProductPrices { val productPrices = diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index d58fb4305..756aa783a 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -4,7 +4,11 @@ import zio.schema.Schema trait OracleRenderModule extends OracleSqlModule { self => - override def renderDelete(delete: self.Delete[_]): String = ??? + override def renderDelete(delete: self.Delete[_]): String = { + val builder = new StringBuilder + buildDeleteString(delete, builder) + builder.toString + } override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? @@ -32,7 +36,12 @@ trait OracleRenderModule extends OracleSqlModule { self => buildExpr(base, builder) case Expr.Property(base, op) => buildExpr(base, builder) - val _ = builder.append(" ").append(op.symbol) + val opString = op match { + case PropertyOp.IsNull | PropertyOp.IsNotNull => op.symbol + case PropertyOp.IsTrue => "= 1" + case PropertyOp.IsNotTrue => "= 0" + } + val _ = builder.append(" ").append(opString) case Expr.Binary(left, right, op) => buildExpr(left, builder) builder.append(" ").append(op.symbol).append(" ") @@ -44,6 +53,10 @@ trait OracleRenderModule extends OracleSqlModule { self => case Expr.In(value, set) => buildExpr(value, builder) buildReadString(set, builder) + case Expr.Literal(true) => + val _ = builder.append("1") + case Expr.Literal(false) => + val _ = builder.append("0") case Expr.Literal(value) => val _ = builder.append(value.toString) // todo fix escaping case Expr.AggregationCall(param, aggregation) => @@ -299,4 +312,16 @@ trait OracleRenderModule extends OracleSqlModule { self => buildExpr(on, builder) val _ = builder.append(" ") } + + private def buildDeleteString(delete: Delete[_], builder: StringBuilder) = { + builder.append("DELETE FROM ") + buildTable(delete.table, builder) + delete.whereExpr match { + case Expr.Literal(true) => () + case _ => + builder.append(" WHERE ") + buildExpr(delete.whereExpr, builder) + } + } + } diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala new file mode 100644 index 000000000..7bbeddaa3 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala @@ -0,0 +1,33 @@ +package zio.sql.oracle + +import zio.test.Assertion._ +import zio.test.TestAspect._ +import zio.test._ + +import scala.language.postfixOps + +object OracleModuleSpec extends OracleRunnableSpec with ShopSchema { + + import Customers._ + + override def specLayered = suite("Postgres module")( + test("Can delete from single table with a condition") { + val query = deleteFrom(customers) where (verified isNotTrue) + println(renderDelete(query)) + + val expected = 1 + val result = execute(query) + + assertZIO(result)(equalTo(expected)) + }, + test("Can delete all from a single table") { + val query = deleteFrom(customers) + println(renderDelete(query)) + + val expected = 4 + val result = execute(query) + + assertZIO(result)(equalTo(expected)) + } + ) @@ sequential +} diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala new file mode 100644 index 000000000..a964bf708 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala @@ -0,0 +1,34 @@ +package zio.sql.oracle + +import zio.ZLayer +import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } +import zio.test.{ Spec, TestEnvironment } + +import java.util.Properties + +trait OracleRunnableSpec extends JdbcRunnableSpec with OracleJdbcModule { + + private def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + val poolConfigLayer = ZLayer.scoped { + TestContainer + .oracle() + .map(container => + ConnectionPoolConfig( + url = container.jdbcUrl, + properties = connProperties(container.username, container.password) + ) + ) + } + + override def spec: Spec[TestEnvironment, Any] = + specLayered.provideCustomShared(jdbcLayer) + + def specLayered: Spec[JdbcEnvironment, Object] + +} diff --git a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala new file mode 100644 index 000000000..52076f321 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala @@ -0,0 +1,42 @@ +package zio.sql.oracle + +import zio.sql.Jdbc + +trait ShopSchema extends Jdbc { self => + import self.ColumnSet._ + + object Customers { + val customers = + (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) + .table("customers") + + val (customerId, dob, fName, lName, verified) = customers.columns + } + object Orders { + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + + val (orderId, fkCustomerId, orderDate) = orders.columns + } + object Products { + val products = + (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") + + val (productId, productName, description, imageURL) = products.columns + } + object ProductPrices { + val productPrices = + (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") + + val (fkProductId, effective, price) = productPrices.columns + } + + object OrderDetails { + val orderDetails = + (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) + .table( + "order_details" + ) // todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. + + val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns + } +} diff --git a/oracle/src/test/scala/zio/sql/oracle/TestContainer.scala b/oracle/src/test/scala/zio/sql/oracle/TestContainer.scala new file mode 100644 index 000000000..74577d433 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/TestContainer.scala @@ -0,0 +1,22 @@ +package zio.sql.oracle + +import com.dimafeng.testcontainers.OracleContainer +import org.testcontainers.utility.DockerImageName +import zio.{ Scope, ZIO } + +object TestContainer { + + def oracle(imageName: String = "gvenzl/oracle-xe"): ZIO[Scope, Throwable, OracleContainer] = + ZIO.acquireRelease { + ZIO.attemptBlocking { + val c = new OracleContainer( + dockerImageName = DockerImageName.parse(imageName) + ).configure { container => + container.withInitScript("shop_schema.sql") + () + } + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).orDie) +} From cee8c53a5a30aee40afa4b0483ceb4bccdc4ca60 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 27 May 2022 17:08:07 +0200 Subject: [PATCH 463/673] Update database-commons, jdbc, mssqlserver, ... to 1.17.2 (#647) Co-authored-by: Jakub Czuchnowski --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f9232aa81..a321d57f0 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC6" val zioSchemaVersion = "0.1.9" -val testcontainersVersion = "1.17.1" +val testcontainersVersion = "1.17.2" val testcontainersScalaVersion = "0.40.7" lazy val startPostgres = taskKey[Unit]("Start up Postgres") From b2b6a61687132e3c289fe87fadffba5491fa104b Mon Sep 17 00:00:00 2001 From: Sheng-Loong Su Date: Fri, 27 May 2022 23:12:11 +0800 Subject: [PATCH 464/673] Add insert tuple test --- .../scala/zio/sql/mysql/MysqlSqlModule.scala | 12 +++- mysql/src/test/resources/shop_schema.sql | 55 ++++++++++--------- .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 40 ++++++++++++-- .../test/scala/zio/sql/mysql/ShopSchema.scala | 12 ++-- 4 files changed, 82 insertions(+), 37 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index d86c97e6b..cf32bb0c6 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -1,8 +1,11 @@ package zio.sql.mysql +import java.time._ import java.sql.ResultSet -import java.time.{ LocalDate, LocalTime, OffsetTime, Year, ZonedDateTime } +import java.time.format.DateTimeFormatter import java.util.UUID + +import zio.schema.Schema import zio.sql.Sql trait MysqlSqlModule extends Sql { self => @@ -43,4 +46,11 @@ trait MysqlSqlModule extends Sql { self => val Uuid = Expr.FunctionCall0[UUID](FunctionDef[Any, UUID](FunctionName("uuid"))) val Radians = FunctionDef[Double, Double](FunctionName("radians")) } + + implicit val localDateSchema = + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) + + implicit val localDateTimeSchema = + Schema.primitive[LocalDateTime](zio.schema.StandardType.LocalDateTimeType(DateTimeFormatter.ISO_DATE_TIME)) + } diff --git a/mysql/src/test/resources/shop_schema.sql b/mysql/src/test/resources/shop_schema.sql index 76b105e88..1ad8c80c9 100644 --- a/mysql/src/test/resources/shop_schema.sql +++ b/mysql/src/test/resources/shop_schema.sql @@ -14,7 +14,8 @@ create table orders ( id varchar(36) not null primary key, customer_id varchar(36) not null, - order_date date not null + order_date date not null, + deleted_at datetime ); create table products @@ -78,33 +79,33 @@ values ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00); insert into orders - (id, customer_id, order_date) + (id, customer_id, order_date, deleted_at) values - ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-03-25'), - ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-06-04'), - ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-08-19'), - ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-08-30'), - ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-03-07'), - ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', '2020-03-19'), - ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2020-05-11'), - ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-02-21'), - ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-05-06'), - ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-02-11'), - ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-10-12'), - ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-01-29'), - ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-02-10'), - ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-09-27'), - ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2018-11-13'), - ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2020-01-15'), - ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2018-07-10'), - ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-08-01'), - ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-12-08'), - ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-11-04'), - ('2c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2018-10-14'), - ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05'), - ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23'), - ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14'), - ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30'); + ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-03-25', null), + ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-06-04', null), + ('9022dd0d-06d6-4a43-9121-2993fc7712a1', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-08-19', null), + ('38d66d44-3cfa-488a-ac77-30277751418f', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-08-30', null), + ('7b2627d5-0150-44df-9171-3462e20797ee', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-03-07', null), + ('62cd4109-3e5d-40cc-8188-3899fc1f8bdf', '60b01fc9-c902-4468-8d49-3c0f989def37', '2020-03-19', null), + ('9473a0bc-396a-4936-96b0-3eea922af36b', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2020-05-11', null), + ('b8bac18d-769f-48ed-809d-4b6c0e4d1795', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-02-21', null), + ('852e2dc9-4ec3-4225-a6f7-4f42f8ff728e', '60b01fc9-c902-4468-8d49-3c0f989def37', '2018-05-06', null), + ('bebbfe4d-4ec3-4389-bdc2-50e9eac2b15b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-02-11', null), + ('742d45a0-e81a-41ce-95ad-55b4cabba258', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-10-12', null), + ('618aa21f-700b-4ca7-933c-67066cf4cd97', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-01-29', null), + ('606da090-dd33-4a77-8746-6ed0e8443ab2', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-02-10', null), + ('4914028d-2e28-4033-a5f2-8f4fcdee8206', '60b01fc9-c902-4468-8d49-3c0f989def37', '2019-09-27', null), + ('d4e77298-d829-4e36-a6a0-902403f4b7d3', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2018-11-13', null), + ('fd0fa8d4-e1a0-4369-be07-945450db5d36', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2020-01-15', null), + ('d6d8dddc-4b0b-4d74-8edc-a54e9b7f35f7', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2018-07-10', null), + ('876b6034-b33c-4497-81ee-b4e8742164c2', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-08-01', null), + ('91caa28a-a5fe-40d7-979c-bd6a128d0418', 'df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', '2019-12-08', null), + ('401c7ab1-41cf-4756-8af5-be25cf2ae67b', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2019-11-04', null), + ('2c3fc180-d0df-4d7b-a271-e6ccd2440393', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2018-10-14', null), + ('763a7c39-833f-4ee8-9939-e80dfdbfc0fc', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2020-04-05', null), + ('5011d206-8eff-42c4-868e-f1a625e1f186', '636ae137-5b1a-4c8c-b11f-c47c624d9cdc', '2019-01-23', null), + ('0a48ffb0-ec61-4147-af56-fc4dbca8de0a', 'f76c9ace-be07-4bf3-bd4c-4a9c62882e64', '2019-05-14', null), + ('5883cb62-d792-4ee3-acbc-fe85b6baa998', '784426a5-b90a-4759-afbb-571b7a0ba35e', '2020-04-30', '2020-05-01T09:00:00'); insert into order_details (order_id, product_id, quantity, unit_price) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index 3fef292f1..05e30230a 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -1,19 +1,20 @@ package zio.sql.mysql -import java.time.LocalDate +import java.time._ import java.time.format.DateTimeFormatter import java.util.UUID -import zio.Cause +import scala.language.postfixOps + +import zio._ import zio.schema._ import zio.test._ import zio.test.Assertion._ -import scala.language.postfixOps object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { - import this.Customers._ - import this.Orders._ + import Customers._ + import Orders._ override def specLayered = suite("Mysql module")( test("Can select from single table") { @@ -206,6 +207,35 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { assertZIO(execute(command))(equalTo(2)) }, + test("Can insert tuples") { + implicit val optionLocalDateTimeSchema = Schema.option[LocalDateTime] + + val rows = List( + ( + UUID.randomUUID(), + UUID.randomUUID(), + LocalDate.of(2022, 1, 1), + None + ), + ( + UUID.randomUUID(), + UUID.randomUUID(), + LocalDate.of(2022, 1, 5), + Some(LocalDateTime.of(2022, 1, 10, 3, 20)) + ) + ) + + val command = insertInto(orders)( + orderId, + fkCustomerId, + orderDate, + deleted_at + ).values(rows) + + println(renderInsert(command)) + + assertZIO(execute(command))(equalTo(2)) + }, test("Can update rows") { val query = update(customers).set(fName, "Roland").where(fName === "Ronald") diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala index d1082c6a9..dbcc58cf5 100644 --- a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala +++ b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala @@ -5,17 +5,21 @@ import zio.sql.Jdbc trait ShopSchema extends Jdbc { self => import self.ColumnSet._ - object Customers { + object Customers { val customers = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) .table("customers") val (customerId, dob, fName, lName, verified) = customers.columns } - object Orders { - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") + object Orders { - val (orderId, fkCustomerId, orderDate) = orders.columns + import ColumnSetAspect._ + + val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date") ++ + localDateTime("deleted_at") @@ nullable).table("orders") + + val (orderId, fkCustomerId, orderDate, deleted_at) = orders.columns } object Products { val products = From caded1879544e4944433b33c11cbaffb1be983be Mon Sep 17 00:00:00 2001 From: ujali Date: Fri, 27 May 2022 17:33:12 +0200 Subject: [PATCH 465/673] 673 added example and test for union function --- examples/src/main/scala/zio/sql/Examples.scala | 7 +++++++ .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 18 ++++++++++++++++-- .../test/scala/zio/sql/mysql/ShopSchema.scala | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index ebe854be0..eb832b930 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -89,4 +89,11 @@ object Examples extends App with ShopSchema with PostgresJdbcModule { // SELECT "users"."first_name", "users"."last_name" FROM "users" WHERE true and "users"."first_name" is not null val withPropertyOp = select(fName, lName).from(users).where(fName isNotNull) println(renderRead(withPropertyOp)) + + /* SELECT "users"."user_id" FROM "users" + UNION + SELECT "orders"."usr_id" FROM "orders" + */ + val selectWithUnion = select(userId).from(users).union(select(fkUserId).from(orders)) + } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index 767d575f0..9bd273e8a 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -2,10 +2,10 @@ package zio.sql.mysql import java.time.LocalDate import java.util.UUID - -import zio.Cause +import zio._ import zio.test._ import zio.test.Assertion._ + import scala.language.postfixOps object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { @@ -120,6 +120,20 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("Can union two tables") { + val query = select(customerId).from(customers).union(select(fkCustomerId).from(orders)) + + val expected = + Seq( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), + UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc") + ) + + assertZIO(execute(query).runCollect)(hasSameElementsDistinct(expected)) + }, /* * This is a failing test for aggregation function. * Uncomment it when aggregation function handling is fixed. diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala index 9124cd3e6..d1082c6a9 100644 --- a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala +++ b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala @@ -21,7 +21,7 @@ trait ShopSchema extends Jdbc { self => val products = (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - val (productId, producttName, description, imageURL) = products.columns + val (productId, productName, description, imageURL) = products.columns } object ProductPrices { val productPrices = From 3ee5db03837a80c1bb166a9778b78cbd55e423cb Mon Sep 17 00:00:00 2001 From: ujali Date: Fri, 27 May 2022 17:57:53 +0200 Subject: [PATCH 466/673] 673 added example and test for unionAll function --- examples/src/main/scala/zio/sql/Examples.scala | 5 +++++ .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index eb832b930..3a19c0959 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -96,4 +96,9 @@ object Examples extends App with ShopSchema with PostgresJdbcModule { */ val selectWithUnion = select(userId).from(users).union(select(fkUserId).from(orders)) + /* SELECT "users"."user_id" FROM "users" + UNION ALL + SELECT "orders"."usr_id" FROM "orders" + */ + val selectWithUnion = select(userId).from(users).unionAll(select(fkUserId).from(orders)) } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index 9bd273e8a..720066ad7 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -120,7 +120,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("Can union two tables") { + test("Execute union on select queries") { val query = select(customerId).from(customers).union(select(fkCustomerId).from(orders)) val expected = @@ -132,6 +132,20 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc") ) + assertZIO(execute(query).runCollect)(hasSameElements(expected)) + }, + test("Execute union all on select queries") { + val query = select(customerId).from(customers).unionAll(select(fkCustomerId).from(orders)) + + val expected = + Chunk( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), + UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), + UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), + UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc") + ) + assertZIO(execute(query).runCollect)(hasSameElementsDistinct(expected)) }, /* From da4cfcfef06187322b252c45d6d010df89719896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Sza=C5=82omski?= Date: Sun, 29 May 2022 18:51:01 +0200 Subject: [PATCH 467/673] #154: Implement `renderUpdate` for Oracle (#700) * 154: (Draft) Implement `renderUpate` for Oracle * #154: (Draft) Implement `renderUpdate` for Oracle * #154: Implement `renderUpdate` for Oracle * #154: Extend tests of `renderUpdate` for Oracle * #154: fix formatting * #154: fix 2.12.15 compatibility * #154: adjust docs * #154: fix non-related flaky test --- README.md | 14 ++--- .../main/scala/zio/sql/driver/Renderer.scala | 5 ++ .../zio/sql/oracle/OracleRenderModule.scala | 63 +++++++++++++++++-- .../zio/sql/oracle/OracleModuleSpec.scala | 33 ---------- .../zio/sql/oracle/OracleSqlModuleSpec.scala | 62 ++++++++++++++++++ .../scala/zio/sql/oracle/ShopSchema.scala | 8 ++- .../zio/sql/postgresql/FunctionDefSpec.scala | 4 +- ...Spec.scala => PostgresSqlModuleSpec.scala} | 2 +- .../sql/sqlserver/SqlServerRenderModule.scala | 3 +- 9 files changed, 141 insertions(+), 53 deletions(-) delete mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala create mode 100644 oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala rename postgres/src/test/scala/zio/sql/postgresql/{PostgresModuleSpec.scala => PostgresSqlModuleSpec.scala} (99%) diff --git a/README.md b/README.md index 1e22d8be3..cffb3546e 100644 --- a/README.md +++ b/README.md @@ -26,15 +26,15 @@ Connection pool | :white_check_mark: #### Db-specific features: -Feature | PostgreSQL | SQL Server | Oracle | MySQL -:------------ | :-------------| :-------------| :-------------| :------------- +Feature | PostgreSQL | SQL Server | Oracle | MySQL +:------------ | :-------------| :-------------|:-------------------| :------------- Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Render Delete | :heavy_check_mark: | :heavy_check_mark: | | :white_check_mark: | -Render Update | :heavy_check_mark: | | | :white_check_mark: | -Render Insert | :heavy_check_mark: | | | +Render Delete | :heavy_check_mark: | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | +Render Update | :heavy_check_mark: | | :white_check_mark: | :white_check_mark: | +Render Insert | :heavy_check_mark: | | | Functions | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -Types | :white_check_mark: | | | :white_check_mark: | -Operators | | | | +Types | :white_check_mark: | | | :white_check_mark: | +Operators | | | | ## What is ZIO SQL? ZIO SQL lets you write type-safe, type-inferred, and composable SQL queries in ordinary Scala, helping you prevent persistence bugs before they happen, and leverage your IDE to make writing SQL productive, safe, and fun. diff --git a/driver/src/main/scala/zio/sql/driver/Renderer.scala b/driver/src/main/scala/zio/sql/driver/Renderer.scala index 5203c8c13..db972550c 100644 --- a/driver/src/main/scala/zio/sql/driver/Renderer.scala +++ b/driver/src/main/scala/zio/sql/driver/Renderer.scala @@ -20,4 +20,9 @@ private[sql] class Renderer(val builder: StringBuilder) extends AnyVal { private[sql] object Renderer { def apply(): Renderer = new Renderer(new StringBuilder) + + implicit class Extensions(val value: String) { + def doubleQuoted: String = s""""$value"""" + def singleQuoted: String = s"'$value'" + } } diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index 756aa783a..37a64dfbc 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -1,6 +1,10 @@ package zio.sql.oracle import zio.schema.Schema +import zio.sql.driver.Renderer +import zio.sql.driver.Renderer.Extensions + +import scala.collection.mutable trait OracleRenderModule extends OracleSqlModule { self => @@ -18,8 +22,13 @@ trait OracleRenderModule extends OracleSqlModule { self => builder.toString() } - override def renderUpdate(update: self.Update[_]): String = ??? + override def renderUpdate(update: self.Update[_]): String = { + implicit val render: Renderer = Renderer() + OracleRender.renderUpdateImpl(update) + render.toString + } + // TODO: to consider the refactoring and using the implicit `Renderer`, see `renderExpr` in `PostgresRenderModule` private def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { case Expr.Subselect(subselect) => builder.append(" (") @@ -49,16 +58,20 @@ trait OracleRenderModule extends OracleSqlModule { self => case Expr.Relational(left, right, op) => buildExpr(left, builder) builder.append(" ").append(op.symbol).append(" ") - buildExpr(right, builder) + right.asInstanceOf[Expr[_, A, B]] match { + case Expr.Literal(true) => val _ = builder.append("1") + case Expr.Literal(false) => val _ = builder.append("0") + case otherValue => buildExpr(otherValue, builder) + } case Expr.In(value, set) => buildExpr(value, builder) buildReadString(set, builder) case Expr.Literal(true) => - val _ = builder.append("1") + val _ = builder.append("1 = 1") case Expr.Literal(false) => - val _ = builder.append("0") + val _ = builder.append("0 = 1") case Expr.Literal(value) => - val _ = builder.append(value.toString) // todo fix escaping + val _ = builder.append(value.toString.singleQuoted) case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") @@ -313,7 +326,7 @@ trait OracleRenderModule extends OracleSqlModule { self => val _ = builder.append(" ") } - private def buildDeleteString(delete: Delete[_], builder: StringBuilder) = { + private def buildDeleteString(delete: Delete[_], builder: mutable.StringBuilder): Unit = { builder.append("DELETE FROM ") buildTable(delete.table, builder) delete.whereExpr match { @@ -324,4 +337,42 @@ trait OracleRenderModule extends OracleSqlModule { self => } } + private[oracle] object OracleRender { + + def renderUpdateImpl(update: Update[_])(implicit render: Renderer): Unit = + update match { + case Update(table, set, whereExpr) => + render("UPDATE ") + buildTable(table, render.builder) + render(" SET ") + renderSet(set) + render(" WHERE ") + buildExpr(whereExpr, render.builder) + } + + def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = + set match { + case head :: tail => + renderSetLhs(head.lhs) + render(" = ") + buildExpr(head.rhs, render.builder) + tail.foreach { setEq => + render(", ") + renderSetLhs(setEq.lhs) + render(" = ") + buildExpr(setEq.rhs, render.builder) + } + case Nil => // TODO restrict Update to not allow empty set + } + + private[zio] def renderSetLhs[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = + expr match { + case Expr.Source(table, column) => + (table, column.name) match { + case (tableName, Some(columnName)) => val _ = render(tableName, ".", columnName) + case _ => () + } + case _ => () + } + } } diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala deleted file mode 100644 index 7bbeddaa3..000000000 --- a/oracle/src/test/scala/zio/sql/oracle/OracleModuleSpec.scala +++ /dev/null @@ -1,33 +0,0 @@ -package zio.sql.oracle - -import zio.test.Assertion._ -import zio.test.TestAspect._ -import zio.test._ - -import scala.language.postfixOps - -object OracleModuleSpec extends OracleRunnableSpec with ShopSchema { - - import Customers._ - - override def specLayered = suite("Postgres module")( - test("Can delete from single table with a condition") { - val query = deleteFrom(customers) where (verified isNotTrue) - println(renderDelete(query)) - - val expected = 1 - val result = execute(query) - - assertZIO(result)(equalTo(expected)) - }, - test("Can delete all from a single table") { - val query = deleteFrom(customers) - println(renderDelete(query)) - - val expected = 4 - val result = execute(query) - - assertZIO(result)(equalTo(expected)) - } - ) @@ sequential -} diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala new file mode 100644 index 000000000..84b4b87f7 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala @@ -0,0 +1,62 @@ +package zio.sql.oracle + +import zio.test.Assertion._ +import zio.test.TestAspect._ +import zio.test._ + +import scala.language.postfixOps + +object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema { + + import Customers._ + + override def specLayered: Spec[SqlDriver, Exception] = suite("Oracle module")( + test("Can update selected rows") { + + /** + * UPDATE customers SET customers.first_name = 'Antek' + * WHERE 1 = 1 and customers.verified = 0 and customers.verified <> 1 + */ + val query = + update(customers) + .set(fName, "Antek") + .where(verified isNotTrue) + .where(verified <> true) // we intentionally verify two syntax variants + + assertZIO(execute(query))(equalTo(1)) + }, + test("Can update all rows") { + + /** + * UPDATE customers SET customers.first_name = 'Antek' WHERE 1 = 1 + */ + val query = update(customers).set(fName, "Antek") + + assertZIO(execute(query))(equalTo(5)) + }, + test("Can delete from single table with a condition") { + + /** + * DELETE FROM customers WHERE customers.verified = 0 + */ + val query = deleteFrom(customers) where (verified isNotTrue) + + val expected = 1 + val result = execute(query) + + assertZIO(result)(equalTo(expected)) + }, + test("Can delete all from a single table") { + + /** + * DELETE FROM customers + */ + val query = deleteFrom(customers) + + val expected = 4 + val result = execute(query) + + assertZIO(result)(equalTo(expected)) + } + ) @@ sequential +} diff --git a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala index 52076f321..177831047 100644 --- a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala +++ b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala @@ -5,12 +5,14 @@ import zio.sql.Jdbc trait ShopSchema extends Jdbc { self => import self.ColumnSet._ - object Customers { + object Customers { + val customers = - (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) + (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ + boolean("verified") ++ zonedDateTime("Created_timestamp")) .table("customers") - val (customerId, dob, fName, lName, verified) = customers.columns + val (customerId, dob, fName, lName, verified, createdTimestamp) = customers.columns } object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index ab3ce1eb4..457adfbdc 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -298,10 +298,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { ) }, test("localtime with precision") { - val precision = 0 + val precision = 3 assertZIO(execute(select(LocaltimeWithPrecision(precision))).runHead.some.map(_.toString))( matchesRegex( - s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}" + s"\\d{2}:\\d{2}:\\d{2}\\.\\d{$precision}" ) ) }, diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala similarity index 99% rename from postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala rename to postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala index 2e6e46842..eb78ed3f1 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala @@ -11,7 +11,7 @@ import scala.language.postfixOps import zio.schema.Schema import java.time.format.DateTimeFormatter -object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { +object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { import AggregationDef._ import Customers._ diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 30cccdd67..29cf49d5c 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -2,6 +2,7 @@ package zio.sql.sqlserver import zio.schema.Schema import zio.sql.driver.Renderer +import zio.sql.driver.Renderer.Extensions trait SqlServerRenderModule extends SqlServerSqlModule { self => @@ -153,7 +154,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => .asInstanceOf[java.time.OffsetDateTime] .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) s"'$x'" - case _ => s"'${value.toString}'" + case _ => value.toString.singleQuoted } render(lit) case Expr.AggregationCall(param, aggregation) => From ca23a33de97b1fb570385b247ad5eca6f30773ee Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sun, 29 May 2022 19:50:40 +0200 Subject: [PATCH 468/673] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cffb3546e..011d54b2f 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,13 @@ Connection pool | :white_check_mark: Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------|:-------------------| :------------- -Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Render Delete | :heavy_check_mark: | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | -Render Update | :heavy_check_mark: | | :white_check_mark: | :white_check_mark: | -Render Insert | :heavy_check_mark: | | | +Render Update | :heavy_check_mark: | | :white_check_mark: | :white_check_mark: | +Render Insert | :heavy_check_mark: | | | :white_check_mark: | Functions | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -Types | :white_check_mark: | | | :white_check_mark: | -Operators | | | | +Types | :white_check_mark: | | | :white_check_mark: | +Operators | | | | | ## What is ZIO SQL? ZIO SQL lets you write type-safe, type-inferred, and composable SQL queries in ordinary Scala, helping you prevent persistence bugs before they happen, and leverage your IDE to make writing SQL productive, safe, and fun. From eb38c2acd36a28ce25b1dafcb85555a1f1a9b29c Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 29 May 2022 20:13:47 +0200 Subject: [PATCH 469/673] Remove old infrastructure related sbt functions --- build.sbt | 25 ---------------- docker-compose.yml | 45 ---------------------------- project/InfrastructureHelper.scala | 47 ------------------------------ 3 files changed, 117 deletions(-) delete mode 100644 docker-compose.yml delete mode 100644 project/InfrastructureHelper.scala diff --git a/build.sbt b/build.sbt index a321d57f0..5c93dca58 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,4 @@ import BuildHelper._ -import InfrastructureHelper._ import explicitdeps.ExplicitDepsPlugin.autoImport.moduleFilterRemoveValue import sbtcrossproject.CrossPlugin.autoImport.crossProject @@ -29,30 +28,6 @@ val zioSchemaVersion = "0.1.9" val testcontainersVersion = "1.17.2" val testcontainersScalaVersion = "0.40.7" -lazy val startPostgres = taskKey[Unit]("Start up Postgres") -startPostgres := startService(Database.Postgres, streams.value) - -lazy val stopPostgres = taskKey[Unit]("Shut down Postgres") -stopPostgres := stopService(Database.Postgres, streams.value) - -lazy val startMySQL = taskKey[Unit]("Start up MySQL") -startMySQL := startService(Database.MySQL, streams.value) - -lazy val stopMySQL = taskKey[Unit]("Shut down MySQL") -stopMySQL := stopService(Database.MySQL, streams.value) - -lazy val startMsSQL = taskKey[Unit]("Start up Microsoft SQL Server") -startMsSQL := startService(Database.MSSQL, streams.value) - -lazy val stopMsSQL = taskKey[Unit]("Shut down Microsoft SQL Server") -stopMsSQL := stopService(Database.MSSQL, streams.value) - -lazy val startOracle = taskKey[Unit]("Start up Oracle") -startOracle := startService(Database.Oracle, streams.value) - -lazy val stopOracle = taskKey[Unit]("Shut down Oracle") -stopOracle := stopService(Database.Oracle, streams.value) - lazy val root = project .in(file(".")) .settings( diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 4c0dcf500..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,45 +0,0 @@ -version: '3.1' - -services: - postgres: - image: postgres:12 - restart: always - environment: - POSTGRES_USER: zio_user - POSTGRES_PASSWORD: zio_pw - ports: - - "5432:5432" - - mysql: - image: mysql:8 - restart: always - environment: - MYSQL_USER: zio_user - MYSQL_PASSWORD: zio_pw - MYSQL_ROOT_PASSWORD: zio_pw - ports: - - "3306:3306" - - mssql: - image: mcr.microsoft.com/mssql/server:2019-latest - restart: always - environment: - ACCEPT_EULA: Y - SA_PASSWORD: zio_pw123ABC! - MSSQL_PID: Developer - ports: - - "1433:1433" - # Username: sa - - oracle: - image: oracleinanutshell/oracle-xe-11g - restart: always - environment: - ORACLE_ALLOW_REMOTE: 'true' - ORACLE_DISABLE_ASYNCH_IO: 'true' - ports: - - "1521:1521" - - "5500:5500" - # SID: XE - # Username: system - # Password: oracle \ No newline at end of file diff --git a/project/InfrastructureHelper.scala b/project/InfrastructureHelper.scala deleted file mode 100644 index 383a8dc9c..000000000 --- a/project/InfrastructureHelper.scala +++ /dev/null @@ -1,47 +0,0 @@ -import sbt.Keys.TaskStreams - -import scala.sys.process._ - -object InfrastructureHelper { - - sealed trait Database { self => - - // must align with the service name in docker-compose.yaml - def name: String = self match { - case Database.Postgres => "postgres" - case Database.MySQL => "mysql" - case Database.MSSQL => "mssql" - case Database.Oracle => "oracle" - } - - def port: Int = self match { - case Database.Postgres => 5432 - case Database.MySQL => 3306 - case Database.MSSQL => 1433 - case Database.Oracle => 1521 - } - } - - object Database { - case object Postgres extends Database - case object MySQL extends Database - case object MSSQL extends Database - case object Oracle extends Database - } - - val shell: Seq[String] = - if (sys.props("os.name").contains("Windows")) Vector("cmd", "/c") - else Vector("bash", "-c") - - def startService(db: Database, s: TaskStreams): Unit = { - val dockerComposeUp = shell :+ s"docker-compose up -d ${db.name}" - if (dockerComposeUp.! == 0) s.log.success(s"${db.name} started on port ${db.port}") - else s.log.error(s"${db.name} was not able to start up") - } - - def stopService(db: Database, s: TaskStreams): Unit = { - val dockerComposeDown = shell :+ s"docker-compose stop ${db.name}" - if (dockerComposeDown.! == 0) s.log.success(s"${db.name} was stopped") - else s.log.error(s"${db.name} was not able to shut down properly") - } -} From edd7e60d0e1368a92041c9cba83988ebfae6ab42 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 29 May 2022 19:33:23 +0200 Subject: [PATCH 470/673] Postgres functions in alphabetical order and tests cleanup --- .../sql/postgresql/PostgresSqlModule.scala | 90 +++++++++---------- .../zio/sql/postgresql/FunctionDefSpec.scala | 56 +++--------- 2 files changed, 57 insertions(+), 89 deletions(-) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala index 817aa17e4..337147121 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala @@ -246,47 +246,36 @@ trait PostgresSqlModule extends Sql { self => object PostgresFunctionDef { import PostgresSpecific._ - val SplitPart = FunctionDef[(String, String, Int), String](FunctionName("split_part")) - val IsFinite = FunctionDef[Instant, Boolean](FunctionName("isfinite")) - val TimeOfDay = FunctionDef[Any, String](FunctionName("timeofday")) - val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) + val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + val CBRT = FunctionDef[Double, Double](FunctionName("cbrt")) val CharLength = FunctionDef[String, Int](FunctionName("character_length")) - val Localtime = Expr.ParenlessFunctionCall0[LocalTime](FunctionName("localtime")) - val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) - val Localtimestamp = Expr.ParenlessFunctionCall0[Instant](FunctionName("localtimestamp")) - val LocaltimestampWithPrecision = FunctionDef[Int, Instant](FunctionName("localtimestamp")) - val Md5 = FunctionDef[String, String](FunctionName("md5")) - val ParseIdent = FunctionDef[String, String](FunctionName("parse_ident")) val Chr = FunctionDef[Int, String](FunctionName("chr")) val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) - val Initcap = FunctionDef[String, String](FunctionName("initcap")) - val Repeat = FunctionDef[(String, Int), String](FunctionName("repeat")) - val Reverse = FunctionDef[String, String](FunctionName("reverse")) - val TrimScale = FunctionDef[Double, Double](FunctionName("trim_scale")) - val Hex = FunctionDef[Int, String](FunctionName("to_hex")) - val Left = FunctionDef[(String, Int), String](FunctionName("left")) - val Length = FunctionDef[String, Int](FunctionName("length")) - val MinScale = FunctionDef[Double, Int](FunctionName("min_scale")) - val Radians = FunctionDef[Double, Double](FunctionName("radians")) - val Right = FunctionDef[(String, Int), String](FunctionName("right")) - val StartsWith = FunctionDef[(String, String), Boolean](FunctionName("starts_with")) - val Translate = FunctionDef[(String, String, String), String](FunctionName("translate")) - val Trunc = FunctionDef[Double, Double](FunctionName("trunc")) - val Sind = FunctionDef[Double, Double](FunctionName("sind")) - val GCD = FunctionDef[(Double, Double), Double](FunctionName("gcd")) - val LCM = FunctionDef[(Double, Double), Double](FunctionName("lcm")) - val CBRT = FunctionDef[Double, Double](FunctionName("cbrt")) + val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) + val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Div = FunctionDef[(Double, Double), Double](FunctionName("div")) + val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) val Factorial = FunctionDef[Int, Int](FunctionName("factorial")) - val Random = FunctionDef[Any, Double](FunctionName("random")) + val Format0 = FunctionDef[String, String](FunctionName("format")) // TODO: varargs + val Format1 = FunctionDef[(String, Any), String](FunctionName("format")) + val Format2 = FunctionDef[(String, Any, Any), String](FunctionName("format")) + val Format3 = FunctionDef[(String, Any, Any, Any), String](FunctionName("format")) + val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) + val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) + val GCD = FunctionDef[(Double, Double), Double](FunctionName("gcd")) + val GenRandomUuid = Expr.FunctionCall0[UUID](FunctionDef[Any, UUID](FunctionName("gen_random_uuid"))) + val Hex = FunctionDef[Int, String](FunctionName("to_hex")) + val Initcap = FunctionDef[String, String](FunctionName("initcap")) + val IsFinite = FunctionDef[Instant, Boolean](FunctionName("isfinite")) + val LCM = FunctionDef[(Double, Double), Double](FunctionName("lcm")) + val Left = FunctionDef[(String, Int), String](FunctionName("left")) + val Length = FunctionDef[String, Int](FunctionName("length")) + val Localtime = Expr.ParenlessFunctionCall0[LocalTime](FunctionName("localtime")) + val Localtimestamp = Expr.ParenlessFunctionCall0[Instant](FunctionName("localtimestamp")) + val LocaltimestampWithPrecision = FunctionDef[Int, Instant](FunctionName("localtimestamp")) + val LocaltimeWithPrecision = FunctionDef[Int, LocalTime](FunctionName("localtime")) val LPad = FunctionDef[(String, Int, String), String](FunctionName("lpad")) - val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) - val ToTimestamp = FunctionDef[Long, ZonedDateTime](FunctionName("to_timestamp")) - val PgClientEncoding = FunctionDef[Any, String](FunctionName("pg_client_encoding")) - val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) - val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) - val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) val MakeDate = FunctionDef[(Int, Int, Int), LocalDate](FunctionName("make_date")) val MakeInterval = FunctionDef[Interval, Interval](FunctionName("make_interval")) val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("make_time")) @@ -296,18 +285,29 @@ trait PostgresSqlModule extends Sql { self => ) val MakeTimestampz = FunctionDef[Timestampz, Timestampz](FunctionName("make_timestamptz")) - val Encode = FunctionDef[(Chunk[Byte], String), String](FunctionName("encode")) - val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) - val Format0 = FunctionDef[String, String](FunctionName("format")) // TODO: varargs - val Format1 = FunctionDef[(String, Any), String](FunctionName("format")) - val Format2 = FunctionDef[(String, Any, Any), String](FunctionName("format")) - val Format3 = FunctionDef[(String, Any, Any, Any), String](FunctionName("format")) - val Format4 = FunctionDef[(String, Any, Any, Any, Any), String](FunctionName("format")) - val Format5 = FunctionDef[(String, Any, Any, Any, Any, Any), String](FunctionName("format")) - val SetSeed = FunctionDef[Double, Unit](FunctionName("setseed")) - val BitLength = FunctionDef[String, Int](FunctionName("bit_length")) + val Md5 = FunctionDef[String, String](FunctionName("md5")) + val MinScale = FunctionDef[Double, Int](FunctionName("min_scale")) + val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) + val ParseIdent = FunctionDef[String, String](FunctionName("parse_ident")) + val PgClientEncoding = FunctionDef[Any, String](FunctionName("pg_client_encoding")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) - val GenRandomUuid = Expr.FunctionCall0[UUID](FunctionDef[Any, UUID](FunctionName("gen_random_uuid"))) + val Radians = FunctionDef[Double, Double](FunctionName("radians")) + val Random = FunctionDef[Any, Double](FunctionName("random")) + val Repeat = FunctionDef[(String, Int), String](FunctionName("repeat")) + val Reverse = FunctionDef[String, String](FunctionName("reverse")) + val Right = FunctionDef[(String, Int), String](FunctionName("right")) + val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) + val SetSeed = FunctionDef[Double, Unit](FunctionName("setseed")) + val Sind = FunctionDef[Double, Double](FunctionName("sind")) + val SplitPart = FunctionDef[(String, String, Int), String](FunctionName("split_part")) + val StartsWith = FunctionDef[(String, String), Boolean](FunctionName("starts_with")) + val StatementTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("statement_timestamp")) + val TimeOfDay = FunctionDef[Any, String](FunctionName("timeofday")) + val ToTimestamp = FunctionDef[Long, ZonedDateTime](FunctionName("to_timestamp")) + val TransactionTimestamp = FunctionDef[Any, ZonedDateTime](FunctionName("transaction_timestamp")) + val Translate = FunctionDef[(String, String, String), String](FunctionName("translate")) + val TrimScale = FunctionDef[Double, Double](FunctionName("trim_scale")) + val Trunc = FunctionDef[Double, Double](FunctionName("trunc")) } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 457adfbdc..7d96f1b8e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -30,15 +30,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { import Expr._ // note: a plain number (3) would and should not compile - val query = select(ConcatWs4("+", "1", "2", "3")) from customers - - val expected = Seq( // note: one for each row - "1+2+3", - "1+2+3", - "1+2+3", - "1+2+3", - "1+2+3" - ) + val query = select(ConcatWs4("+", "1", "2", "3")) + + val expected = Seq("1+2+3") val testResult = execute(query) collectAndCompare(expected, testResult) @@ -124,15 +118,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { test("format0") { import Expr._ - val query = select(Format0("Person")) from customers + val query = select(Format0("Person")) - val expected = Seq( - "Person", - "Person", - "Person", - "Person", - "Person" - ) + val expected = Seq("Person") val testResult = execute(query) collectAndCompare(expected, testResult) @@ -356,11 +344,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, suite("parseIdent")( test("parseIdent removes quoting of individual identifiers") { @@ -373,26 +357,18 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { string2 <- someString } yield s""""${string1}".${string2}""" - val assertion = check(genTestString) { (testString) => + check(genTestString) { (testString) => val query = select(ParseIdent(testString)) val testResult = execute(query) - for { - r <- testResult.runCollect - } yield assert(r.head)(not(containsString("'")) && not(containsString("\""))) - + assertZIO(testResult.runHead.some)(not(containsString("'")) && not(containsString("\""))) } - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("parseIdent fails with invalid identifier") { val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect.exit - } yield assert(r)(fails(anything)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runCollect.exit)(fails(anything)) } ) @@ ignore, test("sqrt") { @@ -402,11 +378,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("chr") { val query = select(Chr(65)) @@ -876,16 +848,12 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("setseed") { - val query = select(SetSeed(0.12), Random(), Random()) from customers + val query = select(SetSeed(0.12), Random(), Random()) val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) val testResult = execute(query).map { case (_, b, c) => (b, c) } - val assertion = for { - r <- testResult.runCollect - } yield assert(r.take(2))(equalTo(Chunk(randomTupleForSeed, randomTupleForSeed))) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + assertZIO(testResult.runHead.some)(equalTo(randomTupleForSeed)) }, test("Can concat strings with concat function") { From a3d1e277258eac1b8f26b6e7bcd5d41dc44b98fa Mon Sep 17 00:00:00 2001 From: Serhii Dashko Date: Mon, 30 May 2022 21:21:25 +0300 Subject: [PATCH 471/673] Adds HikariCP (#639) --- build.sbt | 20 +++- .../scala/zio/sql/HikariConnectionPool.scala | 34 ++++++ .../zio/sql/HikariConnectionPoolConfig.scala | 53 +++++++++ .../zio/sql/HikariConnectionPoolSpec.scala | 102 ++++++++++++++++++ .../scala/zio/sql/MySqlTestContainer.scala | 20 ++++ 5 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala create mode 100644 jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala create mode 100644 jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala create mode 100644 jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala diff --git a/build.sbt b/build.sbt index a321d57f0..a185948df 100644 --- a/build.sbt +++ b/build.sbt @@ -69,7 +69,8 @@ lazy val root = project mysql, oracle, postgres, - sqlserver + sqlserver, + jdbc_hikaricp ) lazy val core = crossProject(JSPlatform, JVMPlatform) @@ -155,6 +156,23 @@ lazy val jdbc = project .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) .dependsOn(core.jvm) +lazy val jdbc_hikaricp = project + .in(file("jdbc-hikaricp")) + .settings(stdSettings("zio-sql-jdbc-hickaricp")) + .settings(buildInfoSettings("zio.sql.jdbc-hickaricp")) + .settings( + libraryDependencies ++= Seq( + "com.zaxxer" % "HikariCP" % "5.0.1", + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test, + "org.testcontainers" % "mysql" % testcontainersVersion % Test, + "mysql" % "mysql-connector-java" % "8.0.29" % Test, + "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test + ) + ) + .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) + .dependsOn(jdbc) + lazy val mysql = project .in(file("mysql")) .dependsOn(jdbc % "compile->compile;test->test") diff --git a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala new file mode 100644 index 000000000..8696eb1f9 --- /dev/null +++ b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala @@ -0,0 +1,34 @@ +package zio.sql +import com.zaxxer.hikari.{HikariConfig, HikariDataSource} +import zio.{Scope, ZIO, ZLayer} + +import java.sql.{Connection, SQLException} + +class HikariConnectionPool private (hikariDataSource: HikariDataSource) extends ConnectionPool { + + private[sql] val dataSource = hikariDataSource + + /** + * Retrieves a JDBC java.sql.Connection as a [[ZIO[Scope, Exception, Connection]]] resource. + * The managed resource will safely acquire and release the connection, and + * may be interrupted or timed out if necessary. + */ + override def connection: ZIO[Scope, Exception, Connection] = { + ZIO.acquireRelease(ZIO.attemptBlocking(hikariDataSource.getConnection).refineToOrDie[SQLException])(con => ZIO.attemptBlocking(hikariDataSource.evictConnection(con)).orDie) + } +} + +object HikariConnectionPool { + + private[sql] def initDataSource(config: HikariConfig): ZIO[Scope, Throwable, HikariDataSource] = + ZIO.acquireRelease(ZIO.attemptBlocking(new HikariDataSource(config)))(ds => ZIO.attemptBlocking(ds.close()).orDie) + + val live: ZLayer[HikariConnectionPoolConfig, Throwable, HikariConnectionPool] = + ZLayer.scoped { + for { + config <- ZIO.service[HikariConnectionPoolConfig] + dataSource <- initDataSource(config.toHikariConfig) + pool = new HikariConnectionPool(dataSource) + } yield pool + } +} diff --git a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala new file mode 100644 index 000000000..f788a9028 --- /dev/null +++ b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala @@ -0,0 +1,53 @@ +package zio.sql + +import com.zaxxer.hikari.HikariConfig + + +/** + * Configuration information for the connection pool. + * + * @param url The JDBC connection string. + * @param properties JDBC connection properties (username / password could go here). + * @param poolSize The size of the pool. + * @param connectionTimeout Maximum number of milliseconds that a client will wait for a connection from the pool. + * If this time is exceeded without a connection becoming available, a SQLException will be thrown from javax.sql.DataSource.getConnection(). + * @param idleTimeout This property controls the maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the pool. + * Whether a connection is retired as idle or not is subject to a maximum variation of +30 seconds, and average variation of +15 seconds. + * A connection will never be retired as idle before this timeout. A value of 0 means that idle connections are never removed from the pool. + * @param initializationFailTimeout the number of milliseconds before the + * pool initialization fails, or 0 to validate connection setup but continue with + * pool start, or less than zero to skip all initialization checks and start the + * pool without delay. + * @param maxLifetime This property controls the maximum lifetime of a connection in the pool. + * When a connection reaches this timeout, even if recently used, it will be retired from the pool. + * An in-use connection will never be retired, only when it is idle will it be removed. Should be bigger then 30000 + * @param minimumIdle The property controls the minimum number of idle connections that HikariCP tries to maintain in the pool, including both idle and in-use connections. + * If the idle connections dip below this value, HikariCP will make a best effort to restore them quickly and efficiently. + */ +final case class HikariConnectionPoolConfig( + url: String, + userName: String, + password: String, + poolSize: Int = 10, + autoCommit: Boolean = true, + connectionTimeout: Option[Long] = None, + idleTimeout: Option[Long] = None, + initializationFailTimeout: Option[Long] = None, + maxLifetime: Option[Long] = None, + minimumIdle: Option[Int] = None + ) { + private[sql] def toHikariConfig = { + val hikariConfig = new HikariConfig() + hikariConfig.setJdbcUrl(this.url) + hikariConfig.setAutoCommit(this.autoCommit) + hikariConfig.setMaximumPoolSize(this.poolSize) + hikariConfig.setUsername(userName) + hikariConfig.setPassword(password) + connectionTimeout.foreach(hikariConfig.setConnectionTimeout) + idleTimeout.foreach(hikariConfig.setIdleTimeout) + initializationFailTimeout.foreach(hikariConfig.setInitializationFailTimeout) + maxLifetime.foreach(hikariConfig.setMaxLifetime) + minimumIdle.foreach(hikariConfig.setMinimumIdle) + hikariConfig + } +} diff --git a/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala b/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala new file mode 100644 index 000000000..8f3d40b3e --- /dev/null +++ b/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala @@ -0,0 +1,102 @@ +package zio.sql + +import zio.test.TestAspect.{sequential, timeout, withLiveClock} +import zio.test.{TestEnvironment, _} +import zio.{ZIO, ZLayer, durationInt} + + +object HikariConnectionPoolSpec extends ZIOSpecDefault { + + + val mySqlConfigLayer: ZLayer[Any, Throwable, MySqlConfig] = + ZLayer.scoped { + MySqlTestContainer.mysql() + .map(a => + MySqlConfig( + url = a.jdbcUrl, + username = a.username, + password = a.password + ) + ) + } + + val hikariPoolConfigLayer: ZLayer[MySqlConfig, Nothing, HikariConnectionPoolConfig] = ZLayer.fromFunction((conf: MySqlConfig) => HikariConnectionPoolConfig(url = conf.url, userName = conf.username, password = conf.password)) + val poolLayer: ZLayer[HikariConnectionPoolConfig, Nothing, HikariConnectionPool] = HikariConnectionPool.live.orDie + + override def spec: Spec[TestEnvironment, Any] = + specLayered.provideCustomShared(mySqlConfigLayer.orDie) + + def specLayered: Spec[TestEnvironment with MySqlConfig, Any] = + suite("Hikaricp module")( + test("Pool size should be configurable") { + val poolSize = 20 + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.getMaximumPoolSize == poolSize)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(poolSize = poolSize))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("Pool size should have 10 connections by default") { + (for { + cp <- ZIO.service[HikariConnectionPool] + _ <- ZIO.replicateZIO(10)(ZIO.scoped(cp.connection)) + } yield assertTrue(cp.dataSource.getMaximumPoolSize == 10)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer >>> poolLayer) + } @@ timeout(10.minutes) @@ withLiveClock, + + test("It should be possible to acquire connections from the pool") { + val poolSize = 20 + (for { + cp <- ZIO.service[HikariConnectionPool] + _ <- ZIO.collectAllParDiscard(ZIO.replicate(poolSize)(ZIO.scoped(cp.connection *> ZIO.sleep(500.millisecond)))) + } yield assert("")(Assertion.anything)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(poolSize = poolSize))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("Auto commit should be configurable") { + val autoCommit = false + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.isAutoCommit == autoCommit)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(autoCommit = autoCommit))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("Auto commit should be true by default") { + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.isAutoCommit)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("Connection timeout should be configurable") { + val connectionTimeout = 2000L + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.getConnectionTimeout == connectionTimeout)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(connectionTimeout = Some(connectionTimeout)))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("Idle timeout should be configurable") { + val idleTimeout = 2000L + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.getIdleTimeout == idleTimeout)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(idleTimeout = Some(idleTimeout)))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("initialization fail timeout should be configurable") { + val initializationFailTimeout = 2000L + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.getInitializationFailTimeout == initializationFailTimeout)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(initializationFailTimeout = Some(initializationFailTimeout)))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("max lifetime should be configurable") { + val maxLifetime = 40000L + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.getMaxLifetime == maxLifetime)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(maxLifetime = Some(maxLifetime)))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + test("minimum idle should be configurable") { + val minimumIdle = 2 + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.getMinimumIdle == minimumIdle)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(minimumIdle = Some(minimumIdle)))) >>> poolLayer) + } @@ timeout(10.seconds) @@ withLiveClock, + + ) @@ sequential +} diff --git a/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala new file mode 100644 index 000000000..ebba6fa31 --- /dev/null +++ b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala @@ -0,0 +1,20 @@ +package zio.sql + +import com.dimafeng.testcontainers.MySQLContainer +import org.testcontainers.utility.DockerImageName +import zio._ + +final case class MySqlConfig(username: String, password: String, url: String) +object MySqlTestContainer { + + def mysql(imageName: String = "mysql"): ZIO[Scope, Throwable, MySQLContainer] = + ZIO.acquireRelease { + ZIO.attemptBlocking { + val c = new MySQLContainer( + mysqlImageVersion = Option(imageName).map(DockerImageName.parse) + ) + c.start() + c + } + }(container => ZIO.attemptBlocking(container.stop()).orDie) +} From 0f45e0fcb4cfddfb4dfa377cc99c4f4fb9dfd7cf Mon Sep 17 00:00:00 2001 From: Luke <7631483+lukemcphee@users.noreply.github.com> Date: Mon, 30 May 2022 21:23:18 +0100 Subject: [PATCH 472/673] added soundex function - closes zio#660 (#684) * added soundex function - closes zio#660 * updated to use assertZIO * fixed formatting Co-authored-by: Jaro Regec --- .../scala/zio/sql/mysql/MysqlSqlModule.scala | 1 + .../scala/zio/sql/mysql/FunctionDefSpec.scala | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala index cf32bb0c6..0e3b35625 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala @@ -41,6 +41,7 @@ trait MysqlSqlModule extends Sql { self => val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("maketime")) val Now = FunctionDef[Any, ZonedDateTime](FunctionName("now")) val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi"))) + val Soundex = FunctionDef[String, String](FunctionName("soundex")) val Rand = FunctionDef[Int, Double](FunctionName("rand")) val RPad = FunctionDef[(String, Int, String), String](FunctionName("rpad")) val Uuid = Expr.FunctionCall0[UUID](FunctionDef[Any, UUID](FunctionName("uuid"))) diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index 030f42a25..3c5953820 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -121,6 +121,38 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { assertZIO(testResult.runHead.some)(equalTo(expected)) }, + test("soundex outputs should not match for non-similar-sounding strings") { + val queryForRobert = select(Soundex("Robert")) + val queryForTam = select(Soundex("Tam")) + + val resultForRobert = execute(queryForRobert) + val resultForTam = execute(queryForTam) + + for { + robertResult <- resultForRobert.runCollect + tamResult <- resultForTam.runCollect + } yield assert(robertResult.head.equals(tamResult.head))(equalTo(false)) + }, + test("soundex outputs should match for equivalent strings") { + val queryForRobert = select(Soundex("Robert")) + val queryForRupert = select(Soundex("Rupert")) + + val resultForRobert = execute(queryForRobert) + val resultForRupert = execute(queryForRupert) + + for { + robertResult <- resultForRobert.runCollect + rupertResult <- resultForRupert.runCollect + } yield assert(robertResult.head.equals(rupertResult.head))(equalTo(true)) + }, + test("soundex") { + val query = select(Soundex("Robert")) + val expected = "R163" + + val testResult = execute(query) + + assertZIO(testResult.runHead.some)(equalTo(expected)) + }, test("current_date") { val query = select(CurrentDate) From fa86aca33c2595eec1d453ae50e189046cb744c6 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 30 May 2022 22:30:33 +0200 Subject: [PATCH 473/673] Update postgresql to 42.3.6 (#662) Co-authored-by: Jaro Regec Co-authored-by: Jakub Czuchnowski --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index a321d57f0..e00bfd8c3 100644 --- a/build.sbt +++ b/build.sbt @@ -141,7 +141,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.3.5" % Test, + "org.postgresql" % "postgresql" % "42.3.6" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -203,7 +203,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.3.5" % Compile, + "org.postgresql" % "postgresql" % "42.3.6" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) From 9658c654f1da7a0db8d15640d9d98b9efb336e14 Mon Sep 17 00:00:00 2001 From: Serhii Dashko Date: Tue, 31 May 2022 12:24:56 +0300 Subject: [PATCH 474/673] Adds option for connectionInitSql (#639) --- .../scala/zio/sql/HikariConnectionPool.scala | 17 ++-- .../zio/sql/HikariConnectionPoolConfig.scala | 29 +++--- .../zio/sql/HikariConnectionPoolSpec.scala | 89 ++++++++++++------- .../scala/zio/sql/MySqlTestContainer.scala | 5 +- 4 files changed, 89 insertions(+), 51 deletions(-) diff --git a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala index 8696eb1f9..b72a28464 100644 --- a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala +++ b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala @@ -1,8 +1,8 @@ package zio.sql -import com.zaxxer.hikari.{HikariConfig, HikariDataSource} -import zio.{Scope, ZIO, ZLayer} +import com.zaxxer.hikari.{ HikariConfig, HikariDataSource } +import zio.{ Scope, ZIO, ZLayer } -import java.sql.{Connection, SQLException} +import java.sql.{ Connection, SQLException } class HikariConnectionPool private (hikariDataSource: HikariDataSource) extends ConnectionPool { @@ -13,9 +13,10 @@ class HikariConnectionPool private (hikariDataSource: HikariDataSource) extends * The managed resource will safely acquire and release the connection, and * may be interrupted or timed out if necessary. */ - override def connection: ZIO[Scope, Exception, Connection] = { - ZIO.acquireRelease(ZIO.attemptBlocking(hikariDataSource.getConnection).refineToOrDie[SQLException])(con => ZIO.attemptBlocking(hikariDataSource.evictConnection(con)).orDie) - } + override def connection: ZIO[Scope, Exception, Connection] = + ZIO.acquireRelease(ZIO.attemptBlocking(hikariDataSource.getConnection).refineToOrDie[SQLException])(con => + ZIO.attemptBlocking(hikariDataSource.evictConnection(con)).orDie + ) } object HikariConnectionPool { @@ -26,9 +27,9 @@ object HikariConnectionPool { val live: ZLayer[HikariConnectionPoolConfig, Throwable, HikariConnectionPool] = ZLayer.scoped { for { - config <- ZIO.service[HikariConnectionPoolConfig] + config <- ZIO.service[HikariConnectionPoolConfig] dataSource <- initDataSource(config.toHikariConfig) - pool = new HikariConnectionPool(dataSource) + pool = new HikariConnectionPool(dataSource) } yield pool } } diff --git a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala index f788a9028..45ab36908 100644 --- a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala +++ b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPoolConfig.scala @@ -2,7 +2,6 @@ package zio.sql import com.zaxxer.hikari.HikariConfig - /** * Configuration information for the connection pool. * @@ -23,19 +22,24 @@ import com.zaxxer.hikari.HikariConfig * An in-use connection will never be retired, only when it is idle will it be removed. Should be bigger then 30000 * @param minimumIdle The property controls the minimum number of idle connections that HikariCP tries to maintain in the pool, including both idle and in-use connections. * If the idle connections dip below this value, HikariCP will make a best effort to restore them quickly and efficiently. + * @param connectionInitSql the SQL to execute on new connections + * Set the SQL string that will be executed on all new connections when they are + * created, before they are added to the pool. If this query fails, it will be + * treated as a failed connection attempt. */ final case class HikariConnectionPoolConfig( - url: String, - userName: String, - password: String, - poolSize: Int = 10, - autoCommit: Boolean = true, - connectionTimeout: Option[Long] = None, - idleTimeout: Option[Long] = None, - initializationFailTimeout: Option[Long] = None, - maxLifetime: Option[Long] = None, - minimumIdle: Option[Int] = None - ) { + url: String, + userName: String, + password: String, + poolSize: Int = 10, + autoCommit: Boolean = true, + connectionTimeout: Option[Long] = None, + idleTimeout: Option[Long] = None, + initializationFailTimeout: Option[Long] = None, + maxLifetime: Option[Long] = None, + minimumIdle: Option[Int] = None, + connectionInitSql: Option[String] = None +) { private[sql] def toHikariConfig = { val hikariConfig = new HikariConfig() hikariConfig.setJdbcUrl(this.url) @@ -48,6 +52,7 @@ final case class HikariConnectionPoolConfig( initializationFailTimeout.foreach(hikariConfig.setInitializationFailTimeout) maxLifetime.foreach(hikariConfig.setMaxLifetime) minimumIdle.foreach(hikariConfig.setMinimumIdle) + connectionInitSql.foreach(hikariConfig.setConnectionInitSql) hikariConfig } } diff --git a/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala b/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala index 8f3d40b3e..31a2a5f5b 100644 --- a/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala +++ b/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala @@ -1,16 +1,15 @@ package zio.sql -import zio.test.TestAspect.{sequential, timeout, withLiveClock} -import zio.test.{TestEnvironment, _} -import zio.{ZIO, ZLayer, durationInt} - +import zio.test.TestAspect.{ sequential, timeout, withLiveClock } +import zio.test.{ TestEnvironment, _ } +import zio.{ durationInt, ZIO, ZLayer } object HikariConnectionPoolSpec extends ZIOSpecDefault { - val mySqlConfigLayer: ZLayer[Any, Throwable, MySqlConfig] = ZLayer.scoped { - MySqlTestContainer.mysql() + MySqlTestContainer + .mysql() .map(a => MySqlConfig( url = a.jdbcUrl, @@ -20,8 +19,11 @@ object HikariConnectionPoolSpec extends ZIOSpecDefault { ) } - val hikariPoolConfigLayer: ZLayer[MySqlConfig, Nothing, HikariConnectionPoolConfig] = ZLayer.fromFunction((conf: MySqlConfig) => HikariConnectionPoolConfig(url = conf.url, userName = conf.username, password = conf.password)) - val poolLayer: ZLayer[HikariConnectionPoolConfig, Nothing, HikariConnectionPool] = HikariConnectionPool.live.orDie + val hikariPoolConfigLayer: ZLayer[MySqlConfig, Nothing, HikariConnectionPoolConfig] = + ZLayer.fromFunction((conf: MySqlConfig) => + HikariConnectionPoolConfig(url = conf.url, userName = conf.username, password = conf.password) + ) + val poolLayer: ZLayer[HikariConnectionPoolConfig, Nothing, HikariConnectionPool] = HikariConnectionPool.live.orDie override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomShared(mySqlConfigLayer.orDie) @@ -29,74 +31,101 @@ object HikariConnectionPoolSpec extends ZIOSpecDefault { def specLayered: Spec[TestEnvironment with MySqlConfig, Any] = suite("Hikaricp module")( test("Pool size should be configurable") { - val poolSize = 20 + val poolSize = 20 (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.getMaximumPoolSize == poolSize)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(poolSize = poolSize))) >>> poolLayer) + } yield assertTrue(cp.dataSource.getMaximumPoolSize == poolSize)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(poolSize = poolSize))) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - test("Pool size should have 10 connections by default") { (for { cp <- ZIO.service[HikariConnectionPool] _ <- ZIO.replicateZIO(10)(ZIO.scoped(cp.connection)) - } yield assertTrue(cp.dataSource.getMaximumPoolSize == 10)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer >>> poolLayer) + } yield assertTrue(cp.dataSource.getMaximumPoolSize == 10)) + .provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer >>> poolLayer) } @@ timeout(10.minutes) @@ withLiveClock, - test("It should be possible to acquire connections from the pool") { val poolSize = 20 (for { cp <- ZIO.service[HikariConnectionPool] - _ <- ZIO.collectAllParDiscard(ZIO.replicate(poolSize)(ZIO.scoped(cp.connection *> ZIO.sleep(500.millisecond)))) - } yield assert("")(Assertion.anything)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(poolSize = poolSize))) >>> poolLayer) + _ <- + ZIO.collectAllParDiscard(ZIO.replicate(poolSize)(ZIO.scoped(cp.connection *> ZIO.sleep(500.millisecond)))) + } yield assert("")(Assertion.anything)).provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(poolSize = poolSize))) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - test("Auto commit should be configurable") { val autoCommit = false (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.isAutoCommit == autoCommit)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(autoCommit = autoCommit))) >>> poolLayer) + } yield assertTrue(cp.dataSource.isAutoCommit == autoCommit)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(autoCommit = autoCommit))) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - test("Auto commit should be true by default") { (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.isAutoCommit)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer >>> poolLayer) + } yield assertTrue(cp.dataSource.isAutoCommit)) + .provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer >>> poolLayer) } @@ timeout(10.seconds) @@ withLiveClock, - test("Connection timeout should be configurable") { val connectionTimeout = 2000L (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.getConnectionTimeout == connectionTimeout)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(connectionTimeout = Some(connectionTimeout)))) >>> poolLayer) + } yield assertTrue(cp.dataSource.getConnectionTimeout == connectionTimeout)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(connectionTimeout = Some(connectionTimeout)))) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - test("Idle timeout should be configurable") { val idleTimeout = 2000L (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.getIdleTimeout == idleTimeout)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(idleTimeout = Some(idleTimeout)))) >>> poolLayer) + } yield assertTrue(cp.dataSource.getIdleTimeout == idleTimeout)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(idleTimeout = Some(idleTimeout)))) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - test("initialization fail timeout should be configurable") { val initializationFailTimeout = 2000L (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.getInitializationFailTimeout == initializationFailTimeout)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(initializationFailTimeout = Some(initializationFailTimeout)))) >>> poolLayer) + } yield assertTrue(cp.dataSource.getInitializationFailTimeout == initializationFailTimeout)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map( + _.update(_.copy(initializationFailTimeout = Some(initializationFailTimeout))) + ) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - test("max lifetime should be configurable") { val maxLifetime = 40000L (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.getMaxLifetime == maxLifetime)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(maxLifetime = Some(maxLifetime)))) >>> poolLayer) + } yield assertTrue(cp.dataSource.getMaxLifetime == maxLifetime)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(maxLifetime = Some(maxLifetime)))) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - test("minimum idle should be configurable") { val minimumIdle = 2 (for { cp <- ZIO.service[HikariConnectionPool] - } yield assertTrue(cp.dataSource.getMinimumIdle == minimumIdle)).provideSomeLayer[TestEnvironment with MySqlConfig](hikariPoolConfigLayer.map(_.update(_.copy(minimumIdle = Some(minimumIdle)))) >>> poolLayer) + } yield assertTrue(cp.dataSource.getMinimumIdle == minimumIdle)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(minimumIdle = Some(minimumIdle)))) >>> poolLayer + ) } @@ timeout(10.seconds) @@ withLiveClock, - + test("connection init SQL should be configurable") { + val initialSql = "SELECT 1 FROM test.test" + (for { + cp <- ZIO.service[HikariConnectionPool] + } yield assertTrue(cp.dataSource.getConnectionInitSql == initialSql)) + .provideSomeLayer[TestEnvironment with MySqlConfig]( + hikariPoolConfigLayer.map(_.update(_.copy(connectionInitSql = Some(initialSql)))) >>> poolLayer + ) + } @@ timeout(10.seconds) @@ withLiveClock ) @@ sequential } diff --git a/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala index ebba6fa31..16ec7cc17 100644 --- a/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala +++ b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala @@ -12,7 +12,10 @@ object MySqlTestContainer { ZIO.attemptBlocking { val c = new MySQLContainer( mysqlImageVersion = Option(imageName).map(DockerImageName.parse) - ) + ).configure { a => + a.withInitScript("test_schema.sql") + () + } c.start() c } From 1ad4005d7dbba9eea34e92776021a71da7f410fa Mon Sep 17 00:00:00 2001 From: balanka Date: Tue, 31 May 2022 15:06:30 +0200 Subject: [PATCH 475/673] Implented issue/feature 645 --- .../scala/zio/sql/SqlDriverLiveModule.scala | 40 +++++++- .../scala/zio/sql/TransactionModule.scala | 15 +++ jdbc/src/main/scala/zio/sql/jdbc.scala | 16 ++++ .../scala/zio/sql/postgresql/DbSchema.scala | 15 +++ .../zio/sql/postgresql/DeleteBatchSpec.scala | 94 +++++++++++++++++++ .../zio/sql/postgresql/InsertBatchSpec.scala | 70 ++++++++++++++ .../zio/sql/postgresql/UpdateBatchSpec.scala | 85 +++++++++++++++++ 7 files changed, 331 insertions(+), 4 deletions(-) create mode 100644 postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala create mode 100644 postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala create mode 100644 postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 1b47c5af7..716bb6cce 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -9,6 +9,12 @@ import zio.schema.Schema trait SqlDriverLiveModule { self: Jdbc => private[sql] trait SqlDriverCore { + def deleteOnBatch(delete: List[Delete[_]], conn: Connection): IO[Exception, List[Int]] + + def updateOnBatch(update: List[Update[_]], conn: Connection): IO[Exception, List[Int]] + + def insertOnBatch[A: Schema](insert: List[Insert[_, A]], conn: Connection): IO[Exception, List[Int]] + def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] @@ -22,6 +28,9 @@ trait SqlDriverLiveModule { self: Jdbc => def delete(delete: Delete[_]): IO[Exception, Int] = ZIO.scoped(pool.connection.flatMap(deleteOn(delete, _))) + def delete(delete: List[Delete[_]]): IO[Exception, List[Int]] = + ZIO.scoped(pool.connection.flatMap(deleteOnBatch(delete, _))) + def deleteOn(delete: Delete[_], conn: Connection): IO[Exception, Int] = ZIO.attemptBlocking { val query = renderDelete(delete) @@ -29,18 +38,31 @@ trait SqlDriverLiveModule { self: Jdbc => statement.executeUpdate(query) }.refineToOrDie[Exception] + def deleteOnBatch(delete: List[Delete[_]], conn: Connection): IO[Exception, List[Int]] = + ZIO.attemptBlocking { + val statement = conn.createStatement() + delete.map(delete_ => statement.addBatch(renderDelete(delete_))) + statement.executeBatch().toList + }.refineToOrDie[Exception] + def update(update: Update[_]): IO[Exception, Int] = ZIO.scoped(pool.connection.flatMap(updateOn(update, _))) def updateOn(update: Update[_], conn: Connection): IO[Exception, Int] = ZIO.attemptBlocking { - - val query = renderUpdate(update) - + val query = renderUpdate(update) val statement = conn.createStatement() - statement.executeUpdate(query) + }.refineToOrDie[Exception] + + def update(update: List[Update[_]]): IO[Exception, List[Int]] = + ZIO.scoped(pool.connection.flatMap(updateOnBatch(update, _))) + def updateOnBatch(update: List[Update[_]], conn: Connection): IO[Exception, List[Int]] = + ZIO.attemptBlocking { + val statement = conn.createStatement() + update.map(update_ => statement.addBatch(renderUpdate(update_))) + statement.executeBatch().toList }.refineToOrDie[Exception] def read[A](read: Read[A]): Stream[Exception, A] = @@ -93,9 +115,19 @@ trait SqlDriverLiveModule { self: Jdbc => statement.executeUpdate(query) }.refineToOrDie[Exception] + override def insertOnBatch[A: Schema](insert: List[Insert[_, A]], conn: Connection): IO[Exception, List[Int]] = + ZIO.attemptBlocking { + val statement = conn.createStatement() + insert.map(insert_ => statement.addBatch(renderInsert(insert_))) + statement.executeBatch().toList + }.refineToOrDie[Exception] + override def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] = ZIO.scoped(pool.connection.flatMap(insertOn(insert, _))) + def insert[A: Schema](insert: List[Insert[_, A]]): IO[Exception, List[Int]] = + ZIO.scoped(pool.connection.flatMap(insertOnBatch(insert, _))) + override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Throwable, A] = ZIO.scoped[R] { for { diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index e4c0876d7..c33e60bb6 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -87,16 +87,31 @@ trait TransactionModule { self: Jdbc => ZTransaction.fromEffect(coreDriver.updateOn(update, connection)) } + def batchUpdate(update: List[self.Update[_]]): ZTransaction[Any, Exception, List[Int]] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.updateOnBatch(update, connection)) + } + def apply[Z: Schema](insert: self.Insert[_, Z]): ZTransaction[Any, Exception, Int] = txn.flatMap { case Txn(connection, coreDriver) => ZTransaction.fromEffect(coreDriver.insertOn(insert, connection)) } + def batchInsert[Z: Schema](insert: List[self.Insert[_, Z]]): ZTransaction[Any, Exception, List[Int]] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.insertOnBatch(insert, connection)) + } + def apply(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = txn.flatMap { case Txn(connection, coreDriver) => ZTransaction.fromEffect(coreDriver.deleteOn(delete, connection)) } + def batchDelete(delete: List[self.Delete[_]]): ZTransaction[Any, Exception, List[Int]] = + txn.flatMap { case Txn(connection, coreDriver) => + ZTransaction.fromEffect(coreDriver.deleteOnBatch(delete, connection)) + } + def succeed[A](a: => A): ZTransaction[Any, Nothing, A] = fromEffect(ZIO.succeed(a)) def fail[E](e: => E): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.fail(e)) diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index e1a314506..cd4f6c044 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -8,15 +8,22 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi trait SqlDriver { def delete(delete: Delete[_]): IO[Exception, Int] + def delete(delete: List[Delete[_]]): IO[Exception, List[Int]] + def update(update: Update[_]): IO[Exception, Int] + def update(update: List[Update[_]]): IO[Exception, List[Int]] + def read[A](read: Read[A]): Stream[Exception, A] def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Throwable, A] def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] + + def insert[A: Schema](insert: List[Insert[_, A]]): IO[Exception, List[Int]] } object SqlDriver { + val live: ZLayer[ConnectionPool, Nothing, SqlDriver] = ZLayer(ZIO.serviceWith[ConnectionPool](new SqlDriverLive(_))) } @@ -32,9 +39,18 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def execute(delete: Delete[_]): ZIO[SqlDriver, Exception, Int] = ZIO.serviceWithZIO(_.delete(delete)) + def executeBatchDelete(delete: List[Delete[_]]): ZIO[SqlDriver, Exception, List[Int]] = + ZIO.serviceWithZIO(_.delete(delete)) + def execute[A: Schema](insert: Insert[_, A]): ZIO[SqlDriver, Exception, Int] = ZIO.serviceWithZIO(_.insert(insert)) + def executeBatchInsert[A: Schema](insert: List[Insert[_, A]]): ZIO[SqlDriver, Exception, List[Int]] = + ZIO.serviceWithZIO(_.insert(insert)) + def execute(update: Update[_]): ZIO[SqlDriver, Exception, Int] = ZIO.serviceWithZIO(_.update(update)) + + def executeBatchUpdate(update: List[Update[_]]): ZIO[SqlDriver, Exception, List[Int]] = + ZIO.serviceWithZIO(_.update(update)) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala index e9510c911..37adbeff6 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala @@ -2,6 +2,9 @@ package zio.sql.postgresql import zio.sql.Jdbc +import java.time.{ LocalDate, ZonedDateTime } +import java.util.UUID + trait DbSchema extends Jdbc { self => import self.ColumnSet._ @@ -17,6 +20,16 @@ trait DbSchema extends Jdbc { self => } object Customers { + case class Customer( + id: UUID, + fname: String, + lname: String, + verified: Boolean, + dateOfBirth: LocalDate, + created: String, + created2: ZonedDateTime + ) + // https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string val customers = (uuid("Id") ++ localDate("Dob") ++ string("First_name") ++ string("Last_name") ++ boolean( @@ -26,6 +39,8 @@ trait DbSchema extends Jdbc { self => val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = customers.columns + + val ALL = customerId ++ fName ++ lName ++ verified ++ dob ++ createdString ++ createdTimestamp } object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala new file mode 100644 index 000000000..5aeb77ac4 --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala @@ -0,0 +1,94 @@ +package zio.sql.postgresql + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +import java.time.{ LocalDate, ZonedDateTime } +import java.util.UUID + +object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema { + + import Customers._ + + private def delete_(c: Customer): Delete[customers.TableType] = + deleteFrom(customers).where((verified.isTrue) && (customerId === c.id)) + + override def specLayered = suite("Postgres module batch delete")( + test("Can delete more than one customer from single table with a condition") { + val query = deleteFrom(customers).where(verified.isNotTrue) + + val result = executeBatchDelete(List(query)) + + val assertion = for { + r <- result + } yield assert(r)(equalTo(List(1))) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can insert more than one customer into single table prior to deleting them") { + val id1 = UUID.randomUUID() + val id2 = UUID.randomUUID() + val id3 = UUID.randomUUID() + val id4 = UUID.randomUUID() + val c1 = Customer( + id1, + "fnameCustomer1", + "lnameCustomer1", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c2 = Customer( + id2, + "fnameCustomer2", + "lnameCustomer2", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c3 = Customer( + id3, + "fnameCustomer3", + "lnameCustomer3", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c4 = Customer( + id4, + "fnameCustomer4", + "lnameCustomer4", + false, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + + val allCustomer = List(c1, c2, c3, c4) + val data = allCustomer.map(Customer.unapply(_).get) + val query = insertInto(customers)(ALL).values(data) + val resultInsert = execute(query) + + val insertAssertion = for { + r <- resultInsert + } yield assert(r)(equalTo(4)) + insertAssertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + + val selectAll = select(ALL).from(customers) + val result_ = execute(selectAll.to((Customer.apply _).tupled)).runCollect + + val assertion_ = for { + x <- result_ + updated = x.toList.map(delete_) + result <- executeBatchDelete(updated).map(l => l.fold(0)((a, b) => a + b)) + } yield assert(result)(equalTo(4)) + assertion_.mapErrorCause(cause => Cause.stackless(cause.untraced)) + + } + ) + +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala new file mode 100644 index 000000000..767e51f31 --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala @@ -0,0 +1,70 @@ +package zio.sql.postgresql + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +import java.time.{ LocalDate, ZonedDateTime } +import java.util.UUID + +object InsertBatchSpec extends PostgresRunnableSpec with DbSchema { + + import Customers._ + + override def specLayered = suite("Postgres module batch insert")( + test("Can insert more than one customer into a table with a condition") { + val id1 = UUID.randomUUID() + val id2 = UUID.randomUUID() + val id3 = UUID.randomUUID() + val id4 = UUID.randomUUID() + val c1 = Customer( + id1, + "fnameCustomer1", + "lnameCustomer1", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c2 = Customer( + id2, + "fnameCustomer2", + "lnameCustomer2", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c3 = Customer( + id3, + "fnameCustomer3", + "lnameCustomer3", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c4 = Customer( + id4, + "fnameCustomer4", + "lnameCustomer4", + false, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + + val allCustomer = List(c1, c2, c3, c4) + val data = allCustomer.map(Customer.unapply(_).get) + val query = insertInto(customers)(ALL).values(data) + + val resultInsert = execute(query) + + val insertAssertion = for { + result <- resultInsert + } yield assert(result)(equalTo(4)) + insertAssertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) + +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala new file mode 100644 index 000000000..823b0fd6a --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala @@ -0,0 +1,85 @@ +package zio.sql.postgresql + +import zio.Cause +import zio.test.Assertion._ +import zio.test._ + +import java.time.{ LocalDate, ZonedDateTime } +import java.util.UUID + +object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema { + + import Customers._ + + private def update_(c: Customer): Update[customers.TableType] = + update(customers) + .set(verified, !c.verified) + .where(customerId === c.id) + + override def specLayered = suite("Postgres module batch update")( + test("Can update more than one customer from single table with a condition") { + val id1 = UUID.randomUUID() + val id2 = UUID.randomUUID() + val id3 = UUID.randomUUID() + val id4 = UUID.randomUUID() + val c1 = Customer( + id1, + "fnameCustomer1", + "lnameCustomer1", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c2 = Customer( + id2, + "fnameCustomer2", + "lnameCustomer2", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c3 = Customer( + id3, + "fnameCustomer3", + "lnameCustomer3", + true, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + val c4 = Customer( + id4, + "fnameCustomer4", + "lnameCustomer4", + false, + LocalDate.now(), + LocalDate.now().toString, + ZonedDateTime.now() + ) + + val allCustomer = List(c1, c2, c3, c4) + val data = allCustomer.map(Customer.unapply(_).get) + val query = insertInto(customers)(ALL).values(data) + + val resultInsert = execute(query) + + val insertAssertion = for { + r <- resultInsert + } yield assert(r)(equalTo(4)) + insertAssertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + + val selectAll = select(ALL).from(customers) + val result_ = execute(selectAll.to((Customer.apply _).tupled)).runCollect + + val assertion_ = for { + x <- result_ + updated = x.toList.map(update_) + result <- executeBatchUpdate(updated).map(l => l.reduce((a, b) => a + b)) + } yield assert(result)(equalTo(5)) + assertion_.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) + +} From 8cc7f98f5b24136d5326e72bda7a152bd607a5f3 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Fri, 17 Jun 2022 10:41:41 +0200 Subject: [PATCH 476/673] refactor: remove duplicated code of db-specific TestContainers and RunnableSpecs (#706) --- build.sbt | 15 +++-- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 55 ++++++++++++++++++- mysql/src/test/resources/logback.xml | 14 +++++ .../zio/sql/mysql/MysqlRunnableSpec.scala | 30 +++------- .../scala/zio/sql/mysql/TestContainer.scala | 22 -------- oracle/src/test/resources/logback.xml | 14 +++++ .../zio/sql/oracle/OracleRunnableSpec.scala | 37 ++++--------- .../scala/zio/sql/oracle/TestContainer.scala | 22 -------- postgres/src/test/resources/logback.xml | 14 +++++ .../sql/postgresql/PostgresRunnableSpec.scala | 39 ++++--------- .../zio/sql/postgresql/TestContainer.scala | 25 --------- project/BuildHelper.scala | 1 + sqlserver/src/test/resources/logback.xml | 14 +++++ .../sql/sqlserver/SqlServerRunnableSpec.scala | 39 ++++--------- .../zio/sql/sqlserver/TestContainer.scala | 30 ---------- 15 files changed, 160 insertions(+), 211 deletions(-) create mode 100644 mysql/src/test/resources/logback.xml delete mode 100644 mysql/src/test/scala/zio/sql/mysql/TestContainer.scala create mode 100644 oracle/src/test/resources/logback.xml delete mode 100644 oracle/src/test/scala/zio/sql/oracle/TestContainer.scala create mode 100644 postgres/src/test/resources/logback.xml delete mode 100644 postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala create mode 100644 sqlserver/src/test/resources/logback.xml delete mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala diff --git a/build.sbt b/build.sbt index 9fd8a4c12..b89b9e329 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,8 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0-RC6" val zioSchemaVersion = "0.1.9" val testcontainersVersion = "1.17.2" -val testcontainersScalaVersion = "0.40.7" +val testcontainersScalaVersion = "0.40.8" +val logbackVersion = "1.2.11" lazy val root = project .in(file(".")) @@ -143,7 +144,8 @@ lazy val mysql = project "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, "mysql" % "mysql-connector-java" % "8.0.29" % Test, - "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test + "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test, + "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -161,7 +163,8 @@ lazy val oracle = project "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, - "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test + "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test, + "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -179,7 +182,8 @@ lazy val postgres = project "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.postgresql" % "postgresql" % "42.3.6" % Compile, - "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test + "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, + "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) @@ -197,7 +201,8 @@ lazy val sqlserver = project "org.testcontainers" % "mssqlserver" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "com.microsoft.sqlserver" % "mssql-jdbc" % "9.4.0.jre8" % Test, - "com.dimafeng" %% "testcontainers-scala-mssqlserver" % testcontainersScalaVersion % Test + "com.dimafeng" %% "testcontainers-scala-mssqlserver" % testcontainersScalaVersion % Test, + "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) ) .settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")) diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index 59116b1c4..86ccfb653 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -1,19 +1,68 @@ package zio.sql +import com.dimafeng.testcontainers.JdbcDatabaseContainer import zio.test.TestEnvironment -import zio.ZLayer +import zio.{ Scope, ZIO, ZLayer } import zio.test.ZIOSpecDefault +import com.dimafeng.testcontainers.SingleContainer +import java.util.Properties +import zio.test.Spec +/** + * Base trait for integration-style tests running on Testcontainers. + * Extending classes are expected to provide the container implementation + * this test suite will work on by implementing {@link getContainer}. + * + * Test suite should be implemented in {@link specLayered} and + * particular tests can depend on {@link SQLDriver} in the environment. + */ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { type JdbcEnvironment = TestEnvironment with SqlDriver - val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] + def specLayered: Spec[JdbcEnvironment, Object] - final lazy val jdbcLayer: ZLayer[Any, Any, SqlDriver] = + protected def getContainer: SingleContainer[_] with JdbcDatabaseContainer + + protected val autoCommit = false + + override def spec: Spec[TestEnvironment, Any] = + specLayered.provideCustomShared(jdbcLayer) + + private[this] def connProperties(user: String, password: String): Properties = { + val props = new Properties + props.setProperty("user", user) + props.setProperty("password", password) + props + } + + private[this] val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + ZLayer.scoped { + testContainer + .map(a => + ConnectionPoolConfig( + url = a.jdbcUrl, + properties = connProperties(a.username, a.password), + autoCommit = autoCommit + ) + ) + } + + private[this] final lazy val jdbcLayer: ZLayer[Any, Any, SqlDriver] = ZLayer.make[SqlDriver]( poolConfigLayer.orDie, ConnectionPool.live.orDie, SqlDriver.live ) + + private[this] def testContainer: ZIO[Scope, Throwable, SingleContainer[_] with JdbcDatabaseContainer] = + ZIO.acquireRelease { + ZIO.attemptBlocking { + val c = getContainer + c.start() + c + } + } { container => + ZIO.attemptBlocking(container.stop()).orDie + } } diff --git a/mysql/src/test/resources/logback.xml b/mysql/src/test/resources/logback.xml new file mode 100644 index 000000000..1378a823a --- /dev/null +++ b/mysql/src/test/resources/logback.xml @@ -0,0 +1,14 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + + + + + + diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 3878172b5..1a97a1a2e 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -1,29 +1,17 @@ package zio.sql.mysql -import java.util.Properties -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } -import zio.test._ -import zio.ZLayer +import com.dimafeng.testcontainers.{ JdbcDatabaseContainer, MySQLContainer, SingleContainer } +import org.testcontainers.utility.DockerImageName +import zio.sql.JdbcRunnableSpec trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlJdbcModule { - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = - ZLayer.scoped { - TestContainer - .mysql() - .map(a => ConnectionPoolConfig(a.jdbcUrl, connProperties(a.username, a.password))) + override protected def getContainer: SingleContainer[_] with JdbcDatabaseContainer = + new MySQLContainer( + mysqlImageVersion = Option("mysql").map(DockerImageName.parse) + ).configure { a => + a.withInitScript("shop_schema.sql") + () } - override def spec: Spec[TestEnvironment, Any] = - specLayered.provideCustomLayerShared(jdbcLayer) - - def specLayered: Spec[JdbcEnvironment, Object] - } diff --git a/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala b/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala deleted file mode 100644 index 67d778806..000000000 --- a/mysql/src/test/scala/zio/sql/mysql/TestContainer.scala +++ /dev/null @@ -1,22 +0,0 @@ -package zio.sql.mysql - -import com.dimafeng.testcontainers.MySQLContainer -import org.testcontainers.utility.DockerImageName -import zio._ - -object TestContainer { - - def mysql(imageName: String = "mysql"): ZIO[Scope, Throwable, MySQLContainer] = - ZIO.acquireRelease { - ZIO.attemptBlocking { - val c = new MySQLContainer( - mysqlImageVersion = Option(imageName).map(DockerImageName.parse) - ).configure { a => - a.withInitScript("shop_schema.sql") - () - } - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie) -} diff --git a/oracle/src/test/resources/logback.xml b/oracle/src/test/resources/logback.xml new file mode 100644 index 000000000..1378a823a --- /dev/null +++ b/oracle/src/test/resources/logback.xml @@ -0,0 +1,14 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + + + + + + diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala index a964bf708..fcf4a2c2f 100644 --- a/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/OracleRunnableSpec.scala @@ -1,34 +1,17 @@ package zio.sql.oracle -import zio.ZLayer -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } -import zio.test.{ Spec, TestEnvironment } - -import java.util.Properties +import com.dimafeng.testcontainers.{ JdbcDatabaseContainer, OracleContainer, SingleContainer } +import org.testcontainers.utility.DockerImageName +import zio.sql.JdbcRunnableSpec trait OracleRunnableSpec extends JdbcRunnableSpec with OracleJdbcModule { - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer = ZLayer.scoped { - TestContainer - .oracle() - .map(container => - ConnectionPoolConfig( - url = container.jdbcUrl, - properties = connProperties(container.username, container.password) - ) - ) - } - - override def spec: Spec[TestEnvironment, Any] = - specLayered.provideCustomShared(jdbcLayer) - - def specLayered: Spec[JdbcEnvironment, Object] + override protected def getContainer: SingleContainer[_] with JdbcDatabaseContainer = + new OracleContainer( + dockerImageName = DockerImageName.parse("gvenzl/oracle-xe") + ).configure { container => + container.withInitScript("shop_schema.sql") + () + } } diff --git a/oracle/src/test/scala/zio/sql/oracle/TestContainer.scala b/oracle/src/test/scala/zio/sql/oracle/TestContainer.scala deleted file mode 100644 index 74577d433..000000000 --- a/oracle/src/test/scala/zio/sql/oracle/TestContainer.scala +++ /dev/null @@ -1,22 +0,0 @@ -package zio.sql.oracle - -import com.dimafeng.testcontainers.OracleContainer -import org.testcontainers.utility.DockerImageName -import zio.{ Scope, ZIO } - -object TestContainer { - - def oracle(imageName: String = "gvenzl/oracle-xe"): ZIO[Scope, Throwable, OracleContainer] = - ZIO.acquireRelease { - ZIO.attemptBlocking { - val c = new OracleContainer( - dockerImageName = DockerImageName.parse(imageName) - ).configure { container => - container.withInitScript("shop_schema.sql") - () - } - c.start() - c - } - }(container => ZIO.attemptBlocking(container.stop()).orDie) -} diff --git a/postgres/src/test/resources/logback.xml b/postgres/src/test/resources/logback.xml new file mode 100644 index 000000000..1378a823a --- /dev/null +++ b/postgres/src/test/resources/logback.xml @@ -0,0 +1,14 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + + + + + + diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index f4a26efae..b5b4f7e83 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -1,36 +1,17 @@ package zio.sql.postgresql -import zio._ -import zio.test._ -import java.util.Properties -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } +import com.dimafeng.testcontainers.{ JdbcDatabaseContainer, PostgreSQLContainer, SingleContainer } +import org.testcontainers.utility.DockerImageName +import zio.sql.JdbcRunnableSpec trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresJdbcModule { - def autoCommit: Boolean = true - - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer = ZLayer.scoped { - TestContainer - .postgres() - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - autoCommit = autoCommit - ) - ) - } - - override def spec: Spec[TestEnvironment, Any] = - specLayered.provideCustomShared(jdbcLayer) - - def specLayered: Spec[JdbcEnvironment, Object] + override protected def getContainer: SingleContainer[_] with JdbcDatabaseContainer = + new PostgreSQLContainer( + dockerImageNameOverride = Option("postgres:alpine").map(DockerImageName.parse) + ).configure { a => + a.withInitScript("db_schema.sql") + () + } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala b/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala deleted file mode 100644 index 42704c031..000000000 --- a/postgres/src/test/scala/zio/sql/postgresql/TestContainer.scala +++ /dev/null @@ -1,25 +0,0 @@ -package zio.sql.postgresql - -import com.dimafeng.testcontainers.PostgreSQLContainer -import org.testcontainers.utility.DockerImageName -import zio._ - -object TestContainer { - - def postgres(imageName: String = "postgres:alpine"): ZIO[Scope, Throwable, PostgreSQLContainer] = - ZIO.acquireRelease { - ZIO.attemptBlocking { - val c = new PostgreSQLContainer( - dockerImageNameOverride = Option(imageName).map(DockerImageName.parse) - ).configure { a => - a.withInitScript("db_schema.sql") - () - } - c.start() - c - } - } { container => - ZIO.attemptBlocking(container.stop()).orDie - } - -} diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 321d4883e..991416b57 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -162,6 +162,7 @@ object BuildHelper { compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)) ) }, + resolvers += Resolver.sonatypeRepo("snapshots"), Test / parallelExecution := true, incOptions ~= (_.withLogRecompileOnMacro(false)), autoAPIMappings := true, diff --git a/sqlserver/src/test/resources/logback.xml b/sqlserver/src/test/resources/logback.xml new file mode 100644 index 000000000..1378a823a --- /dev/null +++ b/sqlserver/src/test/resources/logback.xml @@ -0,0 +1,14 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + + + + + + diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index d415d6487..a28092daa 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -1,34 +1,19 @@ package zio.sql.sqlserver -import zio._ -import zio.test._ -import java.util.Properties -import zio.sql.{ ConnectionPoolConfig, JdbcRunnableSpec } +import com.dimafeng.testcontainers.{ JdbcDatabaseContainer, MSSQLServerContainer, SingleContainer } +import org.testcontainers.utility.DockerImageName +import zio.sql.JdbcRunnableSpec trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerJdbcModule { - def autoCommit: Boolean = true + override protected def getContainer: SingleContainer[_] with JdbcDatabaseContainer = + new MSSQLServerContainer( + dockerImageName = DockerImageName + .parse("mcr.microsoft.com/azure-sql-edge:latest") + .asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") + ).configure { a => + a.withInitScript("db_schema.sql") + () + } - private def connProperties(user: String, password: String): Properties = { - val props = new Properties - props.setProperty("user", user) - props.setProperty("password", password) - props - } - - val poolConfigLayer = ZLayer.scoped { - TestContainer.sqlServer - .map(a => - ConnectionPoolConfig( - url = a.jdbcUrl, - properties = connProperties(a.username, a.password), - autoCommit = autoCommit - ) - ) - } - - override def spec: Spec[TestEnvironment, Any] = - specLayered.provideCustomLayerShared(jdbcLayer) - - def specLayered: Spec[JdbcEnvironment, Object] } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala deleted file mode 100644 index 8834755dd..000000000 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/TestContainer.scala +++ /dev/null @@ -1,30 +0,0 @@ -package zio.sql.sqlserver - -import com.dimafeng.testcontainers.MSSQLServerContainer -import org.testcontainers.utility.DockerImageName -import zio._ - -object TestContainer { - - /** - * We are using Azure sql edge because MS Sql Server image won't run on ARM. - */ - val sqlServer: ZIO[Scope, Throwable, MSSQLServerContainer] = - ZIO.acquireRelease { - ZIO.attemptBlocking { - val c = new MSSQLServerContainer( - dockerImageName = DockerImageName - .parse("mcr.microsoft.com/azure-sql-edge:latest") - .asCompatibleSubstituteFor("mcr.microsoft.com/mssql/server") - ).configure { a => - a.withInitScript("db_schema.sql") - () - } - c.start() - c - } - } { container => - ZIO.attemptBlocking(container.stop()).orDie - } - -} From 9bd6353df7d03b883b93fbf8587d6b4477cbd738 Mon Sep 17 00:00:00 2001 From: masonedmison Date: Thu, 23 Jun 2022 20:52:42 -0500 Subject: [PATCH 477/673] reacquire connections that are dead --- .../main/scala/zio/sql/ConnectionPool.scala | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index e26d82cd3..862cb57ce 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -132,15 +132,25 @@ final case class ConnectionPoolLive( private def release(connection: ResettableConnection): UIO[Any] = ZIO.uninterruptible { - tryRelease(connection).commit.flatMap { - case Some(handle) => - handle.interrupted.get.tap { interrupted => - ZSTM.when(!interrupted)(handle.promise.succeed(connection)) - }.commit.flatMap { interrupted => - ZIO.when(interrupted)(release(connection)) + ZIO + .whenZIO(connection.isValid.map(!_)) { + ZIO.attempt(connection.connection.close).zipParRight(addFreshConnection).orDie + } + .flatMap { opt => + val conn = opt match { + case Some(c) => c + case None => connection } - case None => ZIO.unit - } + tryRelease(conn).commit.flatMap { + case Some(handle) => + handle.interrupted.get.tap { interrupted => + ZSTM.when(!interrupted)(handle.promise.succeed(conn)) + }.commit.flatMap { interrupted => + ZIO.when(interrupted)(release(conn)) + } + case None => ZIO.unit + } + } } private def tryRelease( @@ -171,5 +181,14 @@ final case class ConnectionPoolLive( } private[sql] final class ResettableConnection(val connection: Connection, resetter: Connection => Unit) { - def reset: UIO[Any] = ZIO.succeed(resetter(connection)) + def reset: UIO[Any] = ZIO.succeed(resetter(connection)) + def isValid: UIO[Boolean] = + ZIO + .when(!connection.isClosed) { + ZIO.succeed(connection.prepareStatement("SELECT 1")) + } + .map { + case Some(stmt) => stmt != null + case None => false + } } From ac9cc1e44250769f7ba055bafbd360a9ffde96da Mon Sep 17 00:00:00 2001 From: masonedmison Date: Thu, 23 Jun 2022 20:52:56 -0500 Subject: [PATCH 478/673] a simple test --- jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala index 7a6b4ee98..8e2d41d5b 100644 --- a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala +++ b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala @@ -49,6 +49,14 @@ object ConnectionPoolSpec extends ZIOSpecDefault { _ <- promise.complete(ZIO.unit) _ <- ZIO.scoped(cp.connection) } yield assert("")(Assertion.anything) - } @@ timeout(10.seconds) @@ withLiveClock + } @@ timeout(10.seconds) @@ withLiveClock + + + test("Invalid or closed fibers should be reacquired") { + for { + cp <- ZIO.service[ConnectionPool] + _ <- ZIO.replicateZIO(poolSize)(ZIO.scoped(cp.connection.map(_.close))) + conn <- ZIO.scoped(cp.connection) + } yield assert(conn.isValid(10))(Assertion.isTrue) + } ) @@ sequential } From 3aad380777665469631bb431f536b74b624382ef Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Tue, 28 Jun 2022 22:44:16 +0200 Subject: [PATCH 479/673] Update zio to 2.0.0 and zio-schema to 0.2.0 (#710) --- build.sbt | 4 ++-- .../test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index b89b9e329..f77d228c6 100644 --- a/build.sbt +++ b/build.sbt @@ -23,8 +23,8 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-RC6" -val zioSchemaVersion = "0.1.9" +val zioVersion = "2.0.0" +val zioSchemaVersion = "0.2.0" val testcontainersVersion = "1.17.2" val testcontainersScalaVersion = "0.40.8" val logbackVersion = "1.2.11" diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala index eb78ed3f1..f5e47982d 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala @@ -641,7 +641,7 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { .values((UUID.randomUUID(), "Charles", "Dent", Some(LocalDate.of(2022, 1, 31)))) val insertNone = insertInto(persons)(personId, fName, lName, dob) - .values((UUID.randomUUID(), "Martin", "Harvey", None)) + .values((UUID.randomUUID(), "Martin", "Harvey", Option.empty[LocalDate])) val insertNone2 = insertInto(persons)(personId, fName, lName, dob) .values(personValue) From e4c54c4d04e66737b4cdc6c7dfab0bf429a9141f Mon Sep 17 00:00:00 2001 From: Maxim Schuwalow <16665913+mschuwalow@users.noreply.github.com> Date: Tue, 28 Jun 2022 22:56:24 +0200 Subject: [PATCH 480/673] Add SqlTransaction type (#692) * Add SqlTransaction type * fix test * fix conflicts Co-authored-by: Jakub Czuchnowski --- .../main/scala/zio/sql/ExprSyntaxModule.scala | 27 ++++ .../scala/zio/sql/SqlDriverLiveModule.scala | 24 +++- .../scala/zio/sql/TransactionModule.scala | 130 ------------------ jdbc/src/main/scala/zio/sql/jdbc.scala | 26 ++-- .../scala/zio/sql/mysql/TransactionSpec.scala | 22 +-- .../zio/sql/postgresql/TransactionSpec.scala | 27 ++-- 6 files changed, 80 insertions(+), 176 deletions(-) create mode 100644 jdbc/src/main/scala/zio/sql/ExprSyntaxModule.scala delete mode 100644 jdbc/src/main/scala/zio/sql/TransactionModule.scala diff --git a/jdbc/src/main/scala/zio/sql/ExprSyntaxModule.scala b/jdbc/src/main/scala/zio/sql/ExprSyntaxModule.scala new file mode 100644 index 000000000..5092fbaf6 --- /dev/null +++ b/jdbc/src/main/scala/zio/sql/ExprSyntaxModule.scala @@ -0,0 +1,27 @@ +package zio.sql + +import zio._ +import zio.stream.ZStream +import zio.schema.Schema + +trait ExprSyntaxModule { self: Jdbc => + implicit final class ReadSyntax[A](self: Read[A]) { + def run: ZStream[SqlTransaction, Exception, A] = + ZStream.serviceWithStream(_.read(self)) + } + + implicit final class DeleteSyntax(self: Delete[_]) { + def run: ZIO[SqlTransaction, Exception, Int] = + ZIO.serviceWithZIO(_.delete(self)) + } + + implicit final class InsertSyntax[A: Schema](self: Insert[_, A]) { + def run: ZIO[SqlTransaction, Exception, Int] = + ZIO.serviceWithZIO(_.insert(self)) + } + + implicit final class UpdatedSyntax(self: Update[_]) { + def run: ZIO[SqlTransaction, Exception, Int] = + ZIO.serviceWithZIO(_.update(self)) + } +} diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 716bb6cce..e282d14d7 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -5,6 +5,7 @@ import java.sql._ import zio._ import zio.stream.{ Stream, ZStream } import zio.schema.Schema +import zio.IO trait SqlDriverLiveModule { self: Jdbc => private[sql] trait SqlDriverCore { @@ -128,13 +129,28 @@ trait SqlDriverLiveModule { self: Jdbc => def insert[A: Schema](insert: List[Insert[_, A]]): IO[Exception, List[Int]] = ZIO.scoped(pool.connection.flatMap(insertOnBatch(insert, _))) - override def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Throwable, A] = - ZIO.scoped[R] { + override def transaction: ZLayer[Any, Exception, SqlTransaction] = + ZLayer.scoped { for { connection <- pool.connection _ <- ZIO.attemptBlocking(connection.setAutoCommit(false)).refineToOrDie[Exception] - a <- tx.run(Txn(connection, self)) - } yield a + _ <- ZIO.addFinalizerExit(c => + ZIO.attempt(if (c.isSuccess) connection.commit() else connection.rollback()).ignore + ) + } yield new SqlTransaction { + def delete(delete: Delete[_]): IO[Exception, Int] = + deleteOn(delete, connection) + + def update(update: Update[_]): IO[Exception, Int] = + updateOn(update, connection) + + def read[A](read: Read[A]): Stream[Exception, A] = + readOn(read, connection) + + def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] = + insertOn(insert, connection) + + } } } } diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala deleted file mode 100644 index c33e60bb6..000000000 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ /dev/null @@ -1,130 +0,0 @@ -package zio.sql - -import java.sql._ - -import zio.{ Tag => ZTag, _ } -import zio.stream._ -import zio.schema.Schema - -trait TransactionModule { self: Jdbc => - private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) - - sealed case class ZTransaction[-R: ZTag, +E, +A](unwrap: ZIO[(R, Txn), E, A]) { self => - def map[B](f: A => B): ZTransaction[R, E, B] = - ZTransaction(self.unwrap.map(f)) - - def flatMap[R1 <: R: ZTag, E1 >: E, B]( - f: A => ZTransaction[R1, E1, B] - ): ZTransaction[R1, E1, B] = - ZTransaction(self.unwrap.flatMap(a => f(a).unwrap)) - - private[sql] def run(txn: Txn)(implicit - ev: E <:< Throwable - ): ZIO[R, Throwable, A] = - for { - r <- ZIO.environment[R] - a <- self.unwrap - .mapError(ev) - .provideLayer(ZLayer.succeed((r.get, txn))) - .absorb - .tapBoth( - _ => - ZIO - .attemptBlocking(txn.connection.rollback()) - .refineToOrDie[Throwable], - _ => - ZIO - .attemptBlocking(txn.connection.commit()) - .refineToOrDie[Throwable] - ) - } yield a - - def zip[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = - zipWith[R1, E1, B, (A, B)](tx)((_, _)) - - def zipWith[R1 <: R: ZTag, E1 >: E, B, C]( - tx: ZTransaction[R1, E1, B] - )(f: (A, B) => C): ZTransaction[R1, E1, C] = - for { - a <- self - b <- tx - } yield f(a, b) - - def *>[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = - self.flatMap(_ => tx) - - // named alias for *> - def zipRight[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = - self *> tx - - def <*[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = - self.flatMap(a => tx.map(_ => a)) - - // named alias for <* - def zipLeft[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = - self <* tx - - def catchAllCause[R1 <: R: ZTag, E1 >: E, A1 >: A]( - f: Cause[E1] => ZTransaction[R1, E1, A1] - ): ZTransaction[R1, E1, A1] = - ZTransaction(self.unwrap.catchAllCause(cause => f(cause).unwrap)) - } - - object ZTransaction { - def apply[A]( - read: self.Read[A] - ): ZTransaction[Any, Exception, zio.stream.Stream[Exception, A]] = - txn.flatMap { case Txn(connection, coreDriver) => - // FIXME: Find a way to NOT load the whole result set into memory at once!!! - val stream = - coreDriver.readOn[A](read, connection) - - ZTransaction.fromEffect(stream.runCollect.map(ZStream.fromIterable(_))) - } - - def apply(update: self.Update[_]): ZTransaction[Any, Exception, Int] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.updateOn(update, connection)) - } - - def batchUpdate(update: List[self.Update[_]]): ZTransaction[Any, Exception, List[Int]] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.updateOnBatch(update, connection)) - } - - def apply[Z: Schema](insert: self.Insert[_, Z]): ZTransaction[Any, Exception, Int] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.insertOn(insert, connection)) - } - - def batchInsert[Z: Schema](insert: List[self.Insert[_, Z]]): ZTransaction[Any, Exception, List[Int]] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.insertOnBatch(insert, connection)) - } - - def apply(delete: self.Delete[_]): ZTransaction[Any, Exception, Int] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.deleteOn(delete, connection)) - } - - def batchDelete(delete: List[self.Delete[_]]): ZTransaction[Any, Exception, List[Int]] = - txn.flatMap { case Txn(connection, coreDriver) => - ZTransaction.fromEffect(coreDriver.deleteOnBatch(delete, connection)) - } - - def succeed[A](a: => A): ZTransaction[Any, Nothing, A] = fromEffect(ZIO.succeed(a)) - - def fail[E](e: => E): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.fail(e)) - - def halt[E](e: => Cause[E]): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.failCause(e)) - - def fromEffect[R: ZTag, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = - ZTransaction(for { - tuple <- ZIO.service[(R, Txn)] - a <- zio.provideLayer(ZLayer.succeed((tuple._1))) - } yield a) - - private val txn: ZTransaction[Any, Nothing, Txn] = - ZTransaction(ZIO.service[(Any, Txn)].map(_._2)) - } -} diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index cd4f6c044..1c69d7f94 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -1,10 +1,10 @@ package zio.sql -import zio.{ Tag => ZTag, _ } +import zio._ import zio.stream._ import zio.schema.Schema -trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule with SqlDriverLiveModule { +trait Jdbc extends zio.sql.Sql with JdbcInternalModule with SqlDriverLiveModule with ExprSyntaxModule { trait SqlDriver { def delete(delete: Delete[_]): IO[Exception, Int] @@ -16,11 +16,11 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def read[A](read: Read[A]): Stream[Exception, A] - def transact[R, A](tx: ZTransaction[R, Exception, A]): ZIO[R, Throwable, A] - def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] def insert[A: Schema](insert: List[Insert[_, A]]): IO[Exception, List[Int]] + + def transaction: ZLayer[Any, Exception, SqlTransaction] } object SqlDriver { @@ -28,10 +28,17 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi ZLayer(ZIO.serviceWith[ConnectionPool](new SqlDriverLive(_))) } - def execute[R <: SqlDriver: ZTag, A]( - tx: ZTransaction[R, Exception, A] - ): ZIO[R, Throwable, A] = - ZIO.serviceWithZIO(_.transact(tx)) + trait SqlTransaction { + + def delete(delete: Delete[_]): IO[Exception, Int] + + def update(update: Update[_]): IO[Exception, Int] + + def read[A](read: Read[A]): Stream[Exception, A] + + def insert[A: Schema](insert: Insert[_, A]): IO[Exception, Int] + + } def execute[A](read: Read[A]): ZStream[SqlDriver, Exception, A] = ZStream.serviceWithStream(_.read(read)) @@ -53,4 +60,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi def executeBatchUpdate(update: List[Update[_]]): ZIO[SqlDriver, Exception, List[Int]] = ZIO.serviceWithZIO(_.update(update)) + + val transact: ZLayer[SqlDriver, Exception, SqlTransaction] = + ZLayer(ZIO.serviceWith[SqlDriver](_.transaction)).flatten } diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index 77ca17f6c..8ec641761 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -15,35 +15,25 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { test("Transaction is returning the last value") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction(query) + val result = transact( + query.run.runCount *> query.run.runCount ) val assertion = result - .flatMap(_.runCount) .map(count => assertTrue(count == 5)) .orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("Transaction is failing") { - val query = select(customerId) from customers - - val result = execute( - ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage) - - assertZIO(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, test("Transaction failed and didn't deleted rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { allCustomersCount <- execute(query).map(identity[UUID](_)).runCount - _ <- execute( - ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) + _ <- transact( + deleteQuery.run *> ZIO.fail(new Exception("this is error")) *> query.run.runCount ).catchAllCause(_ => ZIO.unit) remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount } yield (allCustomersCount, remainingCustomersCount)) @@ -54,11 +44,11 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) - val tx = ZTransaction(deleteQuery) + val tx = deleteQuery.run val result = (for { allCustomersCount <- execute(query).map(identity[UUID](_)).runCount - _ <- execute(tx) + _ <- transact(tx) remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount } yield (allCustomersCount, remainingCustomersCount)) diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index afdc90583..6b1614fb2 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -15,32 +15,23 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { test("Transaction is returning the last value") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction(query) + val result = transact( + query.run.runCount *> query.run.runCount ) - val assertion = assertZIO(result.flatMap(_.runCount))(equalTo(5L)).orDie + val assertion = assertZIO(result)(equalTo(5L)).orDie assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("Transaction is failing") { - val query = select(customerId) from customers - - val result = execute( - ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage) - - assertZIO(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("Transaction failed and didn't deleted rows") { + test("Transaction failed and didn't delete rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) val result = (for { allCustomersCount <- execute(query).runCount - _ <- execute( - ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) - ).catchAllCause(_ => ZIO.unit) + _ <- transact { + deleteQuery.run *> ZIO.fail(new Exception("this is error")) *> query.run.runCount + }.catchAllCause(_ => ZIO.unit) remainingCustomersCount <- execute(query).runCount } yield (allCustomersCount, remainingCustomersCount)) @@ -50,11 +41,11 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) - val tx = ZTransaction(deleteQuery) + val tx = transact(deleteQuery.run) val result = (for { allCustomersCount <- execute(query).runCount - _ <- execute(tx) + _ <- tx remainingCustomersCount <- execute(query).runCount } yield (allCustomersCount, remainingCustomersCount)) From 9e317ff2e2821af3e88f1c8f8cb8a0253dd9f8f5 Mon Sep 17 00:00:00 2001 From: PeiZ <74068135+peixunzhang@users.noreply.github.com> Date: Sun, 3 Jul 2022 00:03:47 +0200 Subject: [PATCH 481/673] Implement renderInsert for Oracle (#695) * Implement renderInsert for Oracle * fix error * fix error * add test * fix test * fix error * fix error * add blank * fix blank * fix * fix * fix * fix datetime * Add tests for inserting and fix bugs (#1) * wip * wip * wip * formatting * Insert tests * Update oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala Co-authored-by: PeiZ <74068135+peixunzhang@users.noreply.github.com> * fix compiler error * fmt Co-authored-by: Jaro Regec Co-authored-by: Maxim Schuwalow <16665913+mschuwalow@users.noreply.github.com> --- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 10 + .../zio/sql/oracle/OracleRenderModule.scala | 231 +++++++++++++++++- .../zio/sql/oracle/OracleSqlModule.scala | 61 +++++ oracle/src/test/resources/shop_schema.sql | 34 ++- .../zio/sql/oracle/OracleSqlModuleSpec.scala | 200 ++++++++++++++- .../scala/zio/sql/oracle/ShopSchema.scala | 59 ++++- 6 files changed, 582 insertions(+), 13 deletions(-) diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index 86ccfb653..d72bd8c0c 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -4,6 +4,9 @@ import com.dimafeng.testcontainers.JdbcDatabaseContainer import zio.test.TestEnvironment import zio.{ Scope, ZIO, ZLayer } import zio.test.ZIOSpecDefault +import zio.prelude.AssociativeBoth +import zio.test.Gen +import zio.prelude.Covariant import com.dimafeng.testcontainers.SingleContainer import java.util.Properties import zio.test.Spec @@ -55,6 +58,13 @@ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { SqlDriver.live ) + protected implicit def genInstances[R] + : AssociativeBoth[({ type T[A] = Gen[R, A] })#T] with Covariant[({ type T[+A] = Gen[R, A] })#T] = + new AssociativeBoth[({ type T[A] = Gen[R, A] })#T] with Covariant[({ type T[+A] = Gen[R, A] })#T] { + def map[A, B](f: A => B): Gen[R, A] => Gen[R, B] = _.map(f) + def both[A, B](fa: => Gen[R, A], fb: => Gen[R, B]): Gen[R, (A, B)] = fa.zip(fb) + } + private[this] def testContainer: ZIO[Scope, Throwable, SingleContainer[_] with JdbcDatabaseContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index 37a64dfbc..744ffd771 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -1,10 +1,21 @@ package zio.sql.oracle import zio.schema.Schema +import zio.schema.DynamicValue +import zio.schema.StandardType +import java.time.Instant +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.OffsetTime +import java.time.ZonedDateTime import zio.sql.driver.Renderer import zio.sql.driver.Renderer.Extensions - +import zio.Chunk import scala.collection.mutable +import java.time.OffsetDateTime +import java.time.YearMonth +import java.time.Duration trait OracleRenderModule extends OracleSqlModule { self => @@ -14,7 +25,11 @@ trait OracleRenderModule extends OracleSqlModule { self => builder.toString } - override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? + override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = { + val builder = new StringBuilder + buildInsertString(insert, builder) + builder.toString() + } override def renderRead(read: self.Read[_]): String = { val builder = new StringBuilder @@ -232,6 +247,218 @@ trait OracleRenderModule extends OracleSqlModule { self => val _ = builder.append(" (").append(values.mkString(",")).append(") ") // todo fix needs escaping } + private def buildInsertString[A: Schema](insert: self.Insert[_, A], builder: StringBuilder): Unit = { + + builder.append("INSERT INTO ") + renderTable(insert.table, builder) + + builder.append(" (") + renderColumnNames(insert.sources, builder) + builder.append(") ") + + renderInsertValues(insert.values, builder) + } + + private def renderTable(table: Table, builder: StringBuilder): Unit = table match { + case Table.DerivedTable(read, name) => + builder.append(" ( ") + builder.append(renderRead(read.asInstanceOf[Read[_]])) + builder.append(" ) ") + builder.append(name) + () + case Table.DialectSpecificTable(_) => ??? // there are no extensions for Oracle + case Table.Joined(joinType, left, right, on) => + renderTable(left, builder) + val joinTypeRepr = joinType match { + case JoinType.Inner => " INNER JOIN " + case JoinType.LeftOuter => " LEFT JOIN " + case JoinType.RightOuter => " RIGHT JOIN " + case JoinType.FullOuter => " OUTER JOIN " + } + builder.append(joinTypeRepr) + renderTable(right, builder) + builder.append(" ON ") + buildExpr(on, builder) + builder.append(" ") + () + case source: Table.Source => + builder.append(source.name) + () + } + private def renderColumnNames(sources: SelectionSet[_], builder: StringBuilder): Unit = + sources match { + case SelectionSet.Empty => () // table is a collection of at least ONE column + case SelectionSet.Cons(columnSelection, tail) => + val _ = columnSelection.name.map { name => + builder.append(name) + } + tail.asInstanceOf[SelectionSet[_]] match { + case SelectionSet.Empty => () + case next @ SelectionSet.Cons(_, _) => + builder.append(", ") + renderColumnNames(next.asInstanceOf[SelectionSet[_]], builder) + } + } + private def renderInsertValues[A](values: Seq[A], builder: StringBuilder)(implicit schema: Schema[A]): Unit = + values.toList match { + case head :: Nil => + builder.append("SELECT ") + renderInsertValue(head, builder) + builder.append(" FROM DUAL") + () + case head :: next => + builder.append("SELECT ") + renderInsertValue(head, builder) + builder.append(" FROM DUAL UNION ALL ") + renderInsertValues(next, builder) + case Nil => () + } + + def renderInsertValue[Z](z: Z, builder: StringBuilder)(implicit schema: Schema[Z]): Unit = + schema.toDynamic(z) match { + case DynamicValue.Record(listMap) => + listMap.values.toList match { + case head :: Nil => renderDynamicValue(head, builder) + case head :: next => + renderDynamicValue(head, builder) + builder.append(", ") + renderDynamicValues(next, builder) + case Nil => () + } + case value => renderDynamicValue(value, builder) + } + + def renderDynamicValue(dynValue: DynamicValue, builder: StringBuilder): Unit = + dynValue match { + case DynamicValue.Primitive(value, typeTag) => + // need to do this since StandardType is invariant in A + import StandardType._ + StandardType.fromString(typeTag.tag) match { + case Some(v) => + v match { + case BigDecimalType => + builder.append(value) + () + case StandardType.InstantType(formatter) => + builder.append( + s"""TO_TIMESTAMP_TZ('${formatter.format( + value.asInstanceOf[Instant] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""" + ) + () + case CharType => + builder.append(s"'${value}'") + () + case IntType => + builder.append(value) + () + case BinaryType => + val chunk = value.asInstanceOf[Chunk[Object]] + builder.append("'") + for (b <- chunk) + builder.append(String.format("%02x", b)) + builder.append(s"'") + () + case StandardType.LocalDateTimeType(formatter) => + builder.append( + s"""TO_TIMESTAMP('${formatter.format( + value.asInstanceOf[LocalDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9')""" + ) + () + case StandardType.YearMonthType => + val yearMonth = value.asInstanceOf[YearMonth] + builder.append(s"INTERVAL '${yearMonth.getYear}-${yearMonth.getMonth.getValue}' YEAR(4) TO MONTH") + () + case DoubleType => + builder.append(value) + () + case StandardType.OffsetDateTimeType(formatter) => + builder.append( + s"""TO_TIMESTAMP_TZ('${formatter.format( + value.asInstanceOf[OffsetDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""" + ) + () + case StandardType.ZonedDateTimeType(formatter) => + builder.append( + s"""TO_TIMESTAMP_TZ('${formatter.format( + value.asInstanceOf[ZonedDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9 TZR')""" + ) + () + case UUIDType => + builder.append(s"'${value}'") + () + case ShortType => + builder.append(value) + () + case StandardType.LocalTimeType(_) => + val localTime = value.asInstanceOf[LocalTime] + builder.append( + s"INTERVAL '${localTime.getHour}:${localTime.getMinute}:${localTime.getSecond}.${localTime.getNano}' HOUR TO SECOND(9)" + ) + () + case StandardType.OffsetTimeType(formatter) => + builder.append( + s"TO_TIMESTAMP_TZ('${formatter.format(value.asInstanceOf[OffsetTime])}', 'HH24:MI:SS.FF9TZH:TZM')" + ) + () + case LongType => + builder.append(value) + () + case StringType => + builder.append(s"'${value}'") + () + case StandardType.LocalDateType(formatter) => + builder.append(s"DATE '${formatter.format(value.asInstanceOf[LocalDate])}'") + () + case BoolType => + val b = value.asInstanceOf[Boolean] + if (b) { + builder.append('1') + } else { + builder.append('0') + } + () + case FloatType => + builder.append(value) + () + case StandardType.DurationType => + val duration = value.asInstanceOf[Duration] + val days = duration.toDays() + val hours = duration.toHours() % 24 + val minutes = duration.toMinutes() % 60 + val seconds = duration.getSeconds % 60 + val nanos = duration.getNano + builder.append(s"INTERVAL '$days $hours:$minutes:$seconds.$nanos' DAY(9) TO SECOND(9)") + () + case _ => + throw new IllegalStateException("unsupported") + } + case None => () + } + case DynamicValue.Tuple(left, right) => + renderDynamicValue(left, builder) + builder.append(", ") + renderDynamicValue(right, builder) + case DynamicValue.SomeValue(value) => renderDynamicValue(value, builder) + case DynamicValue.NoneValue => + builder.append("null") + () + case _ => () + } + + def renderDynamicValues(dynValues: List[DynamicValue], builder: StringBuilder): Unit = + dynValues match { + case head :: Nil => renderDynamicValue(head, builder) + case head :: tail => + renderDynamicValue(head, builder) + builder.append(", ") + renderDynamicValues(tail, builder) + case Nil => () + } + private def buildExprList(expr: Read.ExprSet[_], builder: StringBuilder): Unit = expr match { case Read.ExprSet.ExprCons(head, tail) => diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala index 64d7b5ccb..e6b17ff45 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala @@ -1,11 +1,72 @@ package zio.sql.oracle import zio.sql.Sql +import zio.schema.Schema +import java.time.LocalDate +import java.time.format.DateTimeFormatter +import java.time.LocalDateTime +import java.time.YearMonth +import java.sql.ResultSet +import scala.util.Try +import java.time.Duration +import java.time.ZonedDateTime +import java.time.LocalTime +import java.time.Instant +import java.time.OffsetTime +import java.time.OffsetDateTime trait OracleSqlModule extends Sql { self => + import ColumnSet._ + + override type TypeTagExtension[+A] = OracleTypeTag[A] + + trait OracleTypeTag[+A] extends Tag[A] with Decodable[A] + + object OracleTypeTag { + implicit case object TYearMonth extends OracleTypeTag[YearMonth] { + def decode(column: Int, resultSet: ResultSet): Either[DecodingError, YearMonth] = + Try(YearMonth.parse(resultSet.getString(column))) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + r => Right(r) + ) + } + implicit case object TDuration extends OracleTypeTag[Duration] { + def decode(column: Int, resultSet: ResultSet): Either[DecodingError, Duration] = + Try(Duration.parse(resultSet.getString(column))) + .fold( + _ => Left(DecodingError.UnexpectedNull(column)), + r => Right(r) + ) + } + } object OracleFunctionDef { val Sind = FunctionDef[Double, Double](FunctionName("sind")) } + implicit val instantSchema = + Schema.primitive[Instant](zio.schema.StandardType.InstantType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) + + implicit val localDateSchema = + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_LOCAL_DATE)) + + implicit val localTimeSchema = + Schema.primitive[LocalTime](zio.schema.StandardType.LocalTimeType(DateTimeFormatter.ISO_LOCAL_TIME)) + + implicit val localDateTimeSchema = + Schema.primitive[LocalDateTime](zio.schema.StandardType.LocalDateTimeType(DateTimeFormatter.ISO_LOCAL_DATE_TIME)) + + implicit val offsetTimeSchema = + Schema.primitive[OffsetTime](zio.schema.StandardType.OffsetTimeType(DateTimeFormatter.ISO_OFFSET_TIME)) + + implicit val offsetDateTimeSchema = + Schema.primitive[OffsetDateTime](zio.schema.StandardType.OffsetDateTimeType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) + + implicit val zonedDatetimeSchema = + Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME)) + + def yearMonth(name: String): Singleton[YearMonth, name.type] = singleton[YearMonth, name.type](name) + + def duration(name: String): Singleton[Duration, name.type] = singleton[Duration, name.type](name) } diff --git a/oracle/src/test/resources/shop_schema.sql b/oracle/src/test/resources/shop_schema.sql index ebfa197b6..09ac9b119 100644 --- a/oracle/src/test/resources/shop_schema.sql +++ b/oracle/src/test/resources/shop_schema.sql @@ -37,8 +37,34 @@ create table order_details unit_price Number(15,2) not null ); -insert all - into customers (id, first_name, last_name, verified, dob) values ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 1, TO_DATE('1983-01-05','YYYY-MM-DD')) +create table all_types +( + id varchar(36) not null primary key, + bytearray blob, + bigdecimal number not null, + boolean_ number(1) not null, + char_ varchar(4) not null, + double_ number not null, + float_ float not null, + instant timestamp with time zone not null, + int_ integer not null, + optional_int integer, + localdate date not null, + localdatetime timestamp not null, + localtime interval day to second not null, + long_ integer not null, + offsetdatetime timestamp with time zone not null, + offsettime timestamp with time zone not null, + short integer not null, + string clob not null, + uuid varchar(36) not null, + zoneddatetime timestamp with time zone not null, + yearmonth interval year(4) to month not null, + duration interval day(9) to second(9) not null +); + +insert all + into customers (id, first_name, last_name, verified, dob) values ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', 1, TO_DATE('1983-01-05','YYYY-MM-DD')) into customers (id, first_name, last_name, verified, dob) values ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', 1, TO_DATE('1999-11-02','YYYY-MM-DD')) into customers (id, first_name, last_name, verified, dob) values ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', 1, TO_DATE('1990-11-16','YYYY-MM-DD')) into customers (id, first_name, last_name, verified, dob) values ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', 1, TO_DATE('1995-11-12','YYYY-MM-DD')) @@ -106,7 +132,7 @@ insert all ('04912093-cc2e-46ac-b64c-1bd7bb7758c3', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2019-03-25', 'YYYY-MM-DD')) into orders (id, customer_id, order_date) - values + values ('a243fa42-817a-44ec-8b67-22193d212d82', '60b01fc9-c902-4468-8d49-3c0f989def37', TO_DATE('2018-06-04', 'YYYY-MM-DD')) into orders (id, customer_id, order_date) @@ -452,4 +478,4 @@ insert all into order_details(order_id, product_id, quantity, unit_price) values ('5883CB62-D792-4EE3-ACBC-FE85B6BAA998', 'D5137D3A-894A-4109-9986-E982541B434F', 1, 55.00) -select * from dual; \ No newline at end of file +select * from dual; diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala index 84b4b87f7..40007cd4d 100644 --- a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala @@ -5,12 +5,19 @@ import zio.test.TestAspect._ import zio.test._ import scala.language.postfixOps +import java.util.UUID +import java.time.format.DateTimeFormatter +import zio.schema.Schema +import zio.prelude._ +import java.time.{ LocalDate, LocalDateTime, Month, Year, YearMonth, ZoneOffset, ZonedDateTime } object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema { import Customers._ + import Orders._ + import AllTypes._ - override def specLayered: Spec[SqlDriver, Exception] = suite("Oracle module")( + override def specLayered: Spec[SqlDriver with TestConfig with Sized, Exception] = suite("Oracle module")( test("Can update selected rows") { /** @@ -57,6 +64,195 @@ object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema { val result = execute(query) assertZIO(result)(equalTo(expected)) - } + }, + test("Can insert rows") { + final case class CustomerRow( + id: UUID, + dateOfBirth: LocalDate, + firstName: String, + lastName: String, + verified: Boolean + ) + implicit val customerRowSchema = + Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, CustomerRow]( + Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field( + "dateOfBirth", + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) + ), + Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), + CustomerRow.apply, + _.id, + _.dateOfBirth, + _.firstName, + _.lastName, + _.verified + ) + + val rows = List( + CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", true), + CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", false) + ) + + val command = insertInto(customers)( + customerId, + dob, + fName, + lName, + verified + ).values(rows) + + assertZIO(execute(command))(equalTo(2)) + }, + test("Can insert tuples") { + + val rows = List( + ( + UUID.randomUUID(), + UUID.randomUUID(), + LocalDate.of(2022, 1, 1) + ), + ( + UUID.randomUUID(), + UUID.randomUUID(), + LocalDate.of(2022, 1, 5) + ) + ) + + val command = insertInto(orders)( + orderId, + fkCustomerId, + orderDate + ).values(rows) + + assertZIO(execute(command))(equalTo(2)) + }, + test("Can insert all supported types") { + val sqlMinDateTime = LocalDateTime.of(-4713, 1, 1, 0, 0) + val sqlMaxDateTime = LocalDateTime.of(9999, 12, 31, 23, 59) + + val sqlInstant = + Gen.instant(sqlMinDateTime.toInstant(ZoneOffset.MIN), sqlMaxDateTime.toInstant(ZoneOffset.MAX)) + + val sqlYear = Gen.int(-4713, 9999).filter(_ != 0).map(Year.of) + + val sqlLocalDate = for { + year <- sqlYear + month <- Gen.int(1, 12) + maxLen = if (!year.isLeap && month == 2) 28 else Month.of(month).maxLength + day <- Gen.int(1, maxLen) + } yield LocalDate.of(year.getValue, month, day) + + val sqlYearMonth = for { + year <- sqlYear + month <- Gen.int(1, 12) + } yield YearMonth.of(year.getValue(), month) + + val sqlLocalDateTime = + Gen.localDateTime(sqlMinDateTime, sqlMaxDateTime) + + val sqlZonedDateTime = for { + dateTime <- sqlLocalDateTime + zoneId <- Gen.zoneId + } yield ZonedDateTime.of(dateTime, zoneId) + + val sqlOffsetTime = + Gen.offsetTime.filter(_.getOffset.getTotalSeconds % 60 == 0) + + val sqlOffsetDateTime = + Gen + .offsetDateTime(sqlMinDateTime.atOffset(ZoneOffset.MIN), sqlMaxDateTime.atOffset(ZoneOffset.MAX)) + .filter(_.getOffset.getTotalSeconds % 60 == 0) + + val gen = ( + Gen.uuid, + Gen.chunkOf(Gen.byte), + Gen.bigDecimal(Long.MinValue, Long.MaxValue), + Gen.boolean, + Gen.char, + Gen.double, + Gen.float, + sqlInstant, + Gen.int, + Gen.option(Gen.int), + sqlLocalDate, + sqlLocalDateTime, + Gen.localTime, + Gen.long, + sqlOffsetDateTime, + sqlOffsetTime, + Gen.short, + Gen.string, + Gen.uuid, + sqlZonedDateTime, + sqlYearMonth, + Gen.finiteDuration + ).tupleN + check(gen) { row => + val insert = insertInto(allTypes)( + id, + bytearrayCol, + bigdecimalCol, + booleanCol, + charCol, + doubleCol, + floatCol, + instantCol, + intCol, + optionalIntCol, + localdateCol, + localdatetimeCol, + localtimeCol, + longCol, + offsetdatetimeCol, + offsettimeCol, + shortCol, + stringCol, + uuidCol, + zonedDatetimeCol, + yearMonthCol, + durationCol + ).values(row) + + // TODO: ensure we can read values back correctly + // val read = + // select( + // id ++ + // bytearrayCol ++ + // bigdecimalCol ++ + // booleanCol ++ + // charCol ++ + // doubleCol ++ + // floatCol ++ + // instantCol ++ + // intCol ++ + // optionalIntCol ++ + // localdateCol ++ + // localdatetimeCol ++ + // localtimeCol ++ + // longCol ++ + // offsetdatetimeCol ++ + // offsettimeCol ++ + // shortCol ++ + // stringCol ++ + // uuidCol ++ + // zonedDatetimeCol ++ + // yearMonthCol ++ + // durationCol + // ).from(allTypes) + + val delete = deleteFrom(allTypes).where(id === row._1) + + for { + _ <- execute(insert) + // result <- execute(read).runHead + _ <- execute(delete) + // } yield assert(result)(isSome(equalTo(row))) + } yield assertCompletes + + } + } @@ samples(1) @@ retries(0) @@ shrinks(0) ) @@ sequential } diff --git a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala index 177831047..ec7eaf9d0 100644 --- a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala +++ b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala @@ -1,18 +1,16 @@ package zio.sql.oracle -import zio.sql.Jdbc - -trait ShopSchema extends Jdbc { self => +trait ShopSchema extends OracleSqlModule { self => import self.ColumnSet._ object Customers { val customers = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ - boolean("verified") ++ zonedDateTime("Created_timestamp")) + boolean("verified")) .table("customers") - val (customerId, dob, fName, lName, verified, createdTimestamp) = customers.columns + val (customerId, dob, fName, lName, verified) = customers.columns } object Orders { val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") @@ -41,4 +39,55 @@ trait ShopSchema extends Jdbc { self => val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns } + + object AllTypes { + val allTypes = + (uuid("id") ++ + byteArray("bytearray") ++ + bigDecimal("bigdecimal") ++ + boolean("boolean_") ++ + char("char_") ++ + double("double_") ++ + float("float_") ++ + instant("instant") ++ + int("int_") ++ + (int("optional_int") @@ ColumnSetAspect.nullable) ++ + localDate("localdate") ++ + localDateTime("localdatetime") ++ + localTime("localtime") ++ + long("long_") ++ + offsetDateTime("offsetdatetime") ++ + offsetTime("offsettime") ++ + short("short") ++ + string("string") ++ + uuid("uuid") ++ + zonedDateTime("zoneddatetime") ++ + yearMonth("yearmonth") ++ + duration("duration")).table("all_types") + + val ( + id, + bytearrayCol, + bigdecimalCol, + booleanCol, + charCol, + doubleCol, + floatCol, + instantCol, + intCol, + optionalIntCol, + localdateCol, + localdatetimeCol, + localtimeCol, + longCol, + offsetdatetimeCol, + offsettimeCol, + shortCol, + stringCol, + uuidCol, + zonedDatetimeCol, + yearMonthCol, + durationCol + ) = allTypes.columns + } } From 5594dca56265ba97c63de3dd97f01376e5fc0755 Mon Sep 17 00:00:00 2001 From: walesho <92475279+walesho@users.noreply.github.com> Date: Sat, 2 Jul 2022 23:58:48 +0100 Subject: [PATCH 482/673] Added Date Trunc for Postgres (#697) Co-authored-by: Jaro Regec Co-authored-by: Jakub Czuchnowski --- .../sql/postgresql/PostgresSqlModule.scala | 1 + .../zio/sql/postgresql/FunctionDefSpec.scala | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala index 337147121..443917026 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresSqlModule.scala @@ -252,6 +252,7 @@ trait PostgresSqlModule extends Sql { self => val Chr = FunctionDef[Int, String](FunctionName("chr")) val CurrentDate = Expr.ParenlessFunctionCall0[LocalDate](FunctionName("current_date")) val CurrentTime = Expr.ParenlessFunctionCall0[OffsetTime](FunctionName("current_time")) + val DateTrunc = FunctionDef[(String, Instant), LocalDateTime](FunctionName("date_trunc")) val Decode = FunctionDef[(String, String), Chunk[Byte]](FunctionName("decode")) val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) val Div = FunctionDef[(Double, Double), Double](FunctionName("div")) diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index 7d96f1b8e..2d0936f95 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -1058,6 +1058,34 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val result = typeCheck("execute((select(CharLength(Customers.fName))).to[Int, Int](identity))") assertZIO(dummyUsage *> result)(isLeft) + }, + test("date-trunc woth hour") { + val someInstant = Instant.parse("1997-05-07T10:15:30.00Z") + val query = select(DateTrunc("hour", someInstant)) + val testResult = execute(query) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} 10:00:00.0000") + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("date-trunc with minute") { + val someInstant = Instant.parse("1997-05-07T10:15:30.00Z") + val query = select(DateTrunc("minute", someInstant)) + val testResult = execute(query) + + val assertion = + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} 10:15:00.0000") + ) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ timeout(5.minutes) } From 72353a2e326a4d93b6dfb5054112b8ae6f8174ae Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sun, 3 Jul 2022 01:46:07 +0200 Subject: [PATCH 483/673] Remove initial Literal in Where clause in Oracle module (#711) --- .../zio/sql/oracle/OracleRenderModule.scala | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index 744ffd771..c1e22b34d 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -177,6 +177,20 @@ trait OracleRenderModule extends OracleSqlModule { self => val _ = builder.append(")") } + /** + * Drops the initial Litaral(true) present at the start of every WHERE expressions by default + * and proceeds to the rest of Expr's. + */ + private def buildWhereExpr[A, B](expr: self.Expr[_, A, B], builder: mutable.StringBuilder): Unit = expr match { + case Expr.Literal(true) => () + case Expr.Binary(_, b, _) => + builder.append(" WHERE ") + buildExpr(b, builder) + case _ => + builder.append(" WHERE ") + buildExpr(expr, builder) + } + private def buildReadString(read: self.Read[_], builder: StringBuilder): Unit = read match { case Read.Mapped(read, _) => buildReadString(read, builder) @@ -198,12 +212,7 @@ trait OracleRenderModule extends OracleSqlModule { self => builder.append(" FROM ") buildTable(t, builder) } - whereExpr match { - case Expr.Literal(true) => () - case _ => - builder.append(" WHERE ") - buildExpr(whereExpr, builder) - } + buildWhereExpr(whereExpr, builder) groupByExprs match { case Read.ExprSet.ExprCons(_, _) => builder.append(" GROUP BY ") @@ -556,12 +565,7 @@ trait OracleRenderModule extends OracleSqlModule { self => private def buildDeleteString(delete: Delete[_], builder: mutable.StringBuilder): Unit = { builder.append("DELETE FROM ") buildTable(delete.table, builder) - delete.whereExpr match { - case Expr.Literal(true) => () - case _ => - builder.append(" WHERE ") - buildExpr(delete.whereExpr, builder) - } + buildWhereExpr(delete.whereExpr, builder) } private[oracle] object OracleRender { @@ -573,8 +577,7 @@ trait OracleRenderModule extends OracleSqlModule { self => buildTable(table, render.builder) render(" SET ") renderSet(set) - render(" WHERE ") - buildExpr(whereExpr, render.builder) + buildWhereExpr(whereExpr, render.builder) } def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = From edda2a3102c3c24e3ea12b03f416a6e594cece55 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sun, 3 Jul 2022 02:25:27 +0200 Subject: [PATCH 484/673] Remove initial Literal in Where clause in SQL Server module (#712) --- .../sql/sqlserver/SqlServerRenderModule.scala | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 29cf49d5c..3f3ab6339 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -60,12 +60,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(" FROM ") buildTable(t) } - whereExpr match { - case Expr.Literal(true) => () - case _ => - render(" WHERE ") - buildExpr(whereExpr) - } + buildWhereExpr(whereExpr) groupByExprs match { case Read.ExprSet.ExprCons(_, _) => render(" GROUP BT ") @@ -96,7 +91,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(" (", values.mkString(","), ") ") // todo fix needs escaping } - def buildExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + private def buildExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Subselect(subselect) => render(" (") render(renderRead(subselect)) @@ -126,7 +121,11 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => case Expr.Relational(left, right, op) => buildExpr(left) render(" ", op.symbol, " ") - buildExpr(right) + right.asInstanceOf[Expr[_, A, B]] match { + case Expr.Literal(true) => val _ = render("1") + case Expr.Literal(false) => val _ = render("0") + case otherValue => buildExpr(otherValue) + } case Expr.In(value, set) => buildExpr(value) renderReadImpl(set) @@ -247,7 +246,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(")") } - def buildExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = + private def buildExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = expr match { case Read.ExprSet.ExprCons(head, tail) => buildExpr(head) @@ -259,7 +258,8 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => } case Read.ExprSet.NoExpr => () } - def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = + + private def buildOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = expr match { case head :: tail => head match { @@ -277,7 +277,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => case Nil => () } - def buildSelection(selectionSet: SelectionSet[_])(implicit render: Renderer): Unit = + private def buildSelection(selectionSet: SelectionSet[_])(implicit render: Renderer): Unit = selectionSet match { case cons0 @ SelectionSet.Cons(_, _) => object Dummy { @@ -295,7 +295,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => case SelectionSet.Empty => () } - def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = + private def buildColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => render(value.toString()) // todo fix escaping @@ -317,7 +317,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => } } - def buildTable(table: Table)(implicit render: Renderer): Unit = + private def buildTable(table: Table)(implicit render: Renderer): Unit = table match { case Table.DerivedTable(read, name) => @@ -356,15 +356,24 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(" ") } + /** + * Drops the initial Litaral(true) present at the start of every WHERE expressions by default + * and proceeds to the rest of Expr's. + */ + private def buildWhereExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + case Expr.Literal(true) => () + case Expr.Binary(_, b, _) => + render(" WHERE ") + buildExpr(b) + case _ => + render(" WHERE ") + buildExpr(expr) + } + def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") buildTable(delete.table) - delete.whereExpr match { - case Expr.Literal(true) => () - case _ => - render(" WHERE ") - buildExpr(delete.whereExpr) - } + buildWhereExpr(delete.whereExpr) } // TODO https://github.com/zio/zio-sql/issues/160 From 75dce9979deb2492c4c55da2552fc6306c9a02bf Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sun, 3 Jul 2022 13:38:24 +0200 Subject: [PATCH 485/673] Remove initial Literal in Where clause in Postgres module (#713) * Remove initial Literal in Where clause in Postgres module * Fix test * Fix test --- .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 7 +-- .../sql/postgresql/PostgresRenderModule.scala | 53 ++++++++++--------- .../zio/sql/postgresql/DeleteBatchSpec.scala | 30 +++++------ 3 files changed, 47 insertions(+), 43 deletions(-) diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index db77a4473..8308060e5 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -4,12 +4,13 @@ import java.time._ import java.time.format.DateTimeFormatter import java.util.UUID -import scala.language.postfixOps - import zio._ import zio.schema._ import zio.test._ import zio.test.Assertion._ +import zio.test.TestAspect._ + +import scala.language.postfixOps object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { @@ -270,6 +271,6 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { println(renderUpdate(query)) assertZIO(execute(query))(equalTo(1)) } - ) + ) @@ sequential } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala index 456294af3..88655dc20 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala @@ -47,7 +47,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => renderInsertValues(insert.values) } - def renderInsertValues[A](col: Seq[A])(implicit render: Renderer, schema: Schema[A]): Unit = + private def renderInsertValues[A](col: Seq[A])(implicit render: Renderer, schema: Schema[A]): Unit = // TODO any performance penalty because of toList ? col.toList match { case head :: Nil => @@ -62,7 +62,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => case Nil => () } - def renderInserValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = + private def renderInserValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = schema.toDynamic(z) match { case DynamicValue.Record(listMap) => listMap.values.toList match { @@ -76,7 +76,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => case value => renderDynamicValue(value) } - def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = + private def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = dynValues match { case head :: Nil => renderDynamicValue(head) case head :: tail => @@ -87,7 +87,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => } // TODO render each type according to their specifics & test it - def renderDynamicValue(dynValue: DynamicValue)(implicit render: Renderer): Unit = + private def renderDynamicValue(dynValue: DynamicValue)(implicit render: Renderer): Unit = dynValue match { case DynamicValue.Primitive(value, typeTag) => // need to do this since StandardType is invariant in A @@ -143,7 +143,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => case _ => () } - def renderColumnNames(sources: SelectionSet[_])(implicit render: Renderer): Unit = + private def renderColumnNames(sources: SelectionSet[_])(implicit render: Renderer): Unit = sources match { case SelectionSet.Empty => () // table is a collection of at least ONE column case SelectionSet.Cons(columnSelection, tail) => @@ -161,12 +161,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") renderTable(delete.table) - delete.whereExpr match { - case Expr.Literal(true) => () - case _ => - render(" WHERE ") - renderExpr(delete.whereExpr) - } + renderWhereExpr(delete.whereExpr) } def renderUpdateImpl(update: Update[_])(implicit render: Renderer) = @@ -176,11 +171,10 @@ trait PostgresRenderModule extends PostgresSqlModule { self => renderTable(table) render(" SET ") renderSet(set) - render(" WHERE ") - renderExpr(whereExpr) + renderWhereExpr(whereExpr) } - def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = + private def renderSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = set match { case head :: tail => renderSetLhs(head.lhs) @@ -394,12 +388,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => render(" FROM ") renderTable(t) } - whereExpr match { - case Expr.Literal(true) => () - case _ => - render(" WHERE ") - renderExpr(whereExpr) - } + renderWhereExpr(whereExpr) groupByExprs match { case Read.ExprSet.ExprCons(_, _) => render(" GROUP BY ") @@ -438,7 +427,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => render(" (", values.mkString(","), ") ") // todo fix needs escaping } - def renderExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = + private def renderExprList(expr: Read.ExprSet[_])(implicit render: Renderer): Unit = expr match { case Read.ExprSet.ExprCons(head, tail) => renderExpr(head) @@ -451,7 +440,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => case Read.ExprSet.NoExpr => () } - def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = + private def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = expr match { case head :: tail => head match { @@ -469,7 +458,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => case Nil => () } - def renderSelection[A](selectionSet: SelectionSet[A])(implicit render: Renderer): Unit = + private def renderSelection[A](selectionSet: SelectionSet[A])(implicit render: Renderer): Unit = selectionSet match { case cons0 @ SelectionSet.Cons(_, _) => object Dummy { @@ -487,7 +476,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => case SelectionSet.Empty => () } - def renderColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = + private def renderColumnSelection[A, B](columnSelection: ColumnSelection[A, B])(implicit render: Renderer): Unit = columnSelection match { case ColumnSelection.Constant(value, name) => render(value) // todo fix escaping @@ -507,7 +496,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => } } - def renderTable(table: Table)(implicit render: Renderer): Unit = + private def renderTable(table: Table)(implicit render: Renderer): Unit = table match { case Table.DialectSpecificTable(tableExtension) => tableExtension match { @@ -538,5 +527,19 @@ trait PostgresRenderModule extends PostgresSqlModule { self => renderExpr(on) render(" ") } + + /** + * Drops the initial Litaral(true) present at the start of every WHERE expressions by default + * and proceeds to the rest of Expr's. + */ + private def renderWhereExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + case Expr.Literal(true) => () + case Expr.Binary(_, b, _) => + render(" WHERE ") + renderExpr(b) + case _ => + render(" WHERE ") + renderExpr(expr) + } } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala index 5aeb77ac4..22413297b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala @@ -2,6 +2,7 @@ package zio.sql.postgresql import zio.Cause import zio.test.Assertion._ +import zio.test.TestAspect._ import zio.test._ import java.time.{ LocalDate, ZonedDateTime } @@ -70,25 +71,24 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema { val allCustomer = List(c1, c2, c3, c4) val data = allCustomer.map(Customer.unapply(_).get) - val query = insertInto(customers)(ALL).values(data) - val resultInsert = execute(query) + val insertStmt = insertInto(customers)(ALL).values(data) + val insertResult = execute(insertStmt) - val insertAssertion = for { - r <- resultInsert - } yield assert(r)(equalTo(4)) - insertAssertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + val selectStmt = select(ALL).from(customers) + val selectResult = execute(selectStmt.to((Customer.apply _).tupled)).runCollect - val selectAll = select(ALL).from(customers) - val result_ = execute(selectAll.to((Customer.apply _).tupled)).runCollect + val expected = 8 // 4 customers are in the db alredy and we insert additional 4 in this test - val assertion_ = for { - x <- result_ - updated = x.toList.map(delete_) - result <- executeBatchDelete(updated).map(l => l.fold(0)((a, b) => a + b)) - } yield assert(result)(equalTo(4)) - assertion_.mapErrorCause(cause => Cause.stackless(cause.untraced)) + val assertion = for { + _ <- insertResult + customers <- selectResult + deletes = customers.toList.map(delete_) + result <- executeBatchDelete(deletes).map(l => l.fold(0)((a, b) => a + b)) + } yield assert(result)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } - ) + ) @@ sequential } From fa81e092f0a62f8e529193df86fbec10c3f74ae4 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 3 Jul 2022 13:52:41 +0200 Subject: [PATCH 486/673] Remove initial Literal in Where clause in MySQL module --- .../zio/sql/mysql/MysqlRenderModule.scala | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala index 504ecd92e..17481a48f 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala @@ -49,12 +49,7 @@ trait MysqlRenderModule extends MysqlSqlModule { self => def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") renderTable(delete.table) - delete.whereExpr match { - case Expr.Literal(true) => () - case _ => - render(" WHERE ") - renderExpr(delete.whereExpr) - } + renderWhereExpr(delete.whereExpr) } def renderUpdateImpl(update: Update[_])(implicit render: Renderer) = @@ -64,8 +59,7 @@ trait MysqlRenderModule extends MysqlSqlModule { self => renderTable(table) render(" SET ") renderSet(set) - render(" WHERE ") - renderExpr(whereExpr) + renderWhereExpr(whereExpr) } def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = @@ -89,12 +83,7 @@ trait MysqlRenderModule extends MysqlSqlModule { self => render(" FROM ") renderTable(t) } - whereExpr match { - case Expr.Literal(true) => () - case _ => - render(" WHERE ") - renderExpr(whereExpr) - } + renderWhereExpr(whereExpr) groupByExprs match { case Read.ExprSet.ExprCons(_, _) => render(" GROUP BY ") @@ -511,7 +500,7 @@ trait MysqlRenderModule extends MysqlSqlModule { self => case Read.ExprSet.NoExpr => () } - def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = + private def renderOrderingList(expr: List[Ordering[Expr[_, _, _]]])(implicit render: Renderer): Unit = expr match { case head :: tail => head match { @@ -529,6 +518,20 @@ trait MysqlRenderModule extends MysqlSqlModule { self => } case Nil => () } + + /** + * Drops the initial Litaral(true) present at the start of every WHERE expressions by default + * and proceeds to the rest of Expr's. + */ + private def renderWhereExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { + case Expr.Literal(true) => () + case Expr.Binary(_, b, _) => + render(" WHERE ") + renderExpr(b) + case _ => + render(" WHERE ") + renderExpr(expr) + } } } From aa2bd0069b6680077309326bd97c4eed386ffbc4 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 3 Jul 2022 13:55:00 +0200 Subject: [PATCH 487/673] Add operator tests in OracleModule spec --- .../test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 8f357568e..1072caf1b 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -97,6 +97,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { test("Can select with property unary operator") { customerSelectJoseAssertion(verified isNotTrue) }, + test("Can select with property binary operator with Boolean") { + customerSelectJoseAssertion(verified === false) + }, test("Can select with property binary operator with UUID") { customerSelectJoseAssertion(customerId === UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc")) }, @@ -118,6 +121,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { test("Can select with property binary operator with Instant") { customerSelectJoseAssertion(dob === Instant.parse("1987-03-23T00:00:00Z")) }, + test("Can select with mutltiple binary operators") { + customerSelectJoseAssertion(verified === false && fName === "Jose" && lName === "Wiggins") + }, test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) From 7a449e6c3fe212bd047dd2c462bb213663ddbcd0 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sun, 3 Jul 2022 14:14:13 +0200 Subject: [PATCH 488/673] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 011d54b2f..af1971f3b 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,10 @@ Connection pool | :white_check_mark: Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------|:-------------------| :------------- Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Render Delete | :heavy_check_mark: | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | -Render Update | :heavy_check_mark: | | :white_check_mark: | :white_check_mark: | -Render Insert | :heavy_check_mark: | | | :white_check_mark: | -Functions | :heavy_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +Render Delete | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +Render Update | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | +Render Insert | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | +Functions | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Types | :white_check_mark: | | | :white_check_mark: | Operators | | | | | From fd12e37829b4a81204ff9ecc8a76b5b6896c3ff6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:13:24 +0000 Subject: [PATCH 489/673] Update sbt-bloop to 1.5.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 52aabf67c..255970314 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.0") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.2") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From 7dda6e4216893996fa60c245bd76515508dcdf32 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:13:33 +0000 Subject: [PATCH 490/673] Update sbt-scalafix to 0.10.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 52aabf67c..2ad38adbc 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,5 +10,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") From edc9a67212941e14da81b872036a0b5e10a044a9 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:13:44 +0000 Subject: [PATCH 491/673] Update silencer-lib, silencer-plugin to 1.7.9 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 991416b57..d40b5f404 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -9,7 +9,7 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val SilencerVersion = "1.7.8" + val SilencerVersion = "1.7.9" val Scala212 = "2.12.15" val Scala213 = "2.13.8" val ScalaDotty = "3.0.0-RC3" From a396ebf5f9676b69a71378558b4607f629f39ed9 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:13:54 +0000 Subject: [PATCH 492/673] Update ojdbc8 to 21.6.0.0.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f77d228c6..cb3ce8f63 100644 --- a/build.sbt +++ b/build.sbt @@ -162,7 +162,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.5.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.6.0.0.1" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 2db817e44259c6cb762e1388d0d80826d7cac5d4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:14:04 +0000 Subject: [PATCH 493/673] Update sbt-tpolecat to 0.3.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 52aabf67c..698c7cd3b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.3") From f6ab0c193f83615e1ad4f9b6c88f40475d8f3b90 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:14:15 +0000 Subject: [PATCH 494/673] Update postgresql to 42.4.0 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index f77d228c6..c898cd52a 100644 --- a/build.sbt +++ b/build.sbt @@ -117,7 +117,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.3.6" % Test, + "org.postgresql" % "postgresql" % "42.4.0" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -181,7 +181,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.3.6" % Compile, + "org.postgresql" % "postgresql" % "42.4.0" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 393b162c22856cdebe53a1c7b795e1fae6dc6a2d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:14:27 +0000 Subject: [PATCH 495/673] Update scala-library to 2.12.16 --- .github/workflows/ci.yml | 2 +- project/BuildHelper.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bffb75e2..c971ce1be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.15', '2.13.8'] + scala: ['2.12.16', '2.13.8'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 991416b57..596bce1ec 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -10,7 +10,7 @@ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { val SilencerVersion = "1.7.8" - val Scala212 = "2.12.15" + val Scala212 = "2.12.16" val Scala213 = "2.13.8" val ScalaDotty = "3.0.0-RC3" From a0c176c513f5953ea7f9ec7086c534f74df15fcb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:14:32 +0000 Subject: [PATCH 496/673] Update scalafmt-core to 3.5.8 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 9db89de66..b461beab6 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.5.3" +version = "3.5.8" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From 068dbb644d737de7620fa00cddcdca5cd72a653f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:15:46 +0000 Subject: [PATCH 497/673] Update sbt-scoverage to 2.0.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 52aabf67c..c126786aa 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.0") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 0ebba9a61bac6d3cde9a4ba7931840dc55b7dfd7 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Jul 2022 06:15:57 +0000 Subject: [PATCH 498/673] Update database-commons, jdbc, mssqlserver, ... to 1.17.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f77d228c6..548e0ce73 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0" val zioSchemaVersion = "0.2.0" -val testcontainersVersion = "1.17.2" +val testcontainersVersion = "1.17.3" val testcontainersScalaVersion = "0.40.8" val logbackVersion = "1.2.11" From d7b7301e525101f760afaef92b84d75933f8304a Mon Sep 17 00:00:00 2001 From: bogatyra Date: Thu, 7 Jul 2022 14:08:10 +0200 Subject: [PATCH 499/673] Issue #160 renderUpdateImpl is implemented for SqlServer --- .../sql/sqlserver/SqlServerRenderModule.scala | 25 +++++++++++++++++-- .../sql/sqlserver/SqlServerModuleSpec.scala | 5 ++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 3f3ab6339..850b626be 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -370,15 +370,36 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => buildExpr(expr) } + private def buildSet(set: List[Set[_, _]])(implicit render: Renderer): Unit = + set match { + case head :: tail => + buildExpr(head.lhs) + render(" = ") + buildExpr(head.rhs) + tail.foreach { setEq => + render(", ") + buildExpr(setEq.lhs) + render(" = ") + buildExpr(setEq.rhs) + } + case Nil => // TODO restrict Update to not allow empty set + } + def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") buildTable(delete.table) buildWhereExpr(delete.whereExpr) } - // TODO https://github.com/zio/zio-sql/issues/160 def renderUpdateImpl(update: Update[_])(implicit render: Renderer) = - ??? + update match { + case Update(table, set, whereExpr) => + render("UPDATE ") + buildTable(table) + render(" SET ") + buildSet(set) + buildWhereExpr(whereExpr) + } // TODO https://github.com/zio/zio-sql/issues/160 def renderInsertImpl[A](insert: Insert[_, A])(implicit render: Renderer, schema: Schema[A]) = diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 1072caf1b..bc993833d 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -521,6 +521,11 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, + test("Can update rows") { + val query = update(customers).set(fName, "Roland").where(fName === "Ronald") + + assertZIO(execute(query))(equalTo(1)) + }, test("Can delete from single table with a condition") { val query = deleteFrom(customers).where(verified.isNotTrue) From 867524ebbae83aff72292562f3951345223ba580 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Thu, 7 Jul 2022 20:15:21 +0200 Subject: [PATCH 500/673] Issue #161 renderInsertImpl is implemented for SqlServer --- .../sql/sqlserver/SqlServerRenderModule.scala | 138 +++++++++++++++++- .../sql/sqlserver/SqlServerSqlModule.scala | 7 + .../sql/sqlserver/SqlServerModuleSpec.scala | 66 +++++++++ 3 files changed, 206 insertions(+), 5 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 3f3ab6339..3eaf1f3cf 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -1,9 +1,13 @@ package zio.sql.sqlserver -import zio.schema.Schema +import zio.schema.StandardType._ +import zio.schema._ import zio.sql.driver.Renderer import zio.sql.driver.Renderer.Extensions +import java.time.format.DateTimeFormatter +import java.time.{Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, ZonedDateTime} + trait SqlServerRenderModule extends SqlServerSqlModule { self => override def renderRead(read: self.Read[_]): String = { @@ -370,6 +374,122 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => buildExpr(expr) } + private def buildColumnNames(sources: SelectionSet[_])(implicit render: Renderer): Unit = + sources match { + case SelectionSet.Empty => () + case SelectionSet.Cons(columnSelection, tail) => + val _ = columnSelection.name.map { name => + render(name) + } + tail.asInstanceOf[SelectionSet[_]] match { + case SelectionSet.Empty => () + case next @ SelectionSet.Cons(_, _) => + render(", ") + buildColumnNames(next.asInstanceOf[SelectionSet[_]])(render) + } + } + + private def buildInsertValues[A](col: Seq[A])(implicit render: Renderer, schema: Schema[A]): Unit = + col.toList match { + case head :: Nil => + render("(") + buildInsertValue(head) + render(");") + case head :: next => + render("(") + buildInsertValue(head)(render, schema) + render(" ),") + buildInsertValues(next) + case Nil => () + } + + private def buildInsertValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = + schema.toDynamic(z) match { + case DynamicValue.Record(listMap) => + listMap.values.toList match { + case head :: Nil => buildDynamicValue(head) + case head :: next => + buildDynamicValue(head) + render(", ") + buildDynamicValues(next) + case Nil => () + } + case value => buildDynamicValue(value) + } + + private def buildDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = + dynValues match { + case head :: Nil => buildDynamicValue(head) + case head :: tail => + buildDynamicValue(head) + render(", ") + buildDynamicValues(tail) + case Nil => () + } + + // TODO render each type according to their specifics & test it + private def buildDynamicValue(dynValue: DynamicValue)(implicit render: Renderer): Unit = + dynValue match { + case DynamicValue.Primitive(value, typeTag) => + // need to do this since StandardType is invariant in A + StandardType.fromString(typeTag.tag) match { + case Some(v) => + v match { + case BigDecimalType => + render(value) + case StandardType.InstantType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[Instant])}'") + case CharType => render(s"'${value}'") + case IntType => render(value) + case StandardType.MonthDayType => render(s"'${value}'") + case BinaryType => render(s"'${value}'") + case StandardType.MonthType => render(s"'${value}'") + case StandardType.LocalDateTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalDateTime])}'") + case UnitType => render("null") // None is encoded as Schema[Unit].transform(_ => None, _ => ()) + case StandardType.YearMonthType => render(s"'${value}'") + case DoubleType => render(value) + case StandardType.YearType => render(s"'${value}'") + case StandardType.OffsetDateTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[OffsetDateTime])}'") + case StandardType.ZonedDateTimeType(_) => + render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") + case BigIntegerType => render(s"'${value}'") + case UUIDType => render(s"'${value}'") + case StandardType.ZoneOffsetType => render(s"'${value}'") + case ShortType => render(value) + case StandardType.LocalTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalTime])}'") + case StandardType.OffsetTimeType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[OffsetTime])}'") + case LongType => render(value) + case StringType => render(s"'${value}'") + case StandardType.PeriodType => render(s"'${value}'") + case StandardType.ZoneIdType => render(s"'${value}'") + case StandardType.LocalDateType(formatter) => + render(s"'${formatter.format(value.asInstanceOf[LocalDate])}'") + case BoolType => + val b = value.asInstanceOf[Boolean] + if (b) { + render('1') + } else { + render('0') + } + case DayOfWeekType => render(s"'${value}'") + case FloatType => render(value) + case StandardType.DurationType => render(s"'${value}'") + } + case None => () + } + case DynamicValue.Tuple(left, right) => + buildDynamicValue(left) + render(", ") + buildDynamicValue(right) + case DynamicValue.SomeValue(value) => buildDynamicValue(value) + case DynamicValue.NoneValue => render("null") + case _ => () + } + def renderDeleteImpl(delete: Delete[_])(implicit render: Renderer) = { render("DELETE FROM ") buildTable(delete.table) @@ -377,11 +497,19 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => } // TODO https://github.com/zio/zio-sql/issues/160 - def renderUpdateImpl(update: Update[_])(implicit render: Renderer) = + def renderUpdateImpl(update: Update[_])(implicit render: Renderer) = { ??? + } - // TODO https://github.com/zio/zio-sql/issues/160 - def renderInsertImpl[A](insert: Insert[_, A])(implicit render: Renderer, schema: Schema[A]) = - ??? + def renderInsertImpl[A](insert: Insert[_, A])(implicit render: Renderer, schema: Schema[A]) = { + render("INSERT INTO ") + buildTable(insert.table) + + render(" (") + buildColumnNames(insert.sources) + render(") VALUES ") + + buildInsertValues(insert.values) + } } } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala index 6f013be41..453018298 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala @@ -1,7 +1,11 @@ package zio.sql.sqlserver +import zio.schema.Schema import zio.sql.Sql +import java.time.LocalDate +import java.time.format.DateTimeFormatter + trait SqlServerSqlModule extends Sql { self => override type TableExtension[A] = SqlServerSpecific.SqlServerTable[A] @@ -89,4 +93,7 @@ trait SqlServerSqlModule extends Sql { self => } } + implicit val localDateSchema = + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_LOCAL_DATE)) + } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 1072caf1b..47e58f691 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -1,11 +1,13 @@ package zio.sql.sqlserver import zio._ +import zio.schema._ import zio.test.Assertion._ import zio.test.TestAspect.sequential import zio.test._ import java.time._ +import java.time.format.DateTimeFormatter import java.util.UUID import scala.language.postfixOps @@ -527,6 +529,70 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { val result = execute(query) assertZIO(result)(equalTo(1)) + }, + test("Can insert rows") { + final case class CustomerRow( + id: UUID, + firstName: String, + lastName: String, + verified: Boolean, + dateOfBirth: LocalDate + ) + implicit val customerRowSchema = + Schema.CaseClass5[UUID, String, String, Boolean, LocalDate, CustomerRow]( + Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), + Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), + Schema.Field( + "dateOfBirth", + Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) + ), + CustomerRow.apply, + _.id, + _.firstName, + _.lastName, + _.verified, + _.dateOfBirth + ) + + val rows = List( + CustomerRow(UUID.randomUUID(), "Peter", "Parker", true, LocalDate.ofYearDay(2001, 8)), + CustomerRow(UUID.randomUUID(), "Stephen", "Strange", false, LocalDate.ofYearDay(1980, 2)) + ) + + val command = insertInto(customers)( + customerId, + fName, + lName, + verified, + dob + ).values(rows) + + assertZIO(execute(command))(equalTo(2)) + }, + test("Can insert tuples") { + + val rows = List( + ( + UUID.randomUUID(), + UUID.randomUUID(), + LocalDate.of(2022, 1, 1) + ), + ( + UUID.randomUUID(), + UUID.randomUUID(), + LocalDate.of(2022, 1, 5) + ) + ) + + val command = insertInto(orders)( + orderId, + fkCustomerId, + orderDate + ).values(rows) + + assertZIO(execute(command))(equalTo(2)) } ) @@ sequential From 81ce56642fff60ca9b633016a7b26963511489b8 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Fri, 8 Jul 2022 14:18:31 +0200 Subject: [PATCH 501/673] Format fix --- .../zio/sql/sqlserver/SqlServerRenderModule.scala | 4 ++-- .../scala/zio/sql/sqlserver/SqlServerModuleSpec.scala | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 128500b8d..e0a817882 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -6,7 +6,7 @@ import zio.sql.driver.Renderer import zio.sql.driver.Renderer.Extensions import java.time.format.DateTimeFormatter -import java.time.{Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, ZonedDateTime} +import java.time.{ Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, ZonedDateTime } trait SqlServerRenderModule extends SqlServerSqlModule { self => @@ -415,7 +415,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => case Nil => () } case value => buildDynamicValue(value) - } + } private def buildDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = dynValues match { diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index b515586be..6d4aaf78f 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -537,11 +537,11 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { }, test("Can insert rows") { final case class CustomerRow( - id: UUID, - firstName: String, - lastName: String, - verified: Boolean, - dateOfBirth: LocalDate + id: UUID, + firstName: String, + lastName: String, + verified: Boolean, + dateOfBirth: LocalDate ) implicit val customerRowSchema = Schema.CaseClass5[UUID, String, String, Boolean, LocalDate, CustomerRow]( From 088ebe1fe55087903af7ed1701d00da047126050 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Fri, 8 Jul 2022 15:16:13 +0200 Subject: [PATCH 502/673] Query render fix for "GROUP BY" case --- .../main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index e0a817882..5357be790 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -67,7 +67,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => buildWhereExpr(whereExpr) groupByExprs match { case Read.ExprSet.ExprCons(_, _) => - render(" GROUP BT ") + render(" GROUP BY ") buildExprList(groupByExprs) havingExpr match { From cb9e01fa5b7c46e7f93816987a8431c6aa30b612 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 12 Jul 2022 08:43:41 +0000 Subject: [PATCH 503/673] Update sbt to 1.7.1 --- mysql/project/build.properties | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql/project/build.properties b/mysql/project/build.properties index c8fcab543..22af2628c 100644 --- a/mysql/project/build.properties +++ b/mysql/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.7.1 diff --git a/project/build.properties b/project/build.properties index c8fcab543..22af2628c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.7.1 From e2447d3224309c4303a3890a4e297906f4ed0ef4 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Tue, 12 Jul 2022 14:17:03 +0200 Subject: [PATCH 504/673] Mapping of Schema types to corresponding SqlServer types for Insert case --- .../sql/sqlserver/SqlServerRenderModule.scala | 89 ++++++++++------- .../sql/sqlserver/SqlServerSqlModule.scala | 19 +++- sqlserver/src/test/resources/db_schema.sql | 22 +++++ .../scala/zio/sql/sqlserver/DbSchema.scala | 45 +++++++++ .../sql/sqlserver/SqlServerModuleSpec.scala | 95 ++++++++++++++++++- 5 files changed, 231 insertions(+), 39 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 5357be790..50a9cefc3 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -1,12 +1,13 @@ package zio.sql.sqlserver +import zio.Chunk import zio.schema.StandardType._ import zio.schema._ import zio.sql.driver.Renderer import zio.sql.driver.Renderer.Extensions -import java.time.format.DateTimeFormatter -import java.time.{ Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, ZonedDateTime } +import java.time.format.{ DateTimeFormatter, DateTimeFormatterBuilder } +import java.time._ trait SqlServerRenderModule extends SqlServerSqlModule { self => @@ -36,6 +37,17 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => object SqlServerRenderer { + private val fmtDateTimeOffset = new DateTimeFormatterBuilder().parseCaseInsensitive + .append(DateTimeFormatter.ISO_LOCAL_DATE_TIME) + .appendOffset("+HH:MM", "Z") + .toFormatter() + + private val fmtTimeOffset = new DateTimeFormatterBuilder() + .parseCaseInsensitive() + .append(DateTimeFormatter.ISO_LOCAL_TIME) + .appendOffset("+HH:MM", "Z") + .toFormatter() + private[zio] def renderReadImpl(read: self.Read[_])(implicit render: Renderer): Unit = read match { // case Read.Mapped(read, _) => renderReadImpl(read.asInstanceOf[Read[Out]]) @@ -435,49 +447,54 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => StandardType.fromString(typeTag.tag) match { case Some(v) => v match { - case BigDecimalType => + case BigDecimalType => render(value) - case StandardType.InstantType(formatter) => + case StandardType.InstantType(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") - case CharType => render(s"'${value}'") - case IntType => render(value) - case StandardType.MonthDayType => render(s"'${value}'") - case BinaryType => render(s"'${value}'") - case StandardType.MonthType => render(s"'${value}'") - case StandardType.LocalDateTimeType(formatter) => + case CharType => render(s"'${value}'") + case IntType => render(value) + case StandardType.MonthDayType => render(s"'${value}'") + case BinaryType => + val chunk = value.asInstanceOf[Chunk[Object]] + render("CONVERT(VARBINARY(MAX),'") + for (b <- chunk) + render(String.format("%02x", b)) + render("', 2)") + case StandardType.MonthType => render(s"'${value}'") + case StandardType.LocalDateTimeType(formatter) => render(s"'${formatter.format(value.asInstanceOf[LocalDateTime])}'") - case UnitType => render("null") // None is encoded as Schema[Unit].transform(_ => None, _ => ()) - case StandardType.YearMonthType => render(s"'${value}'") - case DoubleType => render(value) - case StandardType.YearType => render(s"'${value}'") - case StandardType.OffsetDateTimeType(formatter) => - render(s"'${formatter.format(value.asInstanceOf[OffsetDateTime])}'") - case StandardType.ZonedDateTimeType(_) => - render(s"'${DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value.asInstanceOf[ZonedDateTime])}'") - case BigIntegerType => render(s"'${value}'") - case UUIDType => render(s"'${value}'") - case StandardType.ZoneOffsetType => render(s"'${value}'") - case ShortType => render(value) - case StandardType.LocalTimeType(formatter) => - render(s"'${formatter.format(value.asInstanceOf[LocalTime])}'") - case StandardType.OffsetTimeType(formatter) => - render(s"'${formatter.format(value.asInstanceOf[OffsetTime])}'") - case LongType => render(value) - case StringType => render(s"'${value}'") - case StandardType.PeriodType => render(s"'${value}'") - case StandardType.ZoneIdType => render(s"'${value}'") - case StandardType.LocalDateType(formatter) => - render(s"'${formatter.format(value.asInstanceOf[LocalDate])}'") - case BoolType => + case UnitType => render("null") // None is encoded as Schema[Unit].transform(_ => None, _ => ()) + case StandardType.YearMonthType => render(s"'${value}'") + case DoubleType => render(value) + case StandardType.YearType => render(s"'${value}'") + case StandardType.OffsetDateTimeType(_) => + render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[OffsetDateTime])}'") + case StandardType.ZonedDateTimeType(_) => + render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[ZonedDateTime])}'") + case BigIntegerType => render(s"'${value}'") + case UUIDType => render(s"'${value}'") + case StandardType.ZoneOffsetType => render(s"'${value}'") + case ShortType => render(value) + case StandardType.LocalTimeType(_) => + render(s"'${DateTimeFormatter.ISO_LOCAL_TIME.format(value.asInstanceOf[LocalTime])}'") + case StandardType.OffsetTimeType(_) => + render(s"'${fmtTimeOffset.format(value.asInstanceOf[OffsetTime])}'") + case LongType => render(value) + case StringType => render(s"'${value}'") + case StandardType.PeriodType => render(s"'${value}'") + case StandardType.ZoneIdType => render(s"'${value}'") + case StandardType.LocalDateType(_) => + render(s"'${DateTimeFormatter.ISO_LOCAL_DATE.format(value.asInstanceOf[LocalDate])}'") + case BoolType => val b = value.asInstanceOf[Boolean] if (b) { render('1') } else { render('0') } - case DayOfWeekType => render(s"'${value}'") - case FloatType => render(value) - case StandardType.DurationType => render(s"'${value}'") + case DayOfWeekType => render(s"'${value}'") + case FloatType => render(value) + case StandardType.DurationType => render(s"'${value}'") } case None => () } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala index 453018298..5b1501524 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerSqlModule.scala @@ -3,7 +3,7 @@ package zio.sql.sqlserver import zio.schema.Schema import zio.sql.Sql -import java.time.LocalDate +import java.time.{ Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, ZonedDateTime } import java.time.format.DateTimeFormatter trait SqlServerSqlModule extends Sql { self => @@ -96,4 +96,21 @@ trait SqlServerSqlModule extends Sql { self => implicit val localDateSchema = Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_LOCAL_DATE)) + implicit val instantSchema = + Schema.primitive[Instant](zio.schema.StandardType.InstantType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) + + implicit val localTimeSchema = + Schema.primitive[LocalTime](zio.schema.StandardType.LocalTimeType(DateTimeFormatter.ISO_LOCAL_TIME)) + + implicit val localDateTimeSchema = + Schema.primitive[LocalDateTime](zio.schema.StandardType.LocalDateTimeType(DateTimeFormatter.ISO_LOCAL_DATE_TIME)) + + implicit val offsetTimeSchema = + Schema.primitive[OffsetTime](zio.schema.StandardType.OffsetTimeType(DateTimeFormatter.ISO_OFFSET_TIME)) + + implicit val offsetDateTimeSchema = + Schema.primitive[OffsetDateTime](zio.schema.StandardType.OffsetDateTimeType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) + + implicit val zonedDatetimeSchema = + Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME)) } diff --git a/sqlserver/src/test/resources/db_schema.sql b/sqlserver/src/test/resources/db_schema.sql index b25d1ec11..1313a6409 100644 --- a/sqlserver/src/test/resources/db_schema.sql +++ b/sqlserver/src/test/resources/db_schema.sql @@ -37,6 +37,28 @@ create table order_details unit_price money not null ); +create table all_types( + id varchar(36) not null primary key, + bytearray varbinary(100) not null, + bigdecimal decimal(28) not null, + boolean_ bit not null, + char_ varchar(4) not null, + double_ float not null, + float_ real not null, + instant datetimeoffset not null, + int_ int not null, + optional_int int, + localdate date not null, + localdatetime datetime2(4) not null, + localtime time not null, + long_ bigint not null, + offsetdatetime datetimeoffset(4) not null, + offsettime datetimeoffset not null, + short smallint not null, + string varchar(max) not null, + uuid varchar(36) not null, + zoneddatetime datetimeoffset not null +); insert into customers (id, first_name, last_name, verified, dob) diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 8edf6525a..8669059eb 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -41,5 +41,50 @@ trait DbSchema extends Jdbc { self => .asTable("derived") val orderDateDerived = orderDateDerivedTable.columns + + val allTypes = + (uuid("id") ++ + byteArray("bytearray") ++ + bigDecimal("bigdecimal") ++ + boolean("boolean_") ++ + char("char_") ++ + double("double_") ++ + float("float_") ++ + instant("instant") ++ + int("int_") ++ + (int("optional_int") @@ ColumnSetAspect.nullable) ++ + localDate("localdate") ++ + localDateTime("localdatetime") ++ + localTime("localtime") ++ + long("long_") ++ + offsetDateTime("offsetdatetime") ++ + offsetTime("offsettime") ++ + short("short") ++ + string("string") ++ + uuid("uuid") ++ + zonedDateTime("zoneddatetime")).table("all_types") + + val ( + id, + bytearrayCol, + bigdecimalCol, + booleanCol, + charCol, + doubleCol, + floatCol, + instantCol, + intCol, + optionalIntCol, + localdateCol, + localdatetimeCol, + localtimeCol, + longCol, + offsetdatetimeCol, + offsettimeCol, + shortCol, + stringCol, + uuidCol, + zonedDatetimeCol + ) = allTypes.columns } } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 6d4aaf78f..2dca24c40 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -1,9 +1,10 @@ package zio.sql.sqlserver import zio._ +import zio.prelude._ import zio.schema._ import zio.test.Assertion._ -import zio.test.TestAspect.sequential +import zio.test.TestAspect.{ retries, samples, sequential, shrinks } import zio.test._ import java.time._ @@ -598,7 +599,97 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { ).values(rows) assertZIO(execute(command))(equalTo(2)) - } + }, + test("Can insert all supported types") { + val sqlMinDateTime = LocalDateTime.of(1, 1, 1, 0, 0) + val sqlMaxDateTime = LocalDateTime.of(9999, 12, 31, 23, 59) + + val maxOffsetSeconds = 14 * 3600 + val sqlInstant = Gen.instant( + sqlMinDateTime.toInstant(ZoneOffset.ofTotalSeconds(-maxOffsetSeconds)), + sqlMaxDateTime.toInstant(ZoneOffset.ofTotalSeconds(maxOffsetSeconds)) + ) + + val sqlYear = Gen.int(1, 9999).map(Year.of) + + val sqlLocalDate = for { + year <- sqlYear + month <- Gen.int(1, 12) + maxLen = if (!year.isLeap && month == 2) 28 else Month.of(month).maxLength + day <- Gen.int(1, maxLen) + } yield LocalDate.of(year.getValue, month, day) + + val sqlLocalDateTime = Gen.localDateTime(sqlMinDateTime, sqlMaxDateTime) + + val zoneOffset = Gen + .int(-maxOffsetSeconds / 60, maxOffsetSeconds / 60) + .map(p => ZoneOffset.ofTotalSeconds(p * 60)) + + val sqlZonedDateTime = for { + dateTime <- sqlLocalDateTime + zOffset <- zoneOffset + } yield ZonedDateTime.of(dateTime, ZoneId.from(zOffset)) + + val sqlOffsetTime = for { + localTime <- Gen.localTime + zOffset <- zoneOffset + } yield OffsetTime.of(localTime, zOffset) + + val sqlOffsetDateTime = for { + dateTime <- sqlLocalDateTime + zOffset <- zoneOffset + } yield OffsetDateTime.of(dateTime, zOffset) + + val gen = ( + Gen.uuid, + Gen.chunkOfBounded(1, 100)(Gen.byte), + Gen.bigDecimal(Long.MinValue, Long.MaxValue), + Gen.boolean, + Gen.char, + Gen.double, + Gen.float, + sqlInstant, + Gen.int, + Gen.option(Gen.int), + sqlLocalDate, + sqlLocalDateTime, + Gen.localTime, + Gen.long, + sqlOffsetDateTime, + sqlOffsetTime, + Gen.short, + Gen.string, + Gen.uuid, + sqlZonedDateTime + ).tupleN + + check(gen) { row => + val insert = insertInto(allTypes)( + id, + bytearrayCol, + bigdecimalCol, + booleanCol, + charCol, + doubleCol, + floatCol, + instantCol, + intCol, + optionalIntCol, + localdateCol, + localdatetimeCol, + localtimeCol, + longCol, + offsetdatetimeCol, + offsettimeCol, + shortCol, + stringCol, + uuidCol, + zonedDatetimeCol + ).values(row) + + assertZIO(execute(insert))(equalTo(1)) + } + } @@ samples(1) @@ retries(0) @@ shrinks(0) ) @@ sequential case class CustomerAndDateRow(firstName: String, lastName: String, orderDate: LocalDate) From ff4c52befa111d42e3c4efb226b4437ff877c921 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Tue, 12 Jul 2022 15:22:57 +0200 Subject: [PATCH 505/673] BigInteger mapping fix --- .../main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 50a9cefc3..a2fe4f288 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -471,7 +471,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[OffsetDateTime])}'") case StandardType.ZonedDateTimeType(_) => render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[ZonedDateTime])}'") - case BigIntegerType => render(s"'${value}'") + case BigIntegerType => render(value) case UUIDType => render(s"'${value}'") case StandardType.ZoneOffsetType => render(s"'${value}'") case ShortType => render(value) From ef8c20f895e7b21d27fffac2304441b3d9c6a8c3 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Wed, 13 Jul 2022 17:46:00 +0200 Subject: [PATCH 506/673] Test comparing INSERTed data with results from SELECT (OffsetDateTime and OffsetTime have issue with resulting data) --- .../sql/sqlserver/SqlServerRenderModule.scala | 4 +- sqlserver/src/test/resources/db_schema.sql | 10 +- .../scala/zio/sql/sqlserver/DbSchema.scala | 8 +- .../sql/sqlserver/SqlServerModuleSpec.scala | 160 ++++++++++++++++-- 4 files changed, 157 insertions(+), 25 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index a2fe4f288..c42723271 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -451,7 +451,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(value) case StandardType.InstantType(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") - case CharType => render(s"'${value}'") + case CharType => render(s"N'${value}'") case IntType => render(value) case StandardType.MonthDayType => render(s"'${value}'") case BinaryType => @@ -480,7 +480,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => case StandardType.OffsetTimeType(_) => render(s"'${fmtTimeOffset.format(value.asInstanceOf[OffsetTime])}'") case LongType => render(value) - case StringType => render(s"'${value}'") + case StringType => render(s"N'${value}'") case StandardType.PeriodType => render(s"'${value}'") case StandardType.ZoneIdType => render(s"'${value}'") case StandardType.LocalDateType(_) => diff --git a/sqlserver/src/test/resources/db_schema.sql b/sqlserver/src/test/resources/db_schema.sql index 1313a6409..b16784434 100644 --- a/sqlserver/src/test/resources/db_schema.sql +++ b/sqlserver/src/test/resources/db_schema.sql @@ -42,22 +42,24 @@ create table all_types( bytearray varbinary(100) not null, bigdecimal decimal(28) not null, boolean_ bit not null, - char_ varchar(4) not null, + char_ char(1) not null, double_ float not null, float_ real not null, instant datetimeoffset not null, int_ int not null, optional_int int, localdate date not null, - localdatetime datetime2(4) not null, + localdatetime datetime2 not null, localtime time not null, long_ bigint not null, - offsetdatetime datetimeoffset(4) not null, + offsetdatetime datetimeoffset not null, offsettime datetimeoffset not null, short smallint not null, string varchar(max) not null, uuid varchar(36) not null, - zoneddatetime datetimeoffset not null + zoneddatetime datetimeoffset not null, + nchar_ nchar(1) not null, + nvarchar_ nvarchar(30) not null ); insert into customers diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 8669059eb..21ee76a23 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -62,7 +62,9 @@ trait DbSchema extends Jdbc { self => short("short") ++ string("string") ++ uuid("uuid") ++ - zonedDateTime("zoneddatetime")).table("all_types") + zonedDateTime("zoneddatetime") ++ + char("nchar_") ++ + string("nvarchar_")).table("all_types") val ( id, @@ -84,7 +86,9 @@ trait DbSchema extends Jdbc { self => shortCol, stringCol, uuidCol, - zonedDatetimeCol + zonedDatetimeCol, + ncharCol, + nvarcharCol ) = allTypes.columns } } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 2dca24c40..e435e2316 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -1,7 +1,6 @@ package zio.sql.sqlserver import zio._ -import zio.prelude._ import zio.schema._ import zio.test.Assertion._ import zio.test.TestAspect.{ retries, samples, sequential, shrinks } @@ -9,6 +8,7 @@ import zio.test._ import java.time._ import java.time.format.DateTimeFormatter +import java.time.temporal.ChronoUnit import java.util.UUID import scala.language.postfixOps @@ -601,6 +601,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { assertZIO(execute(command))(equalTo(2)) }, test("Can insert all supported types") { + import AllTypesHelper._ + import zio.prelude._ + val sqlMinDateTime = LocalDateTime.of(1, 1, 1, 0, 0) val sqlMaxDateTime = LocalDateTime.of(9999, 12, 31, 23, 59) @@ -645,7 +648,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Gen.chunkOfBounded(1, 100)(Gen.byte), Gen.bigDecimal(Long.MinValue, Long.MaxValue), Gen.boolean, - Gen.char, + Gen.asciiChar, Gen.double, Gen.float, sqlInstant, @@ -658,40 +661,163 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { sqlOffsetDateTime, sqlOffsetTime, Gen.short, - Gen.string, + Gen.stringBounded(2, 30)(Gen.asciiChar), Gen.uuid, - sqlZonedDateTime + sqlZonedDateTime, + Gen.char, + Gen.stringBounded(2, 30)(Gen.char) ).tupleN + case class RowDates( + localDate: LocalDate, + localDateTime: LocalDateTime, + localTime: LocalTime, + offsetDateTime: Instant, + offsetTime: OffsetTime, + zonedDateTime: Instant + ) + case class RowBasic( + id: UUID, + bigDecimal: BigDecimal, + boolean: Boolean, + char: Char, + double: Double, + float: Float, + int: Int, + long: Long, + short: Short, + string: String, + nchar: Char, + nvarchar: String, + bytearray: Chunk[Byte] + ) + check(gen) { row => val insert = insertInto(allTypes)( - id, + id, // 1 bytearrayCol, - bigdecimalCol, - booleanCol, - charCol, - doubleCol, - floatCol, + bigdecimalCol, // 3 + booleanCol, // 4 + charCol, // 5 + doubleCol, // 6 + floatCol, // 7 instantCol, - intCol, + intCol, // 9 optionalIntCol, - localdateCol, + localdateCol, // 11 localdatetimeCol, localtimeCol, - longCol, + longCol, // 14 offsetdatetimeCol, offsettimeCol, - shortCol, - stringCol, + shortCol, // 17 + stringCol, // 18 uuidCol, - zonedDatetimeCol + zonedDatetimeCol, + ncharCol, // 21 + nvarcharCol // 22 ).values(row) - assertZIO(execute(insert))(equalTo(1)) + val query = select( + id, + bigdecimalCol, + booleanCol, + charCol, + doubleCol, + floatCol, + intCol, + longCol, + shortCol, + stringCol, + ncharCol, + nvarcharCol, + bytearrayCol + ) + .from(allTypes) + .where(id === row._1) + + val expectedBasic = RowBasic( + row._1, + row._3, + row._4, + row._5, + row._6, + row._7, + row._9, + row._14, + row._17, + row._18, + row._21, + row._22, + row._2 + ) + val assertionB = for { + _ <- execute(insert) + rb <- execute(query).runHead.some + rowB = RowBasic(rb._1, rb._2, rb._3, rb._4, rb._5, rb._6, rb._7, rb._8, rb._9, rb._10, rb._11, rb._12, rb._13) + } yield assert(rowB) { + val assertB = assertM(expectedBasic) _ + assertB("UUID")(_.id) && + assertB("BigDecimal")(_.bigDecimal) && + assertB("Boolean")(_.boolean) && + assertB("Char")(_.char) && + assertB("Double")(_.double) && + assertB("Float")(_.float) && + assertB("Int")(_.int) && + assertB("Long")(_.long) && + assertB("Short")(_.short) && + assertB("String")(_.string) && + assertB("Unicode char")(_.nchar) && + assertB("Unicode string")(_.nvarchar) && + assertB("Chunk[Byte]")(_.bytearray) + } + assertionB.mapErrorCause(cause => Cause.stackless(cause.untraced)) + + val queryDates = + select(localdateCol, localdatetimeCol, localtimeCol, offsetdatetimeCol, offsettimeCol, zonedDatetimeCol) + .from(allTypes) + .where(id === row._1) + + val expectedDates = + RowDates(row._11, normLdt(row._12), normLt(row._13), normOdt(row._15), normOt(row._16), normZdt(row._20)) + val assertionD = for { + _ <- execute(insert) + rd <- execute(queryDates).runHead.some + rowD = RowDates(rd._1, normLdt(rd._2), normLt(rd._3), normOdt(rd._4), normOt(rd._5), normZdt(rd._6)) + } yield assert(rowD) { + val assertD = assertM(expectedDates) _ + assertD("LocalTime")(_.localTime) && + assertD("LocalDate")(_.localDate) && + assertD("LocalDateTime")(_.localDateTime) && + // assertD("OffsetDateTime")(_.offsetDateTime) && + // assertD("OffsetTime")(_.offsetTime) && + assertD("zonedDateTime")(_.zonedDateTime) + } + assertionD.mapErrorCause(cause => Cause.stackless(cause.untraced)) } } @@ samples(1) @@ retries(0) @@ shrinks(0) ) @@ sequential + private object AllTypesHelper { + def normLt(in: LocalTime): LocalTime = + in.truncatedTo(ChronoUnit.MICROS) + + def normLdt(in: LocalDateTime): LocalDateTime = + LocalDateTime.of(in.toLocalDate, normLt(in.toLocalTime)) + + def normOt(in: OffsetTime): OffsetTime = + OffsetTime.of(normLt(in.toLocalTime), in.getOffset) + + def normOdt(in: OffsetDateTime): Instant = + OffsetDateTime.of(normLdt(in.toLocalDateTime), in.getOffset).toInstant + + def normZdt(in: ZonedDateTime): Instant = + ZonedDateTime.of(normLdt(in.toLocalDateTime), in.getZone).toInstant + + def assertM[B, T](expected: B)(name: String)(extract: B => T): Assertion[B] = + assertionRec[B, T](name)(equalTo(extract(expected)))(p => Option(extract(p))) + } + case class CustomerAndDateRow(firstName: String, lastName: String, orderDate: LocalDate) private val crossOuterApplyExpected = Seq( CustomerAndDateRow("Ronald", "Russell", LocalDate.parse("2019-03-25")), From bf9c725629ae56d3b3e943e6edfbc5f7efe257ef Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Thu, 14 Jul 2022 13:16:50 +0200 Subject: [PATCH 507/673] Update ci.yml --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bffb75e2..67da4578d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,9 @@ name: CI +env: + JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags -XX:+UseG1GC -Xmx4g -Xms4g + JVM_OPTS: -XX:+PrintCommandLineFlags -XX:+UseG1GC -Xmx4g -Xms4g + on: pull_request: push: From 3759c6e62b6390ac6db76fb36d259ce347085dc8 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 21 Jul 2022 19:49:51 +0000 Subject: [PATCH 508/673] Update sbt-tpolecat to 0.4.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8b59de989..85b9e5c89 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,4 +11,4 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.3") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1") From 3a3fedf8e9c56f0d903b53a10d72f4f7d923f30e Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Fri, 22 Jul 2022 12:32:24 +0200 Subject: [PATCH 509/673] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af1971f3b..f43e48a3d 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Feature | PostgreSQL | SQL Server | Oracle | MySQL :------------ | :-------------| :-------------|:-------------------| :------------- Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Render Delete | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Render Update | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | -Render Insert | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | +Render Update | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +Render Insert | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Functions | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Types | :white_check_mark: | | | :white_check_mark: | Operators | | | | | From 1c23c51bb4756530d2ced6b3700408f43802f4fe Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 25 Jul 2022 18:42:35 +0000 Subject: [PATCH 510/673] Update mysql-connector-java to 8.0.30 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a690e3265..0a44070ad 100644 --- a/build.sbt +++ b/build.sbt @@ -143,7 +143,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.29" % Test, + "mysql" % "mysql-connector-java" % "8.0.30" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 853a6d9d1b590f61887329bcb1404fc81bc1a1e3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 27 Jul 2022 19:38:32 +0000 Subject: [PATCH 511/673] Update sbt-scoverage to 2.0.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8b59de989..bb9cd29a2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.2") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 9748813612da3e4acc0068fe2621d3bebf009f37 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Fri, 29 Jul 2022 17:10:47 +0200 Subject: [PATCH 512/673] #732 Postgresql changes --- .../postgresql/CommonFunctionDefSpec.scala | 329 ++++++++++++++++++ ...Spec.scala => CustomFunctionDefSpec.scala} | 314 +---------------- 2 files changed, 330 insertions(+), 313 deletions(-) create mode 100644 postgres/src/test/scala/zio/sql/postgresql/CommonFunctionDefSpec.scala rename postgres/src/test/scala/zio/sql/postgresql/{FunctionDefSpec.scala => CustomFunctionDefSpec.scala} (73%) diff --git a/postgres/src/test/scala/zio/sql/postgresql/CommonFunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/CommonFunctionDefSpec.scala new file mode 100644 index 000000000..2ef317344 --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/CommonFunctionDefSpec.scala @@ -0,0 +1,329 @@ +package zio.sql.postgresql + +import zio.stream.ZStream +import zio.test.Assertion._ +import zio.test._ +import zio.Cause + +object CommonFunctionDefSpec extends PostgresRunnableSpec with DbSchema { + import FunctionDef.{ CharLength => _, _ } + import Customers._ + + private def collectAndCompare[R, E]( + expected: Seq[String], + testResult: ZStream[R, E, String] + ) = + assertZIO(testResult.runCollect)(hasSameElementsDistinct(expected)) + + override def specLayered = suite("Postgres Common FunctionDef")( + suite("Schema dependent tests")( + test("concat_ws #2 - combine columns") { + + // note: you can't use customerId here as it is a UUID, hence not a string in our book + val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers + + val expected = Seq( + "RonaldRonaldRussell", + "TerrenceTerrenceNoel", + "MilaMilaPaterso", + "AlanaAlanaMurray", + "JoseJoseWiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("concat_ws #3 - combine columns and flat values") { + import Expr._ + + val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers + + val expected = Seq( + "Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("concat_ws #3 - combine function calls together") { + import Expr._ + + val query = select( + ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) + ) from customers + + val expected = Seq( + "Name: Ronald and Surname: Russell", + "Name: Terrence and Surname: Noel", + "Name: Mila and Surname: Paterso", + "Name: Alana and Surname: Murray", + "Name: Jose and Surname: Wiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("lower") { + val query = select(Lower(fName)) from customers limit (1) + + val expected = "ronald" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can concat strings with concat function") { + + val query = select(Concat(fName, lName) as "fullname") from customers + + val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") + + val result = execute(query) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("replace") { + val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" + val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" + + val query = select(lastNameReplaced, computedReplace) from customers + + val expected = ("Russe_", "special ::__::") + + val testResult = + execute(query).map { case row => + (row._1, row._2) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ), + suite("Schema independent tests")( + test("concat_ws #1 - combine flat values") { + import Expr._ + + // note: a plain number (3) would and should not compile + val query = select(ConcatWs4("+", "1", "2", "3")) + + val expected = Seq("1+2+3") + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("ltrim") { + assertZIO(execute(select(Ltrim(" hello "))).runHead.some)(equalTo("hello ")) + }, + test("rtrim") { + assertZIO(execute(select(Rtrim(" hello "))).runHead.some)(equalTo(" hello")) + }, + test("abs") { + assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) + }, + test("log") { + assertZIO(execute(select(Log(2.0, 32.0))).runHead.some)(equalTo(5.0)) + }, + test("acos") { + assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) + }, + test("asin") { + assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) + }, + test("ln") { + assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) + }, + test("atan") { + assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) + }, + test("cos") { + assertZIO(execute(select(Cos(3.141592653589793))).runHead.some)(equalTo(-1.0)) + }, + test("exp") { + assertZIO(execute(select(Exp(1.0))).runHead.some)(equalTo(2.718281828459045)) + }, + test("floor") { + assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) + }, + test("ceil") { + assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) + }, + test("sin") { + assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) + }, + test("sqrt") { + val query = select(Sqrt(121.0)) + + val expected = 11.0 + + val testResult = execute(query) + + assertZIO(testResult.runHead.some)(equalTo(expected)) + }, + test("round") { + val query = select(Round(10.8124, 2)) + + val expected = 10.81 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign positive") { + val query = select(Sign(3.0)) + + val expected = 1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign negative") { + val query = select(Sign(-3.0)) + + val expected = -1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign zero") { + val query = select(Sign(0.0)) + + val expected = 0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("power") { + val query = select(Power(7.0, 3.0)) + + val expected = 343.000000000000000 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("mod") { + val query = select(Mod(-15.0, -4.0)) + + val expected = -3.0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("octet_length") { + val query = select(OctetLength("josé")) + + val expected = 5 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("ascii") { + val query = select(Ascii("""x""")) + + val expected = 120 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("upper") { + val query = (select(Upper("ronald"))).limit(1) + + val expected = "RONALD" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("width_bucket") { + val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) + + val expected = 3 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("tan") { + val query = select(Tan(0.7853981634)) + + val expected = 1.0000000000051035 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("trim") { + assertZIO(execute(select(Trim(" 1234 "))).runHead.some)(equalTo("1234")) + }, + test("lower") { + assertZIO(execute(select(Lower("YES"))).runHead.some)(equalTo("yes")) + } + ) + ) + +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala similarity index 73% rename from postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala rename to postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala index 2d0936f95..eee241858 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala @@ -10,10 +10,9 @@ import java.time._ import java.time.format.DateTimeFormatter import java.util.UUID -object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { +object CustomFunctionDefSpec extends PostgresRunnableSpec with DbSchema { import Customers._ - import FunctionDef.{ CharLength => _, _ } import PostgresFunctionDef._ import PostgresSpecific._ @@ -26,67 +25,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) override def specLayered = suite("Postgres FunctionDef")( - test("concat_ws #1 - combine flat values") { - import Expr._ - - // note: a plain number (3) would and should not compile - val query = select(ConcatWs4("+", "1", "2", "3")) - - val expected = Seq("1+2+3") - - val testResult = execute(query) - collectAndCompare(expected, testResult) - }, - test("concat_ws #2 - combine columns") { - - // note: you can't use customerId here as it is a UUID, hence not a string in our book - val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers - - val expected = Seq( - "RonaldRonaldRussell", - "TerrenceTerrenceNoel", - "MilaMilaPaterso", - "AlanaAlanaMurray", - "JoseJoseWiggins" - ) - - val testResult = execute(query) - collectAndCompare(expected, testResult) - }, - test("concat_ws #3 - combine columns and flat values") { - import Expr._ - - val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers - - val expected = Seq( - "Person: Ronald Russell", - "Person: Terrence Noel", - "Person: Mila Paterso", - "Person: Alana Murray", - "Person: Jose Wiggins" - ) - - val testResult = execute(query) - collectAndCompare(expected, testResult) - }, - test("concat_ws #3 - combine function calls together") { - import Expr._ - - val query = select( - ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) - ) from customers - - val expected = Seq( - "Name: Ronald and Surname: Russell", - "Name: Terrence and Surname: Noel", - "Name: Mila and Surname: Paterso", - "Name: Alana and Surname: Murray", - "Name: Jose and Surname: Wiggins" - ) - - val testResult = execute(query) - collectAndCompare(expected, testResult) - }, test("isfinite") { val query = select(IsFinite(Instant.now)) val expected: Boolean = true @@ -99,12 +37,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { test("CharLength") { assertZIO(execute(select(Length("hello"))).runHead.some)(equalTo(5)) }, - test("ltrim") { - assertZIO(execute(select(Ltrim(" hello "))).runHead.some)(equalTo("hello ")) - }, - test("rtrim") { - assertZIO(execute(select(Rtrim(" hello "))).runHead.some)(equalTo(" hello")) - }, test("bit_length") { assertZIO(execute(select(BitLength("hello"))).runHead.some)(equalTo(40)) }, @@ -226,45 +158,12 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } ) ), - test("abs") { - assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) - }, - test("log") { - assertZIO(execute(select(Log(2.0, 32.0))).runHead.some)(equalTo(5.0)) - }, - test("acos") { - assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) - }, test("repeat") { assertZIO(execute(select(Repeat("Zio", 3))).runHead.some)(equalTo("ZioZioZio")) }, test("reverse") { assertZIO(execute(select(Reverse("abcd"))).runHead.some)(equalTo("dcba")) }, - test("asin") { - assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) - }, - test("ln") { - assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) - }, - test("atan") { - assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) - }, - test("cos") { - assertZIO(execute(select(Cos(3.141592653589793))).runHead.some)(equalTo(-1.0)) - }, - test("exp") { - assertZIO(execute(select(Exp(1.0))).runHead.some)(equalTo(2.718281828459045)) - }, - test("floor") { - assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) - }, - test("ceil") { - assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) - }, - test("sin") { - assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) - }, test("sind") { assertZIO(execute(select(Sind(30.0))).runHead.some)(equalTo(0.5)) }, @@ -371,15 +270,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertZIO(testResult.runCollect.exit)(fails(anything)) } ) @@ ignore, - test("sqrt") { - val query = select(Sqrt(121.0)) - - val expected = 11.0 - - val testResult = execute(query) - - assertZIO(testResult.runHead.some)(equalTo(expected)) - }, test("chr") { val query = select(Chr(65)) @@ -484,71 +374,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("round") { - val query = select(Round(10.8124, 2)) - - val expected = 10.81 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("sign positive") { - val query = select(Sign(3.0)) - - val expected = 1 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("sign negative") { - val query = select(Sign(-3.0)) - - val expected = -1 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("sign zero") { - val query = select(Sign(0.0)) - - val expected = 0 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("power") { - val query = select(Power(7.0, 3.0)) - - val expected = 343.000000000000000 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, test("length") { val query = select(Length("hello")) @@ -562,19 +387,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("mod") { - val query = select(Mod(-15.0, -4.0)) - - val expected = -3.0 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, test("translate") { val query = select(Translate("12345", "143", "ax")) @@ -667,97 +479,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("lower") { - val query = select(Lower(fName)) from customers limit (1) - - val expected = "ronald" - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("lower with string literal") { - val query = select(Lower("LOWER")) from customers limit (1) - - val expected = "lower" - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("octet_length") { - val query = select(OctetLength("josé")) - - val expected = 5 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("ascii") { - val query = select(Ascii("""x""")) - - val expected = 120 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("upper") { - val query = (select(Upper("ronald"))).limit(1) - - val expected = "RONALD" - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("width_bucket") { - val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) - - val expected = 3 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("tan") { - val query = select(Tan(0.7853981634)) - - val expected = 1.0000000000051035 - - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, test("gcd") { val query = select(GCD(1071d, 462d)) @@ -855,20 +576,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertZIO(testResult.runHead.some)(equalTo(randomTupleForSeed)) }, - test("Can concat strings with concat function") { - - val query = select(Concat(fName, lName) as "fullname") from customers - - val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") - - val result = execute(query) - - val assertion = for { - r <- result.runCollect - } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, test("Can calculate character length of a string") { val query = select(CharLength(fName)) from customers @@ -909,25 +616,6 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("replace") { - val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" - val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" - - val query = select(lastNameReplaced, computedReplace) from customers - - val expected = ("Russe_", "special ::__::") - - val testResult = - execute(query).map { case row => - (row._1, row._2) - } - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, test("lpad") { def runTest(s: String, pad: String) = { val query = select(LPad(s, 5, pad)) From 22781cdddabd0b329780c9869f704ddea4fe4780 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Fri, 29 Jul 2022 17:25:55 +0200 Subject: [PATCH 513/673] #732 Mysql changes --- .../zio/sql/mysql/CommonFunctionDefSpec.scala | 313 ++++++++++++++++++ ...Spec.scala => CustomFunctionDefSpec.scala} | 46 +-- 2 files changed, 314 insertions(+), 45 deletions(-) create mode 100644 mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala rename mysql/src/test/scala/zio/sql/mysql/{FunctionDefSpec.scala => CustomFunctionDefSpec.scala} (78%) diff --git a/mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala new file mode 100644 index 000000000..3297805ad --- /dev/null +++ b/mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala @@ -0,0 +1,313 @@ +package zio.sql.mysql + +import zio.Cause +import zio.stream.ZStream +import zio.test.Assertion._ +import zio.test._ + +object CommonFunctionDefSpec extends MysqlRunnableSpec with ShopSchema { + import FunctionDef.{ CharLength => _, _ } + import Customers._ + + private def collectAndCompare[R, E]( + expected: Seq[String], + testResult: ZStream[R, E, String] + ) = + assertZIO(testResult.runCollect)(hasSameElementsDistinct(expected)) + + override def specLayered = suite("MySQL Common FunctionDef")( + suite("Schema dependent tests")( + test("concat_ws #2 - combine columns") { + + // note: you can't use customerId here as it is a UUID, hence not a string in our book + val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers + + val expected = Seq( + "RonaldRonaldRussell", + "TerrenceTerrenceNoel", + "MilaMilaPaterso", + "AlanaAlanaMurray", + "JoseJoseWiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("concat_ws #3 - combine columns and flat values") { + + val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers + + val expected = Seq( + "Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("concat_ws #3 - combine function calls together") { + + val query = select( + ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) + ) from customers + + val expected = Seq( + "Name: Ronald and Surname: Russell", + "Name: Terrence and Surname: Noel", + "Name: Mila and Surname: Paterso", + "Name: Alana and Surname: Murray", + "Name: Jose and Surname: Wiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("lower") { + val query = select(Lower(fName)) from customers limit (1) + + val expected = "ronald" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can concat strings with concat function") { + + val query = select(Concat(fName, lName) as "fullname") from customers + + val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") + + val result = execute(query) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("replace") { + val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" + val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" + + val query = select(lastNameReplaced, computedReplace) from customers + + val expected = ("Russe_", "special ::__::") + + val testResult = + execute(query).map { case row => + (row._1, row._2) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ), + suite("Schema independent tests")( + test("concat_ws #1 - combine flat values") { + + // note: a plain number (3) would and should not compile + val query = select(ConcatWs4("+", "1", "2", "3")) + + val expected = Seq("1+2+3") + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("ltrim") { + assertZIO(execute(select(Ltrim(" hello "))).runHead.some)(equalTo("hello ")) + }, + test("rtrim") { + assertZIO(execute(select(Rtrim(" hello "))).runHead.some)(equalTo(" hello")) + }, + test("abs") { + assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) + }, + test("log") { + assertZIO(execute(select(Log(2.0, 32.0))).runHead.some)(equalTo(5.0)) + }, + test("acos") { + assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) + }, + test("asin") { + assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) + }, + test("ln") { + assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) + }, + test("atan") { + assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) + }, + test("cos") { + assertZIO(execute(select(Cos(3.141592653589793))).runHead.some)(equalTo(-1.0)) + }, + test("exp") { + assertZIO(execute(select(Exp(1.0))).runHead.some)(equalTo(2.718281828459045)) + }, + test("floor") { + assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) + }, + test("ceil") { + assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) + }, + test("sin") { + assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) + }, + test("sqrt") { + val query = select(Sqrt(121.0)) + + val expected = 11.0 + + val testResult = execute(query) + + assertZIO(testResult.runHead.some)(equalTo(expected)) + }, + test("round") { + val query = select(Round(10.8124, 2)) + + val expected = 10.81 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign positive") { + val query = select(Sign(3.0)) + + val expected = 1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign negative") { + val query = select(Sign(-3.0)) + + val expected = -1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign zero") { + val query = select(Sign(0.0)) + + val expected = 0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("power") { + val query = select(Power(7.0, 3.0)) + + val expected = 343.000000000000000 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("mod") { + val query = select(Mod(-15.0, -4.0)) + + val expected = -3.0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("octet_length") { + val query = select(OctetLength("josé")) + + val expected = 5 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("ascii") { + val query = select(Ascii("""x""")) + + val expected = 120 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("upper") { + val query = (select(Upper("ronald"))).limit(1) + + val expected = "RONALD" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("tan") { + val query = select(Tan(0.7853981634)) + + val expected = 1.0000000000051035 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("trim") { + assertZIO(execute(select(Trim(" 1234 "))).runHead.some)(equalTo("1234")) + }, + test("lower") { + assertZIO(execute(select(Lower("YES"))).runHead.some)(equalTo("yes")) + } + ) + ) + +} diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/CustomFunctionDefSpec.scala similarity index 78% rename from mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala rename to mysql/src/test/scala/zio/sql/mysql/CustomFunctionDefSpec.scala index 3c5953820..b5d98c4f5 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/CustomFunctionDefSpec.scala @@ -6,56 +6,12 @@ import zio.test.Assertion._ import java.time.{ LocalDate, LocalTime, ZoneId } import java.time.format.DateTimeFormatter -object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { +object CustomFunctionDefSpec extends MysqlRunnableSpec with ShopSchema { import Customers._ - import FunctionDef._ import MysqlFunctionDef._ override def specLayered = suite("MySQL FunctionDef")( - test("lower") { - val query = select(Lower(fName)) from customers limit (1) - - val expected = "ronald" - - val testResult = execute(query) - - assertZIO(testResult.runHead.some)(equalTo(expected)) - }, - // FIXME: lower with string literal should not refer to a column name - // See: https://www.w3schools.com/sql/trymysql.asp?filename=trysql_func_mysql_lower - // Uncomment the following test when fixed - // test("lower with string literal") { - // val query = select(Lower("LOWER")) from customers limit(1) - // - // val expected = "lower" - // - // val testResult = execute(query.to[String, String](identity)) - // - // val assertion = for { - // r <- testResult.runCollect - // } yield assert(r.head)(equalTo(expected)) - // - // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - // }, - test("sin") { - val query = select(Sin(1.0)) - - val expected = 0.8414709848078965 - - val testResult = execute(query) - - assertZIO(testResult.runHead.some)(equalTo(expected)) - }, - test("abs") { - val query = select(Abs(-32.0)) - - val expected = 32.0 - - val testResult = execute(query) - - assertZIO(testResult.runHead.some)(equalTo(expected)) - }, test("crc32") { val query = select(Crc32("MySQL")) from customers From d02c7a48c504d73fb0b460380b713b51d37a1704 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Fri, 29 Jul 2022 17:28:30 +0200 Subject: [PATCH 514/673] #732 Oracle (not tested) --- .../sql/oracle/CommonFunctionDefSpec.scala | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala diff --git a/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala b/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala new file mode 100644 index 000000000..9006926d7 --- /dev/null +++ b/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala @@ -0,0 +1,285 @@ +package zio.sql.oracle + +import zio.Cause +import zio.stream.ZStream +import zio.test.Assertion._ +import zio.test._ + +object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { + import FunctionDef.{ CharLength => _, _ } + import Customers._ + + private def collectAndCompare[R, E]( + expected: Seq[String], + testResult: ZStream[R, E, String] + ) = + assertZIO(testResult.runCollect)(hasSameElementsDistinct(expected)) + + override def specLayered = suite("Oracle Common FunctionDef")( + suite("Schema dependent tests")( + test("concat - combine function calls together") { + + val query = select( + Concat(Concat("Name: ", Customers.fName), Concat(" and Surname: ", Customers.lName)) + ) from customers + + val expected = Seq( + "Name: Ronald and Surname: Russell", + "Name: Terrence and Surname: Noel", + "Name: Mila and Surname: Paterso", + "Name: Alana and Surname: Murray", + "Name: Jose and Surname: Wiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("lower") { + val query = select(Lower(fName)) from customers limit (1) + + val expected = "ronald" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can concat strings with concat function") { + + val query = select(Concat(fName, lName) as "fullname") from customers + + val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") + + val result = execute(query) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("replace") { + val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" + val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" + + val query = select(lastNameReplaced, computedReplace) from customers + + val expected = ("Russe_", "special ::__::") + + val testResult = + execute(query).map { case row => + (row._1, row._2) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ), + suite("Schema independent tests")( + test("ltrim") { + assertZIO(execute(select(Ltrim(" hello "))).runHead.some)(equalTo("hello ")) + }, + test("rtrim") { + assertZIO(execute(select(Rtrim(" hello "))).runHead.some)(equalTo(" hello")) + }, + test("abs") { + assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) + }, + test("log") { + assertZIO(execute(select(Log(2.0, 32.0))).runHead.some)(equalTo(5.0)) + }, + test("acos") { + assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) + }, + test("asin") { + assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) + }, + test("ln") { + assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) + }, + test("atan") { + assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) + }, + test("cos") { + assertZIO(execute(select(Cos(3.141592653589793))).runHead.some)(equalTo(-1.0)) + }, + test("exp") { + assertZIO(execute(select(Exp(1.0))).runHead.some)(equalTo(2.718281828459045)) + }, + test("floor") { + assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) + }, + test("ceil") { + assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) + }, + test("sin") { + assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) + }, + test("sqrt") { + val query = select(Sqrt(121.0)) + + val expected = 11.0 + + val testResult = execute(query) + + assertZIO(testResult.runHead.some)(equalTo(expected)) + }, + test("round") { + val query = select(Round(10.8124, 2)) + + val expected = 10.81 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign positive") { + val query = select(Sign(3.0)) + + val expected = 1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign negative") { + val query = select(Sign(-3.0)) + + val expected = -1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign zero") { + val query = select(Sign(0.0)) + + val expected = 0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("power") { + val query = select(Power(7.0, 3.0)) + + val expected = 343.000000000000000 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("mod") { + val query = select(Mod(-15.0, -4.0)) + + val expected = -3.0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("octet_length") { + val query = select(OctetLength("josé")) + + val expected = 5 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("ascii") { + val query = select(Ascii("""x""")) + + val expected = 120 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("upper") { + val query = (select(Upper("ronald"))).limit(1) + + val expected = "RONALD" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("width_bucket") { + val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) + + val expected = 3 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("tan") { + val query = select(Tan(0.7853981634)) + + val expected = 1.0000000000051035 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("trim") { + assertZIO(execute(select(Trim(" 1234 "))).runHead.some)(equalTo("1234")) + }, + test("lower") { + assertZIO(execute(select(Lower("YES"))).runHead.some)(equalTo("yes")) + } + ) + ) + +} From b79014cfe725f28b58e243106731bdb8660ea79b Mon Sep 17 00:00:00 2001 From: bogatyra Date: Fri, 29 Jul 2022 17:29:11 +0200 Subject: [PATCH 515/673] #732 Mssql (in progress) --- .../sql/sqlserver/SqlServerRenderModule.scala | 72 ++-- .../sql/sqlserver/CommonFunctionDefSpec.scala | 330 ++++++++++++++++++ 2 files changed, 374 insertions(+), 28 deletions(-) create mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index c42723271..a2e4eda2e 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -4,7 +4,6 @@ import zio.Chunk import zio.schema.StandardType._ import zio.schema._ import zio.sql.driver.Renderer -import zio.sql.driver.Renderer.Extensions import java.time.format.{ DateTimeFormatter, DateTimeFormatterBuilder } import java.time._ @@ -107,6 +106,49 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(" (", values.mkString(","), ") ") // todo fix needs escaping } + private def renderLit(lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { + import TypeTag._ + val value = lit.value + lit.typeTag match { + case TInstant => + render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[Instant])}'") + case TLocalTime => + render(s"'${DateTimeFormatter.ISO_LOCAL_TIME.format(value.asInstanceOf[LocalTime])}'") + case TLocalDate => + render(s"'${DateTimeFormatter.ISO_LOCAL_DATE.format(value.asInstanceOf[LocalDate])}'") + case TLocalDateTime => + render(s"'${DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value.asInstanceOf[LocalDateTime])}'") + case TZonedDateTime => + render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[ZonedDateTime])}'") + case TOffsetTime => + render(s"'${fmtTimeOffset.format(value.asInstanceOf[OffsetTime])}'") + case TOffsetDateTime => + render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[OffsetDateTime])}'") + + case TBoolean => + val b = value.asInstanceOf[Boolean] + if (b) { + render('1') + } else { + render('0') + } + case TUUID => render(s"'$value'") + + case TBigDecimal => render(value) + case TByte => render(value) + case TDouble => render(value) + case TFloat => render(value) + case TInt => render(value) + case TLong => render(value) + case TShort => render(value) + + case TChar => render(s"N'$value'") + case TString => render(s"N'$value'") + + case _ => render(s"'$value'") + } + } + private def buildExpr[A, B](expr: self.Expr[_, A, B])(implicit render: Renderer): Unit = expr match { case Expr.Subselect(subselect) => render(" (") @@ -145,33 +187,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => case Expr.In(value, set) => buildExpr(value) renderReadImpl(set) - case literal @ Expr.Literal(value) => - val lit = literal.typeTag match { - case TypeTag.TBoolean => - // MSSQL server variant of true/false - if (value.asInstanceOf[Boolean]) { - "0 = 0" - } else { - "0 = 1" - } - case TypeTag.TLocalDateTime => - val x = value - .asInstanceOf[java.time.LocalDateTime] - .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) - s"'$x'" - case TypeTag.TZonedDateTime => - val x = value - .asInstanceOf[java.time.ZonedDateTime] - .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) - s"'$x'" - case TypeTag.TOffsetDateTime => - val x = value - .asInstanceOf[java.time.OffsetDateTime] - .format(java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss")) - s"'$x'" - case _ => value.toString.singleQuoted - } - render(lit) + case literal: Expr.Literal[_] => renderLit(literal) case Expr.AggregationCall(param, aggregation) => render(aggregation.name.name) render("(") diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala new file mode 100644 index 000000000..de540acb7 --- /dev/null +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala @@ -0,0 +1,330 @@ +package zio.sql.sqlserver + +import zio.Cause +import zio.stream.ZStream +import zio.test.Assertion._ +import zio.test._ + +object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { + import FunctionDef.{CharLength => _, _} + import DbSchema._ + + private def collectAndCompare[R, E]( + expected: Seq[String], + testResult: ZStream[R, E, String] + ) = + assertZIO(testResult.runCollect)(hasSameElementsDistinct(expected)) + + override def specLayered = suite("Postgres Common FunctionDef")( + suite("Schema dependent tests")( + test("concat_ws #2 - combine columns") { + + // note: you can't use customerId here as it is a UUID, hence not a string in our book + val query = select(ConcatWs3(fName, fName, lName)) from customers + + val expected = Seq( + "RonaldRonaldRussell", + "TerrenceTerrenceNoel", + "MilaMilaPaterso", + "AlanaAlanaMurray", + "JoseJoseWiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("concat_ws #3 - combine columns and flat values") { + import Expr._ + + val query = select(ConcatWs4(" ", "Person:", fName, lName)) from customers + + val expected = Seq( + "Person: Ronald Russell", + "Person: Terrence Noel", + "Person: Mila Paterso", + "Person: Alana Murray", + "Person: Jose Wiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("concat_ws #3 - combine function calls together") { + import Expr._ + + val query = select( + ConcatWs3(" and ", Concat("Name: ", fName), Concat("Surname: ", lName)) + ) from customers + + val expected = Seq( + "Name: Ronald and Surname: Russell", + "Name: Terrence and Surname: Noel", + "Name: Mila and Surname: Paterso", + "Name: Alana and Surname: Murray", + "Name: Jose and Surname: Wiggins" + ) + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("lower") { + val query = select(Lower(fName)) from customers limit (1) + + val expected = "ronald" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can concat strings with concat function") { + + val query = select(Concat(fName, lName) as "fullname") from customers + + val expected = Seq("RonaldRussell", "TerrenceNoel", "MilaPaterso", "AlanaMurray", "JoseWiggins") + + val result = execute(query) + + val assertion = for { + r <- result.runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("replace") { + val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" + val computedReplace = Replace("special ::ąę::", "ąę", "__") as "computedReplace" + + val query = select(lastNameReplaced, computedReplace) from customers + + val expected = ("Russe_", "special ::__::") + + val testResult = + execute(query).map { case row => + (row._1, row._2) + } + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ), + suite("Schema independent tests")( + test("concat_ws #1 - combine flat values") { + import Expr._ + + // note: a plain number (3) would and should not compile + val query = select(ConcatWs4("+", "1", "2", "3")) + + val expected = Seq("1+2+3") + + val testResult = execute(query) + collectAndCompare(expected, testResult) + }, + test("ltrim") { + assertZIO(execute(select(Ltrim(" hello "))).runHead.some)(equalTo("hello ")) + }, + test("rtrim") { + assertZIO(execute(select(Rtrim(" hello "))).runHead.some)(equalTo(" hello")) + }, + test("abs") { + assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) + }, +/* test("log") { + assertZIO(execute(select(Log(32.0, 2.0))).runHead.some)(equalTo(5.0)) + },*/ + test("acos") { + assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) + }, + test("asin") { + assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) + }, +/* test("ln") { + assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) + },*/ + test("atan") { + assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) + }, + test("cos") { + assertZIO(execute(select(Cos(3.141592653589793))).runHead.some)(equalTo(-1.0)) + }, + test("exp") { + assertZIO(execute(select(Exp(1.0))).runHead.some)(equalTo(2.718281828459045)) + }, + test("floor") { + assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) + }, +/* test("ceil") { + assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) + },*/ + test("sin") { + assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) + }, + test("sqrt") { + val query = select(Sqrt(121.0)) + + val expected = 11.0 + + val testResult = execute(query) + + assertZIO(testResult.runHead.some)(equalTo(expected)) + }, + test("round") { + val query = select(Round(10.8124, 2)) + + val expected = 10.81 + println(renderRead(query)) + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign positive") { + val query = select(Sign(3.0)) + + val expected = 1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign negative") { + val query = select(Sign(-3.0)) + + val expected = -1 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("sign zero") { + val query = select(Sign(0.0)) + + val expected = 0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("power") { + val query = select(Power(7.0, 3.0)) + + val expected = 343.000000000000000 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, +/* test("mod") { + val query = select(Mod(-15.0, -4.0)) + + val expected = -3.0 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + },*/ + test("octet_length") { + val query = select(OctetLength("josé")) + + val expected = 5 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("ascii") { + val query = select(Ascii("""x""")) + + val expected = 120 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("upper") { + val query = (select(Upper("ronald"))).limit(1) + + val expected = "RONALD" + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("width_bucket") { + val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) + + val expected = 3 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("tan") { + val query = select(Tan(0.7853981634)) + + val expected = 1.0000000000051035 + + val testResult = execute(query) + + val assertion = for { + r <- testResult.runCollect + } yield assert(r.head)(equalTo(expected)) + + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("trim") { + assertZIO(execute(select(Trim(" 1234 "))).runHead.some)(equalTo("1234")) + }, + test("lower") { + assertZIO(execute(select(Lower("YES"))).runHead.some)(equalTo("yes")) + } + ) + ) + +} From dc2b1ebce89de93da82a3378e9a838dce7745dec Mon Sep 17 00:00:00 2001 From: bogatyra Date: Fri, 29 Jul 2022 22:23:22 +0200 Subject: [PATCH 516/673] #732 Mssql (fixed) --- .../zio/sql/sqlserver/SqlServerRenderModule.scala | 2 +- .../zio/sql/sqlserver/CommonFunctionDefSpec.scala | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index a2e4eda2e..031cba45a 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -111,7 +111,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => val value = lit.value lit.typeTag match { case TInstant => - render(s"'${fmtDateTimeOffset.format(value.asInstanceOf[Instant])}'") + render(s"'${DateTimeFormatter.ISO_INSTANT.format(value.asInstanceOf[Instant])}'") case TLocalTime => render(s"'${DateTimeFormatter.ISO_LOCAL_TIME.format(value.asInstanceOf[LocalTime])}'") case TLocalDate => diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala index de540acb7..7e28098a9 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala @@ -135,9 +135,9 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { test("abs") { assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) }, -/* test("log") { + test("log") { assertZIO(execute(select(Log(32.0, 2.0))).runHead.some)(equalTo(5.0)) - },*/ + } @@ TestAspect.ignore, test("acos") { assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) }, @@ -159,9 +159,9 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { test("floor") { assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) }, -/* test("ceil") { + test("ceil") { assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) - },*/ + } @@ TestAspect.ignore, test("sin") { assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) }, @@ -178,8 +178,6 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { val query = select(Round(10.8124, 2)) val expected = 10.81 - println(renderRead(query)) - val testResult = execute(query) val assertion = for { @@ -265,7 +263,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, + } @@ TestAspect.ignore, test("ascii") { val query = select(Ascii("""x""")) @@ -304,7 +302,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, + } @@ TestAspect.ignore, test("tan") { val query = select(Tan(0.7853981634)) From d89a96145f73e68cf4f2ea3fda9a0e023ed789c9 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 31 Jul 2022 13:46:37 +0200 Subject: [PATCH 517/673] #732 Oracle interpretation of literal const extended, DUAL table, functional tests --- .../zio/sql/oracle/OracleRenderModule.scala | 107 +++++++++++++++++- .../zio/sql/oracle/OracleSqlModule.scala | 5 + .../sql/oracle/CommonFunctionDefSpec.scala | 58 +++++----- 3 files changed, 137 insertions(+), 33 deletions(-) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index c1e22b34d..321100bc4 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -3,6 +3,7 @@ package zio.sql.oracle import zio.schema.Schema import zio.schema.DynamicValue import zio.schema.StandardType + import java.time.Instant import java.time.LocalDate import java.time.LocalDateTime @@ -10,12 +11,14 @@ import java.time.LocalTime import java.time.OffsetTime import java.time.ZonedDateTime import zio.sql.driver.Renderer -import zio.sql.driver.Renderer.Extensions import zio.Chunk + import scala.collection.mutable import java.time.OffsetDateTime import java.time.YearMonth import java.time.Duration +import java.time.format.{DateTimeFormatter, DateTimeFormatterBuilder} +import java.time.temporal.ChronoField._ trait OracleRenderModule extends OracleSqlModule { self => @@ -43,6 +46,102 @@ trait OracleRenderModule extends OracleSqlModule { self => render.toString } + private object DateFormats { + val fmtTime = new DateTimeFormatterBuilder() + .appendValue(HOUR_OF_DAY, 2) + .appendLiteral(':') + .appendValue(MINUTE_OF_HOUR, 2) + .appendLiteral(':') + .appendValue(SECOND_OF_MINUTE, 2) + .appendFraction(NANO_OF_SECOND, 9, 9, true) + .appendOffset("+HH:MM", "Z") + .toFormatter() + + val fmtTimeOffset = new DateTimeFormatterBuilder() + .append(fmtTime) + .appendFraction(NANO_OF_SECOND, 9, 9, true) + .toFormatter() + + val fmtDateTime = new DateTimeFormatterBuilder().parseCaseInsensitive + .append(DateTimeFormatter.ISO_LOCAL_DATE) + .appendLiteral('T') + .append(fmtTime) + .toFormatter() + + val fmtDateTimeOffset = new DateTimeFormatterBuilder().parseCaseInsensitive + .append(fmtDateTime) + .appendOffset("+HH:MM", "Z") + .toFormatter() + } + + private def buildLit(lit: self.Expr.Literal[_])(builder: StringBuilder): Unit = { + import TypeTag._ + val value = lit.value + lit.typeTag match { + case TInstant => + val _ = builder.append( s"""TO_TIMESTAMP_TZ('${DateFormats.fmtDateTimeOffset.format( + value.asInstanceOf[Instant] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""") + case TLocalTime => + val localTime = value.asInstanceOf[LocalTime] + val _ = builder.append( + s"INTERVAL '${localTime.getHour}:${localTime.getMinute}:${localTime.getSecond}.${localTime.getNano}' HOUR TO SECOND(9)" + ) + case TLocalDate => + val _ = builder.append(s"TO_DATE('${DateTimeFormatter.ISO_LOCAL_DATE.format(value.asInstanceOf[LocalDate])}', 'SYYYY-MM-DD')") + case TLocalDateTime => + val _ = builder.append(s"""TO_TIMESTAMP('${DateFormats.fmtDateTime.format(value.asInstanceOf[LocalDateTime])}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9')""") + case TZonedDateTime => + val _ = builder.append( s"""TO_TIMESTAMP_TZ('${DateFormats.fmtDateTimeOffset.format( + value.asInstanceOf[ZonedDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""") + case TOffsetTime => + val _ = builder.append( + s"TO_TIMESTAMP_TZ('${DateFormats.fmtTimeOffset.format(value.asInstanceOf[OffsetTime])}', 'HH24:MI:SS.FF9TZH:TZM')" + ) + case TOffsetDateTime => + val _ = builder.append( + s"""TO_TIMESTAMP_TZ('${DateFormats.fmtDateTimeOffset.format( + value.asInstanceOf[OffsetDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""" + ) + + case TBoolean => + val b = value.asInstanceOf[Boolean] + if (b) { + val _ = builder.append('1') + } else { + val _ = builder.append('0') + } + case TUUID => + val _ = builder.append(s"'$value'") + + case TBigDecimal => + val _ = builder.append(value) + case TByte => + val _ = builder.append(value) + case TDouble => + val _ = builder.append(value) + case TFloat => + val _ = builder.append(value) + case TInt => + val _ = builder.append(value) + case TLong => + val _ = builder.append(value) + case TShort => + val _ = builder.append(value) + + case TChar => + val _ = builder.append(s"N'$value'") + case TString => + val _ = builder.append(s"N'$value'") + + case _ => + val _ = builder.append(s"'$value'") + } + } + + // TODO: to consider the refactoring and using the implicit `Renderer`, see `renderExpr` in `PostgresRenderModule` private def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { case Expr.Subselect(subselect) => @@ -85,8 +184,8 @@ trait OracleRenderModule extends OracleSqlModule { self => val _ = builder.append("1 = 1") case Expr.Literal(false) => val _ = builder.append("0 = 1") - case Expr.Literal(value) => - val _ = builder.append(value.toString.singleQuoted) + case literal: Expr.Literal[_] => + val _ = buildLit(literal)(builder) case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) builder.append("(") @@ -178,7 +277,7 @@ trait OracleRenderModule extends OracleSqlModule { self => } /** - * Drops the initial Litaral(true) present at the start of every WHERE expressions by default + * Drops the initial Litaral(true) present at the start of every WHERE expressions by default * and proceeds to the rest of Expr's. */ private def buildWhereExpr[A, B](expr: self.Expr[_, A, B], builder: mutable.StringBuilder): Unit = expr match { diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala index e6b17ff45..c22ae32fc 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala @@ -45,6 +45,11 @@ trait OracleSqlModule extends Sql { self => val Sind = FunctionDef[Double, Double](FunctionName("sind")) } + object Dual { + val dual = (string("dummy")).table("dual") + val (dummy) = dual.columns + } + implicit val instantSchema = Schema.primitive[Instant](zio.schema.StandardType.InstantType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) diff --git a/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala b/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala index 9006926d7..01e187909 100644 --- a/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala @@ -8,6 +8,7 @@ import zio.test._ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { import FunctionDef.{ CharLength => _, _ } import Customers._ + import Dual._ private def collectAndCompare[R, E]( expected: Seq[String], @@ -83,47 +84,46 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { ), suite("Schema independent tests")( test("ltrim") { - assertZIO(execute(select(Ltrim(" hello "))).runHead.some)(equalTo("hello ")) + assertZIO(execute(select(Ltrim(" hello ")).from(dual)).runHead.some)(equalTo("hello ")) }, test("rtrim") { - assertZIO(execute(select(Rtrim(" hello "))).runHead.some)(equalTo(" hello")) + assertZIO(execute(select(Rtrim(" hello ")).from(dual)).runHead.some)(equalTo(" hello")) }, test("abs") { - assertZIO(execute(select(Abs(-3.14159))).runHead.some)(equalTo(3.14159)) + assertZIO(execute(select(Abs(-3.14159)).from(dual)).runHead.some)(equalTo(3.14159)) }, test("log") { - assertZIO(execute(select(Log(2.0, 32.0))).runHead.some)(equalTo(5.0)) + assertZIO(execute(select(Log(2.0, 32.0)).from(dual)).runHead.some)(equalTo(5.0)) }, test("acos") { - assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) + assertZIO(execute(select(Acos(-1.0)).from(dual)).runHead.some)(equalTo(3.141592653589793)) }, test("asin") { - assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) + assertZIO(execute(select(Asin(0.5)).from(dual)).runHead.some)(equalTo(0.5235987755982989)) }, test("ln") { - assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) + assertZIO(execute(select(Ln(3.0)).from(dual)).runHead.some)(equalTo(1.0986122886681097)) }, test("atan") { - assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) + assertZIO(execute(select(Atan(10.0)).from(dual)).runHead.some)(equalTo(1.4711276743037347)) }, test("cos") { - assertZIO(execute(select(Cos(3.141592653589793))).runHead.some)(equalTo(-1.0)) + assertZIO(execute(select(Cos(3.141592653589793)).from(dual)).runHead.some)(equalTo(-1.0)) }, test("exp") { - assertZIO(execute(select(Exp(1.0))).runHead.some)(equalTo(2.718281828459045)) + assertZIO(execute(select(Exp(1.0)).from(dual)).runHead.some)(equalTo(2.718281828459045)) }, test("floor") { - assertZIO(execute(select(Floor(-3.14159))).runHead.some)(equalTo(-4.0)) + assertZIO(execute(select(Floor(-3.14159)).from(dual)).runHead.some)(equalTo(-4.0)) }, test("ceil") { - assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) + assertZIO(execute(select(Ceil(53.7), Ceil(-53.7)).from(dual)).runHead.some)(equalTo((54.0, -53.0))) }, test("sin") { - assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) + assertZIO(execute(select(Sin(1.0)).from(dual)).runHead.some)(equalTo(0.8414709848078965)) }, test("sqrt") { - val query = select(Sqrt(121.0)) - + val query = select(Sqrt(121.0)).from(dual) val expected = 11.0 val testResult = execute(query) @@ -131,7 +131,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertZIO(testResult.runHead.some)(equalTo(expected)) }, test("round") { - val query = select(Round(10.8124, 2)) + val query = select(Round(10.8124, 2)).from(dual) val expected = 10.81 @@ -144,7 +144,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("sign positive") { - val query = select(Sign(3.0)) + val query = select(Sign(3.0)).from(dual) val expected = 1 @@ -157,7 +157,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("sign negative") { - val query = select(Sign(-3.0)) + val query = select(Sign(-3.0)).from(dual) val expected = -1 @@ -170,7 +170,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("sign zero") { - val query = select(Sign(0.0)) + val query = select(Sign(0.0)).from(dual) val expected = 0 @@ -183,7 +183,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("power") { - val query = select(Power(7.0, 3.0)) + val query = select(Power(7.0, 3.0)).from(dual) val expected = 343.000000000000000 @@ -196,7 +196,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("mod") { - val query = select(Mod(-15.0, -4.0)) + val query = select(Mod(-15.0, -4.0)).from(dual) val expected = -3.0 @@ -209,7 +209,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("octet_length") { - val query = select(OctetLength("josé")) + val query = select(OctetLength("josé")).from(dual) val expected = 5 @@ -220,9 +220,9 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, + } @@ TestAspect.ignore, test("ascii") { - val query = select(Ascii("""x""")) + val query = select(Ascii("""x""")).from(dual) val expected = 120 @@ -235,7 +235,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("upper") { - val query = (select(Upper("ronald"))).limit(1) + val query = (select(Upper("ronald")).from(dual)).limit(1) val expected = "RONALD" @@ -248,7 +248,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("width_bucket") { - val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) + val query = select(WidthBucket(5.35, 0.024, 10.06, 5)).from(dual) val expected = 3 @@ -261,7 +261,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("tan") { - val query = select(Tan(0.7853981634)) + val query = select(Tan(0.7853981634)).from(dual) val expected = 1.0000000000051035 @@ -274,10 +274,10 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("trim") { - assertZIO(execute(select(Trim(" 1234 "))).runHead.some)(equalTo("1234")) + assertZIO(execute(select(Trim(" 1234 ")).from(dual)).runHead.some)(equalTo("1234")) }, test("lower") { - assertZIO(execute(select(Lower("YES"))).runHead.some)(equalTo("yes")) + assertZIO(execute(select(Lower("YES")).from(dual)).runHead.some)(equalTo("yes")) } ) ) From 91357d08c47cfd1376d8161c4d4d20322060b982 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Jul 2022 19:56:43 +0000 Subject: [PATCH 518/673] Update sbt-bloop to 1.5.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8b59de989..95ee96d92 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,7 +5,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.2") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.3") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From 6f1a6b9e01a20c782683af8df2b7dca55397b407 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Jul 2022 19:56:53 +0000 Subject: [PATCH 519/673] Update testcontainers-scala-mssqlserver, ... to 0.40.10 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a690e3265..521c17a46 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.0" val zioSchemaVersion = "0.2.0" val testcontainersVersion = "1.17.3" -val testcontainersScalaVersion = "0.40.8" +val testcontainersScalaVersion = "0.40.10" val logbackVersion = "1.2.11" lazy val root = project From e36800b5e861c65cef06ba39831b61bc8b13d9e6 Mon Sep 17 00:00:00 2001 From: bogatyra Date: Mon, 1 Aug 2022 11:01:54 +0200 Subject: [PATCH 520/673] #732 Formatting, tags --- core/jvm/src/main/scala/zio/sql/expr.scala | 1 - .../zio/sql/oracle/OracleRenderModule.scala | 49 ++++++++++--------- .../zio/sql/oracle/OracleSqlModule.scala | 2 +- .../sql/oracle/CommonFunctionDefSpec.scala | 4 +- .../sql/sqlserver/SqlServerRenderModule.scala | 2 +- .../sql/sqlserver/CommonFunctionDefSpec.scala | 20 ++++---- 6 files changed, 40 insertions(+), 38 deletions(-) diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index 5b4c736c5..e4f3c7db0 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -412,7 +412,6 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { val Ascii = FunctionDef[String, Int](FunctionName("ascii")) val CharLength = FunctionDef[String, Int](FunctionName("character_length")) val Concat = FunctionDef[(String, String), String](FunctionName("concat")) // todo varargs - val ConcatWs2 = FunctionDef[(String, String), String](FunctionName("concat_ws")) val ConcatWs3 = FunctionDef[(String, String, String), String](FunctionName("concat_ws")) val ConcatWs4 = FunctionDef[(String, String, String, String), String](FunctionName("concat_ws")) val Lower = FunctionDef[String, String](FunctionName("lower")) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index 321100bc4..c874eba74 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -17,7 +17,7 @@ import scala.collection.mutable import java.time.OffsetDateTime import java.time.YearMonth import java.time.Duration -import java.time.format.{DateTimeFormatter, DateTimeFormatterBuilder} +import java.time.format.{ DateTimeFormatter, DateTimeFormatterBuilder } import java.time.temporal.ChronoField._ trait OracleRenderModule extends OracleSqlModule { self => @@ -46,8 +46,8 @@ trait OracleRenderModule extends OracleSqlModule { self => render.toString } - private object DateFormats { - val fmtTime = new DateTimeFormatterBuilder() + private object DateTimeFormats { + val fmtTime = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2) @@ -57,18 +57,18 @@ trait OracleRenderModule extends OracleSqlModule { self => .appendOffset("+HH:MM", "Z") .toFormatter() - val fmtTimeOffset = new DateTimeFormatterBuilder() + val fmtTimeOffset = new DateTimeFormatterBuilder() .append(fmtTime) .appendFraction(NANO_OF_SECOND, 9, 9, true) .toFormatter() - val fmtDateTime = new DateTimeFormatterBuilder().parseCaseInsensitive + val fmtDateTime = new DateTimeFormatterBuilder().parseCaseInsensitive .append(DateTimeFormatter.ISO_LOCAL_DATE) .appendLiteral('T') .append(fmtTime) .toFormatter() - val fmtDateTimeOffset = new DateTimeFormatterBuilder().parseCaseInsensitive + val fmtDateTimeOffset = new DateTimeFormatterBuilder().parseCaseInsensitive .append(fmtDateTime) .appendOffset("+HH:MM", "Z") .toFormatter() @@ -76,34 +76,38 @@ trait OracleRenderModule extends OracleSqlModule { self => private def buildLit(lit: self.Expr.Literal[_])(builder: StringBuilder): Unit = { import TypeTag._ - val value = lit.value + val value = lit.value lit.typeTag match { case TInstant => - val _ = builder.append( s"""TO_TIMESTAMP_TZ('${DateFormats.fmtDateTimeOffset.format( - value.asInstanceOf[Instant] - )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""") + val _ = builder.append(s"""TO_TIMESTAMP_TZ('${DateTimeFormats.fmtDateTimeOffset.format( + value.asInstanceOf[Instant] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""") case TLocalTime => val localTime = value.asInstanceOf[LocalTime] - val _ = builder.append( + val _ = builder.append( s"INTERVAL '${localTime.getHour}:${localTime.getMinute}:${localTime.getSecond}.${localTime.getNano}' HOUR TO SECOND(9)" ) case TLocalDate => - val _ = builder.append(s"TO_DATE('${DateTimeFormatter.ISO_LOCAL_DATE.format(value.asInstanceOf[LocalDate])}', 'SYYYY-MM-DD')") + val _ = builder.append( + s"TO_DATE('${DateTimeFormatter.ISO_LOCAL_DATE.format(value.asInstanceOf[LocalDate])}', 'SYYYY-MM-DD')" + ) case TLocalDateTime => - val _ = builder.append(s"""TO_TIMESTAMP('${DateFormats.fmtDateTime.format(value.asInstanceOf[LocalDateTime])}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9')""") + val _ = builder.append(s"""TO_TIMESTAMP('${DateTimeFormats.fmtDateTime.format( + value.asInstanceOf[LocalDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9')""") case TZonedDateTime => - val _ = builder.append( s"""TO_TIMESTAMP_TZ('${DateFormats.fmtDateTimeOffset.format( - value.asInstanceOf[ZonedDateTime] - )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""") + val _ = builder.append(s"""TO_TIMESTAMP_TZ('${DateTimeFormats.fmtDateTimeOffset.format( + value.asInstanceOf[ZonedDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""") case TOffsetTime => val _ = builder.append( - s"TO_TIMESTAMP_TZ('${DateFormats.fmtTimeOffset.format(value.asInstanceOf[OffsetTime])}', 'HH24:MI:SS.FF9TZH:TZM')" + s"TO_TIMESTAMP_TZ('${DateTimeFormats.fmtTimeOffset.format(value.asInstanceOf[OffsetTime])}', 'HH24:MI:SS.FF9TZH:TZM')" ) case TOffsetDateTime => val _ = builder.append( - s"""TO_TIMESTAMP_TZ('${DateFormats.fmtDateTimeOffset.format( - value.asInstanceOf[OffsetDateTime] - )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""" + s"""TO_TIMESTAMP_TZ('${DateTimeFormats.fmtDateTimeOffset.format( + value.asInstanceOf[OffsetDateTime] + )}', 'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')""" ) case TBoolean => @@ -123,7 +127,7 @@ trait OracleRenderModule extends OracleSqlModule { self => case TDouble => val _ = builder.append(value) case TFloat => - val _ = builder.append(value) + val _ = builder.append(value) case TInt => val _ = builder.append(value) case TLong => @@ -141,7 +145,6 @@ trait OracleRenderModule extends OracleSqlModule { self => } } - // TODO: to consider the refactoring and using the implicit `Renderer`, see `renderExpr` in `PostgresRenderModule` private def buildExpr[A, B](expr: self.Expr[_, A, B], builder: StringBuilder): Unit = expr match { case Expr.Subselect(subselect) => @@ -184,7 +187,7 @@ trait OracleRenderModule extends OracleSqlModule { self => val _ = builder.append("1 = 1") case Expr.Literal(false) => val _ = builder.append("0 = 1") - case literal: Expr.Literal[_] => + case literal: Expr.Literal[_] => val _ = buildLit(literal)(builder) case Expr.AggregationCall(param, aggregation) => builder.append(aggregation.name.name) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala index c22ae32fc..2a4f55e5c 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleSqlModule.scala @@ -46,7 +46,7 @@ trait OracleSqlModule extends Sql { self => } object Dual { - val dual = (string("dummy")).table("dual") + val dual = (string("dummy")).table("dual") val (dummy) = dual.columns } diff --git a/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala b/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala index 01e187909..1ffa82096 100644 --- a/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/CommonFunctionDefSpec.scala @@ -123,7 +123,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { assertZIO(execute(select(Sin(1.0)).from(dual)).runHead.some)(equalTo(0.8414709848078965)) }, test("sqrt") { - val query = select(Sqrt(121.0)).from(dual) + val query = select(Sqrt(121.0)).from(dual) val expected = 11.0 val testResult = execute(query) @@ -220,7 +220,7 @@ object CommonFunctionDefSpec extends OracleRunnableSpec with ShopSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ TestAspect.ignore, + } @@ TestAspect.ignore @@ TestAspect.tag("lengthb"), test("ascii") { val query = select(Ascii("""x""")).from(dual) diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 031cba45a..4e5b7cb9d 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -108,7 +108,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => private def renderLit(lit: self.Expr.Literal[_])(implicit render: Renderer): Unit = { import TypeTag._ - val value = lit.value + val value = lit.value lit.typeTag match { case TInstant => render(s"'${DateTimeFormatter.ISO_INSTANT.format(value.asInstanceOf[Instant])}'") diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala index 7e28098a9..907d8e33c 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/CommonFunctionDefSpec.scala @@ -6,7 +6,7 @@ import zio.test.Assertion._ import zio.test._ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { - import FunctionDef.{CharLength => _, _} + import FunctionDef.{ CharLength => _, _ } import DbSchema._ private def collectAndCompare[R, E]( @@ -15,7 +15,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { ) = assertZIO(testResult.runCollect)(hasSameElementsDistinct(expected)) - override def specLayered = suite("Postgres Common FunctionDef")( + override def specLayered = suite("SqlServer Common FunctionDef")( suite("Schema dependent tests")( test("concat_ws #2 - combine columns") { @@ -137,16 +137,16 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { }, test("log") { assertZIO(execute(select(Log(32.0, 2.0))).runHead.some)(equalTo(5.0)) - } @@ TestAspect.ignore, + } @@ TestAspect.tag("different order of params"), test("acos") { assertZIO(execute(select(Acos(-1.0))).runHead.some)(equalTo(3.141592653589793)) }, test("asin") { assertZIO(execute(select(Asin(0.5))).runHead.some)(equalTo(0.5235987755982989)) }, -/* test("ln") { + test("ln") { assertZIO(execute(select(Ln(3.0))).runHead.some)(equalTo(1.0986122886681097)) - },*/ + } @@ TestAspect.ignore @@ TestAspect.tag("log with one param"), test("atan") { assertZIO(execute(select(Atan(10.0))).runHead.some)(equalTo(1.4711276743037347)) }, @@ -161,7 +161,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { }, test("ceil") { assertZIO(execute(select(Ceil(53.7), Ceil(-53.7))).runHead.some)(equalTo((54.0, -53.0))) - } @@ TestAspect.ignore, + } @@ TestAspect.ignore @@ TestAspect.tag("cailing"), test("sin") { assertZIO(execute(select(Sin(1.0))).runHead.some)(equalTo(0.8414709848078965)) }, @@ -177,7 +177,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { test("round") { val query = select(Round(10.8124, 2)) - val expected = 10.81 + val expected = 10.81 val testResult = execute(query) val assertion = for { @@ -238,7 +238,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, -/* test("mod") { + test("mod") { val query = select(Mod(-15.0, -4.0)) val expected = -3.0 @@ -250,7 +250,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - },*/ + } @@ TestAspect.ignore @@ TestAspect.tag("to use % instead"), test("octet_length") { val query = select(OctetLength("josé")) @@ -263,7 +263,7 @@ object CommonFunctionDefSpec extends SqlServerRunnableSpec with DbSchema { } yield assert(r.head)(equalTo(expected)) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } @@ TestAspect.ignore, + } @@ TestAspect.ignore @@ TestAspect.tag("datalength"), test("ascii") { val query = select(Ascii("""x""")) From 6946411ef3248f99aa5477eef7e222314b36ee52 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 4 Aug 2022 19:05:50 +0000 Subject: [PATCH 521/673] Update postgresql to 42.4.1 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index a690e3265..1e1ee6a97 100644 --- a/build.sbt +++ b/build.sbt @@ -117,7 +117,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.4.0" % Test, + "org.postgresql" % "postgresql" % "42.4.1" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -181,7 +181,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.4.0" % Compile, + "org.postgresql" % "postgresql" % "42.4.1" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 62fb60f81cd9b5aadc5cb145108f03084c242f0e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 8 Aug 2022 18:34:47 +0000 Subject: [PATCH 522/673] Update sbt-scoverage to 2.0.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8024e9eb1..868d2f3fc 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.2") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.3") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From 696077e708a330993d8d85d6ddb905dd28fb3348 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 14 Aug 2022 23:30:35 +0000 Subject: [PATCH 523/673] Update scalafmt-core to 3.5.9 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index b461beab6..1e658cd37 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.5.8" +version = "3.5.9" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From b3e3468da08e6c664db6482856f130eadd5686be Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 18 Aug 2022 19:51:47 +0000 Subject: [PATCH 524/673] Update postgresql to 42.4.2 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 2b81d0e3b..079abeb63 100644 --- a/build.sbt +++ b/build.sbt @@ -117,7 +117,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.4.1" % Test, + "org.postgresql" % "postgresql" % "42.4.2" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -181,7 +181,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.4.1" % Compile, + "org.postgresql" % "postgresql" % "42.4.2" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 15594b91f84a201e95fa875735864bd6f43f031b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 26 Aug 2022 18:40:09 +0000 Subject: [PATCH 525/673] Update ojdbc8 to 21.7.0.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2b81d0e3b..b0ee2d7e2 100644 --- a/build.sbt +++ b/build.sbt @@ -162,7 +162,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.6.0.0.1" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "21.7.0.0" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 0c4936b46c2c36d30ed9cae3a70437026fa338ff Mon Sep 17 00:00:00 2001 From: sviezypan Date: Mon, 29 Aug 2022 20:29:22 +0200 Subject: [PATCH 526/673] introduced new way of defining table + macro checks --- build.sbt | 30 +- core/jvm/src/main/scala/zio/sql/Sql.scala | 2 +- core/jvm/src/main/scala/zio/sql/insert.scala | 8 +- .../src/main/scala/zio/sql/insertutils.scala | 98 +-- core/jvm/src/main/scala/zio/sql/select.scala | 123 ++-- .../src/main/scala/zio/sql/selectutils.scala | 42 +- core/jvm/src/main/scala/zio/sql/table.scala | 393 ++++++------ core/jvm/src/main/scala/zio/sql/typetag.scala | 9 +- .../test/scala/zio/sql/ProductSchema.scala | 21 +- .../scala/zio/sql/TestBasicSelectSpec.scala | 14 +- examples/src/main/scala/Example1.scala | 68 ++- examples/src/main/scala/ShopSchema.scala | 38 -- .../src/main/scala/zio/sql/Examples.scala | 154 ++++- .../main/scala/zio/sql/GroupByExamples.scala | 17 +- .../main/scala/zio/sql/ConnectionPool.scala | 2 +- .../scala/zio/sql/JdbcInternalModule.scala | 8 + .../scala/zio/sql/SqlDriverLiveModule.scala | 2 +- .../scala/zio/sql/TransactionModule.scala | 26 +- jdbc/src/main/scala/zio/sql/jdbc.scala | 2 +- .../scala/zio/sql/ConnectionPoolSpec.scala | 4 +- .../test/scala/zio/sql/JdbcRunnableSpec.scala | 3 +- .../scala/zio/sql/macros/insertmacro.scala | 79 +++ .../main/scala/zio/sql/macros/tablelike.scala | 81 +++ .../scala/zio/sql/mysql/MysqlModule.scala | 8 +- .../test/scala/zio/sql/mysql/DeleteSpec.scala | 32 +- .../scala/zio/sql/mysql/FunctionDefSpec.scala | 67 +- .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 74 ++- .../zio/sql/mysql/MysqlRunnableSpec.scala | 7 +- .../test/scala/zio/sql/mysql/ShopSchema.scala | 42 -- .../scala/zio/sql/mysql/TransactionSpec.scala | 52 +- .../zio/sql/postgresql/PostgresModule.scala | 44 +- postgres/src/test/resources/db_schema.sql | 19 +- .../scala/zio/sql/postgresql/DbSchema.scala | 98 --- .../scala/zio/sql/postgresql/DeleteSpec.scala | 31 +- .../zio/sql/postgresql/DeriveTableSpec.scala | 143 +++++ .../zio/sql/postgresql/FunctionDefSpec.scala | 578 +++++++----------- .../sql/postgresql/PostgresModuleSpec.scala | 410 +++++++------ .../sql/postgresql/PostgresRunnableSpec.scala | 4 +- .../zio/sql/postgresql/TransactionSpec.scala | 58 +- .../zio/sql/sqlserver/SqlServerModule.scala | 49 +- sqlserver/src/test/resources/db_schema.sql | 7 +- .../scala/zio/sql/sqlserver/DbSchema.scala | 45 -- .../sql/sqlserver/SqlServerModuleSpec.scala | 149 +++-- .../sql/sqlserver/SqlServerRunnableSpec.scala | 4 +- 44 files changed, 1640 insertions(+), 1505 deletions(-) delete mode 100644 examples/src/main/scala/ShopSchema.scala create mode 100644 macros/src/main/scala/zio/sql/macros/insertmacro.scala create mode 100644 macros/src/main/scala/zio/sql/macros/tablelike.scala delete mode 100644 mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala delete mode 100644 postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala create mode 100644 postgres/src/test/scala/zio/sql/postgresql/DeriveTableSpec.scala delete mode 100644 sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala diff --git a/build.sbt b/build.sbt index 041ea187f..b1720fd21 100644 --- a/build.sbt +++ b/build.sbt @@ -24,8 +24,8 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0-RC5" -val zioSchemaVersion = "0.1.9" +val zioVersion = "2.0.1" +val zioSchemaVersion = "0.2.1" val testcontainersVersion = "1.16.3" val testcontainersScalaVersion = "0.40.5" @@ -69,7 +69,8 @@ lazy val root = project mysql, oracle, postgres, - sqlserver + sqlserver, + macros ) lazy val core = crossProject(JSPlatform, JVMPlatform) @@ -79,12 +80,12 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .settings(buildInfoSettings("zio.sql")) .settings( libraryDependencies ++= Seq( - "dev.zio" %% "zio" % zioVersion, - "dev.zio" %% "zio-streams" % zioVersion, - "dev.zio" %% "zio-schema" % zioSchemaVersion, - "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, - "dev.zio" %% "zio-test" % zioVersion % Test, - "dev.zio" %% "zio-test-sbt" % zioVersion % Test + "dev.zio" %% "zio" % zioVersion, + "dev.zio" %% "zio-streams" % zioVersion, + "dev.zio" %% "zio-schema" % zioSchemaVersion, + "dev.zio" %% "zio-schema-derivation" % zioSchemaVersion, + "dev.zio" %% "zio-test" % zioVersion % Test, + "dev.zio" %% "zio-test-sbt" % zioVersion % Test ), dependencyOverrides += "dev.zio" %% "zio" % zioVersion, resolvers += Resolver.sonatypeRepo("snapshots") @@ -94,7 +95,16 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) lazy val coreJS = core.js .settings(scalaJSUseMainModuleInitializer := true) -lazy val coreJVM = core.jvm +lazy val coreJVM = core.jvm.dependsOn(macros) + +lazy val macros = project + .in(file("macros")) + .settings( + libraryDependencies ++= Seq( + "org.scala-lang" % "scala-reflect" % scalaVersion.value, + "dev.zio" %% "zio" % zioVersion + ) + ) lazy val docs = project .in(file("zio-sql-docs")) diff --git a/core/jvm/src/main/scala/zio/sql/Sql.scala b/core/jvm/src/main/scala/zio/sql/Sql.scala index ec7f12fab..c33968606 100644 --- a/core/jvm/src/main/scala/zio/sql/Sql.scala +++ b/core/jvm/src/main/scala/zio/sql/Sql.scala @@ -28,7 +28,7 @@ trait Sql * SELECT ARBITRARY(age), COUNT(*) FROM person GROUP BY age */ val select: SelectByCommaBuilder = SelectByCommaBuilder() - + def subselect[ParentTable]: SubselectPartiallyApplied[ParentTable] = new SubselectPartiallyApplied[ParentTable] def deleteFrom[T <: Table](table: T): Delete[table.TableType] = Delete(table, true) diff --git a/core/jvm/src/main/scala/zio/sql/insert.scala b/core/jvm/src/main/scala/zio/sql/insert.scala index ae8a7ef4c..c08cfba1c 100644 --- a/core/jvm/src/main/scala/zio/sql/insert.scala +++ b/core/jvm/src/main/scala/zio/sql/insert.scala @@ -1,6 +1,7 @@ package zio.sql import zio.schema.Schema +//import zio.sql.macros._ trait InsertModule { self: ExprModule with TableModule with SelectModule with InsertUtilsModule => @@ -11,12 +12,14 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule with In def values[Z](values: Seq[Z])(implicit schemaCC: Schema[Z], - schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] + schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source], + //insertLike: InsertLike[F, Z, ColsRepr, AllColumnIdentities, Source] ): Insert[Source, Z] = Insert(table, sources.value, values) def values[Z](value: Z)(implicit schemaCC: Schema[Z], - schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] + schemaValidity: SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source], + // insertLike: InsertLike[F, Z, ColsRepr, AllColumnIdentities, Source] ): Insert[Source, Z] = Insert(table, sources.value, Seq(value)) } @@ -32,4 +35,5 @@ trait InsertModule { self: ExprModule with TableModule with SelectModule with In }, someA => Right(someA) ) + implicit val none: Schema[None.type] = Schema.singleton(None) } diff --git a/core/jvm/src/main/scala/zio/sql/insertutils.scala b/core/jvm/src/main/scala/zio/sql/insertutils.scala index 7b2ffd6c8..c362dcde4 100644 --- a/core/jvm/src/main/scala/zio/sql/insertutils.scala +++ b/core/jvm/src/main/scala/zio/sql/insertutils.scala @@ -12,16 +12,16 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[A1], ev2: (A1, Unit) <:< ColsRepr, ev3: F <:< Features.Source[Identity1, Source], - //TODO find other way to check if selection set contains some set of columns from table ev4: AllColumnIdentities =:= Identity1 ): SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, A1, ColsRepr, AllColumnIdentities, Source] {} + implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit ev1: Schema[(A1, A2)], ev2: (A1, (A2, Unit)) <:< ColsRepr, ev3: F <:< Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 + ev4: AllColumnIdentities =:= (Identity1, Identity2) ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] {} @@ -29,7 +29,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3)], ev2: (A1, (A2, (A3, Unit))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3) ): SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3), ColsRepr, AllColumnIdentities, Source] {} @@ -37,7 +37,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4)], ev2: (A1, (A2, (A3, (A4, Unit)))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4) ): SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4), ColsRepr, AllColumnIdentities, Source] {} @@ -46,7 +46,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5)], ev2: (A1, (A2, (A3, (A4, (A5, Unit))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5) ): SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5), ColsRepr, AllColumnIdentities, Source] {} @@ -55,7 +55,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6), ColsRepr, AllColumnIdentities, Source] {} @@ -64,7 +64,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7), ColsRepr, AllColumnIdentities, Source] {} @@ -73,7 +73,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8), ColsRepr, AllColumnIdentities, Source] {} @@ -82,7 +82,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9), ColsRepr, AllColumnIdentities, Source] {} @@ -91,7 +91,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), ColsRepr, AllColumnIdentities, Source] {} @@ -100,7 +100,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), ColsRepr, AllColumnIdentities, Source] {} @@ -109,7 +109,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), ColsRepr, AllColumnIdentities, Source] {} @@ -118,7 +118,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), ColsRepr, AllColumnIdentities, Source] {} @@ -127,7 +127,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), ColsRepr, AllColumnIdentities, Source] {} @@ -136,7 +136,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), ColsRepr, AllColumnIdentities, Source] {} @@ -145,7 +145,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), ColsRepr, AllColumnIdentities, Source] {} @@ -154,7 +154,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), ColsRepr, AllColumnIdentities, Source] {} @@ -163,7 +163,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), ColsRepr, AllColumnIdentities, Source] {} @@ -172,7 +172,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), ColsRepr, AllColumnIdentities, Source] {} @@ -181,7 +181,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), ColsRepr, AllColumnIdentities, Source] {} @@ -190,7 +190,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21), ColsRepr, AllColumnIdentities, Source] {} @@ -199,7 +199,7 @@ trait InsertUtilsModule { self: FeaturesModule => ev1: Schema[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)], ev2: (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))) <:< ColsRepr, ev3: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], - ev4: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 + ev4: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22) ): SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22), ColsRepr, AllColumnIdentities, Source] {} } @@ -219,7 +219,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass2[A1, A2, Z], ev: ColsRepr <:< (A1, (A2, Unit)), ev2: F <:< :||:[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 + ev3: AllColumnIdentities =:= (Identity1, Identity2) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -227,7 +227,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass3[A1, A2, A3, Z], ev: ColsRepr <:< (A1, (A2, (A3, Unit))), ev2: F <:< Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -235,7 +235,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass4[A1, A2, A3, A4, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, Unit)))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -243,7 +243,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass5[A1, A2, A3, A4, A5, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, Unit))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -251,7 +251,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass6[A1, A2, A3, A4, A5, A6, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, Unit)))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -259,7 +259,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass7[A1, A2, A3, A4, A5, A6, A7, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, Unit))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 + ev3: AllColumnIdentities <:< (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -267,7 +267,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass8[A1, A2, A3, A4, A5, A6, A7, A8, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, Unit)))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -275,7 +275,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass9[A1, A2, A3, A4, A5, A6, A7, A8, A9, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, Unit))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -283,7 +283,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, Unit)))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -291,7 +291,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, Unit))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -299,7 +299,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, Unit)))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -307,7 +307,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, Unit))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -315,7 +315,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, Unit)))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -323,7 +323,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, Unit))))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -332,7 +332,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, Unit)))))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -341,7 +341,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, Unit))))))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -351,7 +351,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, Unit)))))))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], - ev3: AllColumnIdentities =:= Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 + ev3: AllColumnIdentities =:= (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -361,7 +361,7 @@ trait InsertUtilsModule { self: FeaturesModule => ccSchema: Schema.CaseClass19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z], ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, Unit))))))))))))))))))), ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], - ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 + ev3: AllColumnIdentities <:< (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19) ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -374,7 +374,7 @@ trait InsertUtilsModule { self: FeaturesModule => // ccSchema: Schema.CaseClass20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z], // ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, Unit)))))))))))))))))))), // ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], - // ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 + // ev3: AllColumnIdentities <:< (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20) // ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = // new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -383,7 +383,7 @@ trait InsertUtilsModule { self: FeaturesModule => // ccSchema: Schema.CaseClass21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z], // ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, Unit))))))))))))))))))))), // ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], - // ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 + // ev3: AllColumnIdentities <:< (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21) // ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = // new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} @@ -392,9 +392,21 @@ trait InsertUtilsModule { self: FeaturesModule => // ccSchema: Schema.CaseClass22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z], // ev: ColsRepr <:< (A1, (A2, (A3, (A4, (A5, (A6, (A7, (A8, (A9, (A10, (A11, (A12, (A13, (A14, (A15, (A16, (A17, (A18, (A19, (A20, (A21, (A22, Unit)))))))))))))))))))))), // ev2: F <:< Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], Features.Source[Identity3, Source]], Features.Source[Identity4, Source]], Features.Source[Identity5, Source]], Features.Source[Identity6, Source]], Features.Source[Identity7, Source]], Features.Source[Identity8, Source]], Features.Source[Identity9, Source]], Features.Source[Identity10, Source]], Features.Source[Identity11, Source]], Features.Source[Identity12, Source]], Features.Source[Identity13, Source]], Features.Source[Identity14, Source]], Features.Source[Identity15, Source]], Features.Source[Identity16, Source]], Features.Source[Identity17, Source]], Features.Source[Identity18, Source]], Features.Source[Identity19, Source]], Features.Source[Identity20, Source]], Features.Source[Identity21, Source]], Features.Source[Identity22, Source]], - // ev3: AllColumnIdentities <:< Identity1 with Identity2 with Identity3 with Identity4 with Identity5 with Identity6 with Identity7 with Identity8 with Identity9 with Identity10 with Identity11 with Identity12 with Identity13 with Identity14 with Identity15 with Identity16 with Identity17 with Identity18 with Identity19 with Identity20 with Identity21 with Identity22 + // ev3: AllColumnIdentities <:< (Identity1, Identity2, Identity3, Identity4, Identity5, Identity6, Identity7, Identity8, Identity9, Identity10, Identity11, Identity12, Identity13, Identity14, Identity15, Identity16, Identity17, Identity18, Identity19, Identity20, Identity21, Identity22) // ): SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] = // new SchemaValidity[F, Z, ColsRepr, AllColumnIdentities, Source] {} } // format: on + + // how to compare two tuples for equality with elements of different order? + // something like hasSameElements + sealed trait TupleEquality[Left, Right] + + object TupleEquality { + + Tuple2 + + + + } } diff --git a/core/jvm/src/main/scala/zio/sql/select.scala b/core/jvm/src/main/scala/zio/sql/select.scala index 14556e276..c858d740a 100644 --- a/core/jvm/src/main/scala/zio/sql/select.scala +++ b/core/jvm/src/main/scala/zio/sql/select.scala @@ -145,13 +145,11 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro val mapper: ResultType => Out - type ColumnHead - type HeadIdentity - type ColumnTail <: ColumnSet + type ColumnsOut - type CS <: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity] + type TableSource - val columnSet: CS + def columns(name: TableName): ColumnsOut /** * Maps the [[Read]] query's output to another type by providing a function @@ -160,7 +158,7 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro def map[Out2](f: Out => Out2): Read.Aux[ResultType, Out2] = Read.Mapped(self, f) - def asTable(name: TableName): Table.DerivedTable[Out, Read[Out]] + def asTable(name: TableName): Table.DerivedTable[ColumnsOut, Out, Read[Out]{type ColumnsOut = self.ColumnsOut}, TableSource] def to[Target](f: Out => Target): Read[Target] = self.map { resultType => @@ -198,6 +196,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro } } + type WithReprs[+Out, Reprs] = Read[Out] { + type ColumnsOut = Reprs + } + type Aux[ResultType0, Out] = Read[Out] { type ResultType = ResultType0 } @@ -207,16 +209,16 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro override val mapper = read.mapper.andThen(f) - override type ColumnHead = read.ColumnHead - override type ColumnTail = read.ColumnTail - override type CS = read.CS + override type TableSource = read.TableSource - override type HeadIdentity = read.HeadIdentity + override type ColumnsOut = read.ColumnsOut + override def columns(name: TableName): ColumnsOut = read.columns(name) - override val columnSet: CS = read.columnSet - - override def asTable(name: TableName): Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]] = - Table.DerivedTable[Out2, Mapped[Repr, Out, Out2]](self, name) + override def asTable(name: TableName): Table.DerivedTable[read.ColumnsOut, Out2, Mapped[Repr, Out, Out2]{ type ColumnsOut = self.ColumnsOut }, read.TableSource] = + Table.DerivedTable[self.ColumnsOut, Out2, Mapped[Repr, Out, Out2] { type ColumnsOut = self.ColumnsOut }, read.TableSource]( + self, + name + ) } /** @@ -322,21 +324,24 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro override def asTable( name: TableName - ): Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]] = - Table.DerivedTable[Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]](self, name) + ): Table.DerivedTable[selection.ColumnsOut[Source], Repr, Subselect[F, Repr, Source, Subsource, Head, Tail]{ type ColumnsOut = self.ColumnsOut }, Source] = + Table.DerivedTable[self.ColumnsOut, Repr, Subselect[ + F, + Repr, + Source, + Subsource, + Head, + Tail + ] { type ColumnsOut = self.ColumnsOut }, Source](self, name) override type ResultType = Repr - override val mapper: Repr => Repr = identity(_) - - override type ColumnHead = selection.value.ColumnHead - override type ColumnTail = selection.value.ColumnTail + override type TableSource = Source - override type HeadIdentity = selection.value.HeadIdentity - - override val columnSet: CS = selection.value.columnSet + override val mapper: Repr => Repr = identity(_) - override type CS = selection.value.CS + override type ColumnsOut = selection.ColumnsOut[Source] + override def columns(name: TableName) = selection.columns[Source](name) } object Subselect { @@ -358,39 +363,38 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro override val mapper: ResultType => Out = left.mapper - override type ColumnHead = left.ColumnHead - override type ColumnTail = left.ColumnTail + override type ColumnsOut = left.ColumnsOut - override type HeadIdentity = left.HeadIdentity + override type TableSource = left.TableSource - override type CS = left.CS + override def columns(name: TableName): ColumnsOut = left.columns(name) - override val columnSet: CS = left.columnSet - - override def asTable(name: TableName): Table.DerivedTable[Out, Union[Repr, Out]] = - Table.DerivedTable[Out, Union[Repr, Out]](self, name) + override def asTable(name: TableName): Table.DerivedTable[left.ColumnsOut, Out, Union[Repr, Out]{ type ColumnsOut = self.ColumnsOut }, left.TableSource] = + Table.DerivedTable[self.ColumnsOut, Out, Union[Repr, Out] { type ColumnsOut = self.ColumnsOut }, left.TableSource](self, name) } // TODO add name to literal selection - e.g. select '1' as one - sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[(B, Unit)] { self => - override type ResultType = (B, Unit) + sealed case class Literal[B: TypeTag](values: Iterable[B]) extends Read[B] { self => + override type ResultType = B - override val mapper: ResultType => (B, Unit) = identity(_) + override val mapper: ResultType => B = identity(_) - def typeTag: TypeTag[B] = implicitly[TypeTag[B]] + type ColumnIdentity - override type ColumnHead = B - override type ColumnTail = ColumnSet.Empty + def typeTag: TypeTag[B] = implicitly[TypeTag[B]] - override type CS = ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity] + override type ColumnsOut = Expr[Features.Source[ColumnIdentity, Any], Any, B] + override def columns(name: TableName) = Expr.Source(name, Column.Indexed[B, ColumnIdentity]()) - override val columnSet: CS = ColumnSet.Cons(Column.Indexed[ColumnHead, HeadIdentity](), ColumnSet.Empty) + override type TableSource = Any - override def asTable(name: TableName): Table.DerivedTable[(B, Unit), Literal[B]] = - Table.DerivedTable[(B, Unit), Literal[B]](self, name) + override def asTable( + name: TableName + ): Table.DerivedTable[Expr[Features.Source[ColumnIdentity, Any], Any, B], B, Literal[B]{ type ColumnsOut = self.ColumnsOut }, Any] = + Table.DerivedTable[Expr[Features.Source[ColumnIdentity, Any], Any, B], B, Literal[B]{ type ColumnsOut = self.ColumnsOut }, Any](self, name) } - def lit[B: TypeTag](values: B*): Read[(B, Unit)] = Literal(values.toSeq) + def lit[B: TypeTag](values: B*): Read[B] = Literal(values.toSeq) } /** @@ -400,6 +404,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro type ColsRepr = value.ResultTypeRepr + type ColumnsOut[S] = value.ColumnsOut[S] + + def columns[S](name: TableName): ColumnsOut[S] = value.columns[S](name) + def ++[F2, A1 <: A, C <: SelectionSet[A1]]( that: Selection[F2, A1, C] ): Selection[F :||: F2, A1, self.value.Append[A1, C]] = @@ -470,12 +478,13 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro type Append[Source1, That <: SelectionSet[Source1]] <: SelectionSet[Source1] type ColumnHead - type ColumnTail <: ColumnSet + type SelectionTail <: SelectionSet[Source] type HeadIdentity - type CS <: ColumnSet - def columnSet: CS + type ColumnsOut[S] + + def columns[S](name: TableName): ColumnsOut[S] def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] @@ -501,20 +510,20 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro case object Empty extends SelectionSet[Any] { override type ColumnHead = Unit - override type ColumnTail = ColumnSet.Empty override type SelectionTail = SelectionSet.Empty override type HeadIdentity = Any - override type CS = ColumnSet.Empty - override def columnSet: CS = ColumnSet.Empty - override type SelectionsRepr[Source1, T] = Unit override type ResultTypeRepr = Unit override type Append[Source1, That <: SelectionSet[Source1]] = That + override type ColumnsOut[S] = Unit + + override def columns[S](name: TableName): ColumnsOut[S] = () + override def ++[Source1 <: Any, That <: SelectionSet[Source1]](that: That): Append[Source1, That] = that @@ -527,16 +536,10 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro extends SelectionSet[Source] { self => override type ColumnHead = A - override type ColumnTail = tail.CS override type SelectionTail = B override type HeadIdentity = head.toColumn.Identity - override type CS = ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity] - - override def columnSet: CS = - ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity](head.toColumn, tail.columnSet) - override type SelectionsRepr[Source1, T] = (ColumnSelection[Source1, A], tail.SelectionsRepr[Source1, T]) override type ResultTypeRepr = (A, tail.ResultTypeRepr) @@ -544,6 +547,14 @@ trait SelectModule { self: ExprModule with TableModule with UtilsModule with Gro override type Append[Source1, That <: SelectionSet[Source1]] = Cons[Source1, A, tail.Append[Source1, That]] + override type ColumnsOut[S] = (Expr[Features.Source[HeadIdentity, S], S, A], tail.ColumnsOut[S]) + + override def columns[S](name: TableName): ColumnsOut[S] = { + val column: Column.Aux[A, HeadIdentity] = head.toColumn + + (Expr.Source(name, column), tail.columns[S](name)) + } + override def ++[Source1 <: Source, That <: SelectionSet[Source1]](that: That): Append[Source1, That] = Cons[Source1, A, tail.Append[Source1, That]](head, tail ++ that) diff --git a/core/jvm/src/main/scala/zio/sql/selectutils.scala b/core/jvm/src/main/scala/zio/sql/selectutils.scala index 0096f9118..9787301e8 100644 --- a/core/jvm/src/main/scala/zio/sql/selectutils.scala +++ b/core/jvm/src/main/scala/zio/sql/selectutils.scala @@ -1,44 +1,15 @@ package zio.sql -/** - * Generated with https://github.com/kitlangton/boilerplate - * - val insertInto = - bp""" - def apply[${bp"F${num(1)}".rep(", ")}, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")}) = { - val selection = ${bp"expr${num(1)}".rep(" ++ ")} - type B = ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"} - - InsertBuilder[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, AllColumnIdentities, B, selection.ColsRepr]( - table, - selection - ) - } - """ - - val selectSyntax = - bp""" - def apply[${bp"F${num(1)}".rep(", ")}, Source, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")})(implicit - i: Features.IsPartiallyAggregated[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}]] - ): Selector[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, i.Unaggregated] = { - val selection = ${bp"expr${num(1)}".rep(" ++ ")} - Selector[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}, Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, i.Unaggregated](selection) - }""" - - val subselectSyntax = - bp""" - def apply[${bp"F${num(1)}".rep(", ")}, Source, ${bp"B${num(1)}".rep(", ")}](${bp"expr${num(1)}: Expr[F${num(1)}, Source, B${num(1)}]".rep(", ")}): SubselectBuilder[${bp"${lit("Features.Union[").rep("", -1)}"}F1, ${bp"F${num(2)}".rep("], ", -1)}], Source, ${bp"SelectionSet.Cons[Source, B${num(1)}".rep(", ")}, SelectionSet.Empty${bp"${lit("]").rep("")}"}, ParentTable] = { - val selection = ${bp"expr${num(1)}".rep(" ++ ")} - SubselectBuilder(selection) - }""" - */ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule with SelectModule => // format: off sealed case class InsertIntoBuilder[Source, AllColumnIdentities]( table: Table.Source.Aux_[Source, AllColumnIdentities] ) { + def apply[F, B <: SelectionSet[Source]](sources: Selection[F, Source, B]) = + InsertBuilder[F, Source, AllColumnIdentities, B, sources.ColsRepr](table, sources) + def apply[F1, B1](expr1: Expr[F1, Source, B1]) = { type B = SelectionSet.Cons[Source, B1, SelectionSet.Empty] @@ -48,11 +19,14 @@ trait SelectUtilsModule { self: TableModule with ExprModule with InsertModule wi } def apply[F1, F2, B1, B2](expr1: Expr[F1, Source, B1], expr2: Expr[F2, Source, B2]) = { + + // Selection[Features.Union[F1,F2], + // Source.SelectionSet.Cons[Source, B1 , SelectionSet.Cons[Source, B2 , SelectionSet.Empty]]] val selection = expr1 ++ expr2 - type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]] + //type B = SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]] - InsertBuilder[Features.Union[F1, F2], Source, AllColumnIdentities, B, selection.ColsRepr]( + InsertBuilder[Features.Union[F1, F2], Source, AllColumnIdentities, SelectionSet.Cons[Source, B1, SelectionSet.Cons[Source, B2, SelectionSet.Empty]], selection.ColsRepr]( table, selection ) diff --git a/core/jvm/src/main/scala/zio/sql/table.scala b/core/jvm/src/main/scala/zio/sql/table.scala index 2459ed2fc..60c6762d9 100644 --- a/core/jvm/src/main/scala/zio/sql/table.scala +++ b/core/jvm/src/main/scala/zio/sql/table.scala @@ -1,131 +1,128 @@ package zio.sql -import zio.Chunk +import zio.schema._ +import zio.sql.macros.TableSchema +import scala.annotation.StaticAnnotation -import java.time._ -import java.util.UUID +object TableAnnotation { -trait TableModule { self: ExprModule with SelectModule with UtilsModule with SelectUtilsModule => - - sealed trait Singleton0[A] { - type SingletonIdentity - } - - sealed trait ColumnSet { - type ColumnsRepr[T] - type Append[That <: ColumnSet] <: ColumnSet - type AllColumnIdentities - - def ++[That <: ColumnSet](that: That): Append[That] + case class name(name: String) extends StaticAnnotation +} - def columnsUntyped: List[Column.Untyped] +trait TableModule { self: ExprModule with SelectModule with UtilsModule with SelectUtilsModule => - // TODO figure out how to make Column equality well defined - def contains[A](column: Column[A]): Boolean + // naming conventions -> OrderOrigin => order_origins -> this one + def defineTableSmart[Z](implicit schema: Schema.Record[Z], tableLike: TableSchema[Z]): Table.Source.WithColumnsOut[ + schema.Accessors[exprAccessorBuilder.Lens, exprAccessorBuilder.Prism, exprAccessorBuilder.Traversal], + Z, + schema.Accessors[ + allColumnIdentitiesBuilder.Lens, + allColumnIdentitiesBuilder.Prism, + allColumnIdentitiesBuilder.Traversal + ] + ] = { + val tableNameValid = raw"[A-Za-z_][A-Za-z0-9_]*".r + + val tableName = schema.annotations + .collectFirst { case TableAnnotation.name(name) => name } match { + case Some(name) if tableNameValid.pattern.matcher(name).matches() => name + case _ => { + // TODO properly pluralize recordSchema.id.name + schema.id.name + } + } - def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] + defineTable(tableName) } - object ColumnSet { - - type Empty = Empty.type - type :*:[A, B <: ColumnSet, HeadIdentity] = Cons[A, B, HeadIdentity] - type Singleton[A, ColumnIdentity] = Cons[A, Empty, ColumnIdentity] - - type ConsAux[A, B <: ColumnSet, ColumnsRepr0[_], HeadIdentity] = ColumnSet.Cons[A, B, HeadIdentity] { - type ColumnsRepr[C] = ColumnsRepr0[C] - } - - type Aux[ColumnsRepr0] = ColumnSet { - type ColumnsRepr = ColumnsRepr0 + def defineTable[Z](implicit schema: Schema.Record[Z], tableLike: TableSchema[Z]): Table.Source.WithColumnsOut[ + schema.Accessors[exprAccessorBuilder.Lens, exprAccessorBuilder.Prism, exprAccessorBuilder.Traversal], + Z, + schema.Accessors[ + allColumnIdentitiesBuilder.Lens, + allColumnIdentitiesBuilder.Prism, + allColumnIdentitiesBuilder.Traversal + ] + ] = defineTable(schema.id.name) + + def defineTable[Z]( + tableName: String + )(implicit schema: Schema.Record[Z], tableLike: TableSchema[Z]): Table.Source.WithColumnsOut[ + schema.Accessors[exprAccessorBuilder.Lens, exprAccessorBuilder.Prism, exprAccessorBuilder.Traversal], + Z, + schema.Accessors[ + allColumnIdentitiesBuilder.Lens, + allColumnIdentitiesBuilder.Prism, + allColumnIdentitiesBuilder.Traversal + ] + ] = + new Table.Source { + + override type AllColumnIdentities = + schema.Accessors[ + allColumnIdentitiesBuilder.Lens, + allColumnIdentitiesBuilder.Prism, + allColumnIdentitiesBuilder.Traversal + ] + + override type TableType = Z + + override type ColumnsOut = + schema.Accessors[exprAccessorBuilder.Lens, exprAccessorBuilder.Prism, exprAccessorBuilder.Traversal] + + // type Intersection[A, B] = A with B + // in zio schema makeAccessorsWith[Intersection]() + // def makeAccessorsWith[F[_, _]] + // TODO we need to do this becouse order of insert does not matter + override val columns: ColumnsOut = schema.makeAccessors(exprAccessorBuilder) + + override val name: TableName = convertToSnakeCase(tableName).toLowerCase() } - case object Empty extends ColumnSet { - override type ColumnsRepr[T] = Unit - override type Append[That <: ColumnSet] = That - - override type AllColumnIdentities = Any - - override def ++[That <: ColumnSet](that: That): Append[That] = that - - override def columnsUntyped: List[Column.Untyped] = Nil - - override def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] = () - - override def contains[A](column: Column[A]): Boolean = false + private def convertToSnakeCase(name: String): String = { + val temp = (name.head.toLower.toString + name.tail) + temp.indexWhere(_.isUpper) match { + case -1 => temp + case i => + val (prefix, suffix) = temp.splitAt(i) + prefix + "_" + convertToSnakeCase(suffix) } + } - sealed case class Cons[A, B <: ColumnSet, HeadIdentity](head: Column.Aux[A, HeadIdentity], tail: B) - extends ColumnSet { self => - - override type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, A], tail.ColumnsRepr[T]) - - override type Append[That <: ColumnSet] = Cons[A, tail.Append[That], HeadIdentity] - - override def ++[That <: ColumnSet](that: That): Append[That] = Cons(head, tail ++ that) + val allColumnIdentitiesBuilder = new AccessorBuilder { + override type Lens[F, S, A] = F - override type AllColumnIdentities = HeadIdentity with tail.AllColumnIdentities + override type Prism[F, S, A] = Unit - override def columnsUntyped: List[Column.Untyped] = head :: tail.columnsUntyped + override type Traversal[S, A] = Unit - def @@[HeadType]( - columnSetAspect: ColumnSetAspect.Aux[A, HeadType] - )(implicit - ev: B <:< ColumnSet.Empty, - typeTagA: TypeTag.NotNull[A] - ): ColumnSet.Cons[HeadType, B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, HeadType], self.tail.ColumnsRepr[T]) - type Append[That <: ColumnSet] = Cons[HeadType, self.tail.Append[That], HeadIdentity] - type AllColumnIdentities = HeadIdentity with self.tail.AllColumnIdentities - } = columnSetAspect.applyCons(self) + def makeLens[F, S, A](product: Schema.Record[S], term: Schema.Field[A]): Lens[F, S, A] = + convertToSnakeCase(term.label).asInstanceOf[F] - def table(name0: TableName): Table.Aux_[ColumnsRepr, A, B, AllColumnIdentities, HeadIdentity] = - new Table.Source { - override type ColumnHead = A - override type ColumnTail = B + def makePrism[F, S, A](sum: Schema.Enum[S], term: Schema.Case[A, S]): Prism[F, S, A] = () - override type HeadIdentity0 = HeadIdentity + def makeTraversal[S, A](collection: Schema.Collection[S, A], element: Schema[A]): Traversal[S, A] = () + } - override type AllColumnIdentities = HeadIdentity with tail.AllColumnIdentities + val exprAccessorBuilder = new AccessorBuilder { + override type Lens[F, S, A] = Expr[Features.Source[F, S], S, A] - override val name: TableName = name0 + override type Prism[F, S, A] = Unit - override val columnSet: ColumnSet.ConsAux[ColumnHead, ColumnTail, ColumnsRepr, HeadIdentity] = self + override type Traversal[S, A] = Unit - override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr.Source[TableType, A, column.Identity, TableType] = - Expr.Source(name0, column) - } - } + def makeLens[F, S, A](product: Schema.Record[S], term: Schema.Field[A]): Lens[F, S, A] = { + implicit val typeTag = deriveTypeTag(term.schema).get - def makeColumns[T](columnToExpr: ColumnToExpr[T]): ColumnsRepr[T] = - (columnToExpr.toExpr(head), tail.makeColumns(columnToExpr)) + val column: Column.Aux[A, F] = Column.Named[A, F](convertToSnakeCase(term.label)) - override def contains[A](column: Column[A]): Boolean = - head == column || tail.contains(column) + // TODO what if user defined its own name ??? + Expr.Source(convertToSnakeCase(product.id.name).toLowerCase(), column) } - def byteArray(name: String): Singleton[Chunk[Byte], name.type] = singleton[Chunk[Byte], name.type](name) - def bigDecimal(name: String): Singleton[BigDecimal, name.type] = singleton[BigDecimal, name.type](name) - def boolean(name: String): Singleton[Boolean, name.type] = singleton[Boolean, name.type](name) - def char(name: String): Singleton[Char, name.type] = singleton[Char, name.type](name) - def double(name: String): Singleton[Double, name.type] = singleton[Double, name.type](name) - def float(name: String): Singleton[Float, name.type] = singleton[Float, name.type](name) - def instant(name: String): Singleton[Instant, name.type] = singleton[Instant, name.type](name) - def int(name: String): Singleton[Int, name.type] = singleton[Int, name.type](name) - def localDate(name: String): Singleton[LocalDate, name.type] = singleton[LocalDate, name.type](name) - def localDateTime(name: String): Singleton[LocalDateTime, name.type] = singleton[LocalDateTime, name.type](name) - def localTime(name: String): Singleton[LocalTime, name.type] = singleton[LocalTime, name.type](name) - def long(name: String): Singleton[Long, name.type] = singleton[Long, name.type](name) - def offsetDateTime(name: String): Singleton[OffsetDateTime, name.type] = singleton[OffsetDateTime, name.type](name) - def offsetTime(name: String): Singleton[OffsetTime, name.type] = singleton[OffsetTime, name.type](name) - def short(name: String): Singleton[Short, name.type] = singleton[Short, name.type](name) - def string(name: String): Singleton[String, name.type] = singleton[String, name.type](name) - def uuid(name: String): Singleton[UUID, name.type] = singleton[UUID, name.type](name) - def zonedDateTime(name: String): Singleton[ZonedDateTime, name.type] = singleton[ZonedDateTime, name.type](name) - - def singleton[A: TypeTag, ColumnIdentity](name: String): Singleton[A, ColumnIdentity] = - Cons(Column.Named[A, ColumnIdentity](name), Empty) + def makePrism[F, S, A](sum: Schema.Enum[S], term: Schema.Case[A, S]): Prism[F, S, A] = () + + def makeTraversal[S, A](collection: Schema.Collection[S, A], element: Schema[A]): Traversal[S, A] = () } sealed trait Column[+A] { @@ -178,20 +175,9 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule with Sel case object FullOuter extends JoinType } - trait ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity, TableType], TableType, A] - } - sealed trait Table { self => type TableType - type Cols = ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] - - type HeadIdentity0 - - type ColumnHead - type ColumnTail <: ColumnSet - final def fullOuter[That](that: Table.Aux[That]): Table.JoinBuilder[self.TableType, That] = new Table.JoinBuilder[self.TableType, That](JoinType.FullOuter, self, that) @@ -205,13 +191,6 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule with Sel new Table.JoinBuilder[self.TableType, That](JoinType.RightOuter, self, that) final val subselect: SubselectPartiallyApplied[TableType] = new SubselectPartiallyApplied[TableType] - - def columns(implicit i: TrailingUnitNormalizer[columnSet.ColumnsRepr[TableType]]): i.Out = - i.apply(columnSet.makeColumns[TableType](columnToExpr)) - - val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] - - val columnToExpr: ColumnToExpr[TableType] } object Table { @@ -226,13 +205,9 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule with Sel type Aux[A] = Table { type TableType = A } - type Aux_[ColumnsRepr[_], A, B <: ColumnSet, AllColumnIdentities0, HeadIdentity] = Table.Source { - type ColumnHead = A - type ColumnTail = B - type AllColumnIdentities = AllColumnIdentities0 - - type HeadIdentity0 = HeadIdentity - val columnSet: ColumnSet.ConsAux[A, B, ColumnsRepr, HeadIdentity] + type WithColumnsOut[A, ColumnsOut0] = Table { + type TabelType = A + type ColumnsOut = ColumnsOut0 } trait Insanity { @@ -240,11 +215,14 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule with Sel } sealed trait Source extends Table with Insanity { - type AllColumnIdentities val name: TableName + type ColumnsOut + + val columns: ColumnsOut + override def ahhhhhhhhhhhhh[A]: A = ??? // don't remove or it'll break } @@ -257,6 +235,14 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule with Sel type TableType = A type AllColumnIdentities = AllColumnIdentities0 } + + type WithColumnsOut[ColumnsOut0, A, AllColumnIdentities0] = Table.Source { + type TableType = A + + type ColumnsOut = ColumnsOut0 + + type AllColumnIdentities = AllColumnIdentities0 + } } sealed case class Joined[FF, A, B]( @@ -267,113 +253,88 @@ trait TableModule { self: ExprModule with SelectModule with UtilsModule with Sel ) extends Table { override type TableType = left.TableType with right.TableType - - override type HeadIdentity0 = left.HeadIdentity0 - - override type ColumnHead = left.ColumnHead - override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] - - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = - left.columnSet ++ right.columnSet - - override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = - if (left.columnSet.contains(column)) - left.columnToExpr.toExpr(column).asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - else - right.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - } } - sealed case class DerivedTable[+Out, +R <: Read[Out]](read: R, name: TableName) extends Table { self => - - override type ColumnHead = read.ColumnHead - override type ColumnTail = read.ColumnTail + sealed case class DerivedTable[CO, +Out, +R <: Read.WithReprs[Out, CO], Source](read: R, name: TableName) extends Table { + self => + type ColumnsOut = CO - override type HeadIdentity0 = read.HeadIdentity + override type TableType = Source - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = read.columnSet - - override val columnToExpr: ColumnToExpr[TableType] = new ColumnToExpr[TableType] { - def toExpr[A](column: Column[A]): Expr[Features.Source[column.Identity, TableType], TableType, A] = - Expr.Source(name, column) - } + def columns(implicit normalizer: TrailingUnitNormalizer[CO]): normalizer.Out = + normalizer.apply(read.columns(name)) } sealed case class DialectSpecificTable[A](tableExtension: TableExtension[A]) extends Table { override type TableType = A - - override type ColumnHead = tableExtension.ColumnHead - override type ColumnTail = tableExtension.ColumnTail - - override type HeadIdentity0 = tableExtension.HeadIdentity0 - - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = tableExtension.columnSet - - override val columnToExpr: ColumnToExpr[TableType] = tableExtension.columnToExpr } - trait TableEx[A] { - - type ColumnHead - type ColumnTail <: ColumnSet - type HeadIdentity0 - - def columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] - - def columnToExpr: ColumnToExpr[A] - } + trait TableEx[A] } type TableExtension[A] <: Table.TableEx[A] - trait ColumnSetAspect[A] { self => - - type HeadType - - def applyCons[B <: ColumnSet, HeadIdentity]( - columnSet: ColumnSet.Cons[A, B, HeadIdentity] - ): ColumnSet.Cons[HeadType, B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, HeadType], columnSet.tail.ColumnsRepr[T]) - type Append[That <: ColumnSet] = ColumnSet.Cons[HeadType, columnSet.tail.Append[That], HeadIdentity] - type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities + def deriveTypeTag[A](standardType: StandardType[A]): Option[TypeTag.NotNull[A]] = + standardType match { + case StandardType.BigDecimalType => Some(TypeTag.TBigDecimal) + case StandardType.BoolType => Some(TypeTag.TBoolean) + case StandardType.ByteType => Some(TypeTag.TByte) + case StandardType.BinaryType => Some(TypeTag.TByteArray) + case StandardType.CharType => Some(TypeTag.TChar) + case StandardType.DoubleType => Some(TypeTag.TDouble) + case StandardType.FloatType => Some(TypeTag.TFloat) + case StandardType.InstantType(_) => Some(TypeTag.TInstant) + case StandardType.IntType => Some(TypeTag.TInt) + case StandardType.BigIntegerType => None + case StandardType.LocalDateType(_) => Some(TypeTag.TLocalDate) + case StandardType.LocalDateTimeType(_) => Some(TypeTag.TLocalDateTime) + case StandardType.OffsetTimeType(_) => Some(TypeTag.TOffsetTime) + case StandardType.LocalTimeType(_) => Some(TypeTag.TLocalTime) + case StandardType.LongType => Some(TypeTag.TLong) + case StandardType.OffsetDateTimeType(_) => Some(TypeTag.TOffsetDateTime) + case StandardType.ShortType => Some(TypeTag.TShort) + case StandardType.StringType => Some(TypeTag.TString) + case StandardType.UUIDType => Some(TypeTag.TUUID) + case StandardType.ZonedDateTimeType(_) => Some(TypeTag.TZonedDateTime) + // TODO do we need to support any other types in SQL ? + case StandardType.ZoneOffsetType => None + case StandardType.DurationType => None + case StandardType.YearType => None + case StandardType.MonthType => None + case StandardType.MonthDayType => None + case StandardType.ZoneIdType => None + case StandardType.PeriodType => None + case StandardType.YearMonthType => None + case StandardType.DayOfWeekType => None + case StandardType.UnitType => None } - } - object ColumnSetAspect { + def deriveTypeTag[A](opSchema: Schema.Optional[A]): Option[TypeTag[Option[A]]] = + opSchema.codec match { + case Schema.Primitive(standardType, _) => + implicit val notNullTypeTag = deriveTypeTag(standardType).get - type Aux[A, HeadType0] = ColumnSetAspect[A] { - type HeadType = HeadType0 + Some(TypeTag.option[A]) + case _ => None } - def nullable[A: TypeTag.NotNull]: ColumnSetAspect.Aux[A, Option[A]] = new ColumnSetAspect[A] { - - override type HeadType = Option[A] - - def applyCons[B <: ColumnSet, HeadIdentity]( - columnSet: ColumnSet.Cons[A, B, HeadIdentity] - ): ColumnSet.Cons[Option[A], B, HeadIdentity] { - type ColumnsRepr[T] = (Expr[Features.Source[HeadIdentity, T], T, Option[A]], columnSet.tail.ColumnsRepr[T]) - type Append[That <: ColumnSet] = ColumnSet.Cons[Option[A], columnSet.tail.Append[That], HeadIdentity] - type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities - } = { - val head = columnSet.head.nullable - - ColumnSet - .Cons(head, columnSet.tail) - .asInstanceOf[ - ColumnSet.Cons[Option[A], B, HeadIdentity] { - type ColumnsRepr[T] = - (Expr[Features.Source[HeadIdentity, T], T, Option[A]], columnSet.tail.ColumnsRepr[T]) - type Append[That <: ColumnSet] = ColumnSet.Cons[Option[A], columnSet.tail.Append[That], HeadIdentity] - type AllColumnIdentities = HeadIdentity with columnSet.tail.AllColumnIdentities - } - ] + // make zio schema TypeTag of A available out of Schmea[A] + def deriveTypeTag[A](fieldSchema: Schema[A]): Option[TypeTag[A]] = + fieldSchema match { + case s: Schema.Optional[_] => deriveTypeTag(s) + case s: Schema.Lazy[A] => deriveTypeTag(s.schema) + case Schema.Primitive(standardType, _) => deriveTypeTag(standardType) + case _: Schema.Transform[_, _, _] => { + + // if (fieldSchema.isInstanceOf[Schema[BigDecimal]]) { + // Some(TypeTag.TScalaBigDecimal.asInstanceOf[TypeTag[A]]) + // } + // else None + // TODO fix + Some(TypeTag.TScalaBigDecimal.asInstanceOf[TypeTag[A]]) } + case _ => None } - } -} + +} \ No newline at end of file diff --git a/core/jvm/src/main/scala/zio/sql/typetag.scala b/core/jvm/src/main/scala/zio/sql/typetag.scala index 5615f89bd..b67f8bf02 100644 --- a/core/jvm/src/main/scala/zio/sql/typetag.scala +++ b/core/jvm/src/main/scala/zio/sql/typetag.scala @@ -20,7 +20,8 @@ trait TypeTagModule { self: SelectModule => object TypeTag { sealed trait NotNull[+A] extends TypeTag[A] - implicit case object TBigDecimal extends NotNull[BigDecimal] + implicit case object TBigDecimal extends NotNull[java.math.BigDecimal] + implicit case object TScalaBigDecimal extends NotNull[BigDecimal] implicit case object TBoolean extends NotNull[Boolean] implicit case object TByte extends NotNull[Byte] implicit case object TByteArray extends NotNull[Chunk[Byte]] @@ -39,7 +40,9 @@ trait TypeTagModule { self: SelectModule => implicit case object TString extends NotNull[String] implicit case object TUUID extends NotNull[UUID] implicit case object TZonedDateTime extends NotNull[ZonedDateTime] - sealed case class TDialectSpecific[+A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] + + //TODO how to handle dialect specific in tablelike macro ? + sealed case class TDialectSpecific[+A](typeTagExtension: TypeTagExtension[A]) extends NotNull[A] sealed case class Nullable[A: NotNull]() extends TypeTag[Option[A]] { def typeTag: TypeTag[A] = implicitly[TypeTag[A]] } @@ -79,6 +82,6 @@ trait TypeTagModule { self: SelectModule => implicit case object TLongIsNumeric extends AbstractIsNumeric[Long] implicit case object TFloatIsNumeric extends AbstractIsNumeric[Float] implicit case object TDoubleIsNumeric extends AbstractIsNumeric[Double] - implicit case object TBigDecimalIsNumeric extends AbstractIsNumeric[BigDecimal] + implicit case object TBigDecimalIsNumeric extends AbstractIsNumeric[java.math.BigDecimal] } } diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 8e9cad428..cd38e5c2e 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -1,6 +1,10 @@ package zio.sql import zio.schema.Schema +import java.time.LocalDate +import zio.schema.DeriveSchema +import zio.schema.StandardType +import java.time.format.DateTimeFormatter object ProductSchema { val sql = new Sql { self => @@ -10,17 +14,16 @@ object ProductSchema { override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? } - import sql.ColumnSet._ + import sql._ - val productTable = ( - string("id") ++ - localDate("last_updated") ++ - string("name") ++ - int("base_amount") ++ - int("final_amount") ++ - boolean("deleted") - ).table("product") + case class Product(id: String, last_updated: LocalDate, name: String, base_amount: Int, final_amount: Int, deleted: Boolean) + + implicit val localDateSchema = Schema.primitive[LocalDate](StandardType.LocalDateType(DateTimeFormatter.ISO_LOCAL_DATE)) + + implicit val productsSchema = DeriveSchema.gen[Product] + + val productTable = defineTable[Product] val (id, lastUpdated, name, baseAmount, finalAmount, deleted) = productTable.columns diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 117d72062..8be823d0e 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -2,20 +2,26 @@ package zio.sql import zio.test._ import zio.test.Assertion._ -import zio.schema.Schema +import zio.schema._ import zio.test.ZIOSpecDefault +import zio.schema.DeriveSchema +import java.time.LocalDate +import java.time.format.DateTimeFormatter object TestBasicSelect { val userSql = new Sql { self => - import self.ColumnSet._ override def renderDelete(delete: self.Delete[_]): String = ??? override def renderRead(read: self.Read[_]): String = ??? override def renderUpdate(update: self.Update[_]): String = ??? override def renderInsert[A: Schema](insert: self.Insert[_, A]): String = ??? - val userTable = - (string("user_id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") + case class Users(user_id: String, dob: LocalDate, first_name: String, last_name: String) + + implicit val localDateSchema = Schema.primitive[LocalDate](StandardType.LocalDateType(DateTimeFormatter.ISO_LOCAL_DATE)) + implicit val userSchema = DeriveSchema.gen[Users] + + val userTable = defineTable[Users] val (userId, dob, fName, lName) = userTable.columns diff --git a/examples/src/main/scala/Example1.scala b/examples/src/main/scala/Example1.scala index 3ca70d4b6..d31d76d3e 100644 --- a/examples/src/main/scala/Example1.scala +++ b/examples/src/main/scala/Example1.scala @@ -1,8 +1,9 @@ import zio.sql.Sql import zio.schema.Schema +import zio.schema.DeriveSchema +import zio.sql.macros.TableSchema object Example1 extends Sql { - import ColumnSet._ def renderRead(read: this.Read[_]): String = ??? @@ -12,22 +13,64 @@ object Example1 extends Sql { def renderUpdate(update: Example1.Update[_]): String = ??? - val columnSet = int("age") ++ string("name") +// case class Address() - val table = columnSet.table("person") + case class Person(name: String, age: Int) - val table2 = columnSet.table("person2") + implicit val personSchema = DeriveSchema.gen[Person] - val (age, name) = table.columns + def exampleTableLike[T](implicit i: TableSchema[T]): Unit = () - val (age2, name2) = table2.columns + sealed trait DayOfWeek + object DayOfWeek { + case object Monday extends DayOfWeek + case object Tuesday extends DayOfWeek + } + + implicit val dayOfWeekSchema: Schema.Record[DayOfWeek] = ??? + + val personTable = defineTable[Person] + val personTable2 = defineTable[Person] + + //val personTable4 = defineTable[DayOfWeek] + + val (name, age) = personTable.columns + val (name2, age2) = personTable2.columns + + // InsertBuilder[ + // Features.Union[ + // Features.Source[personSchema.field1.label.type,Person], + // Features.Source[personSchema.field2.label.type,Person]], + // Person, + // (personSchema.field1.label.type, personSchema.field2.label.type), + // SelectionSet.Cons[Person,String, + // SelectionSet.Cons[Person,Int,SelectionSet.Empty]], + // (String, (Int, Unit))] + val xe = insertInto(personTable)(name, age) + val xeee = insertInto(personTable)(name, age).values(("Jaro", 31)) + //val xeeee = insertInto(personTable)(age, name).values(("Jaro", 31)) + + final case class OpPerson(id: java.util.UUID, name: Option[String]) + + final case class BigDecWrapper(s: BigDecimal, j: java.math.BigDecimal) + implicit val bigDecWrapper = DeriveSchema.gen[BigDecWrapper] + + val bigDecTable = defineTable[BigDecWrapper] + val (jbd, sbd) = bigDecTable.columns + + implicit val opPersonSchema = DeriveSchema.gen[OpPerson] + + val opPersonTable = defineTable[OpPerson] + + val (id, nameOp) = opPersonTable.columns + import FunctionDef._ import AggregationDef._ val queried = select(((age + 2) as "age"), (name as "name"), (Abs(3.0) as "dummy")) - .from(table) + .from(personTable) .limit(200) .offset(1000) .orderBy(age.descending) @@ -36,22 +79,19 @@ object Example1 extends Sql { val joined = select((age as "age"), (age2 as "age2")) - .from(table.join(table2).on(name === name2)) + .from(personTable.join(personTable2).on(name === name2)) val aggregated = select((age as "age"), (Count(1) as "count")) - .from(table) + .from(personTable) .groupBy(age) - val deleted = deleteFrom(table).where(age === 3) + val deleted = deleteFrom(personTable).where(age === 3) val updated = - update(table) + update(personTable) .set(age, age + 2) .set(name, "foo") .where(age > 100) - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val (orderId, fkCustomerId, orderDate) = orders.columns } diff --git a/examples/src/main/scala/ShopSchema.scala b/examples/src/main/scala/ShopSchema.scala deleted file mode 100644 index db25702fa..000000000 --- a/examples/src/main/scala/ShopSchema.scala +++ /dev/null @@ -1,38 +0,0 @@ -package zio.sql - -trait ShopSchema extends Jdbc { self => - import self.ColumnSet._ - - object Users { - val users = (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name")).table("users") - - val (userId, dob, fName, lName) = users.columns - } - object Orders { - val orders = (uuid("id") ++ uuid("usr_id") ++ localDate("order_date")).table("orders") - - val (orderId, fkUserId, orderDate) = orders.columns - } - object Products { - val products = - (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - - val (productId, name, description, imageURL) = products.columns - } - object ProductPrices { - val productPrices = - (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - - val (fkProductId, effective, price) = productPrices.columns - } - - object OrderDetails { - val orderDetails = - (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) - .table( - "order_details" - ) // todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. - - val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns - } -} diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 6eacc7a7c..0ae647b58 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -1,25 +1,26 @@ package zio.sql import zio.sql.sqlserver.SqlServerModule +import zio.schema._ +import java.time._ +import java.util.UUID -object Examples extends App with ShopSchema with SqlServerModule { +object Examples extends App with SqlServerModule { import this.AggregationDef._ import this.FunctionDef._ - import this.OrderDetails._ - import this.Orders._ - import this.Users._ + import Orders._ + import Users._ + import OrderDetails._ - // select first_name, last_name from users val basicSelect = select(fName, lName).from(users) + println(renderRead(basicSelect)) - // select first_name as first, last_name as last from users val basicSelectWithAliases = select((fName as "first"), (lName as "last")).from(users) println(renderRead(basicSelectWithAliases)) - // select top 2 first_name, last_name from users order by last_name, first_name desc val selectWithRefinements = select(fName, lName) .from(users) @@ -27,39 +28,21 @@ object Examples extends App with ShopSchema with SqlServerModule { .limit(2) println(renderRead(selectWithRefinements)) - case class Person(fname: String, lname: String) - - // execute(selectWithRefinements).to(Person) - // execute(selectWithRefinements).to((_, _)) - - // delete from users where first_name = 'Terrence' val basicDelete = deleteFrom(users).where(fName === "Terrence") println(renderDelete(basicDelete)) - /* - val deleteFromWithSubquery = deleteFrom(orders).where(fkUserId in { - select(userId as "id") from users where (fName === "Fred") //todo fix issue #36 - }) */ - - // select first_name, last_name, order_date from users left join orders on users.usr_id = orders.usr_id val basicJoin = select(fName, lName, orderDate).from(users.leftOuter(orders).on(fkUserId === userId)) println(renderRead(basicJoin)) - /* - select users.usr_id, first_name, last_name, sum(quantity * unit_price) as "total_spend" - from users - left join orders on users.usr_id = orders.usr_id - left join order_details on orders.order_id = order_details.order_id - group by users.usr_id, first_name, last_name */ val orderValues = select( userId, - fName, - lName, - (Sum(quantity * unitPrice) as "total_spend"), - Sum(Abs(quantity)) + fName, + lName, + (Sum(quantity * unitPrice) as "total_spend"), + Sum(Abs(quantity)) ) .from( users @@ -73,9 +56,116 @@ object Examples extends App with ShopSchema with SqlServerModule { import scala.language.postfixOps - /* - * select users.first_name, users.last_name from users where true and users.first_name is not null - */ val withPropertyOp = select(fName, lName).from(users).where(fName isNotNull) println(renderRead(withPropertyOp)) + + val exx = orderId ++ fkUserId + + val query = select(fkUserId, Count(orderId)) + .from(orders) + .groupBy(fkUserId, orderDate) + + val e = select(Count(orderId), Count(orderId)) + .from(orders) + + // val ee: Selection[Features.Source["customer_id",orders.TableType] with Features.Aggregated[Features.Source["id",orders.TableType]], + // orders.TableType,SelectionSet.Cons[orders.TableType,java.util.UUID,SelectionSet.Cons[orders.TableType,Long,SelectionSet.Empty]]] = ??? + + // val ee1: Selection[Features.Source["customer_id",orders.TableType] with Features.Source["composite",orders.TableType] with Features.Aggregated[Features.Source["id",orders.TableType]], + // orders.TableType,SelectionSet.Cons[orders.TableType,java.util.UUID,SelectionSet.Cons[orders.TableType,Long,SelectionSet.Empty]]] = ??? + + // val eee: Selection[Features.Aggregated[Features.Source["id",orders.TableType]] with Features.Source["customer_id",orders.TableType], + // orders.TableType,SelectionSet.Cons[orders.TableType,java.util.UUID,SelectionSet.Cons[orders.TableType,Long,SelectionSet.Empty]]] = ??? + + // val eee2: Selection[Features.Source["customer_id",orders.TableType] with Features.Aggregated[Features.Source["id",orders.TableType]] with Features.Source["composite",orders.TableType], + // orders.TableType,SelectionSet.Cons[orders.TableType,java.util.UUID,SelectionSet.Cons[orders.TableType,Long,SelectionSet.Empty]]] = ??? + + // val eee3: Selection[Features.Aggregated[Features.Source["id",orders.TableType]] with Features.Source["composite",orders.TableType] with Features.Source["customer_id",orders.TableType] , + // orders.TableType,SelectionSet.Cons[orders.TableType,java.util.UUID,SelectionSet.Cons[orders.TableType,Long,SelectionSet.Empty]]] = ??? + + // val q = select(fkUserId, Count(orderId)) + + // Features.Source["customer_id",orders.TableType] with Features.Aggregated[Features.Source["id",orders.TableType]] + def test[F, A, B <: SelectionSet[A]](selection: Selection[F, A, B])(implicit + i: IsPartiallyAggregated2[F] + ): i.Unaggregated = ??? + + // val y = test(ee) + + /** + * Diverging implicit expansion, + * + * would it be possible to write a macro that would remove some specific type from intersection type? + * (A with B with C) - C = A with B + */ + sealed trait IsPartiallyAggregated2[A] { + type Unaggregated + } + + object IsPartiallyAggregated2 extends IsPartiallyAggregated2Lower { + + type WithRemainder[F, R] = IsPartiallyAggregated2[F] { + type Unaggregated = R + } + + implicit def AggregatedIsAggregated[A]: IsPartiallyAggregated2.WithRemainder[Features.Aggregated[A], Any] = + new IsPartiallyAggregated2[Features.Aggregated[A]] { + override type Unaggregated = Any + } + + implicit def LeftWithAggregated[ColumnName, TableType, A, Left, Right](implicit + left: IsPartiallyAggregated2[Left], + right: IsPartiallyAggregated2[Right] + ): IsPartiallyAggregated2.WithRemainder[ + Left with Right, + left.Unaggregated with right.Unaggregated + ] = + new IsPartiallyAggregated2[Left with Right] { + override type Unaggregated = left.Unaggregated with right.Unaggregated + } + + } + trait IsPartiallyAggregated2Lower { + + implicit def SourceIsAggregated[ColumnName, TableType]: IsPartiallyAggregated2.WithRemainder[ + Features.Source[ColumnName, TableType], + Features.Source[ColumnName, TableType] + ] = + new IsPartiallyAggregated2[Features.Source[ColumnName, TableType]] { + override type Unaggregated = Features.Source[ColumnName, TableType] + } + } + + object Users { + + case class Users(id: UUID, dob: LocalDate, firstName: String, lastName: String) + + implicit val userSchema = DeriveSchema.gen[Users] + + val users = defineTable[Users] + + val (userId, dob, fName, lName) = users.columns + } + + object Orders { + + case class Orders(id: java.util.UUID, userId: java.util.UUID, orderDate: LocalDate) + + implicit val orderSchema = DeriveSchema.gen[Orders] + + val orders = defineTable[Orders] + + val (orderId, fkUserId, orderDate) = orders.columns + } + + object OrderDetails { + case class OrderDetail(orderId: Int, productId: Int, quantity: Double, unitPrice: Double) + + implicit val orderDetailSchema = DeriveSchema.gen[OrderDetail] + + val orderDetails = defineTable[OrderDetail] + + val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns + } + } diff --git a/examples/src/main/scala/zio/sql/GroupByExamples.scala b/examples/src/main/scala/zio/sql/GroupByExamples.scala index 18496a80b..eda6e2b91 100644 --- a/examples/src/main/scala/zio/sql/GroupByExamples.scala +++ b/examples/src/main/scala/zio/sql/GroupByExamples.scala @@ -1,17 +1,16 @@ package zio.sql import zio.sql.sqlserver.SqlServerModule +import zio.schema.DeriveSchema -object GroupByExamples extends App with ShopSchema with SqlServerModule { +object GroupByExamples extends App with SqlServerModule { import AggregationDef._ - import ColumnSet._ - - val productTable = ( - string("id") ++ - string("name") ++ - int("amount") ++ - double("price") - ).table("product") + + case class Product(id: Int, name: String, amount: Int, price: Double) + + implicit val productSchema = DeriveSchema.gen[Product] + + val productTable = defineTable[Product] val (id, name, amount, price) = productTable.columns diff --git a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala index 1dfd56c41..e26d82cd3 100644 --- a/jdbc/src/main/scala/zio/sql/ConnectionPool.scala +++ b/jdbc/src/main/scala/zio/sql/ConnectionPool.scala @@ -139,7 +139,7 @@ final case class ConnectionPoolLive( }.commit.flatMap { interrupted => ZIO.when(interrupted)(release(connection)) } - case None => UIO.unit + case None => ZIO.unit } } diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index 731abe593..c683211b0 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -53,6 +53,14 @@ trait JdbcInternalModule { self: Jdbc => else { Right(BigDecimal.javaBigDecimal2bigDecimal(result).asInstanceOf[A]) } + // TODO unify both + case TScalaBigDecimal => + val result = resultSet.getBigDecimal(columnIndex) + if (result == null) + Right(null.asInstanceOf[A]) + else { + Right(BigDecimal.javaBigDecimal2bigDecimal(result).asInstanceOf[A]) + } case TBoolean => tryDecode[Boolean](Option(resultSet.getBoolean(columnIndex))) case TByte => tryDecode[Byte](Option(resultSet.getByte(columnIndex))) case TByteArray => diff --git a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala index 1f36acb83..1b47c5af7 100644 --- a/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala +++ b/jdbc/src/main/scala/zio/sql/SqlDriverLiveModule.scala @@ -49,7 +49,7 @@ trait SqlDriverLiveModule { self: Jdbc => .flatMap(readOn(read, _)) override def readOn[A](read: Read[A], conn: Connection): Stream[Exception, A] = - Stream.unwrap { + ZStream.unwrap { ZIO.attemptBlocking { val schema = getColumns(read).zipWithIndex.map { case (value, index) => (value, index + 1) diff --git a/jdbc/src/main/scala/zio/sql/TransactionModule.scala b/jdbc/src/main/scala/zio/sql/TransactionModule.scala index 3aa3fdbeb..5d6c4c925 100644 --- a/jdbc/src/main/scala/zio/sql/TransactionModule.scala +++ b/jdbc/src/main/scala/zio/sql/TransactionModule.scala @@ -9,11 +9,11 @@ import zio.schema.Schema trait TransactionModule { self: Jdbc => private[sql] sealed case class Txn(connection: Connection, sqlDriverCore: SqlDriverCore) - sealed case class ZTransaction[-R: ZTag: IsNotIntersection, +E, +A](unwrap: ZIO[(R, Txn), E, A]) { self => + sealed case class ZTransaction[-R: ZTag, +E, +A](unwrap: ZIO[(R, Txn), E, A]) { self => def map[B](f: A => B): ZTransaction[R, E, B] = ZTransaction(self.unwrap.map(f)) - def flatMap[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B]( + def flatMap[R1 <: R: ZTag, E1 >: E, B]( f: A => ZTransaction[R1, E1, B] ): ZTransaction[R1, E1, B] = ZTransaction(self.unwrap.flatMap(a => f(a).unwrap)) @@ -25,7 +25,7 @@ trait TransactionModule { self: Jdbc => r <- ZIO.environment[R] a <- self.unwrap .mapError(ev) - .provideService((r.get, txn)) + .provideEnvironment(ZEnvironment((r.get, txn))) .absorb .tapBoth( _ => @@ -39,10 +39,10 @@ trait TransactionModule { self: Jdbc => ) } yield a - def zip[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = + def zip[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, (A, B)] = zipWith[R1, E1, B, (A, B)](tx)((_, _)) - def zipWith[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B, C]( + def zipWith[R1 <: R: ZTag, E1 >: E, B, C]( tx: ZTransaction[R1, E1, B] )(f: (A, B) => C): ZTransaction[R1, E1, C] = for { @@ -50,21 +50,21 @@ trait TransactionModule { self: Jdbc => b <- tx } yield f(a, b) - def *>[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def *>[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self.flatMap(_ => tx) // named alias for *> - def zipRight[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = + def zipRight[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, B] = self *> tx - def <*[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + def <*[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self.flatMap(a => tx.map(_ => a)) // named alias for <* - def zipLeft[R1 <: R: ZTag: IsNotIntersection, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = + def zipLeft[R1 <: R: ZTag, E1 >: E, B](tx: ZTransaction[R1, E1, B]): ZTransaction[R1, E1, A] = self <* tx - def catchAllCause[R1 <: R: ZTag: IsNotIntersection, E1 >: E, A1 >: A]( + def catchAllCause[R1 <: R: ZTag, E1 >: E, A1 >: A]( f: Cause[E1] => ZTransaction[R1, E1, A1] ): ZTransaction[R1, E1, A1] = ZTransaction(self.unwrap.catchAllCause(cause => f(cause).unwrap)) @@ -79,7 +79,7 @@ trait TransactionModule { self: Jdbc => val stream = coreDriver.readOn[A](read, connection) - ZTransaction.fromEffect(stream.runCollect.map(Stream.fromIterable(_))) + ZTransaction.fromEffect(stream.runCollect.map(ZStream.fromIterable(_))) } def apply(update: self.Update[_]): ZTransaction[Any, Exception, Int] = @@ -103,10 +103,10 @@ trait TransactionModule { self: Jdbc => def halt[E](e: => Cause[E]): ZTransaction[Any, E, Nothing] = fromEffect(ZIO.failCause(e)) - def fromEffect[R: ZTag: IsNotIntersection, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = + def fromEffect[R: ZTag, E, A](zio: ZIO[R, E, A]): ZTransaction[R, E, A] = ZTransaction(for { tuple <- ZIO.service[(R, Txn)] - a <- zio.provideService((tuple._1)) + a <- zio.provideEnvironment(ZEnvironment(tuple._1)) } yield a) private val txn: ZTransaction[Any, Nothing, Txn] = diff --git a/jdbc/src/main/scala/zio/sql/jdbc.scala b/jdbc/src/main/scala/zio/sql/jdbc.scala index c3b9b6cc9..e1a314506 100644 --- a/jdbc/src/main/scala/zio/sql/jdbc.scala +++ b/jdbc/src/main/scala/zio/sql/jdbc.scala @@ -21,7 +21,7 @@ trait Jdbc extends zio.sql.Sql with TransactionModule with JdbcInternalModule wi ZLayer(ZIO.serviceWith[ConnectionPool](new SqlDriverLive(_))) } - def execute[R <: SqlDriver: ZTag: IsNotIntersection, A]( + def execute[R <: SqlDriver: ZTag, A]( tx: ZTransaction[R, Exception, A] ): ZIO[R, Throwable, A] = ZIO.serviceWithZIO(_.transact(tx)) diff --git a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala index ac2944311..17cf17deb 100644 --- a/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala +++ b/jdbc/src/test/scala/zio/sql/ConnectionPoolSpec.scala @@ -30,10 +30,10 @@ object ConnectionPoolSpec extends ZIOSpecDefault { ) } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Exception] = specLayered.provideCustomShared((poolConfigLayer >>> ConnectionPool.live).orDie) - def specLayered: Spec[TestEnvironment with ConnectionPool, TestFailure[Object], TestSuccess] = + def specLayered: Spec[ConnectionPool with TestEnvironment, Exception] = suite("Postgres module")( test("Fibers waiting for connections can be interrupted") { // We need to actually sleep here to make sure that the started fibers diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index a40e4b8d4..328a040f3 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -3,7 +3,6 @@ package zio.sql import zio.test.TestEnvironment import zio.ZLayer import zio.test.ZIOSpecDefault -import zio.test.TestFailure trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { @@ -11,7 +10,7 @@ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] - final lazy val jdbcLayer: ZLayer[Any, TestFailure[Any], SqlDriver] = + final lazy val jdbcLayer: ZLayer[Any, Nothing, SqlDriver] = ZLayer.make[SqlDriver]( poolConfigLayer.orDie, ConnectionPool.live.orDie, diff --git a/macros/src/main/scala/zio/sql/macros/insertmacro.scala b/macros/src/main/scala/zio/sql/macros/insertmacro.scala new file mode 100644 index 000000000..d3488ca18 --- /dev/null +++ b/macros/src/main/scala/zio/sql/macros/insertmacro.scala @@ -0,0 +1,79 @@ +package zio.sql.macros + +import scala.reflect.macros.blackbox + +sealed trait InsertLike[F, Z, ColsRepr, AllColumnIdentities, Source] + + + +object InsertLike { + + final case class CanBeInserted[F, Z, ColsRepr, AllColumnIdentities, Source]() extends InsertLike[F, Z, ColsRepr, AllColumnIdentities, Source] + + implicit def createInsertLike[F, Z, ColsRepr, AllColumnIdentities, Source]: InsertLike[F, Z, ColsRepr, AllColumnIdentities, Source] = macro createInsertLikeImpl[F, Z, ColsRepr, AllColumnIdentities, Source] + + /** + * Steps: + 1. check if Z is either a case class or a Tuple + 2. Create nested tuple out of Z decls and compare with ColsRepr + 3. Create Features.Uniont[F, F] out of AllColumnIdentities tuple and compare with F + */ + + /** + + "persons.TableType" is just a Person + most of the validation is here + (String, (Int, Unit)) must be coming from Person, + all except for Optional fields + inserted values must of the same types and order as cols repr + + + + */ + def createInsertLikeImpl[ + F: c.WeakTypeTag, + Z: c.WeakTypeTag, + ColsRepr: c.WeakTypeTag, + AllColumnIdentities: c.WeakTypeTag, + Source: c.WeakTypeTag](c: blackbox.Context): c.Expr[InsertLike[F, Z, ColsRepr, AllColumnIdentities, Source]] = { + import c.universe._ + + val fTpe = weakTypeOf[F] + val zTpe = weakTypeOf[Z] + val colsReprTpe = weakTypeOf[ColsRepr] + val aciTpe = weakTypeOf[AllColumnIdentities] + val sourceTpe = weakTypeOf[Source] + + + c.Expr[InsertLike[F, Z, ColsRepr, AllColumnIdentities, Source]]( + q"new zio.sql.macros.InsertLike.CanBeInserted[${q"$fTpe"}, ${q"$zTpe"}, ${q"$colsReprTpe"}, ${q"$aciTpe"}, ${q"$sourceTpe"}]()" + ) + + } + + /** + insertInto(persons)(name, age).values(("Jaro", 31)) + */ + + /** + * Schema is only to get A1, A2 + * + * Person(name, age), A1 == String, A2 == Int + * ColsRepr == (String, (Int, Unit)) + * F == Features.Union[Features.Source["name"], Features.Source["age", Person]] + * Z == (A1, A2) + * AllColumnIdentities == ("name", "age") + * Source == "persons".TableType + * + + implicit def tuple2[F, A1, A2, ColsRepr, AllColumnIdentities, Source, Identity1, Identity2](implicit + ev1: Schema[(A1, A2)], + ev2: (A1, (A2, Unit)) <:< ColsRepr, + ev3: F <:< Features.Union[Features.Source[Identity1, Source], Features.Source[Identity2, Source]], + ev4: AllColumnIdentities =:= (Identity1, Identity2) + ): SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] = + new SchemaValidity[F, (A1, A2), ColsRepr, AllColumnIdentities, Source] {} + + */ + +} \ No newline at end of file diff --git a/macros/src/main/scala/zio/sql/macros/tablelike.scala b/macros/src/main/scala/zio/sql/macros/tablelike.scala new file mode 100644 index 000000000..b9bbaedfe --- /dev/null +++ b/macros/src/main/scala/zio/sql/macros/tablelike.scala @@ -0,0 +1,81 @@ +package zio.sql.macros + +import scala.reflect.macros.blackbox +import java.time._ +import java.util.UUID +import zio.Chunk + +sealed trait TableSchema[T] + +object TableSchema { + + final case class Compatible[T]() extends TableSchema[T] + + implicit def materializeTableSchema[T]: TableSchema[T] = macro materializeTableSchemaImpl[T] + + def materializeTableSchemaImpl[T: c.WeakTypeTag](c: blackbox.Context): c.Expr[TableSchema[T]] = { + import c.universe._ + + val tpe = weakTypeOf[T] + + val sqlPrimitives = + Seq( + typeOf[java.math.BigDecimal], + typeOf[BigDecimal], + typeOf[Boolean], + typeOf[Byte], + typeOf[Chunk[Byte]], + typeOf[Char], + typeOf[Double], + typeOf[Float], + typeOf[Instant], + typeOf[Int], + typeOf[LocalDate], + typeOf[LocalDateTime], + typeOf[OffsetTime], + typeOf[LocalTime], + typeOf[Long], + typeOf[OffsetDateTime], + typeOf[Short], + typeOf[String], + typeOf[UUID], + typeOf[ZonedDateTime] + ) + + def isSqlPrimitive(tpe: Type): Boolean = sqlPrimitives.contains(tpe) + + val membrs = tpe.decls.sorted.collect { + case p: TermSymbol if p.isCaseAccessor && !p.isMethod => p + }.map(_.typeSignature) + + def isSupportedOption(tpe: Type) : Boolean = { + tpe match { + case TypeRef(_, hkt, t) => (hkt == symbolOf[Option[_]]) && sqlPrimitives.contains(t.head) + case _ => false + } + } + + val uncompatible = + membrs + .filter(m => !isSqlPrimitive(m)) + .filter(t => !isSupportedOption(t)) + + if (!tpe.typeSymbol.asClass.isCaseClass) { + c.abort( + c.enclosingPosition, + s"You can only define table with case class" + ) + } else { + if (uncompatible.isEmpty) + c.Expr[TableSchema[T]](q"new zio.sql.macros.TableSchema.Compatible[${q"$tpe"}]()") + else { + c.abort( + c.enclosingPosition, + s"Unsupported types by SQL ${uncompatible.map(_.dealias.toString()).mkString(", ")}" + ) + } + } + } +} + + diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala index 6224c51c9..4fb2c2e03 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlModule.scala @@ -2,10 +2,13 @@ package zio.sql.mysql import zio.Chunk import zio.sql.{ Jdbc, Renderer } - +import zio.schema._ import java.sql.ResultSet import java.time.Year import zio.schema.Schema +import java.time.format.DateTimeFormatter +import java.time.OffsetDateTime +import java.time.LocalDate trait MysqlModule extends Jdbc { self => @@ -28,6 +31,9 @@ trait MysqlModule extends Jdbc { self => } } + implicit val localDateSchema = Schema.primitive[LocalDate](StandardType.LocalDateType(DateTimeFormatter.ISO_LOCAL_DATE)) + implicit val offsetDateTimeSchema = Schema.primitive[OffsetDateTime](StandardType.OffsetDateTimeType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) + object MysqlFunctionDef { val Crc32 = FunctionDef[String, Long](FunctionName("crc32")) val Degrees = FunctionDef[Double, Double](FunctionName("degrees")) diff --git a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala index cc4768cd7..0740b88b0 100644 --- a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala @@ -1,24 +1,34 @@ package zio.sql.mysql -import zio.Cause -import zio.test.Assertion._ import zio.test._ +import java.util.UUID +import java.time.LocalDate +import zio.schema.DeriveSchema -object DeleteSpec extends MysqlRunnableSpec with ShopSchema { +object DeleteSpec extends MysqlRunnableSpec { - import Customers._ + case class Customers(id: UUID, dob: LocalDate, first_name: String, lastName: String, verified: Boolean) + + implicit val customerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (_, _, _, lastName, verified) = customers.columns override def specLayered = suite("MySQL module delete")( - test("Can delete from single table with a condition") { + test("Can delete from single table with a is not true condition") { val query = deleteFrom(customers).where(verified.isNotTrue) - val result = execute(query) - - val assertion = for { - r <- result - } yield assert(r)(equalTo(1)) + for { + r <- execute(query) + } yield assertTrue(r == 1) + }, + test("Can delete from single table with an equals condition") { + val query = deleteFrom(customers).where(lastName === "Murray") - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + r <- execute(query) + } yield assertTrue(r == 1) } ) } diff --git a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala index dc77769df..4a2ac0819 100644 --- a/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala @@ -2,14 +2,23 @@ package zio.sql.mysql import zio.Cause import zio.test._ -import zio.test.Assertion._ +import java.util.UUID +import java.time.LocalDate +import zio.schema.DeriveSchema -object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { +object FunctionDefSpec extends MysqlRunnableSpec { - import Customers._ import FunctionDef._ import MysqlFunctionDef._ + case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) + + implicit val customerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (customerId, dob, fName, lName, verified) = customers.columns + override def specLayered = suite("MySQL FunctionDef")( test("lower") { val query = select(Lower(fName)) from customers limit (1) @@ -20,7 +29,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val assertion = for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + } yield assertTrue(r.head == expected) assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, @@ -36,7 +45,7 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { // // val assertion = for { // r <- testResult.runCollect - // } yield assert(r.head)(equalTo(expected)) + // } yield assertTrue(r.head ==expected) // // assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) // }, @@ -47,11 +56,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("abs") { val query = select(Abs(-32.0)) @@ -60,11 +67,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("crc32") { val query = select(Crc32("MySQL")) from customers @@ -73,11 +78,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("degrees") { val query = select(Degrees(Math.PI)) from customers @@ -86,11 +89,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("log2") { val query = select(Log2(8d)) from customers @@ -99,11 +100,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("log10") { val query = select(Log10(1000000d)) from customers @@ -112,11 +111,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("bit_length") { val query = select(BitLength("hello")) @@ -125,11 +122,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("pi") { val query = select(Pi) from customers @@ -138,11 +133,9 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) } ) } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index a8b609c11..82661bd3b 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -3,15 +3,28 @@ package zio.sql.mysql import java.time.LocalDate import java.util.UUID -import zio.Cause import zio.test._ import zio.test.Assertion._ import scala.language.postfixOps +import zio.schema.DeriveSchema -object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { +object MysqlModuleSpec extends MysqlRunnableSpec { - import this.Customers._ - import this.Orders._ + case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) + + implicit val customerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (customerId, dob, fName, lName, verified) = customers.columns + + case class Orders(id: UUID, customer_id: UUID, order_date: LocalDate) + + implicit val orderSchema = DeriveSchema.gen[Orders] + + val orders = defineTable[Orders] + + val (orderId, fkCustomerId, orderDate) = orders.columns override def specLayered = suite("Mysql module")( test("Can select from single table") { @@ -59,19 +72,15 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { Customer(row._1, row._2, row._3, row._4) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can select with property operator") { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) val query = select(customerId, fName, lName, verified, dob) from customers where (verified isNotTrue) - println(renderRead(query)) - val expected = Seq( Customer( @@ -87,11 +96,9 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { Customer(row._1, row._2, row._3, row._4, row._5) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can select from single table with limit, offset and order by") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) @@ -114,33 +121,24 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { Customer(row._1, row._2, row._3, row._4) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - /* - * This is a failing test for aggregation function. - * Uncomment it when aggregation function handling is fixed. - */ - // test("Can count rows") { - // val query = select { Count(userId) } from users - - // val expected = 5L + test("Can count rows") { + import AggregationDef._ + val query = select(Count(customerId)) from customers - // val result = new ExecuteBuilder(query).to[Long, Long](identity).provideCustomLayer(executorLayer) - - // for { - // r <- result.runCollect - // } yield assert(r.head)(equalTo(expected)) - // }, + for { + r <- execute(query).runCollect + } yield assertTrue(r.head == 5L) + }, test("Can select from joined tables (inner join)") { - val query = select(fName, lName, orderDate) from (customers join orders).on( - fkCustomerId === customerId - ) where (verified isNotTrue) + val (customerId1, _, fName1, lName1, _) = customers.columns - println(renderRead(query)) + val query = select(fName1, lName1, orderDate) from (customers join orders).on( + fkCustomerId === customerId1 + ) where (verified isNotTrue) case class Row(firstName: String, lastName: String, orderDate: LocalDate) @@ -155,18 +153,16 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { Row(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can update rows") { val query = update(customers).set(fName, "Roland").where(fName === "Ronald") - println(renderUpdate(query)) - assertM(execute(query))(equalTo(1)) + for { + result <- execute(query) + } yield assertTrue(result == 1) } ) - } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 9effb9375..54a14a4a0 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -14,16 +14,17 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlModule { props } - val poolConfigLayer: ZLayer[Any, Throwable, ConnectionPoolConfig] = + val poolConfigLayer: ZLayer[Any, Nothing, ConnectionPoolConfig] = ZLayer.scoped { TestContainer .mysql() .map(a => ConnectionPoolConfig(a.jdbcUrl, connProperties(a.username, a.password))) + .orDie } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomLayerShared(jdbcLayer) - def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, Any] } diff --git a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala b/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala deleted file mode 100644 index 9124cd3e6..000000000 --- a/mysql/src/test/scala/zio/sql/mysql/ShopSchema.scala +++ /dev/null @@ -1,42 +0,0 @@ -package zio.sql.mysql - -import zio.sql.Jdbc - -trait ShopSchema extends Jdbc { self => - import self.ColumnSet._ - - object Customers { - val customers = - (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean("verified")) - .table("customers") - - val (customerId, dob, fName, lName, verified) = customers.columns - } - object Orders { - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val (orderId, fkCustomerId, orderDate) = orders.columns - } - object Products { - val products = - (int("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - - val (productId, producttName, description, imageURL) = products.columns - } - object ProductPrices { - val productPrices = - (int("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - - val (fkProductId, effective, price) = productPrices.columns - } - - object OrderDetails { - val orderDetails = - (int("order_id") ++ int("product_id") ++ double("quantity") ++ double("unit_price")) - .table( - "order_details" - ) // todo fix #3 quantity should be int, unit price should be bigDecimal, numeric operators only support double ATM. - - val (fkOrderId, fkProductId, quantity, unitPrice) = orderDetails.columns - } -} diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index fd1b6d898..d6b7f4072 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -3,52 +3,50 @@ package zio.sql.mysql import java.util.UUID import zio._ -import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.sequential +import java.time.LocalDate +import zio.schema.DeriveSchema -object TransactionSpec extends MysqlRunnableSpec with ShopSchema { +object TransactionSpec extends MysqlRunnableSpec { - import Customers._ + case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) - override def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] = suite("MySQL module")( - test("Transaction is returning the last value") { - val query = select(customerId) from customers + implicit val customerSchema = DeriveSchema.gen[Customers] - val result = execute( - ZTransaction(query) *> ZTransaction(query) - ) + val customers = defineTable[Customers] - val assertion = - result - .flatMap(_.runCount) - .map(count => assertTrue(count == 5)) - .orDie + val (customerId, dob, fName, lName, verified) = customers.columns + + override def specLayered = suite("MySQL module")( + test("Transaction is returning the last value") { + val query = select(customerId) from customers - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + result <- execute(ZTransaction(query) *> ZTransaction(query)) + count <- result.runCount + } yield assertTrue(count == 5) }, test("Transaction is failing") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage) - - assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + result <- execute(ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query)) + .mapError(_.getMessage) + .flip + } yield assertTrue(result == "failing") }, test("Transaction failed and didn't deleted rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) - val result = (for { + for { allCustomersCount <- execute(query).map(identity[UUID](_)).runCount _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) ).catchAllCause(_ => ZIO.unit) remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount - } yield (allCustomersCount, remainingCustomersCount)) - - assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue((allCustomersCount, remainingCustomersCount) == ((5L, 5L))) }, test("Transaction succeeded and deleted rows") { val query = select(customerId) from customers @@ -56,13 +54,11 @@ object TransactionSpec extends MysqlRunnableSpec with ShopSchema { val tx = ZTransaction(deleteQuery) - val result = (for { + for { allCustomersCount <- execute(query).map(identity[UUID](_)).runCount _ <- execute(tx) remainingCustomersCount <- execute(query).map(identity[UUID](_)).runCount - } yield (allCustomersCount, remainingCustomersCount)) - - assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue((allCustomersCount, remainingCustomersCount) == ((5L, 4L))) } ) @@ sequential } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala index 5b90b15df..e276edb80 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresModule.scala @@ -24,6 +24,7 @@ import zio.schema.StandardType.StringType import zio.schema.StandardType.BoolType import zio.schema.StandardType.DayOfWeekType import zio.schema.StandardType.FloatType +import zio.schema.StandardType.ByteType trait PostgresModule extends Jdbc { self => import TypeTag._ @@ -39,29 +40,7 @@ trait PostgresModule extends Jdbc { self => import scala.language.implicitConversions private[PostgresModule] sealed case class LateraLTable[A, B](left: Table.Aux[A], right: Table.Aux[B]) - extends PostgresSpecificTable[A with B] { self => - - override type ColumnHead = left.ColumnHead - - override type HeadIdentity0 = left.HeadIdentity0 - override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] - - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = - left.columnSet ++ right.columnSet - - override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = - if (left.columnSet.contains(column)) - left.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - else - right.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - } - } + extends PostgresSpecificTable[A with B] implicit def tableSourceToSelectedBuilder[A]( table: Table.Aux[A] @@ -71,11 +50,11 @@ trait PostgresModule extends Jdbc { self => sealed case class LateralTableBuilder[A](left: Table.Aux[A]) { self => - final def lateral[Out]( - right: Table.DerivedTable[Out, Read[Out]] - ): Table.DialectSpecificTable[A with right.TableType] = { + final def lateral[Reprs, Out, B]( + right: Table.DerivedTable[Reprs, Out, Read.WithReprs[Out, Reprs], B] + ): Table.DialectSpecificTable[A with B] = { - val tableExtension = LateraLTable[A, right.TableType]( + val tableExtension = LateraLTable[A, B]( left, right ) @@ -252,11 +231,17 @@ trait PostgresModule extends Jdbc { self => } } + // Schemas for Postgres specific time formats implicit val localDateSchema = Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) - implicit val zonedDateTimeShema = Schema.primitive[ZonedDateTime](zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME)) + implicit val offsetDateTimeSchema = + Schema.primitive[OffsetDateTime](StandardType.OffsetDateTimeType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) + implicit val instantSchema : Schema[Instant] = + Schema.primitive(StandardType.InstantType(DateTimeFormatter.ISO_INSTANT)) + implicit val localDateTimeSchema : Schema[LocalDateTime] = + Schema.primitive(StandardType.LocalDateTimeType(DateTimeFormatter.ISO_INSTANT)) object PostgresFunctionDef { import PostgresSpecific._ @@ -379,7 +364,7 @@ trait PostgresModule extends Jdbc { self => def renderInserValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = schema.toDynamic(z) match { - case DynamicValue.Record(listMap) => + case DynamicValue.Record(_, listMap) => listMap.values.toList match { case head :: Nil => renderDynamicValue(head) case head :: next => @@ -409,6 +394,7 @@ trait PostgresModule extends Jdbc { self => StandardType.fromString(typeTag.tag) match { case Some(v) => v match { + case ByteType => () case BigDecimalType => render(value) case StandardType.InstantType(formatter) => diff --git a/postgres/src/test/resources/db_schema.sql b/postgres/src/test/resources/db_schema.sql index 9f324157d..4c33f58fd 100644 --- a/postgres/src/test/resources/db_schema.sql +++ b/postgres/src/test/resources/db_schema.sql @@ -42,9 +42,8 @@ create table order_details create table persons ( id uuid not null primary key, - first_name varchar not null, - last_name varchar, - dob date + name varchar, + birth_date date ); -- city, metro_system, metro_line and inserted values are copied from https://github.com/softwaremill/scala-sql-compare @@ -88,13 +87,13 @@ values ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', 'Wiggins', false, '1987-03-23', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00'); insert into persons - (id, first_name, last_name, dob) + (id, name, birth_date) values - ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', '1983-01-05'), - ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Terrence', 'Noel', null), - ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Mila', 'Paterso', '1990-11-16'), - ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Alana', 'Murray', '1995-11-12'), - ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', 'Jose', null, null); + ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Russell', '1983-01-05'), + ('f76c9ace-be07-4bf3-bd4c-4a9c62882e64', 'Noel', null), + ('784426a5-b90a-4759-afbb-571b7a0ba35e', 'Paterso', '1990-11-16'), + ('df8215a2-d5fd-4c6c-9984-801a1b3a2a0b', 'Murray', '1995-11-12'), + ('636ae137-5b1a-4c8c-b11f-c47c624d9cdc', null, null); insert into products (id, name, description, image_url) @@ -278,4 +277,4 @@ INSERT INTO metro_line(id, system_id, name, station_count, track_type) VALUES (302, 30, '3', 45, 2), (303, 30, '6', 33, 1); -ALTER SEQUENCE metro_line_id_seq RESTART WITH 400; \ No newline at end of file +ALTER SEQUENCE metro_line_id_seq RESTART WITH 400; diff --git a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala deleted file mode 100644 index 74f02060d..000000000 --- a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala +++ /dev/null @@ -1,98 +0,0 @@ -package zio.sql.postgresql - -import zio.sql.Jdbc - -trait DbSchema extends Jdbc { self => - import self.ColumnSet._ - - object Persons { - - import ColumnSetAspect._ - - val persons = - (uuid("id") ++ string("first_name") ++ string("last_name") ++ (localDate("dob") @@ nullable)) - .table("persons") - - val (personId, fName, lName, dob) = persons.columns - } - - object Customers { - // https://github.com/zio/zio-sql/issues/320 Once Insert is supported, we can remove created_timestamp_string - val customers = - (uuid("id") ++ localDate("dob") ++ string("first_name") ++ string("last_name") ++ boolean( - "verified" - ) ++ string("created_timestamp_string") ++ zonedDateTime("created_timestamp")) - .table("customers") - - val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = - customers.columns - } - object Orders { - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val (orderId, fkCustomerId, orderDate) = orders.columns - } - object Products { - val products = - (uuid("id") ++ string("name") ++ string("description") ++ string("image_url")).table("products") - - val (productId, productName, description, imageURL) = products.columns - } - object ProductPrices { - val productPrices = - (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - - val (fkProductId, effective, price) = productPrices.columns - } - - object OrderDetails { - val orderDetails = - (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")) - .table( - "order_details" - ) - - val (orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) = orderDetails.columns - } - - object DerivedTables { - import OrderDetails._ - import Customers._ - import Orders._ - - val orderDetailsDerived = - select(orderDetailsOrderId, orderDetailsProductId, unitPrice).from(orderDetails).asTable("derived") - - val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns - val orderDateDerivedTable = customers - .subselect(orderDate) - .from(orders) - .limit(1) - .where(customerId === fkCustomerId) - .orderBy(Ordering.Desc(orderDate)) - .asTable("derived") - - val orderDateDerived = orderDateDerivedTable.columns - } - - object Cities { - case class CityId(id: Int) - case class City(cityId: CityId, name: String, population: Int, area: Float, link: Option[String]) - - import ColumnSet._ - - val city = (int("id") ++ string("name") ++ - int("population") ++ float("area") ++ string("link")).table("city") - - val (cityId, cityName, population, area, link) = city.columns - - val metroSystem = (int("id") ++ int("city_id") ++ string("name") ++ int("daily_ridership")).table("metro_system") - - val (metroSystemId, cityIdFk, metroSystemName, dailyRidership) = metroSystem.columns - - val metroLine = - (int("id") ++ int("system_id") ++ string("name") ++ int("station_count") ++ int("track_type")).table("metro_line") - - val (metroLineId, systemId, metroLineName, stationCount, trackType) = metroLine.columns - } -} diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index d98ff10a9..eefb94754 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -1,12 +1,29 @@ package zio.sql.postgresql -import zio.Cause -import zio.test.Assertion._ import zio.test._ +import java.util.UUID +import java.time.LocalDate +import java.time.ZonedDateTime +import zio.schema.DeriveSchema -object DeleteSpec extends PostgresRunnableSpec with DbSchema { +object DeleteSpec extends PostgresRunnableSpec { - import Customers._ + case class Customers( + id: UUID, + dob: LocalDate, + firstName: String, + lastName: String, + verified: Boolean, + createdTimestampString: String, + createdTimestamp: ZonedDateTime + ) + + implicit val custommerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = + customers.columns override def specLayered = suite("Postgres module delete")( test("Can delete from single table with a condition") { @@ -14,11 +31,9 @@ object DeleteSpec extends PostgresRunnableSpec with DbSchema { val result = execute(query) - val assertion = for { + for { r <- result - } yield assert(r)(equalTo(1)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r == 1) } ) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeriveTableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeriveTableSpec.scala new file mode 100644 index 000000000..78150dff9 --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/DeriveTableSpec.scala @@ -0,0 +1,143 @@ +package zio.sql.postgresql + +import zio.test._ +import zio.test.Assertion._ +import zio.schema._ +import java.time.LocalDate +import zio.test.TestAspect._ +import java.util.UUID +import java.time._ + +//TODO remove +object DeriveTableSpec extends PostgresRunnableSpec { + + //==== + + case class Customers( + id: UUID, + dob: LocalDate, + firstName: String, + lastName: String, + verified: Boolean, + createdTimestampString: String, + createdTimestamp: ZonedDateTime + ) + + implicit val custommerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = + customers.columns + + //=== + + case class Orders(id: UUID, customerId: UUID, orderDate: LocalDate) + + implicit val orderSchema = DeriveSchema.gen[Orders] + + val orders = defineTable[Orders] + + // orderDate: Expr[Features.Source[orderSchema.field3.label.type,Orders],Orders,LocalDate] + val (orderId, fkCustomerId, orderDate) = orders.columns + + + object DerivedTables { + + val orderDateDerivedTable = customers + .subselect(orderDate) + .from(orders) + .limit(1) + .where(customerId === fkCustomerId) + .orderBy(Ordering.Desc(orderDate)) + .asTable("derived") + + implicitly[orderDateDerivedTable.TableType =:= Customers with Orders] + + // + val orderDateDerived = orderDateDerivedTable.columns + } + + def specLayered = + suite("testing new table derivation")( + test("Can do lateral join") { + import PostgresSpecific.PostgresSpecificTable._ + + /** + * select customers.id, customers.first_name, customers.last_name, derived.order_date + * from customers, + * lateral ( + * select orders.order_date + * from orders + * where customers.id = orders.customer_id + * order by orders.order_date desc limit 1 ) derived order by derived.order_date desc + */ + + case class Row(id: UUID, firstName: String, lastName: String, orderDate: LocalDate) + + val expected = Seq( + Row(UUID.fromString("df8215a2-d5fd-4c6c-9984-801a1b3a2a0b"), "Alana", "Murray", LocalDate.parse("2020-05-11")), + Row(UUID.fromString("784426a5-b90a-4759-afbb-571b7a0ba35e"), "Mila", "Paterso", LocalDate.parse("2020-04-30")), + Row(UUID.fromString("f76c9ace-be07-4bf3-bd4c-4a9c62882e64"), "Terrence", "Noel", LocalDate.parse("2020-04-05")), + Row( + UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), + "Ronald", + "Russell", + LocalDate.parse("2020-03-19") + ), + Row(UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), "Jose", "Wiggins", LocalDate.parse("2020-01-15")) + ) + + import DerivedTables._ + + val query = + select(customerId, fName, lName, orderDateDerived) + .from(customers.lateral(orderDateDerivedTable)) + .orderBy(Ordering.Desc(orderDateDerived)) + + for { + r <- execute(query).map(Row tupled _).runCollect + } yield assert(r)(hasSameElementsDistinct(expected)) + }, + test("join table") { + val query = select(fName, lName, orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) + + case class ResultRow(firstName: String, lastName: String, orderDate: LocalDate) + + val results = execute(query) + .map(ResultRow.tupled) + .runCollect + .map(_.toList) + + assertZIO(results)(hasSameElementsDistinct(expected.map(ResultRow.tupled))) + } @@ ignore + ) + + val expected = List( + ("Ronald", "Russell", LocalDate.parse("2019-03-25")), + ("Ronald", "Russell", LocalDate.parse("2018-06-04")), + ("Alana", "Murray", LocalDate.parse("2019-08-19")), + ("Jose", "Wiggins", LocalDate.parse("2019-08-30")), + ("Jose", "Wiggins", LocalDate.parse("2019-03-07")), + ("Ronald", "Russell", LocalDate.parse("2020-03-19")), + ("Alana", "Murray", LocalDate.parse("2020-05-11")), + ("Alana", "Murray", LocalDate.parse("2019-02-21")), + ("Ronald", "Russell", LocalDate.parse("2018-05-06")), + ("Mila", "Paterso", LocalDate.parse("2019-02-11")), + ("Terrence", "Noel", LocalDate.parse("2019-10-12")), + ("Ronald", "Russell", LocalDate.parse("2019-01-29")), + ("Terrence", "Noel", LocalDate.parse("2019-02-10")), + ("Ronald", "Russell", LocalDate.parse("2019-09-27")), + ("Alana", "Murray", LocalDate.parse("2018-11-13")), + ("Jose", "Wiggins", LocalDate.parse("2020-01-15")), + ("Terrence", "Noel", LocalDate.parse("2018-07-10")), + ("Mila", "Paterso", LocalDate.parse("2019-08-01")), + ("Alana", "Murray", LocalDate.parse("2019-12-08")), + ("Mila", "Paterso", LocalDate.parse("2019-11-04")), + ("Mila", "Paterso", LocalDate.parse("2018-10-14")), + ("Terrence", "Noel", LocalDate.parse("2020-04-05")), + ("Jose", "Wiggins", LocalDate.parse("2019-01-23")), + ("Terrence", "Noel", LocalDate.parse("2019-05-14")), + ("Mila", "Paterso", LocalDate.parse("2020-04-30")) + ) +} diff --git a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala index b74c48440..54ca04b10 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/FunctionDefSpec.scala @@ -9,24 +9,38 @@ import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.{ ignore, timeout } import zio.durationInt +import zio.schema.DeriveSchema -object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { +object FunctionDefSpec extends PostgresRunnableSpec { - import Customers._ import FunctionDef.{ CharLength => _, _ } import PostgresFunctionDef._ import PostgresSpecific._ + case class Customers( + id: UUID, + dob: LocalDate, + firstName: String, + lastName: String, + verified: Boolean, + createdTimestampString: String, + createdTimestamp: ZonedDateTime + ) + + implicit val custommerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = + customers.columns + private def collectAndCompare[R, E]( expected: Seq[String], testResult: ZStream[R, E, String] - ) = { - val assertion = for { + ) = + for { r <- testResult.runCollect - } yield assert(r.toList)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } + } yield assertTrue(r.toList == expected.toList) private val timestampFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSS").withZone(ZoneId.of("UTC")) @@ -52,7 +66,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { import Expr._ // note: you can't use customerId here as it is a UUID, hence not a string in our book - val query = select(ConcatWs3(Customers.fName, Customers.fName, Customers.lName)) from customers + val query = select(ConcatWs3(fName, fName, lName)) from customers val expected = Seq( "RonaldRonaldRussell", @@ -68,7 +82,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { test("concat_ws #3 - combine columns and flat values") { import Expr._ - val query = select(ConcatWs4(" ", "Person:", Customers.fName, Customers.lName)) from customers + val query = select(ConcatWs4(" ", "Person:", fName, lName)) from customers val expected = Seq( "Person: Ronald Russell", @@ -85,7 +99,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { import Expr._ val query = select( - ConcatWs3(" and ", Concat("Name: ", Customers.fName), Concat("Surname: ", Customers.lName)) + ConcatWs3(" and ", Concat("Name: ", fName), Concat("Surname: ", lName)) ) from customers val expected = Seq( @@ -104,13 +118,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val expected: Boolean = true - val testResult = execute(query) - - val assertion = for { - r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + r <- execute(query).runCollect + } yield assertTrue(r.head == expected) }, suite("String functions")( test("CharLength") { @@ -119,11 +129,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("ltrim") { val query = select(Ltrim(" hello ")) @@ -132,11 +140,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("rtrim") { val query = select(Rtrim(" hello ")) @@ -145,11 +151,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("bit_length") { val query = select(BitLength("hello")) @@ -158,11 +162,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("pi") { val query = select(Pi) @@ -171,11 +173,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, suite("format function")( test("format0") { @@ -197,7 +197,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { test("format1") { import Expr._ - val query = select(Format1("Person: %s", Customers.fName)) from customers + val query = select(Format1("Person: %s", fName)) from customers val expected = Seq( "Person: Ronald", @@ -213,7 +213,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { test("format2") { import Expr._ - val query = select(Format2("Person: %s %s", Customers.fName, Customers.lName)) from customers + val query = select(Format2("Person: %s %s", fName, lName)) from customers val expected = Seq( "Person: Ronald Russell", @@ -230,7 +230,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { import Expr._ val query = select( - Format3("Person: %s %s with double quoted %I ", Customers.fName, Customers.lName, "identi fier") + Format3("Person: %s %s with double quoted %I ", fName, lName, "identi fier") ) from customers val expected = Seq( @@ -250,8 +250,8 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val query = select( Format4( "Person: %s %s with null-literal %L and non-null-literal %L ", - Customers.fName, - Customers.lName, + fName, + lName, "FIXME: NULL", "literal" ) @@ -274,10 +274,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val query = select( Format5( "Person: %s %s with more arguments than placeholders: %I %L ", - Customers.fName, - Customers.lName, + fName, + lName, "identifier", - Reverse(Customers.fName), + Reverse(fName), "unused" ) ) from customers @@ -302,11 +302,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("log") { val query = select(Log(2.0, 32.0)) @@ -315,11 +313,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("acos") { val query = select(Acos(-1.0)) @@ -328,11 +324,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("repeat") { val query = select(Repeat("Zio", 3)) @@ -341,11 +335,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("asin") { val query = select(Asin(0.5)) @@ -354,11 +346,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("ln") { val query = select(Ln(3.0)) @@ -367,11 +357,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("atan") { val query = select(Atan(10.0)) @@ -380,11 +368,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("reverse") { val query = select(Reverse("abcd")) @@ -393,11 +379,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("cos") { val query = select(Cos(3.141592653589793)) @@ -406,11 +390,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("exp") { val query = select(Exp(1.0)) @@ -419,11 +401,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("floor") { val query = select(Floor(-3.14159)) @@ -432,11 +412,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("ceil") { val query = select(Ceil(53.7), Ceil(-53.7)) @@ -445,11 +423,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query).map(value => (value._1, value._2)) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("sin") { val query = select(Sin(1.0)) @@ -458,11 +434,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("sind") { val query = select(Sind(30.0)) @@ -471,11 +445,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("split_part") { val query = select(SplitPart("abc~@~def~@~ghi", "~@~", 2)) @@ -484,37 +456,31 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("timeofday") { val query = select(TimeOfDay()) val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(r.head)( - matchesRegex( - "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3,4}" - ) + for { + r <- testResult.runCollect + } yield assert(r.head)( + matchesRegex( + "[A-Za-z]{3}\\s[A-Za-z]{3}\\s[0-9]{2}\\s(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9].[0-9]{6}\\s[0-9]{4}\\s[A-Za-z]{3,4}" ) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("localtime") { val query = select(Localtime) val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect } yield assert(r.head.toString)(Assertion.matchesRegex("([0-9]{2}):[0-9]{2}:[0-9]{2}\\.[0-9]{6}")) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("localtime with precision") { val precision = 0 @@ -522,25 +488,20 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect } yield assert(r.head.toString)(Assertion.matchesRegex(s"([0-9]{2}):[0-9]{2}:[0-9].[0-9]{$precision}")) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("localtimestamp") { val query = select(Localtimestamp) val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) }, test("localtimestamp with precision") { val precision = 2 @@ -549,72 +510,57 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") - ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex(s"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}00") + ) }, test("now") { val query = select(Now()) val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) }, test("statement_timestamp") { val query = select(StatementTimestamp()) val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) }, test("transaction_timestamp") { val query = select(TransactionTimestamp()) val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(timestampFormatter.format(r.head))( - Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") - ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + r <- testResult.runCollect + } yield assert(timestampFormatter.format(r.head))( + Assertion.matchesRegex("[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{4}") + ) }, test("current_time") { val query = select(CurrentTime) val testResult = execute(query) - val assertion = - for { - r <- testResult.runCollect - } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( - matchesRegex( - "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" - ) + for { + r <- testResult.runCollect + } yield assert(DateTimeFormatter.ofPattern("HH:mm:ss").format(r.head))( + matchesRegex( + "(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]" ) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + ) }, test("md5") { val query = select(Md5("hello, world!")) @@ -623,11 +569,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, suite("parseIdent")( test("parseIdent removes quoting of individual identifiers") { @@ -640,7 +584,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { string2 <- someString } yield s""""${string1}".${string2}""" - val assertion = check(genTestString) { (testString) => + check(genTestString) { (testString) => val query = select(ParseIdent(testString)) val testResult = execute(query) @@ -649,17 +593,15 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } yield assert(r.head)(not(containsString("'")) && not(containsString("\""))) } - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("parseIdent fails with invalid identifier") { val query = select(ParseIdent("\'\"SomeSchema\".someTable.\'")) val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect.exit } yield assert(r)(fails(anything)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } ) @@ ignore, test("sqrt") { @@ -669,11 +611,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("chr") { val query = select(Chr(65)) @@ -682,11 +622,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("current_date") { val query = select(CurrentDate) @@ -695,11 +633,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("initcap") { val query = select(Initcap("hi THOMAS")) @@ -708,11 +644,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("trim_scale") { val query = select(TrimScale(8.4100)) @@ -721,11 +655,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("hex") { val query = select(Hex(2147483647)) @@ -734,11 +666,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("encode") { val query = select(Encode(Chunk.fromArray("Hello, World!".getBytes), "BASE64")) @@ -747,11 +677,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + } yield assertTrue(r.head == expected) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("decode") { val query = select(Decode("SGVsbG8sIFdvcmxkIQ==", "BASE64")) @@ -760,11 +689,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("trunc") { val query = select(Trunc(42.8)) @@ -773,11 +700,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("round") { val query = select(Round(10.8124, 2)) @@ -786,11 +711,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("sign positive") { val query = select(Sign(3.0)) @@ -799,11 +722,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("sign negative") { val query = select(Sign(-3.0)) @@ -812,11 +733,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("sign zero") { val query = select(Sign(0.0)) @@ -825,11 +744,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("power") { val query = select(Power(7.0, 3.0)) @@ -838,11 +755,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("length") { val query = select(Length("hello")) @@ -851,11 +766,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("mod") { val query = select(Mod(-15.0, -4.0)) @@ -864,11 +777,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("translate") { val query = select(Translate("12345", "143", "ax")) @@ -877,11 +788,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("left") { val query = select(Left("abcde", 2)) @@ -890,11 +799,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("right") { val query = select(Right("abcde", 2)) @@ -903,11 +810,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("radians") { val query = select(Radians(45.0)) @@ -916,11 +821,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect } yield assert(r.head)(approximatelyEquals(expected, 10.0)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("min_scale") { val query = select(MinScale(8.4100)) @@ -929,11 +832,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("starts_with") { case class Customer(id: UUID, fname: String, lname: String, verified: Boolean, dateOfBirth: LocalDate) @@ -956,11 +857,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { Customer(id, fname, lname, verified, dob) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("lower") { val query = select(Lower(fName)) from customers limit (1) @@ -969,11 +868,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("lower with string literal") { val query = select(Lower("LOWER")) from customers limit (1) @@ -982,11 +879,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("octet_length") { val query = select(OctetLength("josé")) @@ -995,11 +890,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("ascii") { val query = select(Ascii("""x""")) @@ -1008,11 +901,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("upper") { val query = (select(Upper("ronald"))).limit(1) @@ -1021,11 +912,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("width_bucket") { val query = select(WidthBucket(5.35, 0.024, 10.06, 5)) @@ -1034,11 +923,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("tan") { val query = select(Tan(0.7853981634)) @@ -1047,11 +934,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("gcd") { val query = select(GCD(1071d, 462d)) @@ -1060,11 +945,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("lcm") { val query = select(LCM(1071d, 462d)) @@ -1073,11 +956,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("cbrt") { val query = select(CBRT(64.0)) @@ -1086,11 +967,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("degrees") { val query = select(Degrees(0.5)) @@ -1099,11 +978,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("div") { val query = select(Div(8d, 4d)) @@ -1112,11 +989,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("factorial") { val query = select(Factorial(5)) @@ -1125,22 +1000,18 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("random") { val query = select(Random()) val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect } yield assert(r.head)(Assertion.isGreaterThanEqualTo(0d) && Assertion.isLessThanEqualTo(1d)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("setseed") { val query = select(SetSeed(0.12), Random(), Random()) from customers @@ -1148,11 +1019,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) val testResult = execute(query).map { case (_, b, c) => (b, c) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r.take(2))(equalTo(Chunk(randomTupleForSeed, randomTupleForSeed))) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can concat strings with concat function") { @@ -1162,11 +1031,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val result = execute(query) - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can calculate character length of a string") { @@ -1176,11 +1043,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val result = execute(query) - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElements(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("to_timestamp") { val query = select(ToTimestamp(1284352323L)) @@ -1200,13 +1065,11 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { ("2020-11-21T12:10:25-07:00", ZonedDateTime.parse("2020-11-21T12:10:25-07:00"), expectedRoundTripTimestamp) ) - val assertion = for { + for { single <- testResult.runCollect roundTrip <- roundTripResults.runCollect } yield assert(single.head)(equalTo(expected)) && assert(roundTrip)(hasSameElementsDistinct(roundTripExpected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("replace") { val lastNameReplaced = Replace(lName, "ll", "_") as "lastNameReplaced" @@ -1221,11 +1084,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { (row._1, row._2) } - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + } yield assertTrue(r.head == expected) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("lpad") { def runTest(s: String, pad: String) = { @@ -1237,9 +1099,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("xyxhi")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + t1 <- assertZIO(runTest("hi", "xy"))(equalTo("xyxhi")) + t2 <- assertZIO(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertZIO(runTest("hello world", "xy"))(equalTo("hello")) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("rpad") { @@ -1252,9 +1114,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } (for { - t1 <- assertM(runTest("hi", "xy"))(equalTo("hixyx")) - t2 <- assertM(runTest("hello", "xy"))(equalTo("hello")) - t3 <- assertM(runTest("hello world", "xy"))(equalTo("hello")) + t1 <- assertZIO(runTest("hi", "xy"))(equalTo("hixyx")) + t2 <- assertZIO(runTest("hello", "xy"))(equalTo("hello")) + t3 <- assertZIO(runTest("hello world", "xy"))(equalTo("hello")) } yield t1 && t2 && t3).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("pg_client_encoding") { @@ -1262,11 +1124,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect } yield assert(r.head)(equalTo("UTF8")) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } @@ ignore, // todo fix - select(PgClientEncoding())? test("make_date") { @@ -1276,11 +1137,10 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) + } yield assertTrue(r.head == expected) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("make_interval") { def runTest(interval: Interval) = { @@ -1293,9 +1153,9 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { } (for { - t1 <- assertM(runTest(Interval()))(equalTo(Interval())) - t2 <- assertM(runTest(Interval(days = 10)))(equalTo(Interval(days = 10))) - t3 <- assertM( + t1 <- assertZIO(runTest(Interval()))(equalTo(Interval())) + t2 <- assertZIO(runTest(Interval(days = 10)))(equalTo(Interval(days = 10))) + t3 <- assertZIO( runTest(Interval(years = 10, months = 2, days = 5, hours = 6, minutes = 20, seconds = 15)) )( equalTo(Interval(years = 10, months = 2, days = 5, hours = 6, minutes = 20, seconds = 15)) @@ -1307,22 +1167,18 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val expected = LocalTime.parse("08:15:23.500") val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("make_timestamp") { val query = select(MakeTimestamp(2013, 7, 15, 8, 15, 23.5)) val expected = LocalDateTime.parse("2013-07-15T08:15:23.500") val testResult = execute(query) - val assertion = for { + for { r <- testResult.runCollect - } yield assert(r.head)(equalTo(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r.head == expected) }, test("make_timestampz") { def runTest(tz: Timestampz) = { @@ -1335,20 +1191,20 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val expectedRoundTripTimestamp = Timestampz.fromZonedDateTime(ZonedDateTime.of(2020, 11, 21, 19, 10, 25, 0, ZoneId.of(ZoneOffset.UTC.getId))) (for { - t1 <- assertM(runTest(Timestampz(2013, 7, 15, 8, 15, 23.5)))( + t1 <- assertZIO(runTest(Timestampz(2013, 7, 15, 8, 15, 23.5)))( equalTo(Timestampz.fromZonedDateTime(ZonedDateTime.parse("2013-07-15T08:15:23.5+00:00"))) ) - t2 <- assertM(runTest(Timestampz(2020, 11, 21, 19, 10, 25, "+00:00")))( + t2 <- assertZIO(runTest(Timestampz(2020, 11, 21, 19, 10, 25, "+00:00")))( equalTo(expectedRoundTripTimestamp) ) - t3 <- assertM(runTest(Timestampz(2020, 11, 21, 15, 10, 25, "-04:00")))(equalTo(expectedRoundTripTimestamp)) - t4 <- assertM(runTest(Timestampz(2020, 11, 22, 2, 10, 25, "+07:00")))(equalTo(expectedRoundTripTimestamp)) - t5 <- assertM(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) + t3 <- assertZIO(runTest(Timestampz(2020, 11, 21, 15, 10, 25, "-04:00")))(equalTo(expectedRoundTripTimestamp)) + t4 <- assertZIO(runTest(Timestampz(2020, 11, 22, 2, 10, 25, "+07:00")))(equalTo(expectedRoundTripTimestamp)) + t5 <- assertZIO(runTest(Timestampz(2020, 11, 21, 12, 10, 25, "-07:00")))(equalTo(expectedRoundTripTimestamp)) } yield t1 && t2 && t3 && t4 && t5).mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("cannot compile a select without from clause if a table source is required") { // the following execute only compiles with 'from customers' clause - execute((select(CharLength(Customers.fName)) from customers)) + execute((select(CharLength(fName)) from customers)) // imports for Left and Right are necessary to make the typeCheck macro expansion compile // TODO: clean this up when https://github.com/zio/zio/issues/4927 is resolved @@ -1357,7 +1213,7 @@ object FunctionDefSpec extends PostgresRunnableSpec with DbSchema { val dummyUsage = zio.ZIO.succeed((Left(()), Right(()))) val result = typeCheck("execute((select(CharLength(Customers.fName))).to[Int, Int](identity))") - assertM(dummyUsage *> result)(isLeft) + assertZIO(dummyUsage *> result)(isLeft) } ) @@ timeout(5.minutes) } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala index 2f081fd82..adb5ba84e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresModuleSpec.scala @@ -10,12 +10,66 @@ import java.util.UUID import scala.language.postfixOps import zio.schema.Schema import java.time.format.DateTimeFormatter +import zio.schema.TypeId +import zio.schema.DeriveSchema -object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { +object PostgresModuleSpec extends PostgresRunnableSpec { import AggregationDef._ - import Customers._ - import Orders._ + + // Customers table schema + case class Customers( + id: UUID, + dob: LocalDate, + firstName: String, + lastName: String, + verified: Boolean, + createdTimestampString: String, + createdTimestamp: ZonedDateTime + ) + + implicit val custommerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = + customers.columns + + // Orders table schema + case class Orders(id: UUID, customerId: UUID, orderDate: LocalDate) + + implicit val orderSchema = DeriveSchema.gen[Orders] + + val orders = defineTable[Orders] + + val (orderId, fkCustomerId, orderDate) = orders.columns + + // Products table schema + case class Products(id: UUID, name: String, description: String, imageUrl: String) + + implicit val productSchema = DeriveSchema.gen[Products] + + val products = defineTable[Products] + + val (productId, productName, description, imageURL) = products.columns + + // OrderDetails table schema + case class OrderDetails(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) + + implicit val orderDetailsSchema = DeriveSchema.gen[OrderDetails] + + val orderDetails = defineTable[OrderDetails] + + val (orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) = orderDetails.columns + + // Persons table schema + case class Persons(id: UUID, name: Option[String], birthDate: Option[LocalDate]) + + implicit val personsSchema = DeriveSchema.gen[Persons] + + val persons = defineTable[Persons] + + val (personsId, personsName, birthDate) = persons.columns private def customerSelectJoseAssertion[F: Features.IsNotAggregated]( condition: Expr[F, customers.TableType, Boolean] @@ -40,11 +94,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { Customer(row._1, row._2, row._3, row._4, row._5) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } override def specLayered = suite("Postgres module")( @@ -263,13 +315,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { .from(customers.lateral(orderDateDerivedTable)) .orderBy(Ordering.Desc(orderDateDerived)) - val result = execute(query).map(Row tupled _) - - val assertion = for { - r <- result.runCollect + for { + r <- execute(query).map(Row tupled _).runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("can do correlated subqueries in selections - counts orders for each customer") { @@ -300,11 +348,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { Row(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can select using like") { case class Customer(id: UUID, fname: String, lname: String, dateOfBirth: LocalDate) @@ -324,11 +370,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { Customer(uuid, firstName, lastName, dob) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can delete from single table with a condition") { val query = deleteFrom(customers) where (verified isNotTrue) @@ -336,11 +380,9 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val result = execute(query) - val assertion = for { + for { r <- result - } yield assert(r)(equalTo(1)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r == 1) }, test("Can delete all from a single table") { val query = deleteFrom(customers) @@ -348,20 +390,11 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val result = execute(query) - val assertion = for { + for { r <- result - } yield assert(r)(equalTo(4)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue(r == 4) }, test("group by can be called on non aggregated collumn") { - - /** - * select customer_id - * from orders - * group by customer_id - */ - val expected = List( "636ae137-5b1a-4c8c-b11f-c47c624d9cdc", "60b01fc9-c902-4468-8d49-3c0f989def37", @@ -374,21 +407,11 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { .from(orders) .groupBy(fkCustomerId) - val actual = execute(query).map(_.toString()).runCollect.map(_.toList) - - assertM(actual)(equalTo(expected)) + for { + actual <- execute(query).map(_.toString()).runCollect.map(_.toList) + } yield assertTrue(actual == expected) }, test("group by have to be called on column from selection") { - - /** - * select customer_id, count(id) - * from orders - * group by customer_id - * order by count(id) desc - */ - - import AggregationDef._ - val expected = List(6, 5, 5, 5, 4) val query = select(fkCustomerId, Count(orderId)) @@ -396,84 +419,87 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { .groupBy(fkCustomerId) .orderBy(Ordering.Desc(Count(orderId))) - val actual = execute(query).map(arg => arg._2.toInt).runCollect.map(_.toList) - - assertM(actual)(equalTo(expected)) + for { + actual <- execute(query).map(arg => arg._2.toInt).runCollect.map(_.toList) + } yield assertTrue(actual == expected) }, test("insert - 1 rows into customers") { - - /** - * insert into customers - * (id, first_name, last_name, verified, dob, created_timestamp_string, created_timestamp) - * values - * ('60b01fc9-c902-4468-8d49-3c0f989def37', 'Ronald', 'Russell', true, '1983-01-05', '2020-11-21T19:10:25+00:00', '2020-11-21 19:10:25+00')) - */ - - final case class CustomerRow( - id: UUID, - firstName: String, - lastName: String, - verified: Boolean, - dateOfBirth: LocalDate, - cretedTimestampString: String, - createdTimestamp: ZonedDateTime - ) + // TODO following should work after changes in zio schema. We can input data in whatever order we want + // final case class CustomerRow( + // id: UUID, + // firstName: String, + // lastName: String, + // verified: Boolean, + // dateOfBirth: LocalDate, + // cretedTimestampString: String, + // createdTimestamp: ZonedDateTime + // ) + + // val data = + // CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created) + + // val query = insertInto(customers)( + // customerId, + // fName, + // lName, + // verified, + // dob, + // createdString, + // createdTimestamp + // ).values(data) + + // implicit val customerRowSchema = + // Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( + // TypeId.parse("zio.sql.postgresql.PostgresModuleSpec.CustomerRow"), + // Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), + // Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), + // Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), + // Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), + // Schema.Field( + // "localDate", + // Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) + // ), + // Schema.Field("cretedTimestampString", Schema.primitive[String](zio.schema.StandardType.StringType)), + // Schema.Field( + // "createdTimestamp", + // Schema.primitive[ZonedDateTime]( + // zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME) + // ) + // ), + // CustomerRow.apply, + // _.id, + // _.firstName, + // _.lastName, + // _.verified, + // _.dateOfBirth, + // _.cretedTimestampString, + // _.createdTimestamp + // ) val created = ZonedDateTime.now() - import java.time._ - - implicit val customerRowSchema = - Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( - Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), - Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field("verified", Schema.primitive[Boolean](zio.schema.StandardType.BoolType)), - Schema.Field( - "localDate", - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) - ), - Schema.Field("cretedTimestampString", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field( - "createdTimestamp", - Schema.primitive[ZonedDateTime]( - zio.schema.StandardType.ZonedDateTimeType(DateTimeFormatter.ISO_ZONED_DATE_TIME) - ) - ), - CustomerRow.apply, - _.id, - _.firstName, - _.lastName, - _.verified, - _.dateOfBirth, - _.cretedTimestampString, - _.createdTimestamp - ) val data = - CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created) + Customers(UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Jaro", "Regec", true, created.toString, created) val query = insertInto(customers)( - customerId, fName, lName, verified, dob, createdString, createdTimestamp + customerId, + dob, + fName, + lName, + verified, + createdString, + createdTimestamp ).values(data) - assertM(execute(query))(equalTo(1)) + for { + result <- execute(query) + } yield assertTrue(result == 1) }, test("insert - insert 10 rows into orders") { - - /** - * insert into product_prices - * (product_id, effective, price) - * values - * ('7368ABF4-AED2-421F-B426-1725DE756895', '2018-01-01', 10.00), - * ('7368ABF4-AED2-421F-B426-1725DE756895', '2019-01-01', 11.00), - * ('D5137D3A-894A-4109-9986-E982541B434F', '2020-01-01', 55.00), - * ..... - * ('D5137D3A-894A-4109-9986-E982541B43BB', '2020-01-01', 66.00); - */ - final case class InputOrders(uuid: UUID, customerId: UUID, localDate: LocalDate) implicit val inputOrdersSchema = Schema.CaseClass3[UUID, UUID, LocalDate, InputOrders]( + TypeId.parse("zio.sql.postgresql.PostgresModuleSpec.InputOrders"), Schema.Field("uuid", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("customerId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field( @@ -502,30 +528,19 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val query = insertInto(orders)(orderId, fkCustomerId, orderDate) .values(data) - assertM(execute(query))(equalTo(10)) + for { + result <- execute(query) + } yield assertTrue(result == 10) }, test("insert - 4 rows into orderDetails") { - - /** - * insert into order_details - * (order_id, product_id, quantity, unit_price) - * values - * ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00), - * ('38D66D44-3CFA-488A-AC77-30277751418F', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.00), - * ('7B2627D5-0150-44DF-9171-3462E20797EE', '7368ABF4-AED2-421F-B426-1725DE756895', 1, 11.50), - * ('62CD4109-3E5D-40CC-8188-3899FC1F8BDF', '7368ABF4-AED2-421F-B426-1725DE756895', 2, 10.90), - */ - - import OrderDetails._ - case class OrderDetailsRow(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - // TODO we need schema for scala.math.BigDecimal. Probably directly in zio-schema ? implicit val bigDecimalSchema: Schema[BigDecimal] = Schema[java.math.BigDecimal] .transform(bigDec => new BigDecimal(bigDec, java.math.MathContext.DECIMAL128), _.bigDecimal) implicit val orderDetailsRowSchema = Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetailsRow]( + TypeId.parse("zio.sql.postgresql.PostgresModuleSpec.OrderDetailsRow"), Schema.Field("orderId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("productId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("quantity", Schema.primitive[Int](zio.schema.StandardType.IntType)), @@ -547,23 +562,17 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val query = insertInto(orderDetails)(orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) .values(rows) - assertM(execute(query))(equalTo(4)) + for { + result <- execute(query) + } yield assertTrue(result == 4) }, test("insert into orderDetails with tuples") { - - /** - * insert into order_details - * (order_id, product_id, quantity, unit_price) - * values - * ('9022DD0D-06D6-4A43-9121-2993FC7712A1', '7368ABF4-AED2-421F-B426-1725DE756895', 4, 11.00)) - */ - - import OrderDetails._ - val query = insertInto(orderDetails)(orderDetailsOrderId, orderDetailsProductId, quantity, unitPrice) .values((UUID.randomUUID(), UUID.randomUUID(), 4, BigDecimal.valueOf(11.00))) - assertM(execute(query))(equalTo(1)) + for { + result <- execute(query) + } yield assertTrue(result == 1) }, test("insert into customers with tuples") { @@ -577,17 +586,17 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val created = ZonedDateTime.now() val row = - ((UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created)) + ((UUID.randomUUID(), LocalDate.ofYearDay(1990, 1), "Jaro", "Regec", true, created.toString, created)) val query = insertInto(customers)( - customerId, fName, lName, verified, dob, createdString, createdTimestamp + customerId, dob, fName, lName, verified, createdString, createdTimestamp ).values(row) - assertM(execute(query))(equalTo(1)) + for { + result <- execute(query) + } yield assertTrue(result == 1) }, test("insert into products") { - import Products._ - val tupleData = List( (UUID.randomUUID(), "product 1", "product desription", "image url"), (UUID.randomUUID(), "product 2", "product desription", "image url"), @@ -597,62 +606,40 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { val query = insertInto(products)(productId, productName, description, imageURL).values(tupleData) - assertM(execute(query))(equalTo(4)) + for { + result <- execute(query) + } yield assertTrue(result == 4) }, test("insert and query nullable field") { - import Persons._ - - val query = select(fName, lName, dob) - .from(persons) - - final case class Person(id: UUID, firstName: String, lastName: String, dateOfBirth: Option[LocalDate]) - - implicit val localDateSchema = Schema.option[LocalDate]( - Schema.primitive[LocalDate](zio.schema.StandardType.LocalDateType(DateTimeFormatter.ISO_DATE)) - ) - implicit val personSchema = Schema.CaseClass4[UUID, String, String, Option[LocalDate], Person]( - Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), - Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), - Schema.Field("dateOfBirth", localDateSchema), - Person.apply, - _.id, - _.firstName, - _.lastName, - _.dateOfBirth + val expected = List( + (Some("Russell"), Some(LocalDate.of(1983, 1, 5))), + (Some("Noel"), None), + (Some("Paterso"), Some(LocalDate.of(1990, 11, 16))), + (Some("Murray"), Some(LocalDate.of(1995, 11, 12))), + (None, None), + (Some("Harvey"), Some(LocalDate.of(2022, 1, 31))), + (Some("Dent"), None), + (Some("Charles"), None) ) - val personValue = Person(UUID.randomUUID(), "Charles", "Harvey", None) + val insertSome = insertInto(persons)(personsId, personsName, birthDate) + .values((UUID.randomUUID(), Some("Harvey"), Some(LocalDate.of(2022, 1, 31)))) - val insertSome = insertInto(persons)(personId, fName, lName, dob) - .values((UUID.randomUUID(), "Charles", "Dent", Some(LocalDate.of(2022, 1, 31)))) + val data = (UUID.randomUUID(), Some("Dent"), None) - val insertNone = insertInto(persons)(personId, fName, lName, dob) - .values((UUID.randomUUID(), "Martin", "Harvey", None)) + val insertNone = insertInto(persons)(personsId, personsName, birthDate) + .values(data) - val insertNone2 = insertInto(persons)(personId, fName, lName, dob) - .values(personValue) + val insertNone2 = insertInto(persons)(personsId, personsName, birthDate) + .values(Persons(UUID.randomUUID(), Some("Charles"), None)) - val result = for { + for { _ <- execute(insertSome) _ <- execute(insertNone) _ <- execute(insertNone2) - persons <- execute(query).runCollect - } yield (persons.toList) - - val expected = List( - ("Ronald", "Russell", Some(LocalDate.of(1983, 1, 5))), - ("Terrence", "Noel", None), - ("Mila", "Paterso", Some(LocalDate.of(1990, 11, 16))), - ("Alana", "Murray", Some(LocalDate.of(1995, 11, 12))), - ("Jose", null, None), - ("Charles", "Dent", Some(LocalDate.of(2022, 1, 31))), - ("Martin", "Harvey", None), - ("Charles", "Harvey", None) - ) - - assertM(result)(equalTo(expected)) + persons <- execute(select(personsName, birthDate).from(persons)).runCollect + } yield assertTrue(persons.toList == expected) }, test("in joined tables, columns of the same name from different table are treated as different columns") { import Cities._ @@ -679,8 +666,6 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { .groupBy(metroSystemName, cityName) .orderBy(Desc(lineCount)) - val result = execute(complexQuery).runCollect - val expected = Chunk( ("Métro de Paris", "Paris", 16L), @@ -688,14 +673,51 @@ object PostgresModuleSpec extends PostgresRunnableSpec with DbSchema { ("Metro Warszawskie", "Warszawa", 2L) ) - assertM(result)(equalTo(expected)) - }, - test("update rows") { - import Persons._ - - val query = update(persons).set(fName, "Charlie").where(fName === "Charles") + for { + result <- execute(complexQuery).runCollect + } yield assertTrue(result == expected) - assertM(execute(query))(equalTo(2)) } + // TODO may work fine once we have typetags solved + // test("update rows") { + // for { + // result <- execute(update(persons).set(personsName, "Charlie").where(personsName === "Murray")) + // } yield assertTrue(result == 2) + // } ) @@ sequential + + object Cities { + case class City(id: Int, name: String, population: Int, area: Float, link: Option[String]) + implicit val citySchema = DeriveSchema.gen[City] + + val city = defineTable[City] + val (cityId, cityName, population, area, link) = city.columns + + case class MetroSystem(id: Int, cityId: Int, name: String, dailyRidership: Int) + implicit val metroSystemSchema = DeriveSchema.gen[MetroSystem] + + val metroSystem = defineTable[MetroSystem] + + val (metroSystemId, cityIdFk, metroSystemName, dailyRidership) = metroSystem.columns + + case class MetroLine(id: Int, systemId: Int, name: String, stationCount: Int, trackType: Int) + + implicit val metroLineSchema = DeriveSchema.gen[MetroLine] + + val metroLine = defineTable[MetroLine] + + val (metroLineId, systemId, metroLineName, stationCount, trackType) = metroLine.columns + } + + object DerivedTables { + val orderDateDerivedTable = customers + .subselect(orderDate) + .from(orders) + .limit(1) + .where(customerId === fkCustomerId) + .orderBy(Ordering.Desc(orderDate)) + .asTable("derived") + + val orderDateDerived = orderDateDerivedTable.columns + } } diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala index 17ad0616e..677b0b474 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresRunnableSpec.scala @@ -28,9 +28,9 @@ trait PostgresRunnableSpec extends JdbcRunnableSpec with PostgresModule { ) } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomShared(jdbcLayer) - def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, Any] } diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index 2aa9c3322..7be4f74c5 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -1,50 +1,62 @@ package zio.sql.postgresql import zio._ -import zio.test.Assertion._ import zio.test._ import zio.test.TestAspect.sequential +import java.util.UUID +import java.time._ +import zio.schema.DeriveSchema -object TransactionSpec extends PostgresRunnableSpec with DbSchema { +object TransactionSpec extends PostgresRunnableSpec { - override val autoCommit = false + case class Customers( + id: UUID, + dob: LocalDate, + firstName: String, + lastName: String, + verified: Boolean, + createdTimestampString: String, + createdTimestamp: ZonedDateTime + ) + + implicit val custommerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] - import Customers._ + val (customerId, dob, fName, lName, verified, createdString, createdTimestamp) = + customers.columns + + override val autoCommit = false override def specLayered = suite("Postgres module")( test("Transaction is returning the last value") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction(query) - ) - - val assertion = assertM(result.flatMap(_.runCount))(equalTo(5L)).orDie - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + transaction <- execute(ZTransaction(query) *> ZTransaction(query)) + result <- transaction.runCount + } yield assertTrue(result == 5L) }, test("Transaction is failing") { val query = select(customerId) from customers - val result = execute( - ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query) - ).mapError(_.getMessage) - - assertM(result.flip)(equalTo("failing")).mapErrorCause(cause => Cause.stackless(cause.untraced)) + for { + result <- execute(ZTransaction(query) *> ZTransaction.fail(new Exception("failing")) *> ZTransaction(query)) + .mapError(_.getMessage) + .flip + } yield assertTrue(result == "failing") }, test("Transaction failed and didn't deleted rows") { val query = select(customerId) from customers val deleteQuery = deleteFrom(customers).where(verified === false) - val result = (for { + for { allCustomersCount <- execute(query).runCount _ <- execute( ZTransaction(deleteQuery) *> ZTransaction.fail(new Exception("this is error")) *> ZTransaction(query) ).catchAllCause(_ => ZIO.unit) remainingCustomersCount <- execute(query).runCount - } yield (allCustomersCount, remainingCustomersCount)) - - assertM(result)(equalTo((5L, 5L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue((allCustomersCount, remainingCustomersCount) == ((5L, 5L))) }, test("Transaction succeeded and deleted rows") { val query = select(customerId) from customers @@ -52,13 +64,11 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { val tx = ZTransaction(deleteQuery) - val result = (for { + for { allCustomersCount <- execute(query).runCount _ <- execute(tx) remainingCustomersCount <- execute(query).runCount - } yield (allCustomersCount, remainingCustomersCount)) - - assertM(result)(equalTo((5L, 4L))).mapErrorCause(cause => Cause.stackless(cause.untraced)) + } yield assertTrue((allCustomersCount, remainingCustomersCount) == ((5L, 4L))) } ) @@ sequential } diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala index bf241a524..159f8388b 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerModule.scala @@ -2,6 +2,10 @@ package zio.sql.sqlserver import zio.sql.{ Jdbc, Renderer } import zio.schema.Schema +import java.time.LocalDate +import zio.schema.StandardType +import java.time.format.DateTimeFormatter +import java.time.OffsetDateTime trait SqlServerModule extends Jdbc { self => @@ -25,29 +29,7 @@ trait SqlServerModule extends Jdbc { self => crossType: CrossType, left: Table.Aux[A], right: Table.Aux[B] - ) extends SqlServerTable[A with B] { self => - - override type ColumnHead = left.ColumnHead - - override type HeadIdentity0 = left.HeadIdentity0 - override type ColumnTail = - left.columnSet.tail.Append[ColumnSet.Cons[right.ColumnHead, right.ColumnTail, right.HeadIdentity0]] - - override val columnSet: ColumnSet.Cons[ColumnHead, ColumnTail, HeadIdentity0] = - left.columnSet ++ right.columnSet - - override val columnToExpr: ColumnToExpr[A with B] = new ColumnToExpr[A with B] { - def toExpr[C](column: Column[C]): Expr[Features.Source[column.Identity, A with B], A with B, C] = - if (left.columnSet.contains(column)) - left.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - else - right.columnToExpr - .toExpr(column) - .asInstanceOf[Expr[Features.Source[column.Identity, A with B], A with B, C]] - } - } + ) extends SqlServerTable[A with B] implicit def tableSourceToSelectedBuilder[A]( table: Table.Aux[A] @@ -57,11 +39,11 @@ trait SqlServerModule extends Jdbc { self => sealed case class CrossOuterApplyTableBuilder[A](left: Table.Aux[A]) { self => - final def crossApply[Out]( - right: Table.DerivedTable[Out, Read[Out]] - ): Table.DialectSpecificTable[A with right.TableType] = { + final def crossApply[Reprs, Out, RightSource]( + right: Table.DerivedTable[Reprs, Out, Read.WithReprs[Out, Reprs], RightSource] + ): Table.DialectSpecificTable[A with RightSource] = { - val tableExtension = CrossOuterApplyTable[A, right.TableType]( + val tableExtension = CrossOuterApplyTable[A, RightSource]( CrossType.CrossApply, left, right @@ -70,11 +52,11 @@ trait SqlServerModule extends Jdbc { self => new Table.DialectSpecificTable(tableExtension) } - final def outerApply[Out]( - right: Table.DerivedTable[Out, Read[Out]] - ): Table.DialectSpecificTable[A with right.TableType] = { + final def outerApply[Reprs, Out, RightSource]( + right: Table.DerivedTable[Reprs, Out, Read.WithReprs[Out, Reprs], RightSource] + ): Table.DialectSpecificTable[A with RightSource] = { - val tableExtension = CrossOuterApplyTable[A, right.TableType]( + val tableExtension = CrossOuterApplyTable[A, RightSource]( CrossType.OuterApply, left, right @@ -90,6 +72,11 @@ trait SqlServerModule extends Jdbc { self => } } + implicit val localDateSchema = + Schema.primitive[LocalDate](StandardType.LocalDateType(DateTimeFormatter.ISO_LOCAL_DATE)) + implicit val offsetDateTimeSchema = + Schema.primitive[OffsetDateTime](StandardType.OffsetDateTimeType(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) + override def renderRead(read: self.Read[_]): String = { implicit val render: Renderer = Renderer() SqlServerRenderModule.renderReadImpl(read) diff --git a/sqlserver/src/test/resources/db_schema.sql b/sqlserver/src/test/resources/db_schema.sql index b25d1ec11..426435890 100644 --- a/sqlserver/src/test/resources/db_schema.sql +++ b/sqlserver/src/test/resources/db_schema.sql @@ -7,6 +7,12 @@ create table customers dob date not null ); +create table persons +( + name varchar(255) not null primary key, + age int not null +); + create table orders ( id varchar(36) not null primary key, @@ -37,7 +43,6 @@ create table order_details unit_price money not null ); - insert into customers (id, first_name, last_name, verified, dob) values diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala deleted file mode 100644 index 8edf6525a..000000000 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ /dev/null @@ -1,45 +0,0 @@ -package zio.sql.sqlserver - -import zio.sql.Jdbc - -trait DbSchema extends Jdbc { self => - import self.ColumnSet._ - - object DbSchema { - - val customers = - (uuid("id") ++ string("first_name") ++ string("last_name") ++ boolean("verified") ++ localDate("dob")) - .table("customers") - - val (customerId, fName, lName, verified, dob) = - customers.columns - - val orders = (uuid("id") ++ uuid("customer_id") ++ localDate("order_date")).table("orders") - - val (orderId, fkCustomerId, orderDate) = orders.columns - - val productPrices = - (uuid("product_id") ++ offsetDateTime("effective") ++ bigDecimal("price")).table("product_prices") - - val (fkProductId, effective, price) = productPrices.columns - - val orderDetails = - (uuid("order_id") ++ uuid("product_id") ++ int("quantity") ++ bigDecimal("unit_price")).table("order_details") - - val (orderDetailsId, productId, quantity, unitPrice) = orderDetails.columns - - val orderDetailsDerived = select(orderDetailsId, productId, unitPrice).from(orderDetails).asTable("derived") - - val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns - - val orderDateDerivedTable = customers - .subselect(orderDate) - .from(orders) - .limit(1) - .where(customerId === fkCustomerId) - .orderBy(Ordering.Desc(orderDate)) - .asTable("derived") - - val orderDateDerived = orderDateDerivedTable.columns - } -} diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 290af79c3..86fb226c3 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -1,18 +1,17 @@ package zio.sql.sqlserver -import zio._ import zio.test.Assertion._ import zio.test.TestAspect.sequential import zio.test._ - import java.time._ import java.util.UUID import scala.language.postfixOps +import zio.schema.DeriveSchema -object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { +object SqlServerModuleSpec extends SqlServerRunnableSpec { import AggregationDef._ - import DbSchema._ + import CustomerSchema._ private def customerSelectJoseAssertion[F: Features.IsNotAggregated]( condition: Expr[F, customers.TableType, Boolean] @@ -37,11 +36,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Customer(row._1, row._2, row._3, row._4, row._5) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) } override def specLayered = suite("MSSQL Server module")( @@ -88,11 +85,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Customer(row._1, row._2, row._3, row._4) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can select with property unary operator") { customerSelectJoseAssertion(verified isNotTrue) @@ -137,11 +132,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Customer(row._1, row._2, row._3, row._4) } - val assertion = for { + for { r <- testResult.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can count rows") { val query = select(Count(customerId)).from(customers) @@ -156,6 +149,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { }, test("correlated subqueries in selections - counts orders for each customer") { + import OrderSchema._ /** * select first_name, last_name, ( * select count(orders.id) from orders @@ -183,14 +177,15 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Row(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("subquery in where clause") { import SqlServerSpecific.SqlServerFunctionDef._ + import DerivedTableSchema._ + import ProductSchema._ + /** * select order_id, product_id, unit_price from order_details @@ -243,14 +238,13 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Row(id, productId, price) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("correlated subquery in where clause - return orders where price was above average for particular product") { import SqlServerSpecific.SqlServerFunctionDef._ + import DerivedTableSchema._ /** * select derived.order_id, derived.product_id, derived.unit_price from order_details derived @@ -326,13 +320,12 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Row(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("cross apply - top 1 order_date") { + import DerivedTableSchema._ /** * select customers.id, customers.first_name, customers.last_name, derived.order_date @@ -371,13 +364,12 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Row(row._1, row._2, row._3, row._4) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("cross apply with subselect") { + import OrderSchema._ /** * select customers.first_name, customers.last_name, ooo.order_date @@ -390,9 +382,12 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { */ import SqlServerSpecific.SqlServerTable._ val subquery = - subselect[customers.TableType](orderDate, orderId).from(orders).where(customerId === fkCustomerId).asTable("ooo") + subselect[customers.TableType](orderDate, orderId) + .from(orders) + .where(customerId === fkCustomerId) + .asTable("ooo") - val (orderDateDerived, _ ) = subquery.columns + val (orderDateDerived, _) = subquery.columns val query = select(fName, lName, orderDateDerived).from(customers.crossApply(subquery)) @@ -400,14 +395,14 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { CustomerAndDateRow(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("cross apply with subquery") { import SqlServerSpecific.SqlServerTable._ + import OrderSchema._ + val subquery = customers.subselect(orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") @@ -419,14 +414,14 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { CustomerAndDateRow(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("outer apply") { import SqlServerSpecific.SqlServerTable._ + import OrderSchema._ + val subquery = subselect[customers.TableType](orderDate).from(orders).where(customerId === fkCustomerId).asTable("ooo") @@ -438,11 +433,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { CustomerAndDateRow(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(crossOuterApplyExpected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("handle isTrue to 1 bit type") { @@ -453,9 +446,9 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { .from(customers) .where(verified.isTrue) - val result = execute(query).runHead.some - - assertM(result)(equalTo(4L)) + for { + result <- execute(query).runHead.some + } yield assertTrue(result == 4L) }, test("handle isNotTrue to 0 bit type") { import AggregationDef._ @@ -465,11 +458,12 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { .from(customers) .where(verified.isNotTrue) - val result = execute(query).runHead.some - - assertM(result)(equalTo(1L)) + for { + result <- execute(query).runHead.some + } yield assertTrue(result == 1L) }, test("Can select from joined tables (inner join)") { + import OrderSchema._ val query = select(fName, lName, orderDate).from(customers.join(orders).on(fkCustomerId === customerId)) case class Row(firstName: String, lastName: String, orderDate: LocalDate) @@ -506,18 +500,16 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Row(row._1, row._2, row._3) } - val assertion = for { + for { r <- result.runCollect } yield assert(r)(hasSameElementsDistinct(expected)) - - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, test("Can delete from single table with a condition") { val query = deleteFrom(customers).where(verified.isNotTrue) - val result = execute(query) - - assertM(result)(equalTo(1)) + for { + result <- execute(query) + } yield assertTrue(result == 1) } ) @@ sequential @@ -549,4 +541,65 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { CustomerAndDateRow("Terrence", "Noel", LocalDate.parse("2019-05-14")), CustomerAndDateRow("Mila", "Paterso", LocalDate.parse("2020-04-30")) ) + + object CustomerSchema { + case class Customers(id: UUID, firstName: String, lastName: String, verified: Boolean, dob: LocalDate) + + implicit val customerSchema = DeriveSchema.gen[Customers] + + val customers = defineTable[Customers] + + val (customerId, fName, lName, verified, dob) = + customers.columns + } + + object OrderSchema { + case class Orders(id: UUID, customerId: UUID, orderDate: LocalDate) + + implicit val orderSchema = DeriveSchema.gen[Orders] + + val orders = defineTable[Orders] + + val (orderId, fkCustomerId, orderDate) = orders.columns + } + + object ProductSchema { + case class ProductPrices(productId: UUID, effective: OffsetDateTime, price: BigDecimal) + + implicit val productPricesSchema = DeriveSchema.gen[ProductPrices] + + val productPrices = defineTable[ProductPrices] + + val (fkProductId, effective, price) = productPrices.columns + } + + object DerivedTableSchema { + import CustomerSchema._ + import OrderSchema._ + + // order details + case class OrderDetails(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) + + implicit val orderDetailsSchema = DeriveSchema.gen[OrderDetails] + + val orderDetails = defineTable[OrderDetails] + + val (orderDetailsId, productId, quantity, unitPrice) = orderDetails.columns + + // derived + + val orderDetailsDerived = select(orderDetailsId, productId, unitPrice).from(orderDetails).asTable("derived") + + val (derivedOrderId, derivedProductId, derivedUnitPrice) = orderDetailsDerived.columns + + val orderDateDerivedTable = customers + .subselect(orderDate) + .from(orders) + .limit(1) + .where(customerId === fkCustomerId) + .orderBy(Ordering.Desc(orderDate)) + .asTable("derived") + + val orderDateDerived = orderDateDerivedTable.columns + } } diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala index 0a08a3619..20bdc299b 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerRunnableSpec.scala @@ -27,8 +27,8 @@ trait SqlServerRunnableSpec extends JdbcRunnableSpec with SqlServerModule { ) } - override def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] = + override def spec: Spec[TestEnvironment, Any] = specLayered.provideCustomLayerShared(jdbcLayer) - def specLayered: Spec[JdbcEnvironment, TestFailure[Object], TestSuccess] + def specLayered: Spec[JdbcEnvironment, Any] } From ece5d0db3501494b8b8a431e2c6e93f3681523b4 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Wed, 28 Sep 2022 18:12:42 +0200 Subject: [PATCH 527/673] Update zio to 2.0.2 --- build.sbt | 2 +- .../src/main/scala/zio/sql/HikariConnectionPool.scala | 5 ----- .../src/test/scala/zio/sql/HikariConnectionPoolSpec.scala | 2 +- .../src/test/scala/zio/sql/MySqlTestContainer.scala | 5 +---- jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala | 7 ++++--- .../test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala | 5 +++-- .../test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala | 2 +- 7 files changed, 11 insertions(+), 17 deletions(-) diff --git a/build.sbt b/build.sbt index cb9a09b02..5941858bb 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.0" +val zioVersion = "2.0.2" val zioSchemaVersion = "0.2.0" val testcontainersVersion = "1.17.3" val testcontainersScalaVersion = "0.40.10" diff --git a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala index b72a28464..fa1eadec1 100644 --- a/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala +++ b/jdbc-hikaricp/src/main/scala/zio/sql/HikariConnectionPool.scala @@ -8,11 +8,6 @@ class HikariConnectionPool private (hikariDataSource: HikariDataSource) extends private[sql] val dataSource = hikariDataSource - /** - * Retrieves a JDBC java.sql.Connection as a [[ZIO[Scope, Exception, Connection]]] resource. - * The managed resource will safely acquire and release the connection, and - * may be interrupted or timed out if necessary. - */ override def connection: ZIO[Scope, Exception, Connection] = ZIO.acquireRelease(ZIO.attemptBlocking(hikariDataSource.getConnection).refineToOrDie[SQLException])(con => ZIO.attemptBlocking(hikariDataSource.evictConnection(con)).orDie diff --git a/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala b/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala index 31a2a5f5b..d2870c0a2 100644 --- a/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala +++ b/jdbc-hikaricp/src/test/scala/zio/sql/HikariConnectionPoolSpec.scala @@ -119,7 +119,7 @@ object HikariConnectionPoolSpec extends ZIOSpecDefault { ) } @@ timeout(10.seconds) @@ withLiveClock, test("connection init SQL should be configurable") { - val initialSql = "SELECT 1 FROM test.test" + val initialSql = "SELECT 1" (for { cp <- ZIO.service[HikariConnectionPool] } yield assertTrue(cp.dataSource.getConnectionInitSql == initialSql)) diff --git a/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala index 16ec7cc17..ebba6fa31 100644 --- a/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala +++ b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala @@ -12,10 +12,7 @@ object MySqlTestContainer { ZIO.attemptBlocking { val c = new MySQLContainer( mysqlImageVersion = Option(imageName).map(DockerImageName.parse) - ).configure { a => - a.withInitScript("test_schema.sql") - () - } + ) c.start() c } diff --git a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala index d72bd8c0c..b4c031db0 100644 --- a/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala +++ b/jdbc/src/test/scala/zio/sql/JdbcRunnableSpec.scala @@ -51,10 +51,11 @@ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { ) } + val connectionPool: ZLayer[Any, Throwable, ConnectionPool] = poolConfigLayer >>> ConnectionPool.live + private[this] final lazy val jdbcLayer: ZLayer[Any, Any, SqlDriver] = ZLayer.make[SqlDriver]( - poolConfigLayer.orDie, - ConnectionPool.live.orDie, + connectionPool.orDie, SqlDriver.live ) @@ -65,7 +66,7 @@ trait JdbcRunnableSpec extends ZIOSpecDefault with Jdbc { def both[A, B](fa: => Gen[R, A], fb: => Gen[R, B]): Gen[R, (A, B)] = fa.zip(fb) } - private[this] def testContainer: ZIO[Scope, Throwable, SingleContainer[_] with JdbcDatabaseContainer] = + val testContainer: ZIO[Scope, Throwable, SingleContainer[_] with JdbcDatabaseContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { val c = getContainer diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala index 40007cd4d..dc7869b93 100644 --- a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala @@ -130,13 +130,13 @@ object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema { assertZIO(execute(command))(equalTo(2)) }, test("Can insert all supported types") { - val sqlMinDateTime = LocalDateTime.of(-4713, 1, 1, 0, 0) + val sqlMinDateTime = LocalDateTime.of(1, 1, 1, 0, 0) val sqlMaxDateTime = LocalDateTime.of(9999, 12, 31, 23, 59) val sqlInstant = Gen.instant(sqlMinDateTime.toInstant(ZoneOffset.MIN), sqlMaxDateTime.toInstant(ZoneOffset.MAX)) - val sqlYear = Gen.int(-4713, 9999).filter(_ != 0).map(Year.of) + val sqlYear = Gen.int(1, 9999).map(Year.of) val sqlLocalDate = for { year <- sqlYear @@ -216,6 +216,7 @@ object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema { durationCol ).values(row) + // printInsert(insert) // TODO: ensure we can read values back correctly // val read = // select( diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index e435e2316..30371d83e 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -656,7 +656,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { Gen.option(Gen.int), sqlLocalDate, sqlLocalDateTime, - Gen.localTime, + Gen.localTime.map(normLt), // needs to be truncated before saving to the db for predictable outcome Gen.long, sqlOffsetDateTime, sqlOffsetTime, From 05229b129690f8cd641bbceeb5fa1151ea1225a5 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Wed, 28 Sep 2022 22:32:53 +0200 Subject: [PATCH 528/673] Downgrade Hikari CPto a version supporting Java 1.8 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5941858bb..52595bbbc 100644 --- a/build.sbt +++ b/build.sbt @@ -138,7 +138,7 @@ lazy val jdbc_hikaricp = project .settings(buildInfoSettings("zio.sql.jdbc-hickaricp")) .settings( libraryDependencies ++= Seq( - "com.zaxxer" % "HikariCP" % "5.0.1", + "com.zaxxer" % "HikariCP" % "4.0.3", // 5.x doesn't support Java 1.8 "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, From 007ebc190c9b6bd9b7c655e83d97dd1263fe2a6a Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Thu, 29 Sep 2022 13:56:34 +0200 Subject: [PATCH 529/673] Update zio-schema to 0.2.1 --- build.sbt | 2 +- mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala | 5 +++-- mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala | 1 + .../src/main/scala/zio/sql/oracle/OracleRenderModule.scala | 4 ++-- .../src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala | 3 ++- .../scala/zio/sql/postgresql/PostgresRenderModule.scala | 5 +++-- .../scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala | 6 +++++- .../scala/zio/sql/sqlserver/SqlServerRenderModule.scala | 5 +++-- .../test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala | 1 + 9 files changed, 21 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index e79e72b2c..e6ff3719a 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "2.0.2" -val zioSchemaVersion = "0.2.0" +val zioSchemaVersion = "0.2.1" val testcontainersVersion = "1.17.3" val testcontainersScalaVersion = "0.40.10" val logbackVersion = "1.2.11" diff --git a/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala index 17481a48f..1811b7879 100644 --- a/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala +++ b/mysql/src/main/scala/zio/sql/mysql/MysqlRenderModule.scala @@ -138,7 +138,7 @@ trait MysqlRenderModule extends MysqlSqlModule { self => private def renderInsertValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = schema.toDynamic(z) match { - case DynamicValue.Record(listMap) => + case DynamicValue.Record(_, listMap) => listMap.values.toList match { case head :: Nil => renderDynamicValue(head) case head :: next => @@ -147,7 +147,7 @@ trait MysqlRenderModule extends MysqlSqlModule { self => renderDynamicValues(next) case Nil => () } - case value => renderDynamicValue(value) + case value => renderDynamicValue(value) } private def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = @@ -170,6 +170,7 @@ trait MysqlRenderModule extends MysqlSqlModule { self => render(value) case StandardType.InstantType(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") + case ByteType => render(s"'${value}'") case CharType => render(s"'${value}'") case IntType => render(value) case StandardType.MonthDayType => render(s"'${value}'") diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index 8308060e5..6bebe34d3 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -203,6 +203,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec with ShopSchema { ) implicit val customerRowSchema = Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, CustomerRow]( + TypeId.parse("zio.sql.mysql.CustomerRow"), Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field( "dateOfBirth", diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index c874eba74..9176b119e 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -427,7 +427,7 @@ trait OracleRenderModule extends OracleSqlModule { self => def renderInsertValue[Z](z: Z, builder: StringBuilder)(implicit schema: Schema[Z]): Unit = schema.toDynamic(z) match { - case DynamicValue.Record(listMap) => + case DynamicValue.Record(_, listMap) => listMap.values.toList match { case head :: Nil => renderDynamicValue(head, builder) case head :: next => @@ -436,7 +436,7 @@ trait OracleRenderModule extends OracleSqlModule { self => renderDynamicValues(next, builder) case Nil => () } - case value => renderDynamicValue(value, builder) + case value => renderDynamicValue(value, builder) } def renderDynamicValue(dynValue: DynamicValue, builder: StringBuilder): Unit = diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala index dc7869b93..2eff8468f 100644 --- a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala @@ -7,7 +7,7 @@ import zio.test._ import scala.language.postfixOps import java.util.UUID import java.time.format.DateTimeFormatter -import zio.schema.Schema +import zio.schema.{ Schema, TypeId } import zio.prelude._ import java.time.{ LocalDate, LocalDateTime, Month, Year, YearMonth, ZoneOffset, ZonedDateTime } @@ -75,6 +75,7 @@ object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema { ) implicit val customerRowSchema = Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, CustomerRow]( + TypeId.parse("zio.sql.oracle.CustomerRow"), Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field( "dateOfBirth", diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala index 88655dc20..7aad08d3b 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala @@ -64,7 +64,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => private def renderInserValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = schema.toDynamic(z) match { - case DynamicValue.Record(listMap) => + case DynamicValue.Record(_, listMap) => listMap.values.toList match { case head :: Nil => renderDynamicValue(head) case head :: next => @@ -73,7 +73,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => renderDynamicValues(next) case Nil => () } - case value => renderDynamicValue(value) + case value => renderDynamicValue(value) } private def renderDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = @@ -98,6 +98,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => render(value) case StandardType.InstantType(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") + case ByteType => render(s"'${value}'") case CharType => render(s"'${value}'") case IntType => render(value) case StandardType.MonthDayType => render(s"'${value}'") diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala index f5e47982d..11795047f 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala @@ -8,7 +8,7 @@ import zio.test._ import java.time._ import java.util.UUID import scala.language.postfixOps -import zio.schema.Schema +import zio.schema.{ Schema, TypeId } import java.time.format.DateTimeFormatter object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { @@ -424,6 +424,7 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { implicit val customerRowSchema = Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( + TypeId.parse("zio.sql.postgres.CustomerRow"), Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), @@ -480,6 +481,7 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { final case class InputOrders(uuid: UUID, customerId: UUID, localDate: LocalDate) implicit val inputOrdersSchema = Schema.CaseClass3[UUID, UUID, LocalDate, InputOrders]( + TypeId.parse("zio.sql.postgres.InputOrders"), Schema.Field("uuid", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("customerId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field( @@ -532,6 +534,7 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { .transform(bigDec => new BigDecimal(bigDec, java.math.MathContext.DECIMAL128), _.bigDecimal) implicit val orderDetailsRowSchema = Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetailsRow]( + TypeId.parse("zio.sql.postgres.OrderDetailsRow"), Schema.Field("orderId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("productId", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("quantity", Schema.primitive[Int](zio.schema.StandardType.IntType)), @@ -624,6 +627,7 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { ) implicit val personSchema = Schema.CaseClass4[UUID, String, String, Option[LocalDate], Person]( + TypeId.parse("zio.sql.postgres.Person"), Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 4e5b7cb9d..69e8bf877 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -433,7 +433,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => private def buildInsertValue[Z](z: Z)(implicit render: Renderer, schema: Schema[Z]): Unit = schema.toDynamic(z) match { - case DynamicValue.Record(listMap) => + case DynamicValue.Record(_, listMap) => listMap.values.toList match { case head :: Nil => buildDynamicValue(head) case head :: next => @@ -442,7 +442,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => buildDynamicValues(next) case Nil => () } - case value => buildDynamicValue(value) + case value => buildDynamicValue(value) } private def buildDynamicValues(dynValues: List[DynamicValue])(implicit render: Renderer): Unit = @@ -467,6 +467,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => render(value) case StandardType.InstantType(formatter) => render(s"'${formatter.format(value.asInstanceOf[Instant])}'") + case ByteType => render(s"${value}") case CharType => render(s"N'${value}'") case IntType => render(value) case StandardType.MonthDayType => render(s"'${value}'") diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 30371d83e..d0d3fe4eb 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -546,6 +546,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec with DbSchema { ) implicit val customerRowSchema = Schema.CaseClass5[UUID, String, String, Boolean, LocalDate, CustomerRow]( + TypeId.parse("zio.sql.sqlserver.CustomerRow"), Schema.Field("id", Schema.primitive[UUID](zio.schema.StandardType.UUIDType)), Schema.Field("firstName", Schema.primitive[String](zio.schema.StandardType.StringType)), Schema.Field("lastName", Schema.primitive[String](zio.schema.StandardType.StringType)), From 9c57450df812457a904259d2c4f8d9ce43db7902 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sun, 2 Oct 2022 20:02:51 +0200 Subject: [PATCH 530/673] Fix Byte array serialization for Oracle and SqlServer --- .../main/scala/zio/sql/oracle/OracleRenderModule.scala | 9 +++++++-- .../scala/zio/sql/postgresql/PostgresRenderModule.scala | 2 +- .../scala/zio/sql/sqlserver/SqlServerRenderModule.scala | 7 ++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala index 9176b119e..ffb05cd54 100644 --- a/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala +++ b/oracle/src/main/scala/zio/sql/oracle/OracleRenderModule.scala @@ -467,8 +467,8 @@ trait OracleRenderModule extends OracleSqlModule { self => val chunk = value.asInstanceOf[Chunk[Object]] builder.append("'") for (b <- chunk) - builder.append(String.format("%02x", b)) - builder.append(s"'") + builder.append("%02x".format(b)) + builder.append("'") () case StandardType.LocalDateTimeType(formatter) => builder.append( @@ -557,6 +557,11 @@ trait OracleRenderModule extends OracleSqlModule { self => case DynamicValue.NoneValue => builder.append("null") () + case DynamicValue.Sequence(chunk) => + builder.append("'") + for (DynamicValue.Primitive(v, _) <- chunk) + builder.append("%02x".format(v)) + val _ = builder.append("'") case _ => () } diff --git a/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala index 7aad08d3b..bf9e63464 100644 --- a/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala +++ b/postgres/src/main/scala/zio/sql/postgresql/PostgresRenderModule.scala @@ -202,7 +202,7 @@ trait PostgresRenderModule extends PostgresSqlModule { self => } case TByteArray => render( - lit.value.asInstanceOf[Chunk[Byte]].map("""\%03o""" format _).mkString("E\'", "", "\'") + lit.value.asInstanceOf[Chunk[Byte]].map("""\%03o""".format(_)).mkString("E\'", "", "\'") ) // todo fix `cast` infers correctly but map doesn't work for some reason case tt @ TChar => render("'", tt.cast(lit.value), "'") // todo is this the same as a string? fix escaping diff --git a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala index 69e8bf877..d437539f0 100644 --- a/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala +++ b/sqlserver/src/main/scala/zio/sql/sqlserver/SqlServerRenderModule.scala @@ -475,7 +475,7 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => val chunk = value.asInstanceOf[Chunk[Object]] render("CONVERT(VARBINARY(MAX),'") for (b <- chunk) - render(String.format("%02x", b)) + render("%02x".format(b)) render("', 2)") case StandardType.MonthType => render(s"'${value}'") case StandardType.LocalDateTimeType(formatter) => @@ -521,6 +521,11 @@ trait SqlServerRenderModule extends SqlServerSqlModule { self => buildDynamicValue(right) case DynamicValue.SomeValue(value) => buildDynamicValue(value) case DynamicValue.NoneValue => render("null") + case DynamicValue.Sequence(chunk) => + render("CONVERT(VARBINARY(MAX),'") + for (DynamicValue.Primitive(v, _) <- chunk) + render("%02x".format(v)) + render("', 2)") case _ => () } From 53ac997481194fc0fdb9dd64855acca88749d7c1 Mon Sep 17 00:00:00 2001 From: balanka Date: Fri, 28 Oct 2022 10:04:23 +0200 Subject: [PATCH 531/673] Added support for SumInt(Int), SumDec(BigDecimal) and AvgDec(BigDecimal) --- core/jvm/src/main/scala/zio/sql/expr.scala | 3 +++ core/jvm/src/test/scala/zio/sql/ExprSpec.scala | 17 +++++++++++++++++ .../src/test/scala/zio/sql/ProductSchema.scala | 11 ++++++++--- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 core/jvm/src/test/scala/zio/sql/ExprSpec.scala diff --git a/core/jvm/src/main/scala/zio/sql/expr.scala b/core/jvm/src/main/scala/zio/sql/expr.scala index e4f3c7db0..7c1976295 100644 --- a/core/jvm/src/main/scala/zio/sql/expr.scala +++ b/core/jvm/src/main/scala/zio/sql/expr.scala @@ -277,7 +277,10 @@ trait ExprModule extends NewtypesModule with FeaturesModule with OpsModule { object AggregationDef { val Count = AggregationDef[Any, Long](FunctionName("count")) val Sum = AggregationDef[Double, Double](FunctionName("sum")) + val SumInt = AggregationDef[Int, Int](FunctionName("sum")) + val SumDec = AggregationDef[BigDecimal, BigDecimal](FunctionName("sum")) val Avg = AggregationDef[Double, Double](FunctionName("avg")) + val AvgDec = AggregationDef[BigDecimal, BigDecimal](FunctionName("avg")) def Min[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("min"))(expr) def Max[F, A, B: TypeTag](expr: Expr[F, A, B]) = AggregationDef[B, B](FunctionName("max"))(expr) } diff --git a/core/jvm/src/test/scala/zio/sql/ExprSpec.scala b/core/jvm/src/test/scala/zio/sql/ExprSpec.scala new file mode 100644 index 000000000..766d79a4c --- /dev/null +++ b/core/jvm/src/test/scala/zio/sql/ExprSpec.scala @@ -0,0 +1,17 @@ +package zio.sql + +import zio.test.Assertion.anything +import zio.test.{ZIOSpecDefault, assert} + +object ExprSpec extends ZIOSpecDefault { + import ProductSchema._ + + def spec = suite("Aggregate Expression")( + test("+ works on integer, Double and BigDecimal columns") { + val query = agSelect + assert(query)(anything) + } + + ) +} + diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 8e9cad428..e8de6ef70 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -12,6 +12,7 @@ object ProductSchema { } import sql.ColumnSet._ import sql._ + import AggregationDef._ val productTable = ( string("id") ++ @@ -19,10 +20,14 @@ object ProductSchema { string("name") ++ int("base_amount") ++ int("final_amount") ++ + double("vat_amount") ++ + bigDecimal("total_amount") ++ boolean("deleted") - ).table("product") - - val (id, lastUpdated, name, baseAmount, finalAmount, deleted) = productTable.columns + ).table("product") + val (id, lastUpdated, name, baseAmount, finalAmount, vatAmount, totalAmount, deleted) = productTable.columns val selectAll = select(id, lastUpdated, baseAmount, deleted) from productTable + val agSelect = select(id, (SumInt(baseAmount) as "sumBaseAmount"), (Sum(vatAmount) as "sumVatAmount") + , (Avg(vatAmount) as "avgVatAmount"), (SumDec(totalAmount) as "sumTotalAmount") + , (AvgDec(totalAmount) as "avgTotalAmount")) from productTable groupBy(id) } From 2cc1ad0aa81a56d29a31ffe7e5ab7b52428f9139 Mon Sep 17 00:00:00 2001 From: balanka Date: Fri, 28 Oct 2022 22:00:18 +0200 Subject: [PATCH 532/673] added test --- .../zio/sql/postgresql/AgregationSpec.scala | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala diff --git a/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala new file mode 100644 index 000000000..96062204d --- /dev/null +++ b/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala @@ -0,0 +1,40 @@ +package zio.sql.postgresql + +import zio.Cause +import zio.test.Assertion._ +import zio.test.TestAspect._ +import zio.test._ + +object AgregationSpec extends PostgresRunnableSpec with DbSchema { + + import AggregationDef._ + import OrderDetails._ + + override def specLayered = suite("Postgres module with aggregate function SumInt, SumDec and avgDec ")( + test("Can aggregate colums SumInt(Int column) and SumDec(BigDdecimal colum)") { + + val query = select((SumDec(unitPrice) as "totalAmount") + , (SumInt(quantity) as "soldQuantity")) + .from(orderDetails).where(orderDetailsProductId==="7368ABF4-AED2-421F-B426-1725DE756895") + + val result = execute(query).runCollect.map(_.toList).head + val assertion = for { + r <- result + } yield assert(r._1)(equalTo(BigDecimal(215.99))) && assert(r._2)(equalTo(40)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can aggregate colums of typ money () AvgDec(BigDdecimal colum)") { + + val query = select((AvgDec(unitPrice) as "AverageAmount")) + .from(orderDetails) + .where(orderDetailsProductId==="7368ABF4-AED2-421F-B426-1725DE756895") + + val result = execute(query).runCollect.map(_.toList).head + val assertion = for { + r <- result + } yield assert(r)(equalTo(BigDecimal(10.7995))) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) @@ sequential + +} From 5c0f42f5179c6fe51e7e07669416b5f1a4b55581 Mon Sep 17 00:00:00 2001 From: balanka Date: Fri, 28 Oct 2022 22:03:11 +0200 Subject: [PATCH 533/673] changed the data type of the colum unit_price from money to numeric (12,2) of the order_details table --- postgres/src/test/resources/db_schema.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postgres/src/test/resources/db_schema.sql b/postgres/src/test/resources/db_schema.sql index 85aad89a0..832f2a699 100644 --- a/postgres/src/test/resources/db_schema.sql +++ b/postgres/src/test/resources/db_schema.sql @@ -36,7 +36,8 @@ create table order_details order_id uuid not null, product_id uuid not null, quantity integer not null, - unit_price money not null + unit_price numeric(12,2) not null + --unit_price money not null ); create table persons From a85ab9e70722278c3f1317f1466973792827d4b0 Mon Sep 17 00:00:00 2001 From: balanka Date: Fri, 28 Oct 2022 22:35:57 +0200 Subject: [PATCH 534/673] Formated --- .../src/test/scala/zio/sql/postgresql/AgregationSpec.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala index 96062204d..49afbd728 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala @@ -10,7 +10,8 @@ object AgregationSpec extends PostgresRunnableSpec with DbSchema { import AggregationDef._ import OrderDetails._ - override def specLayered = suite("Postgres module with aggregate function SumInt, SumDec and avgDec ")( + override def specLayered = + suite("Postgres module with aggregate function SumInt, SumDec and avgDec ")( test("Can aggregate colums SumInt(Int column) and SumDec(BigDdecimal colum)") { val query = select((SumDec(unitPrice) as "totalAmount") From 24f6ba1420891a94d620ff9d5311a82dd8a34b38 Mon Sep 17 00:00:00 2001 From: balanka Date: Fri, 28 Oct 2022 23:08:23 +0200 Subject: [PATCH 535/673] Formated --- .../zio/sql/postgresql/AgregationSpec.scala | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala index 49afbd728..b18196ddb 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/AgregationSpec.scala @@ -12,30 +12,29 @@ object AgregationSpec extends PostgresRunnableSpec with DbSchema { override def specLayered = suite("Postgres module with aggregate function SumInt, SumDec and avgDec ")( - test("Can aggregate colums SumInt(Int column) and SumDec(BigDdecimal colum)") { - - val query = select((SumDec(unitPrice) as "totalAmount") - , (SumInt(quantity) as "soldQuantity")) - .from(orderDetails).where(orderDetailsProductId==="7368ABF4-AED2-421F-B426-1725DE756895") - - val result = execute(query).runCollect.map(_.toList).head - val assertion = for { - r <- result - } yield assert(r._1)(equalTo(BigDecimal(215.99))) && assert(r._2)(equalTo(40)) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - }, - test("Can aggregate colums of typ money () AvgDec(BigDdecimal colum)") { - - val query = select((AvgDec(unitPrice) as "AverageAmount")) - .from(orderDetails) - .where(orderDetailsProductId==="7368ABF4-AED2-421F-B426-1725DE756895") - - val result = execute(query).runCollect.map(_.toList).head - val assertion = for { - r <- result - } yield assert(r)(equalTo(BigDecimal(10.7995))) - assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) - } - ) @@ sequential + test("Can aggregate colums SumInt(Int column) and SumDec(BigDdecimal colum)") { + + val query = select((SumDec(unitPrice) as "totalAmount"), (SumInt(quantity) as "soldQuantity")) + .from(orderDetails) + .where(orderDetailsProductId === "7368ABF4-AED2-421F-B426-1725DE756895") + + val result = execute(query).runCollect.map(_.toList).head + val assertion = for { + r <- result + } yield assert(r._1)(equalTo(BigDecimal(215.99))) && assert(r._2)(equalTo(40)) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + }, + test("Can aggregate colums of typ money () AvgDec(BigDdecimal colum)") { + val query = select((AvgDec(unitPrice) as "AverageAmount")) + .from(orderDetails) + .where(orderDetailsProductId === "7368ABF4-AED2-421F-B426-1725DE756895") + + val result = execute(query).runCollect.map(_.toList).head + val assertion = for { + r <- result + } yield assert(r)(equalTo(BigDecimal(10.7995))) + assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) + } + ) @@ sequential } From f46804bbce44e707d59c695cb0b12711903b0a33 Mon Sep 17 00:00:00 2001 From: balanka Date: Fri, 28 Oct 2022 23:15:25 +0200 Subject: [PATCH 536/673] deleted replaced with AgregationSpec --- core/jvm/src/test/scala/zio/sql/ExprSpec.scala | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 core/jvm/src/test/scala/zio/sql/ExprSpec.scala diff --git a/core/jvm/src/test/scala/zio/sql/ExprSpec.scala b/core/jvm/src/test/scala/zio/sql/ExprSpec.scala deleted file mode 100644 index 766d79a4c..000000000 --- a/core/jvm/src/test/scala/zio/sql/ExprSpec.scala +++ /dev/null @@ -1,17 +0,0 @@ -package zio.sql - -import zio.test.Assertion.anything -import zio.test.{ZIOSpecDefault, assert} - -object ExprSpec extends ZIOSpecDefault { - import ProductSchema._ - - def spec = suite("Aggregate Expression")( - test("+ works on integer, Double and BigDecimal columns") { - val query = agSelect - assert(query)(anything) - } - - ) -} - From 88f9bb78f7a7c76c5823224679b818c75d897aae Mon Sep 17 00:00:00 2001 From: balanka Date: Fri, 28 Oct 2022 23:21:34 +0200 Subject: [PATCH 537/673] reverted the changes --- core/jvm/src/test/scala/zio/sql/ProductSchema.scala | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index e8de6ef70..8e9cad428 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -12,7 +12,6 @@ object ProductSchema { } import sql.ColumnSet._ import sql._ - import AggregationDef._ val productTable = ( string("id") ++ @@ -20,14 +19,10 @@ object ProductSchema { string("name") ++ int("base_amount") ++ int("final_amount") ++ - double("vat_amount") ++ - bigDecimal("total_amount") ++ boolean("deleted") - ).table("product") + ).table("product") + + val (id, lastUpdated, name, baseAmount, finalAmount, deleted) = productTable.columns - val (id, lastUpdated, name, baseAmount, finalAmount, vatAmount, totalAmount, deleted) = productTable.columns val selectAll = select(id, lastUpdated, baseAmount, deleted) from productTable - val agSelect = select(id, (SumInt(baseAmount) as "sumBaseAmount"), (Sum(vatAmount) as "sumVatAmount") - , (Avg(vatAmount) as "avgVatAmount"), (SumDec(totalAmount) as "sumTotalAmount") - , (AvgDec(totalAmount) as "avgTotalAmount")) from productTable groupBy(id) } From ff27ee386a14e28e06018bead262aad94ddc0a49 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 5 Nov 2022 03:55:30 +0000 Subject: [PATCH 538/673] Update testcontainers-scala-mssqlserver, ... to 0.40.11 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 96bbebd70..e51c104aa 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.2" val zioSchemaVersion = "0.2.1" val testcontainersVersion = "1.17.3" -val testcontainersScalaVersion = "0.40.10" +val testcontainersScalaVersion = "0.40.11" val logbackVersion = "1.2.11" lazy val root = project From 8f196e1e1a17f26e610a5ab42a6ccabaa3a7bb71 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 5 Nov 2022 03:55:42 +0000 Subject: [PATCH 539/673] Update silencer-lib, silencer-plugin to 1.7.12 --- project/BuildHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 557ee08c2..992c06ced 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -9,7 +9,7 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val SilencerVersion = "1.7.9" + val SilencerVersion = "1.7.12" val Scala212 = "2.12.16" val Scala213 = "2.13.8" val ScalaDotty = "3.0.0-RC3" From 6306da92c68d92419d5821cb2ea6dbd2ff1199a5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 5 Nov 2022 03:57:31 +0000 Subject: [PATCH 540/673] Update sbt to 1.7.3 --- mysql/project/build.properties | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql/project/build.properties b/mysql/project/build.properties index 22af2628c..6a9f03889 100644 --- a/mysql/project/build.properties +++ b/mysql/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.7.3 diff --git a/project/build.properties b/project/build.properties index 22af2628c..6a9f03889 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.7.3 From f45ead47462ef06ee68a50430eaf4a469870f003 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 5 Nov 2022 03:59:14 +0000 Subject: [PATCH 541/673] Update sbt-scoverage to 2.0.6 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 868d2f3fc..75506cd41 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.3") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") From a44cbd1c65c28000a05dfd19e7261e06be6aa81a Mon Sep 17 00:00:00 2001 From: balanka Date: Mon, 14 Nov 2022 08:55:22 +0100 Subject: [PATCH 542/673] removed setseed Test --- .../scala/zio/sql/postgresql/CustomFunctionDefSpec.scala | 8 -------- 1 file changed, 8 deletions(-) diff --git a/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala index eee241858..28d4051c1 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala @@ -568,14 +568,6 @@ object CustomFunctionDefSpec extends PostgresRunnableSpec with DbSchema { assertion.mapErrorCause(cause => Cause.stackless(cause.untraced)) }, - test("setseed") { - val query = select(SetSeed(0.12), Random(), Random()) - - val randomTupleForSeed = (0.019967750719779076, 0.8378369929936333) - val testResult = execute(query).map { case (_, b, c) => (b, c) } - - assertZIO(testResult.runHead.some)(equalTo(randomTupleForSeed)) - }, test("Can calculate character length of a string") { val query = select(CharLength(fName)) from customers From e55b45f06b16a10b25bd8968f743940c0f8cdea0 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 17 Nov 2022 06:18:25 +0000 Subject: [PATCH 543/673] Update sbt-scalafmt to 2.5.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 868d2f3fc..874ef07fd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.2") From 8f3e2decabfdd3def45f91f96537b274f08e3e24 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 17 Nov 2022 06:18:37 +0000 Subject: [PATCH 544/673] Update database-commons, jdbc, mssqlserver, ... to 1.17.6 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 96bbebd70..1ba4ad122 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.2" val zioSchemaVersion = "0.2.1" -val testcontainersVersion = "1.17.3" +val testcontainersVersion = "1.17.6" val testcontainersScalaVersion = "0.40.10" val logbackVersion = "1.2.11" From 55ded0e9208ce0cc7248b8ad996abb9456cd926b Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Thu, 17 Nov 2022 14:01:18 +0330 Subject: [PATCH 545/673] prepare docs. --- docs/about/code_of_conduct.md | 45 ---- docs/about/contributing.md | 284 ------------------------ docs/about/index.md | 8 - docs/{overview/deep.md => deep-dive.md} | 8 +- docs/{overview => }/index.md | 16 +- docs/package.json | 5 + docs/resources/index.md | 6 - docs/sidebars.js | 8 + docs/usecases/index.md | 6 - 9 files changed, 27 insertions(+), 359 deletions(-) delete mode 100644 docs/about/code_of_conduct.md delete mode 100644 docs/about/contributing.md delete mode 100644 docs/about/index.md rename docs/{overview/deep.md => deep-dive.md} (98%) rename docs/{overview => }/index.md (88%) create mode 100644 docs/package.json delete mode 100644 docs/resources/index.md create mode 100644 docs/sidebars.js delete mode 100644 docs/usecases/index.md diff --git a/docs/about/code_of_conduct.md b/docs/about/code_of_conduct.md deleted file mode 100644 index 7e9df263c..000000000 --- a/docs/about/code_of_conduct.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: about_coc -title: "ZIO Code of Conduct" ---- - -We are committed to providing a friendly, safe and welcoming -environment for all, regardless of level of experience, gender, gender -identity and expression, sexual orientation, disability, personal -appearance, body size, race, ethnicity, age, religion, nationality, or -other such characteristics. - -The ZIO project follows the [Scala Code of Conduct](https://www.scala-lang.org/conduct/), with -an additional clause regarding moderation that is detailed below. All participants, contributors and -members are expected to follow the Scala Code of Conduct when discussing the project on the available -communication channels. If you are being harassed, please contact us immediately so that we can support you. - -## Moderation and Steering Committee - -The ZIO project is moderated by the Steering Committee team members: - -- Itamar Ravid [@iravid](https://github.com/iravid) -- John De Goes [@jdegoes](https://github.com/jdegoes) -- Kai [@neko-kai](https://github.com/neko-kai) -- Paul Shirshov [@pshirshov](https://github.com/pshirshov) -- Pierre Ricadat [@ghostdogpr](https://github.com/ghostdogpr) -- Wiem Zine El Abidine [@wi101](https://github.com/wi101) - -The ZIO project requires that drastic moderation actions detailed in the code of -conduct - for example, removing a user from the Gitter channel - be agreed upon -a group of over 2/3rds of the steering committee. - -For any questions, concerns, or moderation requests please contact any member of -the project, or the people listed above. - -## BDFL - -In addition to the above, the ZIO project's BDFL (benevolent dictator for life) is -John De Goes (@jdegoes), owing to his original founding of the project and continued -investments in it. While John adheres to the same code of conduct as everyone else, -he is entitled to override moderation decisions made by the steering committee. - -We do not take the BDFL position lightly, especially with regards to moderation. John -has consistently shown he is level-headed and able to handle conflict responsibly. Feel -free to reach out to any member of the steering committee, including John himself, -with any concern you might have. diff --git a/docs/about/contributing.md b/docs/about/contributing.md deleted file mode 100644 index 6459b055b..000000000 --- a/docs/about/contributing.md +++ /dev/null @@ -1,284 +0,0 @@ ---- -id: about_contributing -title: "ZIO Contributor Guidelines" ---- - -Thank you for your interest in contributing to ZIO, which is a small, zero-dependency library for doing type-safe, composable concurrent and asynchronous programming! - -We welcome contributions from all people! You will learn about functional programming, and you will add your own unique touch to the ZIO project. We are happy to help you to get started and to hear your suggestions and answer your questions. - -_You too can contribute to ZIO, we believe in you!_ - -# Contributing - -## Getting Started - -To begin contributing, please follow these steps: - -### Get The Project - -If you don't already have one, sign up for a free [GitHub Account](https://github.com/join?source=header-home). - -After you [log into](https://github.com/login) GitHub using your account, go to the [ZIO Project Page](https://github.com/zio/zio), and click on [Fork](https://github.com/zio/zio/fork) to fork the ZIO repository into your own account. - -You will make _all_ contributions from your own account. No one contributes _directly_ to the main repository. Contributors only ever merge code from other people's forks into the main repository. - -Once you have forked the repository, you can now clone your forked repository to your own machine, so you have a complete copy of the project and can begin safely making your modifications (even without an Internet connection). - -To clone your forked repository, first make sure you have installed [Git](https://git-scm.com/downloads), the version control system used by GitHub. Then open a Terminal and type the following commands: - -```bash -mkdir zio -cd zio -git clone git@github.com:your-user-name/zio.git . -``` - -If these steps were successful, then congratulations, you now have a complete copy of the ZIO project! - -The next step is to build the project on your machine, to ensure you know how to compile the project and run tests. - -### Build the Project - -The official way to build the project is with sbt. An sbt build file is included in the project, so if you choose to build the project this way, you won't have to do any additional configuration or setup (others choose to build the project using IntelliJ IDEA, Gradle, Maven, Mill, or Fury). - -We use a custom sbt script, which is included in the repository, in order to ensure settings are uniform across all development machines, and the continuous integration service (Circle CI). - -The sbt script is in the root of the repository. To launch this script from your Terminal window, simply type: - -```bash -./sbt -``` - -Sbt will launch, read the project build file, and download dependencies as required. - -You can now compile the production source code with the following sbt command: - -```bash -compile -``` - -You can compile the test source code with the following sbt command: - -```bash -test:compile -``` - -[Learn more](https://www.scala-sbt.org) about sbt to understand how you can list projects, switch projects, and otherwise manage an sbt project. - -The main project in ZIO is `coreJVM` (the core project on the JVM; there is also `coreJS` for the core project on Scala.js), which you can focus on using sbt by issuing the following command: - -```bash -project coreJVM -``` - -### Find an Issue - -You may have your own idea about what contributions to make to ZIO, which is great! If you want to make sure the ZIO contributors are open to your idea, you can [open an issue](https://github.com/zio/zio/issues/new) first on the ZIO project site. - -Otherwise, if you have no ideas about what to contribute, you can find a large supply of feature requests and bugs on the project's [issue tracker](https://github.com/zio/zio/issues). - -Issues are tagged with various labels, such as `good first issue`, which help you find issues that are a fit for you. - -If some issue is confusing or you think you might need help, then just post a comment on the issue asking for help. Typically, the author of the issue will provide as much help as you need, and if the issue is critical, leading ZIO contributors will probably step in to mentor you and give you a hand, making sure you understand the issue thoroughly. - -Once you've decided on an issue and understand what is necessary to complete the issue, then it's a good idea to post a comment on the issue saying that you intend to work on it. Otherwise, someone else might work on it too! - -### Fix an Issue - -Once you have an issue, the next step is to fix the bug or implement the feature. Since ZIO is an open source project, there are no deadlines. Take your time! - -The only thing you have to worry about is if you take too long, especially for a critical issue, eventually someone else will come along and work on the issue. - -If you shoot for 2-3 weeks for most issues, this should give you plenty of time without having to worry about having your issue stolen. - -If you get stuck, please consider [opening a pull request](https://github.com/zio/zio/compare) for your incomplete work, and asking for help (just prefix the pull request by _WIP_). In addition, you can comment on the original issue, pointing people to your own fork. Both of these are great ways to get outside help from people more familiar with the project. - -### Prepare Your Code - -If you've gotten this far, congratulations! You've implemented a new feature or fixed a bug. Now you're in the last mile, and the next step is submitting your code for review, so that other contributors can spot issues and help improve the quality of the code. - -To do this, you need to commit your changes locally. A good way to find out what you did locally is to use the `git status` command: - -```bash -git status -``` - -If you see new files, you will have to tell `git` to add them to the repository using `git add`: - -```bash -git add core/src/shared/zio/zio/NewFile.scala -``` - -Then you can commit all your changes at once with the following command: - -```bash -git commit -am "Fixed #94211 - Optimized race for lists of effects" -``` - -At this point, you have saved your work locally, to your machine, but you still need to push your changes to your fork of the repository. To do that, use the `git push` command: - -```bash -git push -``` - -Now while you were working on this great improvement, it's quite likely that other ZIO contributors were making their own improvements. You need to pull all those improvements into your own code base to resolve any conflicts and make sure the changes all work well together. - -To do that, use the `git pull` command: - -```bash -git pull git@github.com:zio/zio.git master -``` - -You may get a warning from Git that some files conflicted. Don't worry! That just means you and another contributor edited the same parts of the same files. - -Using a text editor, open up the conflicted files, and try to merge them together, preserving your changes and the other changes (both are important!). - -Once you are done, you can commit again: - -```bash -git commit -am "merged upstream changes" -``` - -At this point, you should re-run all tests to make sure everything is passing: - -```bash -# If you are already in a SBT session you can type only 'test' - -sbt test -``` - -If all the tests are passing, then you can format your code: - -```bash -# If you are already in a SBT session you can type only 'fmt' - -sbt fmt -``` - -If your changes altered an API, then you may need to rebuild the microsite to make sure none of the (compiled) documentation breaks: - -```bash -# If you are already in a SBT session you can type only 'docs/docusaurusCreateSite' - -sbt docs/docusaurusCreateSite -``` - -(If you get an error about _Jekyll_, that means all the code examples work and you can ignore the rest.) - -Finally, if you are up-to-date with master, all your tests are passing, you have properly formatted your code, and the microsite builds properly, then it's time to submit your work for review! - -### Create a Pull Request - -To create a pull request, first push all your changes to your fork of the project repository: - -```bash -git push -``` - -Next, [open a new pull request](https://github.com/zio/zio/compare) on GitHub, and select _Compare Across Forks_. On the right hand side, choose your own fork of the ZIO repository, in which you've been making your contribution. - -Provide a description for the pull request, which details the issue it is fixing, and has other information that may be helpful to developers reviewing the pull request. - -Finally, click _Create Pull Request_! - -### Get Your Pull Request Merged - -Once you have a pull request open, it's still your job to get it merged! To get it merged, you need at least one core ZIO contributor to approve the code. - -If you know someone who would be qualified to review your code, you can request that person, either in the comments of the pull request, or on the right-hand side, if you have appropriate permissions. - -Code reviews can sometimes take a few days, because open source projects are largely done outside of work, in people's leisure time. Be patient, but don't wait forever. If you haven't gotten a review within a few days, then consider gently reminding people that you need a review. - -Once you receive a review, you will probably have to go back and make minor changes that improve your contribution and make it follow existing conventions in the code base. This is normal, even for experienced contributors, and the rigorous reviews help ensure ZIO's code base stays high quality. - -After you make changes, you may need to remind reviewers to check out the code again. If they give a final approval, it means your code is ready for merge! Usually this will happen at the same time, though for controversial changes, a contributor may wait for someone more senior to merge. - -If you don't get a merge in a day after your review is successful, then please gently remind folks that your code is ready to be merged. - -Sit back, relax, and enjoy being a ZIO contributor! - -# ZIO Contributor License Agreement - -Thank you for your interest in contributing to the ZIO open source project. - -This contributor agreement ("Agreement") describes the terms and conditions under which you may Submit a Contribution to Us. By Submitting a Contribution to Us, you accept the terms and conditions in the Agreement. If you do not accept the terms and conditions in the Agreement, you must not Submit any Contribution to Us. - -This is a legally binding document, so please read it carefully before accepting the terms and conditions. If you accept this Agreement, the then-current version of this Agreement shall apply each time you Submit a Contribution. The Agreement may cover more than one software project managed by Us. - -## 1. Definitions - -"We" or "Us" means Ziverge, Inc., and its duly appointed and authorized representatives. - -"You" means the individual or entity who Submits a Contribution to Us. - -"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. You may not Submit a Contribution if you do not own the Copyright in the entire work of authorship. - -"Copyright" means all rights protecting works of authorship owned or controlled by You, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any extensions by You. - -"Material" means the work of authorship which is made available by Us to third parties. When this Agreement covers more than one software project, the Material means the work of authorship to which the Contribution was Submitted. After You Submit the Contribution, it may be included in the Material. - -"Submit" means any form of electronic, verbal, or written communication sent to Us or our representatives, including but not limited to electronic mailing lists, electronic mail, source code control systems, pull requests, and issue tracking systems that are managed by, or on behalf of, Us for the purpose of discussing and improving the Material, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." - -"Submission Date" means the date on which You Submit a Contribution to Us. - -"Effective Date" means the earliest date You execute this Agreement by Submitting a Contribution to Us. - -## 2. Grant of Rights - -### 2.1 Copyright License - -2.1.1. You retain ownership of the Copyright in Your Contribution and have the same rights to use or license the Contribution which You would have had without entering into the Agreement. - -2.1.2. To the maximum extent permitted by the relevant law, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable license under the Copyright covering the Contribution, with the right to sublicense such rights through multiple tiers of sublicensees, to reproduce, modify, display, perform and distribute the Contribution as part of the Material; provided that this license is conditioned upon compliance with Section 2.3. - -### 2.2 Patent License - -For patent claims including, without limitation, method, process, and apparatus claims which You own, control or have the right to grant, now or in the future, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable patent license, with the right to sublicense these rights to multiple tiers of sublicensees, to make, have made, use, sell, offer for sale, import and otherwise transfer the Contribution and the Contribution in combination with the Material (and portions of such combination). This license is granted only to the extent that the exercise of the licensed rights infringes such patent claims; and provided that this license is conditioned upon compliance with Section 2.3. - -### 2.3 Outbound License - -Based on the grant of rights in Sections 2.1 and 2.2, if We include Your Contribution in a Material, We may license the Contribution under any license, including copyleft, permissive, commercial, or proprietary licenses. As a condition on the exercise of this right, We agree to also license the Contribution under the terms of the license or licenses which We are using for the Material on the Submission Date. - -### 2.4 Moral Rights - -If moral rights apply to the Contribution, to the maximum extent permitted by law, You waive and agree not to assert such moral rights against Us or our successors in interest, or any of our licensees, either direct or indirect. - -### 2.5 Our Rights - -You acknowledge that We are not obligated to use Your Contribution as part of the Material and may decide to include any Contribution We consider appropriate. - -### 2.6 Reservation of Rights - -Any rights not expressly licensed under this section are expressly reserved by You. - -## 3. Agreement - -You confirm that: - -a. You have the legal authority to enter into this Agreement. - -b. You own the Copyright and patent claims covering the Contribution which are required to grant the rights under Section 2. - -c. The grant of rights under Section 2 does not violate any grant of rights which You have made to third parties, including Your employer. If You are an employee, You have had Your employer approve this Agreement or sign the Entity version of this document. If You are less than eighteen years old, please have Your parents or guardian sign the Agreement. - -d. You have followed the instructions in, if You do not own the Copyright in the entire work of authorship Submitted. - -## 4. Disclaimer - -EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED "AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW. - -## 5. Consequential Damage Waiver - -TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. - -## 6. Miscellaneous - -6.1. This Agreement will be governed by and construed in accordance with the laws of the state of Maryland, in the United States of America, excluding its conflicts of law provisions. Under certain circumstances, the governing law in this section might be superseded by the United Nations Convention on Contracts for the International Sale of Goods ("UN Convention") and the parties intend to avoid the application of the UN Convention to this Agreement and, thus, exclude the application of the UN Convention in its entirety to this Agreement. - -6.2. This Agreement sets out the entire agreement between You and Us for Your Contributions to Us and overrides all other agreements or understandings. - -6.3. If You or We assign the rights or obligations received through this Agreement to a third party, as a condition of the assignment, that third party must agree in writing to abide by all the rights and obligations in the Agreement. - -6.4. The failure of either party to require performance by the other party of any provision of this Agreement in one situation shall not affect the right of a party to require such performance at any time in the future. A waiver of performance under a provision in one situation shall not be considered a waiver of the performance of the provision in the future or a waiver of the provision in its entirety. - -6.5. If any provision of this Agreement is found void and unenforceable, such provision will be replaced to the extent possible with a provision that comes closest to the meaning of the original provision and which is enforceable. The terms and conditions set forth in this Agreement shall apply notwithstanding any failure of essential purpose of this Agreement or any limited remedy to the maximum extent possible under law. diff --git a/docs/about/index.md b/docs/about/index.md deleted file mode 100644 index 8fa03df78..000000000 --- a/docs/about/index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -id: about_index -title: "About zio-sql" ---- - -TODO: Tagline - -TODO: Long description (paragraph) diff --git a/docs/overview/deep.md b/docs/deep-dive.md similarity index 98% rename from docs/overview/deep.md rename to docs/deep-dive.md index 14ab10530..ea0cdb444 100644 --- a/docs/overview/deep.md +++ b/docs/deep-dive.md @@ -1,5 +1,5 @@ --- -id: deep_dive +id: deep-dive title: "Deep dive" --- @@ -259,4 +259,8 @@ val query = select(customerId, fName, lName, orderDateDerived) .from(customers.lateral(derivedTable)) .orderBy(Ordering.Desc(orderDateDerived)) -``` \ No newline at end of file +``` + +## Learning Resources + +- [ZIO SQL Example Application](https://github.com/sviezypan/zio-sql-example) by [Jaro Regec](https://github.com/sviezypan) diff --git a/docs/overview/index.md b/docs/index.md similarity index 88% rename from docs/overview/index.md rename to docs/index.md index fb88ab8d8..42e0eaa0e 100644 --- a/docs/overview/index.md +++ b/docs/index.md @@ -1,25 +1,25 @@ --- -id: overview_index -title: "Quick introduction" +id: index +title: "Introduction to ZIO SQL" +sidebar_label: "ZIO SQL" --- -TODO: Some initial statement about ZIO SQL - ## Installation ZIO SQL is packaged into separate modules for different databases. Depending on which of these (currently supported) systems you're using, you will need to add one of the following dependencies: + ```scala //PostgreSQL -libraryDependencies += "dev.zio" %% "zio-sql-postgres" % zioSqlVersion +libraryDependencies += "dev.zio" %% "zio-sql-postgres" % "@VERSION@" //MySQL -libraryDependencies += "dev.zio" %% "zio-sql-mysql" % zioSqlVersion +libraryDependencies += "dev.zio" %% "zio-sql-mysql" % "@VERSION@" //Oracle -libraryDependencies += "dev.zio" %% "zio-sql-oracle" % zioSqlVersion +libraryDependencies += "dev.zio" %% "zio-sql-oracle" % "@VERSION@" //SQL Server -libraryDependencies += "dev.zio" %% "zio-sql-sqlserver" % zioSqlVersion +libraryDependencies += "dev.zio" %% "zio-sql-sqlserver" % "@VERSION@" ``` ## Imports and modules diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..f7e3ab9fb --- /dev/null +++ b/docs/package.json @@ -0,0 +1,5 @@ +{ + "name": "@zio.dev/zio-sql", + "description": "ZIO SQL Documentation", + "license": "Apache-2.0" +} diff --git a/docs/resources/index.md b/docs/resources/index.md deleted file mode 100644 index 353876aa0..000000000 --- a/docs/resources/index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: resources_index -title: "Learning resources" ---- - -- [ZIO SQL Example Application](https://github.com/sviezypan/zio-sql-example) by [Jaro Regec](https://github.com/sviezypan) \ No newline at end of file diff --git a/docs/sidebars.js b/docs/sidebars.js new file mode 100644 index 000000000..802bf9ed5 --- /dev/null +++ b/docs/sidebars.js @@ -0,0 +1,8 @@ +const sidebars = { + sidebar: [ + "index", + "deep-dive" + ] +}; + +module.exports = sidebars; diff --git a/docs/usecases/index.md b/docs/usecases/index.md deleted file mode 100644 index 1c9640b5c..000000000 --- a/docs/usecases/index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: usecases_index -title: "Contents" ---- - -TODO: Examples and use cases From 5297745303139aa561227f3ba665897b92a54252 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Thu, 17 Nov 2022 14:01:45 +0330 Subject: [PATCH 546/673] install zio-sbt-website plugin. --- build.sbt | 4 ++-- project/plugins.sbt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 96bbebd70..f9250249b 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ import sbtcrossproject.CrossPlugin.autoImport.crossProject inThisBuild( List( organization := "dev.zio", - homepage := Some(url("https://zio.github.io/zio-sql/")), + homepage := Some(url("https://zio.dev/zio-sql/")), licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), developers := List( Developer("jdegoes", "John De Goes", "john@degoes.net", url("http://degoes.net")) @@ -82,7 +82,7 @@ lazy val docs = project scalacOptions -= "-Xfatal-warnings" ) .dependsOn(postgres) - .enablePlugins(MdocPlugin, DocusaurusPlugin) + .enablePlugins(WebsitePlugin) lazy val examples = project .in(file("examples")) diff --git a/project/plugins.sbt b/project/plugins.sbt index 868d2f3fc..1380de90e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,3 +12,6 @@ addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1") +addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.0.0+84-6fd7d64e-SNAPSHOT") + +resolvers += Resolver.sonatypeRepo("public") From 5b17a341a06e1887d8507d2b5999adfcf97eab2f Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Thu, 17 Nov 2022 14:01:55 +0330 Subject: [PATCH 547/673] update homepage url. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f43e48a3d..30a00d57a 100644 --- a/README.md +++ b/README.md @@ -80,5 +80,5 @@ To set up the project follow below steps: If you want to learn more, please check out: - - [ZIO SQL Homepage](https://zio.github.io/zio-sql) + - [ZIO SQL Homepage](https://zio.dev/zio-sql) - [ZIO SQL Discord](https://discord.gg/2ccFBr4) From 9dce775b8af0e662f1916f3633c2fb6fa751ba91 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Thu, 17 Nov 2022 14:02:07 +0330 Subject: [PATCH 548/673] remove website. --- website/core/Footer.js | 67 - website/package-lock.json | 23015 ---------------- website/package.json | 15 - website/pages/en/index.js | 141 - website/sidebars.json | 25 - website/siteConfig.js | 114 - website/static/css/custom.css | 49 - website/static/img/discord.png | Bin 4131 -> 0 bytes website/static/img/favicon.png | Bin 657 -> 0 bytes website/static/img/navbar_brand.png | Bin 13615 -> 0 bytes website/static/img/navbar_brand2x.png | Bin 16064 -> 0 bytes website/static/img/sidebar_brand.png | Bin 12777 -> 0 bytes website/static/img/sidebar_brand2x.png | Bin 17424 -> 0 bytes website/static/img/undraw_code_review.svg | 1 - website/static/img/undraw_online.svg | 0 website/static/img/undraw_open_source.svg | 1 - .../static/img/undraw_operating_system.svg | 1 - website/static/img/undraw_tweetstorm.svg | 1 - website/yarn.lock | 7189 ----- 19 files changed, 30619 deletions(-) delete mode 100755 website/core/Footer.js delete mode 100644 website/package-lock.json delete mode 100644 website/package.json delete mode 100755 website/pages/en/index.js delete mode 100755 website/sidebars.json delete mode 100644 website/siteConfig.js delete mode 100755 website/static/css/custom.css delete mode 100644 website/static/img/discord.png delete mode 100755 website/static/img/favicon.png delete mode 100644 website/static/img/navbar_brand.png delete mode 100644 website/static/img/navbar_brand2x.png delete mode 100644 website/static/img/sidebar_brand.png delete mode 100644 website/static/img/sidebar_brand2x.png delete mode 100755 website/static/img/undraw_code_review.svg delete mode 100755 website/static/img/undraw_online.svg delete mode 100755 website/static/img/undraw_open_source.svg delete mode 100755 website/static/img/undraw_operating_system.svg delete mode 100755 website/static/img/undraw_tweetstorm.svg delete mode 100644 website/yarn.lock diff --git a/website/core/Footer.js b/website/core/Footer.js deleted file mode 100755 index a393ae0f8..000000000 --- a/website/core/Footer.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -class Footer extends React.Component { - docUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - const docsUrl = this.props.config.docsUrl; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - return `${baseUrl}${docsPart}${langPart}${doc}`; - } - - pageUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + (language ? `${language}/` : '') + doc; - } - - render() { - return ( - - ); - } -} - -module.exports = Footer; diff --git a/website/package-lock.json b/website/package-lock.json deleted file mode 100644 index 87e7643ef..000000000 --- a/website/package-lock.json +++ /dev/null @@ -1,23015 +0,0 @@ -{ - "name": "website", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "devDependencies": { - "docusaurus": "^1.12.0", - "react-sidecar": "^0.1.1" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", - "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.7.tgz", - "integrity": "sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.16.7", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helpers": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", - "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.8", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", - "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", - "dev": true, - "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", - "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.16.4", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz", - "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", - "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^4.7.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz", - "integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", - "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", - "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", - "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", - "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", - "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", - "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-wrap-function": "^7.16.8", - "@babel/types": "^7.16.8" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", - "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", - "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", - "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", - "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", - "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz", - "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.8.tgz", - "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", - "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", - "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", - "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", - "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.7.tgz", - "integrity": "sha512-dgqJJrcZoG/4CkMopzhPJjGxsIe9A8RlkQLnL/Vhhx8AA9ZuaRwGSlscSh42hazc7WSrya/IK7mTeoF0DP9tEw==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", - "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", - "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", - "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", - "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", - "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", - "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz", - "integrity": "sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.16.4", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", - "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", - "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz", - "integrity": "sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", - "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", - "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", - "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", - "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", - "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", - "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", - "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", - "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", - "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz", - "integrity": "sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", - "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", - "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", - "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", - "dev": true, - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", - "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", - "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", - "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", - "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", - "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", - "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", - "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", - "dev": true, - "dependencies": { - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", - "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", - "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", - "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", - "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", - "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", - "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", - "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.7.tgz", - "integrity": "sha512-8D16ye66fxiE8m890w0BpPpngG9o9OVBBy0gH2E+2AR7qMR2ZpTYJEqLxAsoroenMId0p/wMW+Blc0meDgu0Ag==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-jsx": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", - "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", - "dev": true, - "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", - "integrity": "sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", - "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", - "dev": true, - "dependencies": { - "regenerator-transform": "^0.14.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", - "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", - "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", - "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", - "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", - "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", - "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", - "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", - "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/polyfill": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz", - "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==", - "deprecated": "🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.", - "dev": true, - "dependencies": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.4" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.8.tgz", - "integrity": "sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.16.8", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-option": "^7.16.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-async-generator-functions": "^7.16.8", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-class-static-block": "^7.16.7", - "@babel/plugin-proposal-dynamic-import": "^7.16.7", - "@babel/plugin-proposal-export-namespace-from": "^7.16.7", - "@babel/plugin-proposal-json-strings": "^7.16.7", - "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", - "@babel/plugin-proposal-numeric-separator": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.16.7", - "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", - "@babel/plugin-proposal-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-private-methods": "^7.16.7", - "@babel/plugin-proposal-private-property-in-object": "^7.16.7", - "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.16.7", - "@babel/plugin-transform-async-to-generator": "^7.16.8", - "@babel/plugin-transform-block-scoped-functions": "^7.16.7", - "@babel/plugin-transform-block-scoping": "^7.16.7", - "@babel/plugin-transform-classes": "^7.16.7", - "@babel/plugin-transform-computed-properties": "^7.16.7", - "@babel/plugin-transform-destructuring": "^7.16.7", - "@babel/plugin-transform-dotall-regex": "^7.16.7", - "@babel/plugin-transform-duplicate-keys": "^7.16.7", - "@babel/plugin-transform-exponentiation-operator": "^7.16.7", - "@babel/plugin-transform-for-of": "^7.16.7", - "@babel/plugin-transform-function-name": "^7.16.7", - "@babel/plugin-transform-literals": "^7.16.7", - "@babel/plugin-transform-member-expression-literals": "^7.16.7", - "@babel/plugin-transform-modules-amd": "^7.16.7", - "@babel/plugin-transform-modules-commonjs": "^7.16.8", - "@babel/plugin-transform-modules-systemjs": "^7.16.7", - "@babel/plugin-transform-modules-umd": "^7.16.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", - "@babel/plugin-transform-new-target": "^7.16.7", - "@babel/plugin-transform-object-super": "^7.16.7", - "@babel/plugin-transform-parameters": "^7.16.7", - "@babel/plugin-transform-property-literals": "^7.16.7", - "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-reserved-words": "^7.16.7", - "@babel/plugin-transform-shorthand-properties": "^7.16.7", - "@babel/plugin-transform-spread": "^7.16.7", - "@babel/plugin-transform-sticky-regex": "^7.16.7", - "@babel/plugin-transform-template-literals": "^7.16.7", - "@babel/plugin-transform-typeof-symbol": "^7.16.7", - "@babel/plugin-transform-unicode-escapes": "^7.16.7", - "@babel/plugin-transform-unicode-regex": "^7.16.7", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.16.8", - "babel-plugin-polyfill-corejs2": "^0.3.0", - "babel-plugin-polyfill-corejs3": "^0.5.0", - "babel-plugin-polyfill-regenerator": "^0.3.0", - "core-js-compat": "^3.20.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-react": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", - "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-option": "^7.16.7", - "@babel/plugin-transform-react-display-name": "^7.16.7", - "@babel/plugin-transform-react-jsx": "^7.16.7", - "@babel/plugin-transform-react-jsx-development": "^7.16.7", - "@babel/plugin-transform-react-pure-annotations": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/register": { - "version": "7.16.9", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.9.tgz", - "integrity": "sha512-jJ72wcghdRIlENfvALcyODhNoGE5j75cYHdC+aQMh6cU/P86tiiXTp9XYZct1UxUMo/4+BgQRyNZEGx0KWGS+g==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "find-cache-dir": "^2.0.0", - "make-dir": "^2.1.0", - "pirates": "^4.0.0", - "source-map-support": "^0.5.16" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", - "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz", - "integrity": "sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.16.8", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.16.8", - "@babel/types": "^7.16.8", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", - "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, - "dependencies": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.scandir/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@types/cheerio": { - "version": "0.22.30", - "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.30.tgz", - "integrity": "sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "17.0.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz", - "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", - "dev": true - }, - "node_modules/@types/q": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", - "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", - "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", - "dev": true, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/airbnb-prop-types": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz", - "integrity": "sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==", - "dev": true, - "dependencies": { - "array.prototype.find": "^2.1.1", - "function.prototype.name": "^1.1.2", - "is-regex": "^1.1.0", - "object-is": "^1.1.2", - "object.assign": "^4.1.0", - "object.entries": "^1.1.2", - "prop-types": "^15.7.2", - "prop-types-exact": "^1.2.0", - "react-is": "^16.13.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "peerDependencies": { - "react": "^0.14 || ^15.0.0 || ^16.0.0-alpha" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "node_modules/ansi-red": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", - "dev": true, - "dependencies": { - "ansi-wrap": "0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/archive-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", - "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", - "dev": true, - "dependencies": { - "file-type": "^4.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/archive-type/node_modules/file-type": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", - "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array.prototype.filter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz", - "integrity": "sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.find": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.1.2.tgz", - "integrity": "sha512-00S1O4ewO95OmmJW7EesWfQlrCrLEL8kZ40w3+GkLX2yTt0m2ggcePPa2uHPJ9KUmJvwRq+lCV9bD8Yim23x/Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "peer": true - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, - "node_modules/autolinker": { - "version": "3.14.3", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.14.3.tgz", - "integrity": "sha512-t81i2bCpS+s+5FIhatoww9DmpjhbdiimuU9ATEuLxtZMQ7jLv9fyFn7SWNG8IkEfD4AmYyirL1ss9k1aqVWRvg==", - "dev": true, - "dependencies": { - "tslib": "^1.9.3" - } - }, - "node_modules/autolinker/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/autoprefixer": { - "version": "9.8.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz", - "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==", - "dev": true, - "dependencies": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "picocolors": "^0.2.1", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - } - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "node_modules/babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "dependencies": { - "object.assign": "^4.1.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz", - "integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.0", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.0.tgz", - "integrity": "sha512-Hcrgnmkf+4JTj73GbK3bBhlVPiLL47owUAnoJIf69Hakl3q+KfodbDXiZWGMM7iqCZTxCG3Z2VRfPNYES4rXqQ==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.0", - "core-js-compat": "^3.20.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz", - "integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true, - "bin": { - "babylon": "bin/babylon.js" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/bin-build": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", - "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", - "dev": true, - "dependencies": { - "decompress": "^4.0.0", - "download": "^6.2.2", - "execa": "^0.7.0", - "p-map-series": "^1.0.0", - "tempfile": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-check": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", - "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", - "dev": true, - "dependencies": { - "execa": "^0.7.0", - "executable": "^4.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", - "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", - "dev": true, - "dependencies": { - "execa": "^1.0.0", - "find-versions": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-version-check": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", - "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", - "dev": true, - "dependencies": { - "bin-version": "^3.0.0", - "semver": "^5.6.0", - "semver-truncate": "^1.1.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-version-check/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/bin-version/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/bin-version/node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-version/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-version/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/bin-wrapper": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", - "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", - "dev": true, - "dependencies": { - "bin-check": "^4.1.0", - "bin-version-check": "^4.0.0", - "download": "^7.1.0", - "import-lazy": "^3.1.0", - "os-filter-obj": "^2.0.0", - "pify": "^4.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-wrapper/node_modules/download": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", - "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", - "dev": true, - "dependencies": { - "archive-type": "^4.0.0", - "caw": "^2.0.1", - "content-disposition": "^0.5.2", - "decompress": "^4.2.0", - "ext-name": "^5.0.0", - "file-type": "^8.1.0", - "filenamify": "^2.0.0", - "get-stream": "^3.0.0", - "got": "^8.3.1", - "make-dir": "^1.2.0", - "p-event": "^2.1.0", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-wrapper/node_modules/download/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/file-type": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", - "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-wrapper/node_modules/got": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", - "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/got/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/make-dir/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/p-cancelable": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", - "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/p-event": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", - "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", - "dev": true, - "dependencies": { - "p-timeout": "^2.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/bin-wrapper/node_modules/p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/bin-wrapper/node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "dev": true, - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/body": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", - "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", - "dev": true, - "dependencies": { - "continuable-cache": "^0.3.1", - "error": "^7.0.0", - "raw-body": "~1.1.0", - "safe-json-parse": "~1.0.1" - } - }, - "node_modules/body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", - "dev": true, - "dependencies": { - "bytes": "3.1.1", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.6", - "raw-body": "2.4.2", - "type-is": "~1.6.18" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/body/node_modules/bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", - "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", - "dev": true - }, - "node_modules/body/node_modules/raw-body": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", - "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", - "dev": true, - "dependencies": { - "bytes": "1", - "string_decoder": "0.10" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/body/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/braces/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/braces/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/braces/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/browserslist": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", - "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001286", - "electron-to-chromium": "^1.4.17", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, - "node_modules/browserslist/node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "dependencies": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "node_modules/buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/bytes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", - "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cacheable-request": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", - "dev": true, - "dependencies": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cacheable-request/node_modules/normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cacheable-request/node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/cacheable-request/node_modules/sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", - "dev": true, - "dependencies": { - "is-plain-obj": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "node_modules/caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "dependencies": { - "callsites": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "dependencies": { - "caller-callsite": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "dependencies": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001299", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", - "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "node_modules/caw": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", - "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", - "dev": true, - "dependencies": { - "get-proxy": "^2.0.0", - "isurl": "^1.0.0-alpha5", - "tunnel-agent": "^0.6.0", - "url-to-options": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", - "dev": true, - "dependencies": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", - "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", - "dev": true, - "dependencies": { - "css-select": "^4.1.3", - "css-what": "^5.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.7.0" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==", - "dev": true - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - } - }, - "node_modules/coa": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", - "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", - "dev": true, - "dependencies": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/coa/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/coa/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/coa/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/coa/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/coa/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/coa/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/coa/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/coffee-script": { - "version": "1.12.7", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", - "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", - "deprecated": "CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)", - "dev": true, - "bin": { - "cake": "bin/cake", - "coffee": "bin/coffee" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/color-string": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz", - "integrity": "sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==", - "dev": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/color/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/concat-with-sourcemaps": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", - "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", - "dev": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, - "node_modules/concat-with-sourcemaps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "node_modules/console-stream": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", - "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", - "dev": true - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/continuable-cache": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", - "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true - }, - "node_modules/core-js-compat": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.2.tgz", - "integrity": "sha512-qZEzVQ+5Qh6cROaTPFLNS4lkvQ6mBzE3R6A6EEpssj7Zr2egMHgsy4XapdifqJDGC9CBiNv7s+ejI96rLNQFdg==", - "dev": true, - "dependencies": { - "browserslist": "^4.19.1", - "semver": "7.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-compat/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "dependencies": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/create-react-class": { - "version": "15.7.0", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.7.0.tgz", - "integrity": "sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng==", - "dev": true, - "peer": true, - "dependencies": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" - } - }, - "node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "node_modules/crowdin-cli": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/crowdin-cli/-/crowdin-cli-0.3.0.tgz", - "integrity": "sha1-6smYmm/n/qrzMJA5evwYfGe0YZE=", - "dev": true, - "dependencies": { - "request": "^2.53.0", - "yamljs": "^0.2.1", - "yargs": "^2.3.0" - }, - "bin": { - "crowdin-cli": "bin/crowdin-cli" - } - }, - "node_modules/css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - }, - "engines": { - "node": ">4" - } - }, - "node_modules/css-select": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", - "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^5.1.0", - "domhandler": "^4.3.0", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", - "dev": true - }, - "node_modules/css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", - "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.4", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/css-tree/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/css-what": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", - "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cssnano": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz", - "integrity": "sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==", - "dev": true, - "dependencies": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.8", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-preset-default": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz", - "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==", - "dev": true, - "dependencies": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.3", - "postcss-unique-selectors": "^4.0.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/csso": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", - "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", - "dev": true, - "dependencies": { - "css-tree": "^1.1.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/csso/node_modules/css-tree": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", - "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/csso/node_modules/mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", - "dev": true - }, - "node_modules/csso/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "dependencies": { - "array-find-index": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/decompress": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", - "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", - "dev": true, - "dependencies": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", - "dev": true, - "dependencies": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-tar/node_modules/file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", - "dev": true, - "dependencies": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-tarbz2/node_modules/file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", - "dev": true, - "dependencies": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-targz/node_modules/file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", - "dev": true, - "dependencies": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-unzip/node_modules/file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decompress-unzip/node_modules/get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "dev": true, - "dependencies": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decompress-unzip/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decompress/node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress/node_modules/make-dir/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "node_modules/detect-port-alt": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", - "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", - "dev": true, - "dependencies": { - "address": "^1.0.1", - "debug": "^2.6.0" - }, - "bin": { - "detect": "bin/detect-port", - "detect-port": "bin/detect-port" - }, - "engines": { - "node": ">= 4.2.1" - } - }, - "node_modules/detect-port-alt/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/detect-port-alt/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/diacritics-map": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", - "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "dependencies": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/discontinuous-range": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=", - "dev": true - }, - "node_modules/docusaurus": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/docusaurus/-/docusaurus-1.14.7.tgz", - "integrity": "sha512-UWqar4ZX0lEcpLc5Tg+MwZ2jhF/1n1toCQRSeoxDON/D+E9ToLr+vTRFVMP/Tk84NXSVjZFRlrjWwM2pXzvLsQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-object-rest-spread": "^7.12.1", - "@babel/polyfill": "^7.12.1", - "@babel/preset-env": "^7.12.1", - "@babel/preset-react": "^7.12.5", - "@babel/register": "^7.12.1", - "@babel/traverse": "^7.12.5", - "@babel/types": "^7.12.6", - "autoprefixer": "^9.7.5", - "babylon": "^6.18.0", - "chalk": "^3.0.0", - "classnames": "^2.2.6", - "commander": "^4.0.1", - "crowdin-cli": "^0.3.0", - "cssnano": "^4.1.10", - "enzyme": "^3.10.0", - "enzyme-adapter-react-16": "^1.15.1", - "escape-string-regexp": "^2.0.0", - "express": "^4.17.1", - "feed": "^4.2.1", - "fs-extra": "^9.0.1", - "gaze": "^1.1.3", - "github-slugger": "^1.3.0", - "glob": "^7.1.6", - "highlight.js": "^9.16.2", - "imagemin": "^6.0.0", - "imagemin-gifsicle": "^6.0.1", - "imagemin-jpegtran": "^6.0.0", - "imagemin-optipng": "^6.0.0", - "imagemin-svgo": "^7.0.0", - "lodash": "^4.17.20", - "markdown-toc": "^1.2.0", - "mkdirp": "^0.5.1", - "portfinder": "^1.0.28", - "postcss": "^7.0.23", - "prismjs": "^1.22.0", - "react": "^16.8.4", - "react-dev-utils": "^11.0.1", - "react-dom": "^16.8.4", - "remarkable": "^2.0.0", - "request": "^2.88.0", - "shelljs": "^0.8.4", - "sitemap": "^3.2.2", - "tcp-port-used": "^1.0.1", - "tiny-lr": "^1.1.1", - "tree-node-cli": "^1.2.5", - "truncate-html": "^1.0.3" - }, - "bin": { - "docusaurus-build": "lib/build-files.js", - "docusaurus-examples": "lib/copy-examples.js", - "docusaurus-publish": "lib/publish-gh-pages.js", - "docusaurus-rename-version": "lib/rename-version.js", - "docusaurus-start": "lib/start-server.js", - "docusaurus-version": "lib/version.js", - "docusaurus-write-translations": "lib/write-translations.js" - } - }, - "node_modules/docusaurus/node_modules/enzyme-adapter-react-16": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz", - "integrity": "sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g==", - "dev": true, - "dependencies": { - "enzyme-adapter-utils": "^1.14.0", - "enzyme-shallow-equal": "^1.0.4", - "has": "^1.0.3", - "object.assign": "^4.1.2", - "object.values": "^1.1.2", - "prop-types": "^15.7.2", - "react-is": "^16.13.1", - "react-test-renderer": "^16.0.0-0", - "semver": "^5.7.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "peerDependencies": { - "enzyme": "^3.0.0", - "react": "^16.0.0-0", - "react-dom": "^16.0.0-0" - } - }, - "node_modules/docusaurus/node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/docusaurus/node_modules/react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - }, - "peerDependencies": { - "react": "^16.14.0" - } - }, - "node_modules/docusaurus/node_modules/react-test-renderer": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.14.0.tgz", - "integrity": "sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==", - "dev": true, - "dependencies": { - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "react-is": "^16.8.6", - "scheduler": "^0.19.1" - }, - "peerDependencies": { - "react": "^16.14.0" - } - }, - "node_modules/docusaurus/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domhandler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", - "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", - "dev": true, - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/download": { - "version": "6.2.5", - "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", - "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", - "dev": true, - "dependencies": { - "caw": "^2.0.0", - "content-disposition": "^0.5.2", - "decompress": "^4.0.0", - "ext-name": "^5.0.0", - "file-type": "5.2.0", - "filenamify": "^2.0.0", - "get-stream": "^3.0.0", - "got": "^7.0.0", - "make-dir": "^1.0.0", - "p-event": "^1.0.0", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/download/node_modules/file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/download/node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/download/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, - "node_modules/duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.4.44", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.44.tgz", - "integrity": "sha512-tHGWiUUmY7GABK8+DNcr474cnZDTzD8x1736SlDosVH8+/vRJeqfaIBAEHFtMjddz/0T4rKKYsxEc8BwQRdBpw==", - "dev": true - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "peer": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "peer": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/enzyme": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", - "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", - "dev": true, - "dependencies": { - "array.prototype.flat": "^1.2.3", - "cheerio": "^1.0.0-rc.3", - "enzyme-shallow-equal": "^1.0.1", - "function.prototype.name": "^1.1.2", - "has": "^1.0.3", - "html-element-map": "^1.2.0", - "is-boolean-object": "^1.0.1", - "is-callable": "^1.1.5", - "is-number-object": "^1.0.4", - "is-regex": "^1.0.5", - "is-string": "^1.0.5", - "is-subset": "^0.1.1", - "lodash.escape": "^4.0.1", - "lodash.isequal": "^4.5.0", - "object-inspect": "^1.7.0", - "object-is": "^1.0.2", - "object.assign": "^4.1.0", - "object.entries": "^1.1.1", - "object.values": "^1.1.1", - "raf": "^3.4.1", - "rst-selector-parser": "^2.2.3", - "string.prototype.trim": "^1.2.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/enzyme-adapter-utils": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz", - "integrity": "sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==", - "dev": true, - "dependencies": { - "airbnb-prop-types": "^2.16.0", - "function.prototype.name": "^1.1.3", - "has": "^1.0.3", - "object.assign": "^4.1.2", - "object.fromentries": "^2.0.3", - "prop-types": "^15.7.2", - "semver": "^5.7.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "peerDependencies": { - "react": "0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0" - } - }, - "node_modules/enzyme-adapter-utils/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/enzyme-shallow-equal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz", - "integrity": "sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==", - "dev": true, - "dependencies": { - "has": "^1.0.3", - "object-is": "^1.1.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/error": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", - "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", - "dev": true, - "dependencies": { - "string-template": "~0.2.1" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/exec-buffer": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz", - "integrity": "sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==", - "dev": true, - "dependencies": { - "execa": "^0.7.0", - "p-finally": "^1.0.0", - "pify": "^3.0.0", - "rimraf": "^2.5.4", - "tempfile": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/exec-buffer/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "dependencies": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/executable": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "dev": true, - "dependencies": { - "pify": "^2.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/executable/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "dependencies": { - "fill-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/express": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", - "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", - "dev": true, - "dependencies": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.4.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.9.6", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.17.2", - "serve-static": "1.14.2", - "setprototypeof": "1.2.0", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ext-list": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", - "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", - "dev": true, - "dependencies": { - "mime-db": "^1.28.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ext-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", - "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", - "dev": true, - "dependencies": { - "ext-list": "^2.0.0", - "sort-keys-length": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", - "dev": true, - "dependencies": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-xml-parser": { - "version": "3.21.1", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", - "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", - "dev": true, - "dependencies": { - "strnum": "^1.0.4" - }, - "bin": { - "xml2js": "cli.js" - }, - "funding": { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - } - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/fbjs": { - "version": "0.8.18", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.18.tgz", - "integrity": "sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA==", - "dev": true, - "peer": true, - "dependencies": { - "core-js": "^1.0.0", - "isomorphic-fetch": "^2.1.1", - "loose-envify": "^1.0.0", - "object-assign": "^4.1.0", - "promise": "^7.1.1", - "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.30" - } - }, - "node_modules/fbjs/node_modules/core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", - "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "peer": true - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/feed": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz", - "integrity": "sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==", - "dev": true, - "dependencies": { - "xml-js": "^1.6.11" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/file-type": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-10.11.0.tgz", - "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/filename-reserved-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/filenamify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", - "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", - "dev": true, - "dependencies": { - "filename-reserved-regex": "^2.0.0", - "strip-outer": "^1.0.0", - "trim-repeated": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/filesize": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", - "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "dependencies": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fill-range/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/find-versions": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", - "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", - "dev": true, - "dependencies": { - "semver-regex": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/fork-ts-checker-webpack-plugin": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz", - "integrity": "sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.5.5", - "chalk": "^2.4.1", - "micromatch": "^3.1.10", - "minimatch": "^3.0.4", - "semver": "^5.6.0", - "tapable": "^1.0.0", - "worker-rpc": "^0.1.0" - }, - "engines": { - "node": ">=6.11.5", - "yarn": ">=1.0.0" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.2.tgz", - "integrity": "sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "dependencies": { - "globule": "^1.0.0" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proxy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", - "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", - "dev": true, - "dependencies": { - "npm-conf": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/gifsicle": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-4.0.1.tgz", - "integrity": "sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "execa": "^1.0.0", - "logalot": "^2.0.0" - }, - "bin": { - "gifsicle": "cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/gifsicle/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/gifsicle/node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/gifsicle/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/gifsicle/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/github-slugger": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.4.0.tgz", - "integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==", - "dev": true - }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "dependencies": { - "global-prefix": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/globby": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", - "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", - "dev": true, - "dependencies": { - "array-union": "^1.0.1", - "dir-glob": "2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/globby/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/globule": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.3.tgz", - "integrity": "sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg==", - "dev": true, - "dependencies": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/globule/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "dependencies": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "node_modules/gray-matter": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", - "integrity": "sha1-MELZrewqHe1qdwep7SOA+KF6Qw4=", - "dev": true, - "dependencies": { - "ansi-red": "^0.1.1", - "coffee-script": "^1.12.4", - "extend-shallow": "^2.0.1", - "js-yaml": "^3.8.1", - "toml": "^2.3.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-header": { - "version": "1.8.12", - "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.12.tgz", - "integrity": "sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ==", - "deprecated": "Removed event-stream from gulp-header", - "dev": true, - "dependencies": { - "concat-with-sourcemaps": "*", - "lodash.template": "^4.4.0", - "through2": "^2.0.0" - } - }, - "node_modules/gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", - "dev": true, - "dependencies": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "dependencies": { - "has-symbol-support-x": "^1.4.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", - "dev": true - }, - "node_modules/highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", - "deprecated": "Support has ended for 9.x series. Upgrade to @latest", - "dev": true, - "hasInstallScript": true, - "engines": { - "node": "*" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "node_modules/hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "node_modules/html-element-map": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", - "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", - "dev": true, - "dependencies": { - "array.prototype.filter": "^1.0.0", - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, - "node_modules/http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true - }, - "node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz", - "integrity": "sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA==", - "dev": true - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "node_modules/imagemin": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-6.1.0.tgz", - "integrity": "sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A==", - "dev": true, - "dependencies": { - "file-type": "^10.7.0", - "globby": "^8.0.1", - "make-dir": "^1.0.0", - "p-pipe": "^1.1.0", - "pify": "^4.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/imagemin-gifsicle": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz", - "integrity": "sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng==", - "dev": true, - "dependencies": { - "exec-buffer": "^3.0.0", - "gifsicle": "^4.0.0", - "is-gif": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/imagemin-jpegtran": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz", - "integrity": "sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g==", - "dev": true, - "dependencies": { - "exec-buffer": "^3.0.0", - "is-jpg": "^2.0.0", - "jpegtran-bin": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/imagemin-optipng": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz", - "integrity": "sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A==", - "dev": true, - "dependencies": { - "exec-buffer": "^3.0.0", - "is-png": "^1.0.0", - "optipng-bin": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/imagemin-svgo": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz", - "integrity": "sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg==", - "dev": true, - "dependencies": { - "is-svg": "^4.2.1", - "svgo": "^1.3.2" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sindresorhus/imagemin-svgo?sponsor=1" - } - }, - "node_modules/imagemin/node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/imagemin/node_modules/make-dir/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/immer": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", - "integrity": "sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" - } - }, - "node_modules/import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "dependencies": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", - "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "dependencies": { - "repeating": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/into-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", - "dev": true, - "dependencies": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/ip-regex": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", - "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "node_modules/is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "dependencies": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "node_modules/is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-gif": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-gif/-/is-gif-3.0.0.tgz", - "integrity": "sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw==", - "dev": true, - "dependencies": { - "file-type": "^10.4.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-jpg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-jpg/-/is-jpg-2.0.0.tgz", - "integrity": "sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", - "dev": true - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-png": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-png/-/is-png-1.1.0.tgz", - "integrity": "sha1-1XSxK/J1wDUEVVcLDltXqwYgd84=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "node_modules/is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-root": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", - "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", - "dev": true - }, - "node_modules/is-svg": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.3.2.tgz", - "integrity": "sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw==", - "dev": true, - "dependencies": { - "fast-xml-parser": "^3.19.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "node_modules/is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is2": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.7.tgz", - "integrity": "sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "ip-regex": "^4.1.0", - "is-url": "^1.2.4" - }, - "engines": { - "node": ">=v0.10.0" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "dev": true, - "peer": true, - "dependencies": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "node_modules/isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "dependencies": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/jpegtran-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz", - "integrity": "sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "logalot": "^2.0.0" - }, - "bin": { - "jpegtran": "cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "dev": true, - "dependencies": { - "set-getter": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/list-item": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/list-item/-/list-item-1.1.1.tgz", - "integrity": "sha1-DGXQDih8tmPMs8s4Sad+iewmilY=", - "dev": true, - "dependencies": { - "expand-range": "^1.8.1", - "extend-shallow": "^2.0.1", - "is-number": "^2.1.0", - "repeat-string": "^1.5.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/livereload-js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", - "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", - "dev": true - }, - "node_modules/load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "node_modules/lodash.assignin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", - "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=", - "dev": true - }, - "node_modules/lodash.bind": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", - "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=", - "dev": true - }, - "node_modules/lodash.chunk": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", - "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=", - "dev": true - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "node_modules/lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", - "dev": true - }, - "node_modules/lodash.escape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", - "integrity": "sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg=", - "dev": true - }, - "node_modules/lodash.filter": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", - "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=", - "dev": true - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "node_modules/lodash.foreach": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", - "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=", - "dev": true - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "node_modules/lodash.map": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", - "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.padstart": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", - "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", - "dev": true - }, - "node_modules/lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", - "dev": true - }, - "node_modules/lodash.reduce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=", - "dev": true - }, - "node_modules/lodash.reject": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", - "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=", - "dev": true - }, - "node_modules/lodash.some": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", - "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", - "dev": true - }, - "node_modules/lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", - "dev": true - }, - "node_modules/lodash.template": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", - "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", - "dev": true, - "dependencies": { - "lodash._reinterpolate": "^3.0.0", - "lodash.templatesettings": "^4.0.0" - } - }, - "node_modules/lodash.templatesettings": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", - "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", - "dev": true, - "dependencies": { - "lodash._reinterpolate": "^3.0.0" - } - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "node_modules/logalot": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", - "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", - "dev": true, - "dependencies": { - "figures": "^1.3.5", - "squeak": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "dependencies": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lpad-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", - "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", - "dev": true, - "dependencies": { - "get-stdin": "^4.0.1", - "indent-string": "^2.1.0", - "longest": "^1.0.0", - "meow": "^3.3.0" - }, - "bin": { - "lpad-align": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/markdown-link": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/markdown-link/-/markdown-link-0.1.1.tgz", - "integrity": "sha1-MsXGUZmmRXMWMi0eQinRNAfIx88=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/markdown-toc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/markdown-toc/-/markdown-toc-1.2.0.tgz", - "integrity": "sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg==", - "dev": true, - "dependencies": { - "concat-stream": "^1.5.2", - "diacritics-map": "^0.1.0", - "gray-matter": "^2.1.0", - "lazy-cache": "^2.0.2", - "list-item": "^1.1.1", - "markdown-link": "^0.1.1", - "minimist": "^1.2.0", - "mixin-deep": "^1.1.3", - "object.pick": "^1.2.0", - "remarkable": "^1.7.1", - "repeat-string": "^1.6.1", - "strip-color": "^0.1.0" - }, - "bin": { - "markdown-toc": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/markdown-toc/node_modules/autolinker": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", - "integrity": "sha1-BlK0kYgYefB3XazgzcoyM5QqTkc=", - "dev": true, - "dependencies": { - "gulp-header": "^1.7.1" - } - }, - "node_modules/markdown-toc/node_modules/remarkable": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.4.tgz", - "integrity": "sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg==", - "dev": true, - "dependencies": { - "argparse": "^1.0.10", - "autolinker": "~0.28.0" - }, - "bin": { - "remarkable": "bin/remarkable.js" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/math-random": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", - "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", - "dev": true - }, - "node_modules/mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", - "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", - "dev": true - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "dependencies": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/microevent.ts": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/microevent.ts/-/microevent.ts-0.1.1.tgz", - "integrity": "sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==", - "dev": true - }, - "node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/micromatch/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/micromatch/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", - "dev": true, - "dependencies": { - "mime-db": "1.51.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mixin-deep/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/moo": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", - "integrity": "sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==", - "dev": true - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nearley": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", - "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", - "dev": true, - "dependencies": { - "commander": "^2.19.0", - "moo": "^0.5.0", - "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6" - }, - "bin": { - "nearley-railroad": "bin/nearley-railroad.js", - "nearley-test": "bin/nearley-test.js", - "nearley-unparse": "bin/nearley-unparse.js", - "nearleyc": "bin/nearleyc.js" - }, - "funding": { - "type": "individual", - "url": "https://nearley.js.org/#give-to-nearley" - } - }, - "node_modules/nearley/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node_modules/node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "dev": true, - "peer": true, - "dependencies": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "node_modules/node-releases": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", - "dev": true - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "dev": true, - "dependencies": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-conf/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", - "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optipng-bin": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-5.1.0.tgz", - "integrity": "sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "logalot": "^2.0.0" - }, - "bin": { - "optipng": "cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/os-filter-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", - "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", - "dev": true, - "dependencies": { - "arch": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-event": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", - "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", - "dev": true, - "dependencies": { - "p-timeout": "^1.1.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-map-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", - "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", - "dev": true, - "dependencies": { - "p-reduce": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-pipe": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz", - "integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-reduce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "dev": true, - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-type/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", - "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", - "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "dev": true, - "dependencies": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/portfinder/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-calc": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", - "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - } - }, - "node_modules/postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", - "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-colormin/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-convert-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", - "dev": true, - "dependencies": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-merge-longhand/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-merge-rules/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-font-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-gradients/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", - "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-params/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-selectors/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-display-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-positions/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-repeat-style/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", - "dev": true, - "dependencies": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-string/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-timing-functions/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-unicode/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", - "dev": true, - "dependencies": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-url/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-whitespace/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-ordered-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-reduce-transforms/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.8.tgz", - "integrity": "sha512-D5PG53d209Z1Uhcc0qAZ5U3t5HagH3cxu+WLZ22jt3gLUpXM4eXXfiO14jiDWST3NNooX/E8wISfOhZ9eIjGTQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-svgo": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz", - "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-svgo/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/postcss/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prismjs": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", - "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "peer": true, - "dependencies": { - "asap": "~2.0.3" - } - }, - "node_modules/prompts": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", - "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types-exact": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/prop-types-exact/-/prop-types-exact-1.2.0.tgz", - "integrity": "sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA==", - "dev": true, - "dependencies": { - "has": "^1.0.3", - "object.assign": "^4.1.0", - "reflect.ownkeys": "^0.2.0" - } - }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true, - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, - "node_modules/qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", - "dev": true, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "dependencies": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/raf": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", - "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", - "dev": true, - "dependencies": { - "performance-now": "^2.1.0" - } - }, - "node_modules/railroad-diagrams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=", - "dev": true - }, - "node_modules/randexp": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", - "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", - "dev": true, - "dependencies": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/randomatic": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", - "dev": true, - "dependencies": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/randomatic/node_modules/is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", - "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", - "dev": true, - "dependencies": { - "bytes": "3.1.1", - "http-errors": "1.8.1", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/react": { - "version": "15.7.0", - "resolved": "https://registry.npmjs.org/react/-/react-15.7.0.tgz", - "integrity": "sha512-5/MMRYmpmM0sMTHGLossnJCrmXQIiJilD6y3YN3TzAwGFj6zdnMtFv6xmi65PHKRV+pehIHpT7oy67Sr6s9AHA==", - "dev": true, - "peer": true, - "dependencies": { - "create-react-class": "^15.6.0", - "fbjs": "^0.8.9", - "loose-envify": "^1.1.0", - "object-assign": "^4.1.0", - "prop-types": "^15.5.10" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dev-utils": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.4.tgz", - "integrity": "sha512-dx0LvIGHcOPtKbeiSUM4jqpBl3TcY7CDjZdfOIcKeznE7BWr9dg0iPG90G5yfVQ+p/rGNMXdbfStvzQZEVEi4A==", - "dev": true, - "dependencies": { - "@babel/code-frame": "7.10.4", - "address": "1.1.2", - "browserslist": "4.14.2", - "chalk": "2.4.2", - "cross-spawn": "7.0.3", - "detect-port-alt": "1.1.6", - "escape-string-regexp": "2.0.0", - "filesize": "6.1.0", - "find-up": "4.1.0", - "fork-ts-checker-webpack-plugin": "4.1.6", - "global-modules": "2.0.0", - "globby": "11.0.1", - "gzip-size": "5.1.1", - "immer": "8.0.1", - "is-root": "2.1.0", - "loader-utils": "2.0.0", - "open": "^7.0.2", - "pkg-up": "3.1.0", - "prompts": "2.4.0", - "react-error-overlay": "^6.0.9", - "recursive-readdir": "2.2.2", - "shell-quote": "1.7.2", - "strip-ansi": "6.0.0", - "text-table": "0.2.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/react-dev-utils/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/react-dev-utils/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/react-dev-utils/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/react-dev-utils/node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/browserslist": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz", - "integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001125", - "electron-to-chromium": "^1.3.564", - "escalade": "^3.0.2", - "node-releases": "^1.1.61" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - }, - "node_modules/react-dev-utils/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/react-dev-utils/node_modules/chalk/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/react-dev-utils/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/react-dev-utils/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/react-dev-utils/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/react-dev-utils/node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/fast-glob": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.10.tgz", - "integrity": "sha512-s9nFhFnvR63wls6/kM88kQqDhMu0AfdjqouE2l5GVQPbqLgyFjjU5ry/r2yKsJxpb9Py1EYNqieFrmMaX4v++A==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/react-dev-utils/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/react-dev-utils/node_modules/globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/react-dev-utils/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/react-dev-utils/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/react-dev-utils/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/react-dev-utils/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/react-dev-utils/node_modules/node-releases": { - "version": "1.1.77", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", - "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", - "dev": true - }, - "node_modules/react-dev-utils/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/react-dev-utils/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/react-dev-utils/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/react-error-overlay": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz", - "integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==", - "dev": true - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "node_modules/react-sidecar": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/react-sidecar/-/react-sidecar-0.1.1.tgz", - "integrity": "sha1-5JcLyV5JXxaI0nJ/lI78JXVViE4=", - "dev": true, - "peerDependencies": { - "react": ">= 0.11.2 < 16.0.0" - } - }, - "node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg/node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/recursive-readdir": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", - "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", - "dev": true, - "dependencies": { - "minimatch": "3.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "dependencies": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/reflect.ownkeys": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", - "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=", - "dev": true - }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "node_modules/regenerate-unicode-properties": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", - "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "node_modules/regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", - "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regex-not/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regex-not/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regexpu-core": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", - "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^9.0.0", - "regjsgen": "^0.5.2", - "regjsparser": "^0.7.0", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", - "dev": true - }, - "node_modules/regjsparser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", - "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/remarkable": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", - "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", - "dev": true, - "dependencies": { - "argparse": "^1.0.10", - "autolinker": "^3.11.0" - }, - "bin": { - "remarkable": "bin/remarkable.js" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "dependencies": { - "is-finite": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/resolve": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", - "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", - "dev": true, - "dependencies": { - "is-core-module": "^2.8.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", - "dev": true - }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "node_modules/rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/rst-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", - "integrity": "sha1-gbIw6i/MYGbInjRy3nlChdmwPZE=", - "dev": true, - "dependencies": { - "lodash.flattendeep": "^4.4.0", - "nearley": "^2.7.10" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safe-json-parse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", - "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", - "dev": true - }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "dependencies": { - "ret": "~0.1.10" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "node_modules/scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "node_modules/seek-bzip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", - "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", - "dev": true, - "dependencies": { - "commander": "^2.8.1" - }, - "bin": { - "seek-bunzip": "bin/seek-bunzip", - "seek-table": "bin/seek-bzip-table" - } - }, - "node_modules/seek-bzip/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/semver-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", - "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/semver-truncate": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", - "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", - "dev": true, - "dependencies": { - "semver": "^5.3.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/semver-truncate/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", - "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "1.8.1", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/serve-static": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", - "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-getter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", - "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", - "dev": true, - "dependencies": { - "to-object-path": "^0.3.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true, - "peer": true - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true - }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", - "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", - "dev": true - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/sitemap": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-3.2.2.tgz", - "integrity": "sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg==", - "dev": true, - "dependencies": { - "lodash.chunk": "^4.2.0", - "lodash.padstart": "^4.6.1", - "whatwg-url": "^7.0.0", - "xmlbuilder": "^13.0.0" - }, - "engines": { - "node": ">=6.0.0", - "npm": ">=4.0.0" - } - }, - "node_modules/slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "dependencies": { - "is-plain-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sort-keys-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", - "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", - "dev": true, - "dependencies": { - "sort-keys": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dev": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated", - "dev": true - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/split-string/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/split-string/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/squeak": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", - "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", - "dev": true, - "dependencies": { - "chalk": "^1.0.0", - "console-stream": "^0.1.1", - "lpad-align": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/squeak/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/squeak/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/squeak/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/squeak/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/squeak/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/squeak/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "dev": true - }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string-template": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", - "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", - "dev": true - }, - "node_modules/string.prototype.trim": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz", - "integrity": "sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "dependencies": { - "is-utf8": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-color": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", - "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", - "dev": true, - "dependencies": { - "is-natural-number": "^4.0.1" - } - }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "dependencies": { - "get-stdin": "^4.0.1" - }, - "bin": { - "strip-indent": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-outer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", - "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-outer/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/strnum": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "dev": true - }, - "node_modules/stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", - "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/stylehacks/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/svgo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", - "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", - "deprecated": "This SVGO version is no longer supported. Upgrade to v2.x.x.", - "dev": true, - "dependencies": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/svgo/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/svgo/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/svgo/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/svgo/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/svgo/node_modules/css-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", - "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "node_modules/svgo/node_modules/css-what": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", - "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/svgo/node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/svgo/node_modules/domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "node_modules/svgo/node_modules/domutils/node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/svgo/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/svgo/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/svgo/node_modules/nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "dependencies": { - "boolbase": "~1.0.0" - } - }, - "node_modules/svgo/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "dependencies": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/tcp-port-used": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz", - "integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==", - "dev": true, - "dependencies": { - "debug": "4.3.1", - "is2": "^2.0.6" - } - }, - "node_modules/tcp-port-used/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/temp-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", - "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/tempfile": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", - "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", - "dev": true, - "dependencies": { - "temp-dir": "^1.0.0", - "uuid": "^3.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "node_modules/tiny-lr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", - "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", - "dev": true, - "dependencies": { - "body": "^5.1.0", - "debug": "^3.1.0", - "faye-websocket": "~0.10.0", - "livereload-js": "^2.3.0", - "object-assign": "^4.1.0", - "qs": "^6.4.0" - } - }, - "node_modules/tiny-lr/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/toml": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz", - "integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==", - "dev": true - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/tree-node-cli": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/tree-node-cli/-/tree-node-cli-1.4.0.tgz", - "integrity": "sha512-hBc/cp7rTSHFSFvaTzmHNYyJv87UJBsxsfCoq2DtDQuMES4vhnLuvXZit/asGtZG8edWTCydWeFWoBz9LYkJdQ==", - "dev": true, - "dependencies": { - "commander": "^5.0.0" - }, - "bin": { - "tree": "bin/tree.js", - "treee": "bin/tree.js" - } - }, - "node_modules/tree-node-cli/node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/trim-repeated/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/truncate-html": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/truncate-html/-/truncate-html-1.0.4.tgz", - "integrity": "sha512-FpDAlPzpJ3jlZiNEahRs584FS3jOSQafgj4cC9DmAYPct6uMZDLY625+eErRd43G35vGDrNq3i7b4aYUQ/Bxqw==", - "dev": true, - "dependencies": { - "@types/cheerio": "^0.22.8", - "cheerio": "0.22.0" - } - }, - "node_modules/truncate-html/node_modules/cheerio": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", - "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", - "dev": true, - "dependencies": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash.assignin": "^4.0.9", - "lodash.bind": "^4.1.4", - "lodash.defaults": "^4.0.1", - "lodash.filter": "^4.4.0", - "lodash.flatten": "^4.2.0", - "lodash.foreach": "^4.3.0", - "lodash.map": "^4.4.0", - "lodash.merge": "^4.4.0", - "lodash.pick": "^4.2.1", - "lodash.reduce": "^4.4.0", - "lodash.reject": "^4.4.0", - "lodash.some": "^4.4.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/truncate-html/node_modules/css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "dependencies": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "node_modules/truncate-html/node_modules/css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/truncate-html/node_modules/dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dev": true, - "dependencies": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "node_modules/truncate-html/node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/truncate-html/node_modules/domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/truncate-html/node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "node_modules/truncate-html/node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "node_modules/truncate-html/node_modules/htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "dependencies": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "node_modules/truncate-html/node_modules/nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "dependencies": { - "boolbase": "~1.0.0" - } - }, - "node_modules/truncate-html/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "node_modules/ua-parser-js": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", - "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/ua-parser-js" - }, - { - "type": "paypal", - "url": "https://paypal.me/faisalman" - } - ], - "peer": true, - "engines": { - "node": "*" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "node_modules/uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", - "dev": true - }, - "node_modules/url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "dependencies": { - "prepend-http": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", - "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "node_modules/webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/whatwg-fetch": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", - "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", - "dev": true, - "peer": true - }, - "node_modules/whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/worker-rpc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/worker-rpc/-/worker-rpc-0.1.1.tgz", - "integrity": "sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg==", - "dev": true, - "dependencies": { - "microevent.ts": "~0.1.1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/xml-js": { - "version": "1.6.11", - "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", - "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", - "dev": true, - "dependencies": { - "sax": "^1.2.4" - }, - "bin": { - "xml-js": "bin/cli.js" - } - }, - "node_modules/xmlbuilder": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz", - "integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "node_modules/yamljs": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.2.10.tgz", - "integrity": "sha1-SBzHwlynOvWfWR8MluPOVsdXpA8=", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "glob": "^7.0.5" - }, - "bin": { - "json2yaml": "bin/json2yaml", - "yaml2json": "bin/yaml2json" - } - }, - "node_modules/yargs": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-2.3.0.tgz", - "integrity": "sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s=", - "dev": true, - "dependencies": { - "wordwrap": "0.0.2" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.16.7" - } - }, - "@babel/compat-data": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", - "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", - "dev": true - }, - "@babel/core": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.7.tgz", - "integrity": "sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.16.7", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helpers": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - } - }, - "@babel/generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", - "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.8", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", - "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", - "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.16.4", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", - "semver": "^6.3.0" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz", - "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7" - } - }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", - "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^4.7.1" - } - }, - "@babel/helper-define-polyfill-provider": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz", - "integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - } - }, - "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", - "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", - "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-module-transforms": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", - "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", - "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", - "dev": true - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", - "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-wrap-function": "^7.16.8", - "@babel/types": "^7.16.8" - } - }, - "@babel/helper-replace-supers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", - "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-simple-access": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", - "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", - "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", - "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8" - } - }, - "@babel/helpers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", - "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", - "dev": true, - "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/highlight": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz", - "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.8.tgz", - "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw==", - "dev": true - }, - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", - "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", - "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.16.7" - } - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", - "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8", - "@babel/plugin-syntax-async-generators": "^7.8.4" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", - "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-proposal-class-static-block": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.7.tgz", - "integrity": "sha512-dgqJJrcZoG/4CkMopzhPJjGxsIe9A8RlkQLnL/Vhhx8AA9ZuaRwGSlscSh42hazc7WSrya/IK7mTeoF0DP9tEw==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - } - }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", - "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - } - }, - "@babel/plugin-proposal-export-namespace-from": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", - "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", - "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" - } - }, - "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", - "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - } - }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", - "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - } - }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", - "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz", - "integrity": "sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.16.4", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.16.7" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", - "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - } - }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", - "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - } - }, - "@babel/plugin-proposal-private-methods": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz", - "integrity": "sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-proposal-private-property-in-object": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", - "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", - "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz", - "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", - "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", - "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", - "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", - "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", - "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", - "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz", - "integrity": "sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", - "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", - "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", - "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", - "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", - "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", - "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", - "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", - "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", - "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", - "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", - "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", - "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", - "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", - "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", - "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-property-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", - "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-react-display-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", - "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-react-jsx": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.7.tgz", - "integrity": "sha512-8D16ye66fxiE8m890w0BpPpngG9o9OVBBy0gH2E+2AR7qMR2ZpTYJEqLxAsoroenMId0p/wMW+Blc0meDgu0Ag==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-jsx": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/plugin-transform-react-jsx-development": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", - "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", - "dev": true, - "requires": { - "@babel/plugin-transform-react-jsx": "^7.16.7" - } - }, - "@babel/plugin-transform-react-pure-annotations": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", - "integrity": "sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", - "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", - "dev": true, - "requires": { - "regenerator-transform": "^0.14.2" - } - }, - "@babel/plugin-transform-reserved-words": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", - "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", - "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", - "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", - "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", - "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", - "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-unicode-escapes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", - "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", - "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/polyfill": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz", - "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==", - "dev": true, - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/preset-env": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.8.tgz", - "integrity": "sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.16.8", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-option": "^7.16.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-async-generator-functions": "^7.16.8", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-class-static-block": "^7.16.7", - "@babel/plugin-proposal-dynamic-import": "^7.16.7", - "@babel/plugin-proposal-export-namespace-from": "^7.16.7", - "@babel/plugin-proposal-json-strings": "^7.16.7", - "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", - "@babel/plugin-proposal-numeric-separator": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.16.7", - "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", - "@babel/plugin-proposal-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-private-methods": "^7.16.7", - "@babel/plugin-proposal-private-property-in-object": "^7.16.7", - "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.16.7", - "@babel/plugin-transform-async-to-generator": "^7.16.8", - "@babel/plugin-transform-block-scoped-functions": "^7.16.7", - "@babel/plugin-transform-block-scoping": "^7.16.7", - "@babel/plugin-transform-classes": "^7.16.7", - "@babel/plugin-transform-computed-properties": "^7.16.7", - "@babel/plugin-transform-destructuring": "^7.16.7", - "@babel/plugin-transform-dotall-regex": "^7.16.7", - "@babel/plugin-transform-duplicate-keys": "^7.16.7", - "@babel/plugin-transform-exponentiation-operator": "^7.16.7", - "@babel/plugin-transform-for-of": "^7.16.7", - "@babel/plugin-transform-function-name": "^7.16.7", - "@babel/plugin-transform-literals": "^7.16.7", - "@babel/plugin-transform-member-expression-literals": "^7.16.7", - "@babel/plugin-transform-modules-amd": "^7.16.7", - "@babel/plugin-transform-modules-commonjs": "^7.16.8", - "@babel/plugin-transform-modules-systemjs": "^7.16.7", - "@babel/plugin-transform-modules-umd": "^7.16.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", - "@babel/plugin-transform-new-target": "^7.16.7", - "@babel/plugin-transform-object-super": "^7.16.7", - "@babel/plugin-transform-parameters": "^7.16.7", - "@babel/plugin-transform-property-literals": "^7.16.7", - "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-reserved-words": "^7.16.7", - "@babel/plugin-transform-shorthand-properties": "^7.16.7", - "@babel/plugin-transform-spread": "^7.16.7", - "@babel/plugin-transform-sticky-regex": "^7.16.7", - "@babel/plugin-transform-template-literals": "^7.16.7", - "@babel/plugin-transform-typeof-symbol": "^7.16.7", - "@babel/plugin-transform-unicode-escapes": "^7.16.7", - "@babel/plugin-transform-unicode-regex": "^7.16.7", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.16.8", - "babel-plugin-polyfill-corejs2": "^0.3.0", - "babel-plugin-polyfill-corejs3": "^0.5.0", - "babel-plugin-polyfill-regenerator": "^0.3.0", - "core-js-compat": "^3.20.2", - "semver": "^6.3.0" - } - }, - "@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - } - }, - "@babel/preset-react": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", - "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-option": "^7.16.7", - "@babel/plugin-transform-react-display-name": "^7.16.7", - "@babel/plugin-transform-react-jsx": "^7.16.7", - "@babel/plugin-transform-react-jsx-development": "^7.16.7", - "@babel/plugin-transform-react-pure-annotations": "^7.16.7" - } - }, - "@babel/register": { - "version": "7.16.9", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.9.tgz", - "integrity": "sha512-jJ72wcghdRIlENfvALcyODhNoGE5j75cYHdC+aQMh6cU/P86tiiXTp9XYZct1UxUMo/4+BgQRyNZEGx0KWGS+g==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "find-cache-dir": "^2.0.0", - "make-dir": "^2.1.0", - "pirates": "^4.0.0", - "source-map-support": "^0.5.16" - } - }, - "@babel/runtime": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", - "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/traverse": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz", - "integrity": "sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.16.8", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.16.8", - "@babel/types": "^7.16.8", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", - "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "dependencies": { - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - } - } - }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", - "dev": true - }, - "@types/cheerio": { - "version": "0.22.30", - "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.30.tgz", - "integrity": "sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/node": { - "version": "17.0.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz", - "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", - "dev": true - }, - "@types/q": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", - "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==", - "dev": true - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", - "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", - "dev": true - }, - "airbnb-prop-types": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz", - "integrity": "sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==", - "dev": true, - "requires": { - "array.prototype.find": "^2.1.1", - "function.prototype.name": "^1.1.2", - "is-regex": "^1.1.0", - "object-is": "^1.1.2", - "object.assign": "^4.1.0", - "object.entries": "^1.1.2", - "prop-types": "^15.7.2", - "prop-types-exact": "^1.2.0", - "react-is": "^16.13.1" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "ansi-red": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "arch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", - "dev": true - }, - "archive-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", - "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", - "dev": true, - "requires": { - "file-type": "^4.2.0" - }, - "dependencies": { - "file-type": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", - "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", - "dev": true - } - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "array.prototype.filter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz", - "integrity": "sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - } - }, - "array.prototype.find": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.1.2.tgz", - "integrity": "sha512-00S1O4ewO95OmmJW7EesWfQlrCrLEL8kZ40w3+GkLX2yTt0m2ggcePPa2uHPJ9KUmJvwRq+lCV9bD8Yim23x/Q==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - } - }, - "array.prototype.flat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - } - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "peer": true - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autolinker": { - "version": "3.14.3", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.14.3.tgz", - "integrity": "sha512-t81i2bCpS+s+5FIhatoww9DmpjhbdiimuU9ATEuLxtZMQ7jLv9fyFn7SWNG8IkEfD4AmYyirL1ss9k1aqVWRvg==", - "dev": true, - "requires": { - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "autoprefixer": { - "version": "9.8.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz", - "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==", - "dev": true, - "requires": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "picocolors": "^0.2.1", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-plugin-polyfill-corejs2": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz", - "integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.0", - "semver": "^6.1.1" - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.0.tgz", - "integrity": "sha512-Hcrgnmkf+4JTj73GbK3bBhlVPiLL47owUAnoJIf69Hakl3q+KfodbDXiZWGMM7iqCZTxCG3Z2VRfPNYES4rXqQ==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.0", - "core-js-compat": "^3.20.0" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz", - "integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.0" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "bin-build": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", - "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", - "dev": true, - "requires": { - "decompress": "^4.0.0", - "download": "^6.2.2", - "execa": "^0.7.0", - "p-map-series": "^1.0.0", - "tempfile": "^2.0.0" - } - }, - "bin-check": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", - "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "executable": "^4.1.0" - } - }, - "bin-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", - "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "find-versions": "^3.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "bin-version-check": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", - "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", - "dev": true, - "requires": { - "bin-version": "^3.0.0", - "semver": "^5.6.0", - "semver-truncate": "^1.1.2" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "bin-wrapper": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", - "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", - "dev": true, - "requires": { - "bin-check": "^4.1.0", - "bin-version-check": "^4.0.0", - "download": "^7.1.0", - "import-lazy": "^3.1.0", - "os-filter-obj": "^2.0.0", - "pify": "^4.0.1" - }, - "dependencies": { - "download": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", - "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", - "dev": true, - "requires": { - "archive-type": "^4.0.0", - "caw": "^2.0.1", - "content-disposition": "^0.5.2", - "decompress": "^4.2.0", - "ext-name": "^5.0.0", - "file-type": "^8.1.0", - "filenamify": "^2.0.0", - "get-stream": "^3.0.0", - "got": "^8.3.1", - "make-dir": "^1.2.0", - "p-event": "^2.1.0", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "file-type": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", - "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", - "dev": true - }, - "got": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", - "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "p-cancelable": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", - "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", - "dev": true - }, - "p-event": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", - "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", - "dev": true, - "requires": { - "p-timeout": "^2.0.1" - } - }, - "p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - } - } - } - }, - "bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "body": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", - "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", - "dev": true, - "requires": { - "continuable-cache": "^0.3.1", - "error": "^7.0.0", - "raw-body": "~1.1.0", - "safe-json-parse": "~1.0.1" - }, - "dependencies": { - "bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", - "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", - "dev": true - }, - "raw-body": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", - "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", - "dev": true, - "requires": { - "bytes": "1", - "string_decoder": "0.10" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", - "dev": true, - "requires": { - "bytes": "3.1.1", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.6", - "raw-body": "2.4.2", - "type-is": "~1.6.18" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "browserslist": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", - "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001286", - "electron-to-chromium": "^1.4.17", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" - }, - "dependencies": { - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - } - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "bytes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", - "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cacheable-request": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", - "dev": true, - "requires": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" - }, - "dependencies": { - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true - }, - "normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", - "dev": true, - "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - } - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - } - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001299", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", - "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "caw": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", - "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", - "dev": true, - "requires": { - "get-proxy": "^2.0.0", - "isurl": "^1.0.0-alpha5", - "tunnel-agent": "^0.6.0", - "url-to-options": "^1.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", - "dev": true, - "requires": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - } - }, - "cheerio-select": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", - "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", - "dev": true, - "requires": { - "css-select": "^4.1.3", - "css-what": "^5.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.7.0" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==", - "dev": true - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "coa": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", - "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", - "dev": true, - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "coffee-script": { - "version": "1.12.7", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", - "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dev": true, - "requires": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - }, - "dependencies": { - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - } - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "color-string": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz", - "integrity": "sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "concat-with-sourcemaps": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", - "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "console-stream": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", - "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", - "dev": true - }, - "content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "requires": { - "safe-buffer": "5.2.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "continuable-cache": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", - "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", - "dev": true - }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "dev": true - }, - "core-js-compat": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.2.tgz", - "integrity": "sha512-qZEzVQ+5Qh6cROaTPFLNS4lkvQ6mBzE3R6A6EEpssj7Zr2egMHgsy4XapdifqJDGC9CBiNv7s+ejI96rLNQFdg==", - "dev": true, - "requires": { - "browserslist": "^4.19.1", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } - } - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, - "create-react-class": { - "version": "15.7.0", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.7.0.tgz", - "integrity": "sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng==", - "dev": true, - "peer": true, - "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crowdin-cli": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/crowdin-cli/-/crowdin-cli-0.3.0.tgz", - "integrity": "sha1-6smYmm/n/qrzMJA5evwYfGe0YZE=", - "dev": true, - "requires": { - "request": "^2.53.0", - "yamljs": "^0.2.1", - "yargs": "^2.3.0" - } - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - } - }, - "css-select": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", - "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^5.1.0", - "domhandler": "^4.3.0", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - } - }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", - "dev": true - }, - "css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", - "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", - "dev": true, - "requires": { - "mdn-data": "2.0.4", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "css-what": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", - "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", - "dev": true - }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true - }, - "cssnano": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz", - "integrity": "sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.8", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "cssnano-preset-default": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz", - "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==", - "dev": true, - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.3", - "postcss-unique-selectors": "^4.0.1" - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", - "dev": true - }, - "csso": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", - "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", - "dev": true, - "requires": { - "css-tree": "^1.1.2" - }, - "dependencies": { - "css-tree": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", - "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", - "dev": true, - "requires": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" - } - }, - "mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "decompress": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", - "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", - "dev": true, - "requires": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - }, - "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", - "dev": true, - "requires": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" - }, - "dependencies": { - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true - } - } - }, - "decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", - "dev": true, - "requires": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" - }, - "dependencies": { - "file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", - "dev": true - } - } - }, - "decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", - "dev": true, - "requires": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" - }, - "dependencies": { - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true - } - } - }, - "decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", - "dev": true, - "requires": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" - }, - "dependencies": { - "file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", - "dev": true - }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-port-alt": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", - "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", - "dev": true, - "requires": { - "address": "^1.0.1", - "debug": "^2.6.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "diacritics-map": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", - "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=", - "dev": true - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "discontinuous-range": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=", - "dev": true - }, - "docusaurus": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/docusaurus/-/docusaurus-1.14.7.tgz", - "integrity": "sha512-UWqar4ZX0lEcpLc5Tg+MwZ2jhF/1n1toCQRSeoxDON/D+E9ToLr+vTRFVMP/Tk84NXSVjZFRlrjWwM2pXzvLsQ==", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-object-rest-spread": "^7.12.1", - "@babel/polyfill": "^7.12.1", - "@babel/preset-env": "^7.12.1", - "@babel/preset-react": "^7.12.5", - "@babel/register": "^7.12.1", - "@babel/traverse": "^7.12.5", - "@babel/types": "^7.12.6", - "autoprefixer": "^9.7.5", - "babylon": "^6.18.0", - "chalk": "^3.0.0", - "classnames": "^2.2.6", - "commander": "^4.0.1", - "crowdin-cli": "^0.3.0", - "cssnano": "^4.1.10", - "enzyme": "^3.10.0", - "enzyme-adapter-react-16": "^1.15.1", - "escape-string-regexp": "^2.0.0", - "express": "^4.17.1", - "feed": "^4.2.1", - "fs-extra": "^9.0.1", - "gaze": "^1.1.3", - "github-slugger": "^1.3.0", - "glob": "^7.1.6", - "highlight.js": "^9.16.2", - "imagemin": "^6.0.0", - "imagemin-gifsicle": "^6.0.1", - "imagemin-jpegtran": "^6.0.0", - "imagemin-optipng": "^6.0.0", - "imagemin-svgo": "^7.0.0", - "lodash": "^4.17.20", - "markdown-toc": "^1.2.0", - "mkdirp": "^0.5.1", - "portfinder": "^1.0.28", - "postcss": "^7.0.23", - "prismjs": "^1.22.0", - "react": "^16.8.4", - "react-dev-utils": "^11.0.1", - "react-dom": "^16.8.4", - "remarkable": "^2.0.0", - "request": "^2.88.0", - "shelljs": "^0.8.4", - "sitemap": "^3.2.2", - "tcp-port-used": "^1.0.1", - "tiny-lr": "^1.1.1", - "tree-node-cli": "^1.2.5", - "truncate-html": "^1.0.3" - }, - "dependencies": { - "enzyme-adapter-react-16": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz", - "integrity": "sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g==", - "dev": true, - "requires": { - "enzyme-adapter-utils": "^1.14.0", - "enzyme-shallow-equal": "^1.0.4", - "has": "^1.0.3", - "object.assign": "^4.1.2", - "object.values": "^1.1.2", - "prop-types": "^15.7.2", - "react-is": "^16.13.1", - "react-test-renderer": "^16.0.0-0", - "semver": "^5.7.0" - } - }, - "react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "react-test-renderer": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.14.0.tgz", - "integrity": "sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==", - "dev": true, - "requires": { - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "react-is": "^16.8.6", - "scheduler": "^0.19.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - } - }, - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", - "dev": true - }, - "domhandler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", - "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", - "dev": true, - "requires": { - "domelementtype": "^2.2.0" - } - }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "download": { - "version": "6.2.5", - "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", - "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", - "dev": true, - "requires": { - "caw": "^2.0.0", - "content-disposition": "^0.5.2", - "decompress": "^4.0.0", - "ext-name": "^5.0.0", - "file-type": "5.2.0", - "filenamify": "^2.0.0", - "get-stream": "^3.0.0", - "got": "^7.0.0", - "make-dir": "^1.0.0", - "p-event": "^1.0.0", - "pify": "^3.0.0" - }, - "dependencies": { - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.4.44", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.44.tgz", - "integrity": "sha512-tHGWiUUmY7GABK8+DNcr474cnZDTzD8x1736SlDosVH8+/vRJeqfaIBAEHFtMjddz/0T4rKKYsxEc8BwQRdBpw==", - "dev": true - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "peer": true, - "requires": { - "iconv-lite": "^0.6.2" - }, - "dependencies": { - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "peer": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - } - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true - }, - "enzyme": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", - "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", - "dev": true, - "requires": { - "array.prototype.flat": "^1.2.3", - "cheerio": "^1.0.0-rc.3", - "enzyme-shallow-equal": "^1.0.1", - "function.prototype.name": "^1.1.2", - "has": "^1.0.3", - "html-element-map": "^1.2.0", - "is-boolean-object": "^1.0.1", - "is-callable": "^1.1.5", - "is-number-object": "^1.0.4", - "is-regex": "^1.0.5", - "is-string": "^1.0.5", - "is-subset": "^0.1.1", - "lodash.escape": "^4.0.1", - "lodash.isequal": "^4.5.0", - "object-inspect": "^1.7.0", - "object-is": "^1.0.2", - "object.assign": "^4.1.0", - "object.entries": "^1.1.1", - "object.values": "^1.1.1", - "raf": "^3.4.1", - "rst-selector-parser": "^2.2.3", - "string.prototype.trim": "^1.2.1" - } - }, - "enzyme-adapter-utils": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz", - "integrity": "sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==", - "dev": true, - "requires": { - "airbnb-prop-types": "^2.16.0", - "function.prototype.name": "^1.1.3", - "has": "^1.0.3", - "object.assign": "^4.1.2", - "object.fromentries": "^2.0.3", - "prop-types": "^15.7.2", - "semver": "^5.7.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "enzyme-shallow-equal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz", - "integrity": "sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==", - "dev": true, - "requires": { - "has": "^1.0.3", - "object-is": "^1.1.2" - } - }, - "error": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", - "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", - "dev": true, - "requires": { - "string-template": "~0.2.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - } - }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "exec-buffer": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz", - "integrity": "sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "p-finally": "^1.0.0", - "pify": "^3.0.0", - "rimraf": "^2.5.4", - "tempfile": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "executable": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "dev": true, - "requires": { - "pify": "^2.2.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "express": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", - "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.4.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.9.6", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.17.2", - "serve-static": "1.14.2", - "setprototypeof": "1.2.0", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } - }, - "ext-list": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", - "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", - "dev": true, - "requires": { - "mime-db": "^1.28.0" - } - }, - "ext-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", - "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", - "dev": true, - "requires": { - "ext-list": "^2.0.0", - "sort-keys-length": "^1.0.0" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-xml-parser": { - "version": "3.21.1", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", - "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", - "dev": true, - "requires": { - "strnum": "^1.0.4" - } - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "fbjs": { - "version": "0.8.18", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.18.tgz", - "integrity": "sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA==", - "dev": true, - "peer": true, - "requires": { - "core-js": "^1.0.0", - "isomorphic-fetch": "^2.1.1", - "loose-envify": "^1.0.0", - "object-assign": "^4.1.0", - "promise": "^7.1.1", - "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.30" - }, - "dependencies": { - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", - "dev": true, - "peer": true - } - } - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "feed": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz", - "integrity": "sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==", - "dev": true, - "requires": { - "xml-js": "^1.6.11" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "file-type": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-10.11.0.tgz", - "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==", - "dev": true - }, - "filename-reserved-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", - "dev": true - }, - "filenamify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", - "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", - "dev": true, - "requires": { - "filename-reserved-regex": "^2.0.0", - "strip-outer": "^1.0.0", - "trim-repeated": "^1.0.0" - } - }, - "filesize": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", - "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==", - "dev": true - }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "find-versions": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", - "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", - "dev": true, - "requires": { - "semver-regex": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "fork-ts-checker-webpack-plugin": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz", - "integrity": "sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.5.5", - "chalk": "^2.4.1", - "micromatch": "^3.1.10", - "minimatch": "^3.0.4", - "semver": "^5.6.0", - "tapable": "^1.0.0", - "worker-rpc": "^0.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - } - }, - "functions-have-names": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.2.tgz", - "integrity": "sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==", - "dev": true - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "requires": { - "globule": "^1.0.0" - } - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-proxy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", - "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", - "dev": true, - "requires": { - "npm-conf": "^1.1.0" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "gifsicle": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-4.0.1.tgz", - "integrity": "sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg==", - "dev": true, - "requires": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "execa": "^1.0.0", - "logalot": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "github-slugger": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.4.0.tgz", - "integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==", - "dev": true - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "requires": { - "global-prefix": "^3.0.0" - } - }, - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "globby": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", - "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "globule": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.3.tgz", - "integrity": "sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg==", - "dev": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - }, - "dependencies": { - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "gray-matter": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", - "integrity": "sha1-MELZrewqHe1qdwep7SOA+KF6Qw4=", - "dev": true, - "requires": { - "ansi-red": "^0.1.1", - "coffee-script": "^1.12.4", - "extend-shallow": "^2.0.1", - "js-yaml": "^3.8.1", - "toml": "^2.3.2" - } - }, - "gulp-header": { - "version": "1.8.12", - "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.12.tgz", - "integrity": "sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ==", - "dev": true, - "requires": { - "concat-with-sourcemaps": "*", - "lodash.template": "^4.4.0", - "through2": "^2.0.0" - } - }, - "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true - }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", - "dev": true - }, - "highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "html-element-map": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", - "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", - "dev": true, - "requires": { - "array.prototype.filter": "^1.0.0", - "call-bind": "^1.0.2" - } - }, - "htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true - }, - "http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - } - }, - "http-parser-js": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz", - "integrity": "sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA==", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "imagemin": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-6.1.0.tgz", - "integrity": "sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A==", - "dev": true, - "requires": { - "file-type": "^10.7.0", - "globby": "^8.0.1", - "make-dir": "^1.0.0", - "p-pipe": "^1.1.0", - "pify": "^4.0.1", - "replace-ext": "^1.0.0" - }, - "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - } - } - }, - "imagemin-gifsicle": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz", - "integrity": "sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng==", - "dev": true, - "requires": { - "exec-buffer": "^3.0.0", - "gifsicle": "^4.0.0", - "is-gif": "^3.0.0" - } - }, - "imagemin-jpegtran": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz", - "integrity": "sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g==", - "dev": true, - "requires": { - "exec-buffer": "^3.0.0", - "is-jpg": "^2.0.0", - "jpegtran-bin": "^4.0.0" - } - }, - "imagemin-optipng": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz", - "integrity": "sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A==", - "dev": true, - "requires": { - "exec-buffer": "^3.0.0", - "is-png": "^1.0.0", - "optipng-bin": "^5.0.0" - } - }, - "imagemin-svgo": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz", - "integrity": "sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg==", - "dev": true, - "requires": { - "is-svg": "^4.2.1", - "svgo": "^1.3.2" - } - }, - "immer": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", - "integrity": "sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==", - "dev": true - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", - "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "into-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", - "dev": true, - "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - } - }, - "ip-regex": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", - "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true - }, - "is-gif": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-gif/-/is-gif-3.0.0.tgz", - "integrity": "sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw==", - "dev": true, - "requires": { - "file-type": "^10.4.0" - } - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-jpg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-jpg/-/is-jpg-2.0.0.tgz", - "integrity": "sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc=", - "dev": true - }, - "is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", - "dev": true - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-png": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-png/-/is-png-1.1.0.tgz", - "integrity": "sha1-1XSxK/J1wDUEVVcLDltXqwYgd84=", - "dev": true - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true - }, - "is-root": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", - "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", - "dev": true - }, - "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", - "dev": true - }, - "is-svg": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.3.2.tgz", - "integrity": "sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw==", - "dev": true, - "requires": { - "fast-xml-parser": "^3.19.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, - "is2": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.7.tgz", - "integrity": "sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "ip-regex": "^4.1.0", - "is-url": "^1.2.4" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "dev": true, - "peer": true, - "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "jpegtran-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz", - "integrity": "sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ==", - "dev": true, - "requires": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "logalot": "^2.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true - }, - "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "dev": true, - "requires": { - "set-getter": "^0.1.0" - } - }, - "list-item": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/list-item/-/list-item-1.1.1.tgz", - "integrity": "sha1-DGXQDih8tmPMs8s4Sad+iewmilY=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "extend-shallow": "^2.0.1", - "is-number": "^2.1.0", - "repeat-string": "^1.5.2" - } - }, - "livereload-js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", - "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", - "dev": true - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash.assignin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", - "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=", - "dev": true - }, - "lodash.bind": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", - "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=", - "dev": true - }, - "lodash.chunk": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", - "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", - "dev": true - }, - "lodash.escape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", - "integrity": "sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg=", - "dev": true - }, - "lodash.filter": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", - "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=", - "dev": true - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "lodash.foreach": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", - "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.map": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", - "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.padstart": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", - "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", - "dev": true - }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", - "dev": true - }, - "lodash.reduce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=", - "dev": true - }, - "lodash.reject": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", - "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=", - "dev": true - }, - "lodash.some": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", - "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", - "dev": true - }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", - "dev": true - }, - "lodash.template": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", - "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.templatesettings": "^4.0.0" - } - }, - "lodash.templatesettings": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", - "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0" - } - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "logalot": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", - "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", - "dev": true, - "requires": { - "figures": "^1.3.5", - "squeak": "^1.0.0" - } - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lpad-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", - "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "indent-string": "^2.1.0", - "longest": "^1.0.0", - "meow": "^3.3.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "markdown-link": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/markdown-link/-/markdown-link-0.1.1.tgz", - "integrity": "sha1-MsXGUZmmRXMWMi0eQinRNAfIx88=", - "dev": true - }, - "markdown-toc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/markdown-toc/-/markdown-toc-1.2.0.tgz", - "integrity": "sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg==", - "dev": true, - "requires": { - "concat-stream": "^1.5.2", - "diacritics-map": "^0.1.0", - "gray-matter": "^2.1.0", - "lazy-cache": "^2.0.2", - "list-item": "^1.1.1", - "markdown-link": "^0.1.1", - "minimist": "^1.2.0", - "mixin-deep": "^1.1.3", - "object.pick": "^1.2.0", - "remarkable": "^1.7.1", - "repeat-string": "^1.6.1", - "strip-color": "^0.1.0" - }, - "dependencies": { - "autolinker": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", - "integrity": "sha1-BlK0kYgYefB3XazgzcoyM5QqTkc=", - "dev": true, - "requires": { - "gulp-header": "^1.7.1" - } - }, - "remarkable": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.4.tgz", - "integrity": "sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg==", - "dev": true, - "requires": { - "argparse": "^1.0.10", - "autolinker": "~0.28.0" - } - } - } - }, - "math-random": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", - "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", - "dev": true - }, - "mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", - "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "microevent.ts": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/microevent.ts/-/microevent.ts-0.1.1.tgz", - "integrity": "sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "dev": true - }, - "mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", - "dev": true, - "requires": { - "mime-db": "1.51.0" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "moo": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", - "integrity": "sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "nearley": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", - "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", - "dev": true, - "requires": { - "commander": "^2.19.0", - "moo": "^0.5.0", - "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "dev": true, - "peer": true, - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "node-releases": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true - }, - "npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "dev": true, - "requires": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", - "dev": true, - "requires": { - "boolbase": "^1.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", - "dev": true - }, - "object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", - "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "requires": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - } - }, - "optipng-bin": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-5.1.0.tgz", - "integrity": "sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA==", - "dev": true, - "requires": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "logalot": "^2.0.0" - } - }, - "os-filter-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", - "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", - "dev": true, - "requires": { - "arch": "^2.1.0" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true - }, - "p-event": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", - "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", - "dev": true, - "requires": { - "p-timeout": "^1.1.1" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", - "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", - "dev": true, - "requires": { - "p-reduce": "^1.0.0" - } - }, - "p-pipe": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz", - "integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=", - "dev": true - }, - "p-reduce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", - "dev": true - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "requires": { - "parse5": "^6.0.1" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pirates": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", - "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", - "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "requires": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-calc": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", - "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", - "dev": true, - "requires": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", - "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", - "dev": true, - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", - "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", - "dev": true, - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", - "dev": true, - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-selector-parser": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.8.tgz", - "integrity": "sha512-D5PG53d209Z1Uhcc0qAZ5U3t5HagH3cxu+WLZ22jt3gLUpXM4eXXfiO14jiDWST3NNooX/E8wISfOhZ9eIjGTQ==", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - } - }, - "postcss-svgo": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz", - "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } - } - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "prismjs": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", - "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "peer": true, - "requires": { - "asap": "~2.0.3" - } - }, - "prompts": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", - "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", - "dev": true, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - } - }, - "prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "prop-types-exact": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/prop-types-exact/-/prop-types-exact-1.2.0.tgz", - "integrity": "sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA==", - "dev": true, - "requires": { - "has": "^1.0.3", - "object.assign": "^4.1.0", - "reflect.ownkeys": "^0.2.0" - } - }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true - }, - "proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", - "dev": true - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "raf": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", - "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", - "dev": true, - "requires": { - "performance-now": "^2.1.0" - } - }, - "railroad-diagrams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=", - "dev": true - }, - "randexp": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", - "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", - "dev": true, - "requires": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - } - }, - "randomatic": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true - }, - "raw-body": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", - "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", - "dev": true, - "requires": { - "bytes": "3.1.1", - "http-errors": "1.8.1", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "react": { - "version": "15.7.0", - "resolved": "https://registry.npmjs.org/react/-/react-15.7.0.tgz", - "integrity": "sha512-5/MMRYmpmM0sMTHGLossnJCrmXQIiJilD6y3YN3TzAwGFj6zdnMtFv6xmi65PHKRV+pehIHpT7oy67Sr6s9AHA==", - "dev": true, - "peer": true, - "requires": { - "create-react-class": "^15.6.0", - "fbjs": "^0.8.9", - "loose-envify": "^1.1.0", - "object-assign": "^4.1.0", - "prop-types": "^15.5.10" - } - }, - "react-dev-utils": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.4.tgz", - "integrity": "sha512-dx0LvIGHcOPtKbeiSUM4jqpBl3TcY7CDjZdfOIcKeznE7BWr9dg0iPG90G5yfVQ+p/rGNMXdbfStvzQZEVEi4A==", - "dev": true, - "requires": { - "@babel/code-frame": "7.10.4", - "address": "1.1.2", - "browserslist": "4.14.2", - "chalk": "2.4.2", - "cross-spawn": "7.0.3", - "detect-port-alt": "1.1.6", - "escape-string-regexp": "2.0.0", - "filesize": "6.1.0", - "find-up": "4.1.0", - "fork-ts-checker-webpack-plugin": "4.1.6", - "global-modules": "2.0.0", - "globby": "11.0.1", - "gzip-size": "5.1.1", - "immer": "8.0.1", - "is-root": "2.1.0", - "loader-utils": "2.0.0", - "open": "^7.0.2", - "pkg-up": "3.1.0", - "prompts": "2.4.0", - "react-error-overlay": "^6.0.9", - "recursive-readdir": "2.2.2", - "shell-quote": "1.7.2", - "strip-ansi": "6.0.0", - "text-table": "0.2.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz", - "integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001125", - "electron-to-chromium": "^1.3.564", - "escalade": "^3.0.2", - "node-releases": "^1.1.61" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "fast-glob": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.10.tgz", - "integrity": "sha512-s9nFhFnvR63wls6/kM88kQqDhMu0AfdjqouE2l5GVQPbqLgyFjjU5ry/r2yKsJxpb9Py1EYNqieFrmMaX4v++A==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "node-releases": { - "version": "1.1.77", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", - "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", - "dev": true - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "react-error-overlay": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz", - "integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==", - "dev": true - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "react-sidecar": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/react-sidecar/-/react-sidecar-0.1.1.tgz", - "integrity": "sha1-5JcLyV5JXxaI0nJ/lI78JXVViE4=", - "dev": true, - "requires": {} - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "recursive-readdir": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", - "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", - "dev": true, - "requires": { - "minimatch": "3.0.4" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "reflect.ownkeys": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", - "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=", - "dev": true - }, - "regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", - "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", - "dev": true, - "requires": { - "regenerate": "^1.4.2" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", - "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.4" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "regexpu-core": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", - "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", - "dev": true, - "requires": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^9.0.0", - "regjsgen": "^0.5.2", - "regjsparser": "^0.7.0", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" - } - }, - "regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", - "dev": true - }, - "regjsparser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", - "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "remarkable": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", - "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", - "dev": true, - "requires": { - "argparse": "^1.0.10", - "autolinker": "^3.11.0" - } - }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true - } - } - }, - "resolve": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", - "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", - "dev": true, - "requires": { - "is-core-module": "^2.8.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "rst-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", - "integrity": "sha1-gbIw6i/MYGbInjRy3nlChdmwPZE=", - "dev": true, - "requires": { - "lodash.flattendeep": "^4.4.0", - "nearley": "^2.7.10" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-json-parse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", - "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "seek-bzip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", - "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", - "dev": true, - "requires": { - "commander": "^2.8.1" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "semver-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", - "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", - "dev": true - }, - "semver-truncate": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", - "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", - "dev": true, - "requires": { - "semver": "^5.3.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", - "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "1.8.1", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "serve-static": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", - "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.2" - } - }, - "set-getter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", - "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", - "dev": true, - "requires": { - "to-object-path": "^0.3.0" - } - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true, - "peer": true - }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true - }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signal-exit": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", - "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", - "dev": true - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true - } - } - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "sitemap": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-3.2.2.tgz", - "integrity": "sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg==", - "dev": true, - "requires": { - "lodash.chunk": "^4.2.0", - "lodash.padstart": "^4.6.1", - "whatwg-url": "^7.0.0", - "xmlbuilder": "^13.0.0" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "sort-keys-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", - "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", - "dev": true, - "requires": { - "sort-keys": "^1.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "squeak": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", - "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", - "dev": true, - "requires": { - "chalk": "^1.0.0", - "console-stream": "^0.1.1", - "lpad-align": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "string-template": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", - "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", - "dev": true - }, - "string.prototype.trim": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz", - "integrity": "sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-color": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", - "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", - "dev": true - }, - "strip-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", - "dev": true, - "requires": { - "is-natural-number": "^4.0.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-outer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", - "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.2" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "strnum": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "dev": true - }, - "stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", - "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "svgo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", - "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "css-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", - "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "css-what": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", - "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", - "dev": true - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - }, - "dependencies": { - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - } - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true - }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - } - }, - "tcp-port-used": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz", - "integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==", - "dev": true, - "requires": { - "debug": "4.3.1", - "is2": "^2.0.6" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } - } - }, - "temp-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", - "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", - "dev": true - }, - "tempfile": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", - "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", - "dev": true, - "requires": { - "temp-dir": "^1.0.0", - "uuid": "^3.0.1" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "tiny-lr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", - "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", - "dev": true, - "requires": { - "body": "^5.1.0", - "debug": "^3.1.0", - "faye-websocket": "~0.10.0", - "livereload-js": "^2.3.0", - "object-assign": "^4.1.0", - "qs": "^6.4.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true - }, - "toml": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz", - "integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "tree-node-cli": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/tree-node-cli/-/tree-node-cli-1.4.0.tgz", - "integrity": "sha512-hBc/cp7rTSHFSFvaTzmHNYyJv87UJBsxsfCoq2DtDQuMES4vhnLuvXZit/asGtZG8edWTCydWeFWoBz9LYkJdQ==", - "dev": true, - "requires": { - "commander": "^5.0.0" - }, - "dependencies": { - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true - } - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.2" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "truncate-html": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/truncate-html/-/truncate-html-1.0.4.tgz", - "integrity": "sha512-FpDAlPzpJ3jlZiNEahRs584FS3jOSQafgj4cC9DmAYPct6uMZDLY625+eErRd43G35vGDrNq3i7b4aYUQ/Bxqw==", - "dev": true, - "requires": { - "@types/cheerio": "^0.22.8", - "cheerio": "0.22.0" - }, - "dependencies": { - "cheerio": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", - "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", - "dev": true, - "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash.assignin": "^4.0.9", - "lodash.bind": "^4.1.4", - "lodash.defaults": "^4.0.1", - "lodash.filter": "^4.4.0", - "lodash.flatten": "^4.2.0", - "lodash.foreach": "^4.3.0", - "lodash.map": "^4.4.0", - "lodash.merge": "^4.4.0", - "lodash.pick": "^4.2.1", - "lodash.reduce": "^4.4.0", - "lodash.reject": "^4.4.0", - "lodash.some": "^4.4.0" - } - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", - "dev": true - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "ua-parser-js": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", - "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", - "dev": true, - "peer": true - }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, - "unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "requires": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", - "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - } - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - } - } - }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, - "websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "requires": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true - }, - "whatwg-fetch": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", - "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", - "dev": true, - "peer": true - }, - "whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - }, - "worker-rpc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/worker-rpc/-/worker-rpc-0.1.1.tgz", - "integrity": "sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg==", - "dev": true, - "requires": { - "microevent.ts": "~0.1.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xml-js": { - "version": "1.6.11", - "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", - "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", - "dev": true, - "requires": { - "sax": "^1.2.4" - } - }, - "xmlbuilder": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz", - "integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yamljs": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.2.10.tgz", - "integrity": "sha1-SBzHwlynOvWfWR8MluPOVsdXpA8=", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "glob": "^7.0.5" - } - }, - "yargs": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-2.3.0.tgz", - "integrity": "sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s=", - "dev": true, - "requires": { - "wordwrap": "0.0.2" - } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - } - } -} diff --git a/website/package.json b/website/package.json deleted file mode 100644 index 29180a4c6..000000000 --- a/website/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "scripts": { - "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", - "publish-gh-pages": "docusaurus-publish", - "write-translations": "docusaurus-write-translations", - "version": "docusaurus-version", - "rename-version": "docusaurus-rename-version" - }, - "devDependencies": { - "docusaurus": "^1.12.0", - "react-sidecar": "^0.1.1" - } -} diff --git a/website/pages/en/index.js b/website/pages/en/index.js deleted file mode 100755 index 8a4c7738a..000000000 --- a/website/pages/en/index.js +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */ -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -class HomeSplash extends React.Component { - render() { - const {siteConfig, language = ''} = this.props; - const {baseUrl, docsUrl} = siteConfig; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; - - const SplashContainer = props => ( -
-
-
{props.children}
-
-
- ); - - const Logo = props => ( -
- Project Logo -
- ); - - const ProjectTitle = () => ( -

- {siteConfig.title} - {siteConfig.tagline} -

- ); - - const PromoSection = props => ( -
-
-
{props.children}
-
-
- ); - - const Button = props => ( - - ); - - return ( - -
- - - - - - - -
-
- ); - } -} - -class Index extends React.Component { - render() { - const {config: siteConfig, language = ''} = this.props; - const {baseUrl} = siteConfig; - - const Block = props => ( - - - - ); - - // const FeatureCallout = () => ( - //
- //

Welcome to zio-sql

- // - // TODO: Tagline - // - - // - // TODO: Long description (paragraph) - // - //
- // ); - - // const Features = () => ( - // - // {[ - // { - // content: 'TODO: Content 1', - // image: `${baseUrl}img/undraw_tweetstorm.svg`, - // imageAlign: 'top', - // title: 'TODO: Title 1', - // }, - // { - // content: 'TODO: Content 2', - // image: `${baseUrl}img/undraw_operating_system.svg`, - // imageAlign: 'top', - // title: 'TODO: Title 2', - // }, - // ]} - // - // ); - - return ( -
- -
- {/* - */} -
-
- ); - } -} - -module.exports = Index; diff --git a/website/sidebars.json b/website/sidebars.json deleted file mode 100755 index 9084741d1..000000000 --- a/website/sidebars.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "overview-sidebar": { - "Overview": [ - "overview/overview_index", - "overview/deep_dive" - ] - }, - "usecases-sidebar": { - "Use Cases": [ - "usecases/usecases_index" - ] - }, - "resources-sidebar": { - "Resources": [ - "resources/resources_index" - ] - }, - "about-sidebar": { - "About": [ - "about/about_index", - "about/about_contributing", - "about/about_coc" - ] - } -} \ No newline at end of file diff --git a/website/siteConfig.js b/website/siteConfig.js deleted file mode 100644 index adad03280..000000000 --- a/website/siteConfig.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// See https://docusaurus.io/docs/site-config for all the possible -// site configuration options. - -// List of projects/orgs using your project for the users page. -const users = [ - // { - // caption: 'User1', - // // You will need to prepend the image path with your baseUrl - // // if it is not '/', like: '/test-site/img/image.jpg'. - // image: '/img/undraw_open_source.svg', - // infoLink: 'https://www.facebook.com', - // pinned: true, - // }, -]; - -const siteConfig = { - title: 'ZIO SQL', - tagline: 'Type-safe, composable SQL for ZIO applications', - url: 'https://zio.github.io', - baseUrl: '/zio-sql/', - - projectName: 'zio-sql', - organizationName: 'zio', - - // For no header links in the top nav bar -> headerLinks: [], - headerLinks: [ - {doc: 'overview/overview_index', label: 'Overview'}, - {doc: 'usecases/usecases_index', label: 'Use Cases'}, - {doc: 'resources/resources_index', label: 'Resources'}, - {href: 'api/index.html', label: 'API'}, - {doc: 'about/about_index', label: 'About'} - ], - - // by default Docusaurus combines CSS files in a way that doesn't play nicely with Scaladoc - separateCss: ["api"], - - // If you have users set above, you add it here: - users, - - /* path to images for header/footer */ - headerIcon: 'img/navbar_brand2x.png', - footerIcon: 'img/sidebar_brand2x.png', - favicon: 'img/favicon.png', - - /* Colors for website */ - colors: { - primaryColor: '#000000', - secondaryColor: '#000000', - }, - - /* Custom fonts for website */ - /* - fonts: { - myFont: [ - "Times New Roman", - "Serif" - ], - myOtherFont: [ - "-apple-system", - "system-ui" - ] - }, - */ - - // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds. - copyright: `Copyright © ${new Date().getFullYear()} ZIO Maintainers`, - - highlight: { - // Highlight.js theme to use for syntax highlighting in code blocks. - theme: 'default', - }, - - // Add custom scripts here that would be placed in